本文整理汇总了Python中dockertest.containers.DockerContainers.clean_all方法的典型用法代码示例。如果您正苦于以下问题:Python DockerContainers.clean_all方法的具体用法?Python DockerContainers.clean_all怎么用?Python DockerContainers.clean_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dockertest.containers.DockerContainers
的用法示例。
在下文中一共展示了DockerContainers.clean_all方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
"""
Cleanup the containers defined in self.sub_stuff['containers']
"""
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get("containers"))
示例2: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers 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"))
示例3: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
"""
Cleanup the container
"""
super(run_user, self).cleanup()
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all([self.stuff.get("container")])
示例4: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(commit_base, self).cleanup()
if self.config["remove_after_test"]:
dc = DockerContainers(self)
container = self.sub_stuff.get("container")
if container:
dc.clean_all([container])
di = di = DockerImages(self)
images = [img.full_name for img in self.sub_stuff.get("image_list", [])]
di.clean_all(images)
示例5: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers 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)
示例6: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers 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"))
示例7: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(selinux_base, self).cleanup()
for fd in self.sub_stuff.get('fds', []):
try:
os.close(fd)
except OSError:
pass # closing was the goal
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get("containers", []))
for name in self.sub_stuff['volumes']:
if os.path.exists(name):
shutil.rmtree(name)
示例8: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(run_env_base, self).cleanup()
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get("containers", []))
示例9: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(sigproxy_base, self).cleanup()
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all([self.sub_stuff.get("container_name")])
示例10: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(inspect_base, self).cleanup()
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get('containers'))
示例11: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
if self.config["remove_after_test"]:
dc = DockerContainers(self)
dc.clean_all([self.sub_stuff.get("cntr_name")])
示例12: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(rm_sub_base, self).cleanup()
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all([self.sub_stuff.get('cntr_name')])
示例13: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(volumes_one_source, self).cleanup()
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get("names"))
示例14: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(basic, self).cleanup()
if self.config['remove_after_test']:
self._cleanup_cidfiles()
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get('containers', []))
示例15: cleanup
# 需要导入模块: from dockertest.containers import DockerContainers [as 别名]
# 或者: from dockertest.containers.DockerContainers import clean_all [as 别名]
def cleanup(self):
super(invalid_base, self).cleanup()
if self.config['remove_after_test']:
dc = DockerContainers(self)
dc.clean_all(self.sub_stuff.get("container_names"))