当前位置: 首页>>代码示例>>Python>>正文


Python DockerContainers.clean_all方法代码示例

本文整理汇总了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"))
开发者ID:chuanchang,项目名称:autotest-docker,代码行数:9,代码来源:ps_size.py

示例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"))
开发者ID:cevich,项目名称:autotest-docker,代码行数:9,代码来源:run.py

示例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")])
开发者ID:chuanchang,项目名称:autotest-docker,代码行数:10,代码来源:run_user.py

示例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)
开发者ID:afomm,项目名称:autotest-docker,代码行数:12,代码来源:commit.py

示例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)
开发者ID:cevich,项目名称:autotest-docker,代码行数:13,代码来源:rmi.py

示例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"))
开发者ID:cevich,项目名称:autotest-docker,代码行数:14,代码来源:run_exec.py

示例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)
开发者ID:edsantiago,项目名称:autotest-docker,代码行数:15,代码来源:run_volumes_selinux.py

示例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", []))
开发者ID:chuanchang,项目名称:autotest-docker,代码行数:7,代码来源:run_env.py

示例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")])
开发者ID:cevich,项目名称:autotest-docker,代码行数:7,代码来源:run_sigproxy.py

示例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'))
开发者ID:chuanchang,项目名称:autotest-docker,代码行数:7,代码来源:dockerinspect.py

示例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")])
开发者ID:lsm5,项目名称:autotest-docker,代码行数:6,代码来源:rm.py

示例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')])
开发者ID:cevich,项目名称:autotest-docker,代码行数:7,代码来源:rm.py

示例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"))
开发者ID:cevich,项目名称:autotest-docker,代码行数:7,代码来源:volumes_one_source.py

示例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', []))
开发者ID:cevich,项目名称:autotest-docker,代码行数:8,代码来源:run_cidfile.py

示例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"))
开发者ID:chuanchang,项目名称:autotest-docker,代码行数:7,代码来源:invalid.py


注:本文中的dockertest.containers.DockerContainers.clean_all方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。