+
    ˜qgjl  ã                   óÒ   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Ë   € ÷ ÙÜ‡I�IÐ7Ô8Ü�*œd×#Ò#Ø×&Ñ&Ó(‰
Ü˜
¤D×)Ò)ÜØF×MÑMØ%ð Nó ó
ð 	
ô ˜% Ð1€HØ�y‰y˜Ó$€HãˆÜ�	‰	Ð# T§Z¡Z°Ó%5°cÕ%:Ö;ñ ô 	‡O‚O�O§_¡_°WÓ%=Ô>Ü‡I‚Iˆh ×%ó    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&  € ÷ ÙÜ‡I�IÐ3Ô4Ü�(œD×!Ò!ä"(¨¯©Ó)9Ô":Ô;Ñ":™$˜!“AÑ":ˆÑ;ˆÜ˜¤$×'Ò'ÜØC×JÑJØ!ð Kó ó
ð 	
ô /¨v°xÓ@Ðà€LÛ&ˆÜ˜7¤CÓ(ˆð	(Ü�IŠI�g×+ñ '÷ Ø?×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„   € Ø�G‰G�F˜BÓ€EßÜ�	‰	ØFÈô	
ñ 	Ü×Ò˜eÔ$ÜØ�	‰	�, Ó#Ü
�‰�‰�U—[‘[×.Ñ.Ó0Ð2DÓ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*   