Antoni Segura Puimedon has posted comments on this change.
Change subject: [WIP] netwiring: [3/3] Add API definitions.
......................................................................
Patch Set 2: (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
Very right. I shouldn't submit patches so late in the night :P
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 1549: mac.setAttribute('address', dev['macAddr'])
Line 1550: netelem.appendChild(mac)
Line 1551: model = xml.dom.minidom.Element('model')
Line 1552: model.setAttribute('type', dev['nicModel'])
Line 1553: netelem.appendChild(model)
I'll take a look at that.
Line 1554:
Line 1555: if 'network' not in params:
Line 1556: # If no network is specified we take the vnic to the
dummy bridge
Line 1557: # and set the link 'down' always.
Line 1551: model = xml.dom.minidom.Element('model')
Line 1552: model.setAttribute('type', dev['nicModel'])
Line 1553: netelem.appendChild(model)
Line 1554:
Line 1555: if 'network' not in params:
Because we allow network not to be specified for when the caller wants both to
unplug and to remove the assignation of said vnic to any network.
Line 1556: # If no network is specified we take the vnic to the
dummy bridge
Line 1557: # and set the link 'down' always.
Line 1558: source = xml.dom.minidom.Element('source')
Line 1559: source.setAttribute('bridge', DUMMY_BRIDGE)
--
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: Mark Wu <[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