本文整理汇总了Python中kiwi.defaults.Defaults.get_s390_disk_type方法的典型用法代码示例。如果您正苦于以下问题:Python Defaults.get_s390_disk_type方法的具体用法?Python Defaults.get_s390_disk_type怎么用?Python Defaults.get_s390_disk_type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kiwi.defaults.Defaults
的用法示例。
在下文中一共展示了Defaults.get_s390_disk_type方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: post_init
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_s390_disk_type [as 别名]
def post_init(self, custom_args):
"""
zipl post initialization method
:param dict custom_args:
Contains zipl config arguments
.. code:: python
{'targetbase': 'device_name'}
"""
self.custom_args = custom_args
arch = platform.machine()
if 's390' in arch:
self.arch = arch
else:
raise KiwiBootLoaderZiplPlatformError(
'host architecture %s not supported for zipl setup' % arch
)
if not custom_args or 'targetbase' not in custom_args:
raise KiwiBootLoaderZiplSetupError(
'targetbase device name is required for zipl setup'
)
self.bootpath = '.'
self.timeout = self.get_boot_timeout_seconds()
self.cmdline = self.get_boot_cmdline()
self.cmdline_failsafe = ' '.join(
[self.cmdline, Defaults.get_failsafe_kernel_options()]
)
self.target_blocksize = self.xml_state.build_type.get_target_blocksize()
if not self.target_blocksize:
self.target_blocksize = Defaults.get_s390_disk_block_size()
self.target_type = self.xml_state.build_type.get_zipl_targettype()
if not self.target_type:
self.target_type = Defaults.get_s390_disk_type()
self.failsafe_boot = self.failsafe_boot_entry_requested()
self.target_device = custom_args['targetbase']
self.firmware = FirmWare(self.xml_state)
self.target_table_type = self.firmware.get_partition_table_type()
self.zipl = BootLoaderTemplateZipl()
self.config = None