+
    il                        a  R t0 t R t^ RIt^ RIt^ RIHtHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ]P"                  ! ]4      tRR	R
R.R]RR./t] ^ k RtR tR tR R ltR# )z<Snap: Install, configure and manage snapd and snap packages.N)subputil)Cloud)Config)
MetaSchema)PER_INSTANCE)prepend_base_commandidcc_snapdistrosubuntu	frequencyactivate_by_schema_keyssnapc                   V '       g   R# \         P                  R4       \        V \        4      '       d   V P	                  4       p M1\        V \
        4      '       g   \        RP                  V R7      4      h\        RV.pRP                  V 4      pV  F/  p\         P                  RVP                  R4      R,          4       K1  	  \        P                  ! WP                  R	4      4       \        P                  ! VR
R7       R# )a	  Import list of assertions.

Import assertions by concatenating each assertion into a
string separated by a '\n'.  Write this string to a instance file and
then invoke `snap ack /path/to/file` and check for errors.
If snap exits 0, then all assertions are imported.
Nz'Importing user-provided snap assertionsz8assertion parameter was not a list or dict: {assertions})
assertionsack
zSnap acking: %s:       Nzutf-8T)capture)LOGdebug
isinstancedictvalueslist	TypeErrorformatSNAP_CMDjoinsplitr   
write_fileencoder   )r   assertions_filesnap_cmdcombinedasrts   &&   :/usr/lib/python3/dist-packages/cloudinit/config/cc_snap.pyadd_assertionsr)      s     II78*d##&&(

D))FMM% N 
 	
 %1Hyy$H		#TZZ%5c%:;  	OOO__W%=>IIh%    c                   V '       g   R# \         P                  R4       \        V \        4      '       d.   \	        V P                  4       4       UUu. uF  w  rVNK	  	  p ppM1\        V \        4      '       g   \        RP                  V R7      4      h\        RV 4      p. pV F+  p\        V\        4      p \        P                  ! WVR7       K-  	  V'       d9   RP                  VR7      p\        P                  ! \         V4       \!        V4      hR# u uppi   \        P                   d&   pTP                  \        T4      4        Rp?K  Rp?ii ; i)	a4  Run the provided commands provided in snap:commands configuration.

Commands are run individually. Any errors are collected and reported
after attempting all commands.

@param commands: A list or dict containing commands to run. Keys of a
    dict will be used to order the commands provided as dict values.
Nz#Running user-provided snap commandsz5commands parameter was not a list or dict: {commands})commandsr   )shellz.Failures running snap commands:
{cmd_failures})cmd_failures)r   r   r   r   sorteditemsr   r   r   r   strr   ProcessExecutionErrorappendr   logexcRuntimeError)	r,   _vfixed_snap_commandsr.   commandr-   emsgs	   &        r(   run_commandsr<   ;   s&    II34(D!!"()9":;":$!A":;$''CJJ! K 
 	
 /vx@L&7C(	(IIg+ ' ?FF% G 
 	C3 # < )) 	(A''	(s   D8DE0EEc          
      L    V ^8  d   QhR\         R\        R\        R\        RR/# )r   namecfgcloudargsreturnN)r1   r   r   r   )r   s   "r(   __annotate__rC   b   s/     , , ,6 ,% ,t , ,r*   c                 p   VP                  R / 4      pV'       g   \        P                  RV 4       R# \        P                  ! V4       \        VP                  R. 4      \        P                  P                  VP                  P                  4       R4      4       \        VP                  R. 4      4       R# )r   z8Skipping module named %s, no 'snap' key in configurationNr   zsnapd.assertionsr,   )getr   r   r   wait_for_snap_seededr)   ospathr    pathsget_ipath_curr<   )r>   r?   r@   rA   cfgins   &&&& r(   handlerL   b   s    GGFBE		F	
 	e$		,#
U[[..02DE :r*+r*   c                @    V ^8  d   Qh/ ^ \         9   d
   \        ;R&   # )r   meta)__conditional_annotations__r   )r   s   "r(   rC   rC      s     B B j  Cr*   )rO   __doc__loggingrG   	cloudinitr   r   cloudinit.cloudr   cloudinit.configr   cloudinit.config.schemar   cloudinit.settingsr   cloudinit.subpr   	getLogger__name__r   rN   r   r)   r<   rL   rC   )rO   s   @r(   <module>rZ      sq   
 C  	   ! # . + /! 	)zx	  &<$ N,r*   