Change in vdsm[master]: netwiring: [4/4] Add API definitions.
shaohef at linux.vnet.ibm.com
shaohef at linux.vnet.ibm.com
Mon Dec 10 16:39:49 UTC 2012
ShaoHe Feng has posted comments on this change.
Change subject: netwiring: [4/4] Add API definitions.
......................................................................
Patch Set 33: Looks good to me, but someone else must approve
(3 inline comments)
just a minor suggestion.
....................................................
File vdsm/libvirtvm.py
Line 1641: link.setAttribute('state', linkValue)
Line 1642: try:
Line 1643: try:
Line 1644: self._dom.updateDeviceFlags(vnicXML.toxml(encoding='utf-8'),
Line 1645: libvirt.VIR_DOMAIN_AFFECT_LIVE)
VIR_DOMAIN_AFFECT_LIVE means vm is running or vm exist?
sorry, I'm not understand when use VIR_DOMAIN_AFFECT_CURRENT or VIR_DOMAIN_AFFECT_LIVE.
Line 1646: except Exception as e:
Line 1647: self.log.debug('Request failed: %s',
Line 1648: vnicXML.toprettyxml(encoding='utf-8'),
Line 1649: exc_info=True)
Line 2984: linkActive = False
Line 2985: else:
Line 2986: linkActive = True
Line 2987: except IndexError:
Line 2988: linkActive = True
the interface info from libvirt.
when IndexError? why linkActive equals True, if the libvirt does not tell "up"?
Line 2989: source = x.getElementsByTagName('source')
Line 2990: if source:
Line 2991: network = source[0].getAttribute('bridge')
Line 2992: if not network:
....................................................
File vdsm/netinfo.py
Line 174: "!I",
Line 175: int(
Line 176: (
Line 177: ''.ljust(prefix, '1') +
Line 178: ''.ljust(32 - prefix, '0')
"1"*prefix + "0"*(32-prefix) is more readable.
Line 179: ),
Line 180: 2
Line 181: )
Line 182: )
--
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: 33
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Igor Lvovsky <ilvovsky at redhat.com>
Gerrit-Reviewer: Livnat Peer <lpeer at redhat.com>
Gerrit-Reviewer: Mark Wu <wudxw at linux.vnet.ibm.com>
Gerrit-Reviewer: ShaoHe Feng <shaohef at linux.vnet.ibm.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
More information about the vdsm-patches
mailing list