ShaoHe Feng has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions.
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(3 inline comments)
....................................................
File vdsm/libvirtvm.py
Line 1526: return {'status': {'code':
errCode['MissParam']['status']['code'],
Line 1527: 'message': 'Missing at least one of
required '
Line 1528: 'parameters: alias,
linkState'}}
Line 1529:
Line 1530: dev = None
netDev = None?
Line 1531: for dev in self.conf['devices']:
Line 1532: if (dev['type'] == vm.NIC_DEVICES and
Line 1533: dev['alias'] == params['alias']):
Line 1534: break
Line 1529:
Line 1530: dev = None
Line 1531: for dev in self.conf['devices']:
Line 1532: if (dev['type'] == vm.NIC_DEVICES and
Line 1533: dev['alias'] == params['alias']):
netDev = dev?
Line 1534: break
Line 1535:
Line 1536: if dev is None:
Line 1537: self.log.error('Network device %s cannot be updated. It
does not'
Line 1532: if (dev['type'] == vm.NIC_DEVICES and
Line 1533: dev['alias'] == params['alias']):
Line 1534: break
Line 1535:
Line 1536: if dev is None:
if not netDev: ?
if self.conf['devices'] in not None
dev should be the last devices in self.conf['devices'].
so dev in no longer None.
Line 1537: self.log.error('Network device %s cannot be updated. It
does not'
Line 1538: 'exist', params['alias'])
Line 1539: return {'status':
Line 1540: {'code':
errCode['updateDevice']['status']['code'],
--
To view, visit http://gerrit.ovirt.org/9562
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I3b9b4f49f80466a83e3e13f1042ac2a8866c6bcd
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Alona Kaplan <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Livnat Peer <[email protected]>
Gerrit-Reviewer: ShaoHe Feng <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches