Change in vdsm[master]: v2v: get VM information from OVA file

shavivi at redhat.com shavivi at redhat.com
Thu Aug 6 08:46:06 UTC 2015


Shahar Havivi has posted comments on this change.

Change subject: v2v: get VM information from OVA file
......................................................................


Patch Set 6:

(3 comments)

testing patch: https://gerrit.ovirt.org/#/c/44471/

https://gerrit.ovirt.org/#/c/43271/6//COMMIT_MSG
Commit Message:

Line 8: 
Line 9: In order to import a VM that exists in an OVA file the oVirt engine
Line 10: needs to get information regarding the VM, such as disks sizes,
Line 11: interfaces memory etc.
Line 12: Adding a new verb: getOvfInfo
> this needs to be updated to reflect the renamed verb.
Done
Line 13: 
Line 14: Change-Id: I3c55c846f837bb5bf363717e05daabf5ee6631ca


https://gerrit.ovirt.org/#/c/43271/6/vdsm/v2v.py
File vdsm/v2v.py:

Line 50: 
Line 51: _V2V_DIR = os.path.join(P_VDSM_RUN, 'v2v')
Line 52: _VIRT_V2V = CommandPath('virt-v2v', '/usr/bin/virt-v2v')
Line 53: 
Line 54: # ovf sepcification:
> typo: specification
Done
Line 55: # https://www.iso.org/obp/ui/#iso:std:iso-iec:17203:ed-1:v1:en
Line 56: _OVF_NS = 'http://schemas.dmtf.org/ovf/envelope/1'
Line 57: _RASD_NS = 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/' \
Line 58:            'CIM_ResourceAllocationSettingData'


Line 702: 
Line 703:     memSize = node.find('.//ovf:Item[rasd:ResourceType="4"]/'
Line 704:                         'rasd:VirtualQuantity', ns)
Line 705:     if memSize is not None:
Line 706:         vm['memSize'] = int(memSize.text)
> this can raise ValueError. Is it OK if this bubbles up?
Yes, this is not suppose to happened since its part of the specification that if there is value it should be a number.
Line 707:     else:
Line 708:         raise V2VError('Error parsing ovf information: no memory size')
Line 709: 
Line 710:     smp = node.find('.//ovf:Item[rasd:ResourceType="3"]/'


-- 
To view, visit https://gerrit.ovirt.org/43271
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3c55c846f837bb5bf363717e05daabf5ee6631ca
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Michal Skrivanek <mskrivan at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list