Change in vdsm[master]: netwiring: [4/4] Add API definitions.

asegurap at redhat.com asegurap at redhat.com
Mon Dec 10 17:02:42 UTC 2012


Antoni Segura Puimedon has posted comments on this change.

Change subject: netwiring: [4/4] Add API definitions.
......................................................................


Patch Set 33: (3 inline comments)

....................................................
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)
AFFECT_CURRENT works like AFFECT_LIVE when the machine is running and like AFFECT_CONFIG when the machine is just defined. AFFECT_LIVE is only for VMs for which there is a living instance (can be running or paused).

I opted for the latter due to the fact that when we'd want to affect the persistent config that would happen on an engine level.
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
When libvirt does not report a link tag, libvirt's behavior is to have it as 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')
I didn't touch this part. You can submit an patch to improve the code readability of this ;-)
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