本文整理汇总了Python中kiwi.defaults.Defaults.get_default_boot_mbytes方法的典型用法代码示例。如果您正苦于以下问题:Python Defaults.get_default_boot_mbytes方法的具体用法?Python Defaults.get_default_boot_mbytes怎么用?Python Defaults.get_default_boot_mbytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kiwi.defaults.Defaults
的用法示例。
在下文中一共展示了Defaults.get_default_boot_mbytes方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_disksize_mbytes_with_spare_partition
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def test_get_disksize_mbytes_with_spare_partition(self):
configured_spare_part_size = 42
assert self.setup_arm.get_disksize_mbytes() == \
configured_spare_part_size + \
Defaults.get_default_efi_boot_mbytes() + \
Defaults.get_default_boot_mbytes() + \
self.size.accumulate_mbyte_file_sizes.return_value
示例2: test_get_disksize_mbytes_empty_volumes
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def test_get_disksize_mbytes_empty_volumes(self):
assert self.setup_empty_volumes.get_disksize_mbytes() == \
Defaults.get_lvm_overhead_mbytes() + \
Defaults.get_default_legacy_bios_mbytes() + \
Defaults.get_default_efi_boot_mbytes() + \
Defaults.get_default_boot_mbytes() + \
self.size.accumulate_mbyte_file_sizes.return_value
示例3: test_get_disksize_mbytes_root_volume
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def test_get_disksize_mbytes_root_volume(self, mock_log_warn, mock_exists):
mock_exists.return_value = True
root_size = self.size.accumulate_mbyte_file_sizes.return_value
assert self.setup_root_volume.get_disksize_mbytes() == \
Defaults.get_default_legacy_bios_mbytes() + \
Defaults.get_default_efi_boot_mbytes() + \
Defaults.get_default_boot_mbytes() + \
root_size
assert mock_log_warn.called
示例4: test_get_disksize_mbytes_oem_volumes
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def test_get_disksize_mbytes_oem_volumes(self, mock_exists):
mock_exists.return_value = True
root_size = self.size.accumulate_mbyte_file_sizes.return_value
assert self.setup_oem_volumes.get_disksize_mbytes() == \
Defaults.get_lvm_overhead_mbytes() + \
Defaults.get_default_legacy_bios_mbytes() + \
Defaults.get_default_efi_boot_mbytes() + \
Defaults.get_default_boot_mbytes() + \
root_size + \
5 * Defaults.get_min_volume_mbytes()
示例5: test_get_disksize_mbytes_configured_additive
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def test_get_disksize_mbytes_configured_additive(self):
self.setup.configured_size = mock.Mock()
self.setup.build_type_name = 'vmx'
self.setup.configured_size.additive = True
self.setup.configured_size.mbytes = 42
root_size = self.size.accumulate_mbyte_file_sizes.return_value
assert self.setup.get_disksize_mbytes() == \
Defaults.get_default_legacy_bios_mbytes() + \
Defaults.get_default_efi_boot_mbytes() + \
Defaults.get_default_boot_mbytes() + \
root_size + 42 + \
200 * 1.7
示例6: boot_partition_size
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def boot_partition_size(self):
"""
Size of the boot partition in mbytes
:return: boot size mbytes
:rtype: int
"""
if self.need_boot_partition():
if self.bootpart_mbytes:
return self.bootpart_mbytes
else:
return Defaults.get_default_boot_mbytes()
示例7: test_get_disksize_mbytes_volumes
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def test_get_disksize_mbytes_volumes(self, mock_log_warn, mock_exists):
mock_exists.return_value = True
root_size = self.size.accumulate_mbyte_file_sizes.return_value
assert self.setup_volumes.get_disksize_mbytes() == \
Defaults.get_lvm_overhead_mbytes() + \
Defaults.get_default_legacy_bios_mbytes() + \
Defaults.get_default_efi_boot_mbytes() + \
Defaults.get_default_boot_mbytes() + \
root_size + \
1024 - root_size + \
500 + Defaults.get_min_volume_mbytes() + \
30 + Defaults.get_min_volume_mbytes() + \
Defaults.get_min_volume_mbytes()
assert mock_log_warn.called
示例8: test_get_disksize_mbytes_with_ppc_prep_partition
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def test_get_disksize_mbytes_with_ppc_prep_partition(self):
assert self.setup_ppc.get_disksize_mbytes() == \
Defaults.get_default_boot_mbytes() + \
Defaults.get_default_prep_mbytes() + \
self.size.accumulate_mbyte_file_sizes.return_value
示例9: test_boot_partition_size
# 需要导入模块: from kiwi.defaults import Defaults [as 别名]
# 或者: from kiwi.defaults.Defaults import get_default_boot_mbytes [as 别名]
def test_boot_partition_size(self):
self.setup.bootpart_requested = True
assert self.setup.boot_partition_size() == \
Defaults.get_default_boot_mbytes()
self.setup.bootpart_mbytes = 42
assert self.setup.boot_partition_size() == 42