+
    Û1jê  ã                   óH   € ^ RI t ^ RIHt ^ RIHt ^ RIHt  ! R R]4      tR# )é    N)Úquote)ÚContainerRuntime)Úsos_get_command_outputc                   óL   a € ] tR t^t o RtRtRtR tR
R ltR t	RR lt
R	tV tR# )ÚCrioContainerRuntimez-Runtime class to use for systems running crioÚcrioÚcrictlc                ó   € R # ©F© )Úselfs   &Ú</usr/lib/python3/dist-packages/sos/policies/runtimes/crio.pyÚcheck_can_copyÚ#CrioContainerRuntime.check_can_copy   s   € Ùó    c                ól  € . pV P                    RV'       d   RMR R2pV P                  '       d„   \        W0P                  P                  R7      pVR,          ^ 8X  dV   \
        P                  ! VR,          4      pVR,           F+  pVP                  VR	,          VR
,          R,          34       K-  	  V# )z„Get a list of containers present on the system.

:param get_all: If set, include stopped containers as well
:type get_all: ``bool``
z ps z-aÚ z -o json©ÚchrootÚstatusÚoutputÚ
containersÚidÚmetadataÚname)ÚbinaryÚactiver   ÚpolicyÚsysrootÚjsonÚloadsÚappend)r   Úget_allr   Ú_cmdÚoutÚout_jsonÚ	containers   &&     r   Úget_containersÚ#CrioContainerRuntime.get_containers   sž   € ð ˆ
Ø—+‘+�˜d¯7¡4¸Ð";¸8ÐDˆØ�;�;ˆ;Ü(¨·k±k×6IÑ6IÔJˆCØ�8�} Ô!ÜŸ:š: c¨(¥mÓ4�Ø!)¨,×!7Ð!7�Ià×%Ñ%Ø" 4�¨)°JÕ*?ÀÕ*GÐHöJñ "8ð Ðr   c                óH  € . pV P                   '       Ed   \        V P                   R2V P                  P                  R7      pVR,          ^ 8X  dÑ   \
        P                  ! VR,          4      pVR,           F¦  p\        VR,          4      ^ 8”  d,   VR,           F  pVP                  WTR,          34       K  	  KE  \        VR,          4      ^ 8X  d   R	pM&VR,          ^ ,          P                  R
4      ^ ,          pVP                  VR,           VR,          34       K¨  	  V# )z|Get a list of images present on the system

:returns: A list of 2-tuples containing (image_name, image_id)
:rtype: ``list``
z images -o jsonr   r   r   ÚimagesÚrepoTagsr   ÚrepoDigestsz<none>Ú@z:<none>)
r   r   r   r   r   r    r!   Úlenr"   Úsplit)r   r+   r%   r&   ÚimageÚrepo_tagÚ
image_names   &      r   Ú
get_imagesÚCrioContainerRuntime.get_images,   s÷   € ð ˆØ�;�;‰;Ü(¨D¯K©K¨=¸Ð)HØ04·±×0CÑ0CôEˆCà�8�} Ô!ÜŸ:š: c¨(¥mÓ4�Ø% h×/Ð/�Eä˜5 Õ,Ó-°Ô1Ø(-¨j×(9Ð(9˜HØ"ŸM™M¨8¸4µ[Ð*AÖBó ):ô ˜u ]Õ3Ó4¸Ô9Ø)1™Jà).¨}Õ)=¸aÕ)@×)FÑ)FÀsÓ)KÈAÕ)N˜JØŸ™ z°IÕ'=¸uÀT½{Ð&KÖLñ 0ð ˆr   Nc                óê   € V'       d   \        V4      pMTpV P                  V4      pV'       d'   RP                  R VP                  4        4       4      MRpVe   V P                   RV RV RV 2# R# )ax  Format a command to run inside a container using the runtime

:param container: The name or ID of the container in which to run
:type container: ``str``

:param cmd: The command to run inside `container`
:type cmd: ``str``

:param quotecmd: Whether the cmd should be quoted.
:type quotecmd: ``bool``

:returns: Formatted string to run `cmd` inside `container`
:rtype: ``str``
Ú c              3   ó6   "  € T F  w  rR V RV 2x € K  	  R# 5i)z-e Ú=Nr   )Ú.0ÚkÚvs   &  r   Ú	<genexpr>Ú9CrioContainerRuntime.fmt_container_cmd.<locals>.<genexpr>Y   s   é € ÐC±{©t¨q˜s 1 # Q q c�]³{ùs   ‚r   )r   Úget_container_by_nameÚjoinÚitemsÚrun_cmd)r   r'   ÚcmdÚquotecmdÚenvÚ
quoted_cmdÚcontainer_idÚenv_argss   &&&&&   r   Úfmt_container_cmdÚ&CrioContainerRuntime.fmt_container_cmdE   s   € ÷ Ü˜s›‰JàˆJØ×1Ñ1°)Ó<ˆçð —H‘HÑC°s·y±y´{ÓCÔCØ "ð 	ð  Ò+ð —<‘<�.  ( ¨1¨\¨N¸!¸J¸<ÐHð 	5Ø13ð	5r   r   r   )N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r   r(   r4   rI   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s+   ø‡ € Ù7à€DØ€Fòôò$÷25ò 5r   r   )r    Úshlexr   Úsos.policies.runtimesr   Úsos.utilitiesr   r   r   r   r   Ú<module>rV      s"   ðó å Ý 2Ý 0ôK5Ð+ö K5r   