Shahar Havivi has posted comments on this change. Change subject: External hypervisor VMs integration ......................................................................
Patch Set 33: (3 comments) http://gerrit.ovirt.org/#/c/33309/33/vdsm/v2v.py File vdsm/v2v.py: Line 28: ''' Unexpected error while parsing libvirt domain xml ''' Line 29: pass Line 30: Line 31: Line 32: def get_external_VMs(uri, username, password): > Please do not use UPPERCASE in lowercase_with_underscore. This should be: g Done Line 33: conn = libvirtconnection.open_connection(uri=uri, Line 34: username=username, Line 35: passwd=password) Line 36: with closing(conn): Line 41: params['vmName'] = vm.name() Line 42: if vm.state()[0] == libvirt.VIR_DOMAIN_SHUTOFF: Line 43: params['status'] = "Down" Line 44: else: Line 45: params['status'] = "Up" > All other states, such as VIR_DOMAIN_SHUTDOWN, VIR_DOMAIN_SHUTOFF_CRASHED e the only status that Engine needs is down, the reset is not down which mean we cannot import it - so 'up' is just 'not down' Line 46: try: Line 47: _addGeneralInfo(root, params) Line 48: except InvalidVMConfiguration as e: Line 49: logging.error('error parsing domain xml, msg: %s xml: %s', Line 53: ret.append(params) Line 54: return ret Line 55: Line 56: Line 57: def _memToMib(size, unit): > If you want to use pep8 style, rename all function here using lowercase_wit Done Line 58: lunit = unit.lower() Line 59: if lunit in ('bytes', 'b'): Line 60: return size / 1024 / 1024 Line 61: elif lunit in ('kib', 'k'): -- 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: 33 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: Piotr Kliczewski <[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
