Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.4
open-ovf
xenpv-libvirtxml.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xenpv-libvirtxml.patch of Package open-ovf
Index: open-ovf-0.1/py/ovf/OvfLibvirt.py =================================================================== --- open-ovf-0.1.orig/py/ovf/OvfLibvirt.py +++ open-ovf-0.1/py/ovf/OvfLibvirt.py @@ -1135,20 +1135,22 @@ def getOvfDisks(virtualHardware, dir, re raise ValueError(hostResource) #target bus - parentId = int(ovfDisk['rasd:Parent']) - for presource in rasd: - if presource['name'] == 'Item': - instId = int(presource['rasd:InstanceID']) - if instId == parentId: - parentType = presource['rasd:ResourceType'] - break - - if(parentType == '5'): - bus = 'ide' - elif(parentType == '6'): - bus = 'scsi' - else: - raise ValueError + bus = None + if ovfDisk.has_key('rasd:Parent'): + parentId = int(ovfDisk['rasd:Parent']) + for presource in rasd: + if presource['name'] == 'Item': + instId = int(presource['rasd:InstanceID']) + if instId == parentId: + parentType = presource['rasd:ResourceType'] + break + + if(parentType == '5'): + bus = 'ide' + elif(parentType == '6'): + bus = 'scsi' + else: + raise ValueError #default not read-only ro = False @@ -1157,15 +1159,18 @@ def getOvfDisks(virtualHardware, dir, re if(device == 'cdrom'): ro = True dev = 'hdc' + if ovfDisk.has_key('rasd:Address'): + dev = ovfDisk['rasd:Address'] else: dev = logicalNames.pop(0) libvirtDisk = dict(diskType='file', diskDevice=device, sourceFile=source, - targetBus=bus, targetDev=dev, readonly=ro) + if bus: + libvirtDisk['targetBus'] = bus disks += (libvirtDisk,)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor