本文整理汇总了Python中atomic_reactor.core.DockerTasker.get_image_info_by_image_id方法的典型用法代码示例。如果您正苦于以下问题:Python DockerTasker.get_image_info_by_image_id方法的具体用法?Python DockerTasker.get_image_info_by_image_id怎么用?Python DockerTasker.get_image_info_by_image_id使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类atomic_reactor.core.DockerTasker
的用法示例。
在下文中一共展示了DockerTasker.get_image_info_by_image_id方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_image_info_by_id_nonexistent
# 需要导入模块: from atomic_reactor.core import DockerTasker [as 别名]
# 或者: from atomic_reactor.core.DockerTasker import get_image_info_by_image_id [as 别名]
def test_get_image_info_by_id_nonexistent():
if MOCK:
mock_docker()
t = DockerTasker()
response = t.get_image_info_by_image_id("asd")
assert response is None
示例2: test_get_image_info_by_id
# 需要导入模块: from atomic_reactor.core import DockerTasker [as 别名]
# 或者: from atomic_reactor.core.DockerTasker import get_image_info_by_image_id [as 别名]
def test_get_image_info_by_id():
if MOCK:
mock_docker(provided_image_repotags=input_image_name.to_str())
t = DockerTasker()
image_id = t.get_image_info_by_image_name(input_image_name)[0]['Id']
response = t.get_image_info_by_image_id(image_id)
assert isinstance(response, dict)