本文整理汇总了Python中virttest.libvirt_xml.devices.disk.Disk.boot方法的典型用法代码示例。如果您正苦于以下问题:Python Disk.boot方法的具体用法?Python Disk.boot怎么用?Python Disk.boot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类virttest.libvirt_xml.devices.disk.Disk
的用法示例。
在下文中一共展示了Disk.boot方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: from virttest.libvirt_xml.devices.disk import Disk [as 别名]
# 或者: from virttest.libvirt_xml.devices.disk.Disk import boot [as 别名]
if device_with_source:
if device_types[i] == "file":
dev_attrs = "file"
elif device_types[i] == "dir":
dev_attrs = "dir"
else:
dev_attrs = "dev"
source_dict = {dev_attrs: disk_source}
if len(startup_policy) > i:
source_dict.update({"startupPolicy": startup_policy[i]})
disk_xml.source = disk_xml.new_disk_source(
**{"attrs": source_dict})
if len(device_bootorder) > i:
disk_xml.boot = device_bootorder[i]
if test_block_size:
disk_xml.blockio = {"logical_block_size": logical_block_size,
"physical_block_size": physical_block_size}
if wwn != "":
disk_xml.wwn = wwn
if serial != "":
disk_xml.serial = serial
if vendor != "":
disk_xml.vendor = vendor
if product != "":
disk_xml.product = product
disk_xml.target = {"dev": device_targets[i], "bus": device_bus[i]}