本文整理汇总了Python中dockertest.images.DockerImages.clean_all方法的典型用法代码示例。如果您正苦于以下问题:Python DockerImages.clean_all方法的具体用法?Python DockerImages.clean_all怎么用?Python DockerImages.clean_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dockertest.images.DockerImages
的用法示例。
在下文中一共展示了DockerImages.clean_all方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cleanup
# 需要导入模块: from dockertest.images import DockerImages [as 别名]
# 或者: from dockertest.images.DockerImages import clean_all [as 别名]
def cleanup(self):
super(run_base, self).cleanup()
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get("containers"))
di = DockerImages(self)
di.clean_all(self.sub_stuff.get("images"))
示例2: cleanup
# 需要导入模块: from dockertest.images import DockerImages [as 别名]
# 或者: from dockertest.images.DockerImages import clean_all [as 别名]
def cleanup(self):
super(rmi_base, self).cleanup()
di = DockerImages(self)
# Auto-converts "yes/no" to a boolean
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get("containers"))
di = DockerImages(self)
imgs = [img.full_name
for img in self.sub_stuff.get("image_list", [])]
di.clean_all(imgs)
示例3: cleanup
# 需要导入模块: from dockertest.images import DockerImages [as 别名]
# 或者: from dockertest.images.DockerImages import clean_all [as 别名]
def cleanup(self):
super(exec_base, self).cleanup()
for ifd in self.sub_stuff['fds']:
try:
os.close(ifd)
except OSError:
pass
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get("containers"))
di = DockerImages(self)
di.clean_all(self.sub_stuff.get("images"))
示例4: cleanup
# 需要导入模块: from dockertest.images import DockerImages [as 别名]
# 或者: from dockertest.images.DockerImages import clean_all [as 别名]
def cleanup(self):
super(empty, self).cleanup()
if self.parent_subtest.config["remove_after_test"]:
di = DockerImages(self)
image = self.sub_stuff["image_name_tag"]
di.clean_all([image])