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

fromani at redhat.com fromani at redhat.com
Wed Aug 5 13:46:08 UTC 2015


Francesco Romani has posted comments on this change.

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


Patch Set 6:

(4 comments)

minor comments. Looks OK so far.
I of course trust the verification, but this code begs for unit tests. Can you please add them in a future patch (or point me to that patch? :) )

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.
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
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?
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"]/'


Line 709: 
Line 710:     smp = node.find('.//ovf:Item[rasd:ResourceType="3"]/'
Line 711:                     'rasd:VirtualQuantity', ns)
Line 712:     if smp is not None:
Line 713:         vm['smp'] = int(smp.text)
same comment as in line 706
Line 714:     else:
Line 715:         raise V2VError('Error parsing ovf information: no cpu info')
Line 716: 
Line 717: 


-- 
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