Change in vdsm[master]: External hypervisor VMs integration

nsoffer at redhat.com nsoffer at redhat.com
Thu Nov 6 09:43:48 UTC 2014


Nir Soffer has posted comments on this change.

Change subject: External hypervisor VMs integration
......................................................................


Patch Set 18:

(3 comments)

http://gerrit.ovirt.org/#/c/33309/18/vdsm/v2v.py
File vdsm/v2v.py:

Line 30:               libvirt.VIR_DOMAIN_PAUSED: vmstatus.PAUSED,
Line 31:               libvirt.VIR_DOMAIN_SHUTDOWN: vmstatus.POWERING_DOWN,
Line 32:               libvirt.VIR_DOMAIN_SHUTOFF: vmstatus.DOWN,
Line 33:               libvirt.VIR_DOMAIN_CRASHED: 'Crashed',
Line 34:               libvirt.VIR_DOMAIN_PMSUSPENDED: 'PMSuspended'}
This map belongs to vmstatus module - something like:

    status = vmstatus.NAME[vm.state()[0]]
Line 35: 
Line 36: 
Line 37: def getExternalVMList(uri, username, password):
Line 38:     conn = libvirtconnection.open_connection(uri=uri,


Line 33:               libvirt.VIR_DOMAIN_CRASHED: 'Crashed',
Line 34:               libvirt.VIR_DOMAIN_PMSUSPENDED: 'PMSuspended'}
Line 35: 
Line 36: 
Line 37: def getExternalVMList(uri, username, password):
We have some API's with "List" in the names, but I don't think we should add new. How about getExternalVms?
Line 38:     conn = libvirtconnection.open_connection(uri=uri,
Line 39:                                              username=username,
Line 40:                                              passwd=password)
Line 41:     with closing(conn):


Line 46:             params['vmName'] = vm.name()
Line 47:             params['status'] = _VM_STATUS[vm.state()[0]]
Line 48:             _addGeneralInfo(root, params)
Line 49:             _addDisks(root, params)
Line 50:             _addNetworks(root, params)
If we get invalid configuration for one vm, should we fail the entire request, or log errors and return the good vms?
Line 51:             ret.append(params)
Line 52:         return ret
Line 53: 
Line 54: 


-- 
To view, visit http://gerrit.ovirt.org/33309
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I7dcfb860626a844d1d08590274b508519a33f4a3
Gerrit-PatchSet: 18
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Shahar Havivi <shavivi at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list