本文整理汇总了Python中dockertest.images.DockerImages.list_imgs_full_name方法的典型用法代码示例。如果您正苦于以下问题:Python DockerImages.list_imgs_full_name方法的具体用法?Python DockerImages.list_imgs_full_name怎么用?Python DockerImages.list_imgs_full_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dockertest.images.DockerImages
的用法示例。
在下文中一共展示了DockerImages.list_imgs_full_name方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: run_once
# 需要导入模块: from dockertest.images import DockerImages [as 别名]
# 或者: from dockertest.images.DockerImages import list_imgs_full_name [as 别名]
def run_once(self):
fqin = self.sub_stuff['fqin']
self.sub_stuff["images"].append(fqin)
di = DockerImages(self.parent_subtest)
try:
images = di.list_imgs_with_full_name(fqin)
for i in images:
di.remove_image_by_id(i.long_id)
except error.CmdError:
pass # removal was the goal
images = di.list_imgs_with_full_name(fqin)
if images != []:
error.TestNAError("Unable to prepare env for test:"
" image %s already/still"
" exist in docker repository", fqin)
self.logdebug("Existing images: %s", di.list_imgs_full_name())
self.loginfo("Executing test commands")
self.run_command('run', self.sub_stuff['subargs'],
'cmdresult_run1')
self.run_command('rm', [self.sub_stuff["rand_name"]],
'cmdresult_rm')
self.run_command('tag',
[fqin, self.sub_stuff["rand_name"].lower()],
'cmdresult_tag')
self.run_command('rmi',
[fqin],
'cmdresult_rmi')
self.run_command('run', self.sub_stuff['subargs'],
'cmdresult_run2')
self.run_command('rm', [self.sub_stuff["rand_name"]],
'cmdresult_rm2')
self.run_command('rmi',
[self.sub_stuff["rand_name"].lower()],
'cmdresult_rmi2')
示例2: run_once
# 需要导入模块: from dockertest.images import DockerImages [as 别名]
# 或者: from dockertest.images.DockerImages import list_imgs_full_name [as 别名]
def run_once(self):
super(images, self).run_once()
# 1. Run with no options
d = DockerImages(self)
self.loginfo("Images names: %s", d.list_imgs_full_name())
示例3: run_once
# 需要导入模块: from dockertest.images import DockerImages [as 别名]
# 或者: from dockertest.images.DockerImages import list_imgs_full_name [as 别名]
def run_once(self):
super(images, self).run_once()
# 1. Run with no options
d = DockerImages(self)
logging.info(d.list_imgs_full_name())