本文整理汇总了Python中kiwi.defaults.Defaults.get_disk_image_types方法的典型用法代码示例。如果您正苦于以下问题:Python Defaults.get_disk_image_types方法的具体用法?Python Defaults.get_disk_image_types怎么用?Python Defaults.get_disk_image_types使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kiwi.defaults.Defaults
的用法示例。
在下文中一共展示了Defaults.get_disk_image_types方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __new__
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_disk_image_types [as 别名]
def __new__(self, xml_state, target_dir, root_dir, custom_args=None):
requested_image_type = xml_state.get_build_type_name()
if requested_image_type in Defaults.get_filesystem_image_types():
return FileSystemBuilder(
xml_state, target_dir, root_dir
)
elif requested_image_type in Defaults.get_disk_image_types():
return DiskBuilder(
xml_state, target_dir, root_dir, custom_args
)
elif requested_image_type in Defaults.get_live_image_types():
return LiveImageBuilder(
xml_state, target_dir, root_dir, custom_args
)
elif requested_image_type in Defaults.get_network_image_types():
return PxeBuilder(
xml_state, target_dir, root_dir, custom_args
)
elif requested_image_type in Defaults.get_archive_image_types():
return ArchiveBuilder(
xml_state, target_dir, root_dir, custom_args
)
elif requested_image_type in Defaults.get_container_image_types():
return ContainerBuilder(
xml_state, target_dir, root_dir, custom_args
)
else:
raise KiwiRequestedTypeError(
'requested image type %s not supported' % requested_image_type
)