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 <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Saggi Mizrahi <[email protected]> Gerrit-Reviewer: Shahar Havivi <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
