o id @s@ddlZddlmZddlmZddlmZGdddeZdS)N)ContainerRuntime)sos_get_command_output)quotec@s:eZdZdZdZdZddZdddZd d Zd d Z d S)CrioContainerRuntimez-Runtime class to use for systems running criocriocrictlcCsdS)NF)selfrr@z:) rrrrrrrlenrsplit)r r"rrimagerepo_tag image_namerrr get_images,s"    zCrioContainerRuntime.get_imagescCs8|rt|}n|}||}|durd|j||fSdS)aFormat 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`` Nz%s %s %sr )rget_container_by_namerun_cmd)r r cmdquotecmd quoted_cmd container_idrrr fmt_container_cmdEs  z&CrioContainerRuntime.fmt_container_cmdN)F) __name__ __module__ __qualname____doc__rrr r!r+r2rrrr rs  r)rsos.policies.runtimesr sos.utilitiesrpipesrrrrrr s