+
    Û1j  ã                   óH   € ^ RI t ^ RIHt ^ RIHt ^ RIHt  ! R R]4      tR# )é    N)ÚJujuNotInstalledException)ÚRemoteTransport)Úsos_get_command_outputc                   ót   a € ] tR t^t o RtRtRtR tR tRR lt	R t
]R 4       t]R	 4       tR
 tR tRtV tR# )ÚJujuSSHaà  
A "transport" that leverages `juju ssh` to perform commands on the remote
hosts.

This transport is expected to be used in juju managed environment, and the
user should have the necessary credential for accessing the controller.
When using this transport, the --nodes option will be expected to be a
comma separated machine IDs, **not** IP addr, since `juju ssh` identifies
the ssh target by machine ID.

Examples:

sos collect --nodes 0,1,2 --no-local --transport juju --batch

Újuju_sshÚubuntuc                óÄ   € R p \         P                  ! V\         P                  RR7       R#   \         P                   d   pT P	                  R4       \
        ThRp?ii ; i)zjuju versionT©ÚstderrÚshellzFailed to check `juju` versionN)Ú
subprocessÚcheck_outputÚSTDOUTÚCalledProcessErrorÚ	log_errorr   )ÚselfÚcmdÚerrs   &  Ú?/usr/lib/python3/dist-packages/sos/collector/transports/juju.pyÚ_check_juju_installedÚJujuSSH._check_juju_installed'   sV   € Øˆð	5Ü×#Ò# C´
×0AÑ0AÈÕNñ øô ×,Ñ,ô 	5Ø�N‰NÐ;Ô<Ü+°Ð4ûð	5ús   „'- ­AÁAÁAc                óÖ   € V P                    R V 2p \        P                  ! V\        P                  RR7       R#   \        P                   d    T P                  RT R24       h i ; i)z sudo chmod o+r Tr   zFailed to make z world-readable)Úremote_execr   r   r   r   r   )r   Úfnamer   s   && r   Ú_chmodÚJujuSSH._chmod0   sk   € Ø×!Ñ!Ð"Ð"2°5°'Ð:ˆð	Ü×#Ò# C´
×0AÑ0AÈÕNñ øô ×,Ñ,ô 	Ø�N‰N˜_¨U¨G°?ÐCÔDØð	ús	   “'< ¼,A(c                óD   € V P                  4       V n        V P                  # ©N)r   Ú
_connected)r   Úpasswords   &&r   Ú_connectÚJujuSSH._connect9   s   € Ø×4Ñ4Ó6ˆŒØ�‰Ðó    c                ó   € R # )T© ©r   s   &r   Ú_disconnectÚJujuSSH._disconnect=   s   € Ùr$   c                ó   € V P                   # r   ©r    r'   s   &r   Ú	connectedÚJujuSSH.connected@   s   € à�‰Ðr$   c                ór   € V P                   P                  R 4      w  rV'       d   RV 2MRpV RV 2pRV 2# )Ú:ú-m Ú Ú z	juju ssh )ÚaddressÚsplit)r   ÚmodelÚtarget_optionÚmodel_optionÚoptions   &    r   r   ÚJujuSSH.remote_execD   sE   € à#Ÿ|™|×1Ñ1°#Ó6Ñˆß(-˜˜U˜G‘}°2ˆØ �>  = /Ð2ˆØ˜6˜(Ð#Ð#r$   c                ó¨   € V P                   P                  R 4      w  r4V'       d   RV 2MRpRV RV RV R V 2p\        V^R7      pVR,          ^ 8H  # )r/   r0   r1   ú	juju scp z -- r2   )ÚtimeoutÚstatus)r3   r4   r   ©r   r   Údestr5   Úunitr7   r   Úress   &&&     r   Ú_copy_file_to_remoteÚJujuSSH._copy_file_to_remoteK   s`   € Ø—l‘l×(Ñ(¨Ó-‰ˆß(-˜˜U˜G‘}°2ˆØ˜,˜ t¨E¨7°!°D°6¸¸4¸&ÐAˆÜ$ S°"Ô5ˆØ�8�} Ñ!Ð!r$   c                óÆ   € V P                  V4       V P                  P                  R 4      w  r4V'       d   RV 2MRpRV RV R V RV 2p\        V4      pVR,          ^ 8H  # )r/   r0   r1   r;   z -- -r r2   r=   )r   r3   r4   r   r>   s   &&&     r   Ú_retrieve_fileÚJujuSSH._retrieve_fileR   sj   € Ø�‰�EÔØ—l‘l×(Ñ(¨Ó-‰ˆß(-˜˜U˜G‘}°2ˆØ˜,˜ w¨t¨f°A°e°W¸A¸d¸VÐDˆÜ$ SÓ)ˆØ�8�} Ñ!Ð!r$   r+   N)r1   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚnameÚdefault_userr   r   r"   r(   Úpropertyr,   r   rB   rE   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      sa   ø‡ € ñð  €DØ€Lòòôòð ñó ðð ñ$ó ð$ò"÷"ð "r$   r   )r   Úsos.collector.exceptionsr   Úsos.collector.transportsr   Úsos.utilitiesr   r   r&   r$   r   Ú<module>rU      s!   ðó å >Ý 4Ý 0ôE"ˆoö E"r$   