本文整理汇总了Python中virttest.libvirt_xml.devices.disk.Disk.vendor方法的典型用法代码示例。如果您正苦于以下问题:Python Disk.vendor方法的具体用法?Python Disk.vendor怎么用?Python Disk.vendor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类virttest.libvirt_xml.devices.disk.Disk
的用法示例。
在下文中一共展示了Disk.vendor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: from virttest.libvirt_xml.devices.disk import Disk [as 别名]
# 或者: from virttest.libvirt_xml.devices.disk.Disk import vendor [as 别名]
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]}
if len(device_readonly) > i:
disk_xml.readonly = "yes" == device_readonly[i]
# Add driver options from parameters
driver_dict = {"name": "qemu"}
if len(driver_options) > i:
for driver_option in driver_options[i].split(','):
if driver_option != "":
d = driver_option.split('=')
driver_dict.update({d[0].strip(): d[1].strip()})
disk_xml.driver = driver_dict