Petr Šebek has posted comments on this change.
Change subject: bugfix: UpdateVmDevice QoS
......................................................................
Patch Set 3:
(4 comments)
....................................................
File vdsm/vm.py
Line 1309: return iface
Line 1310:
Line 1311: def getXMLBandwidth(self, specParams, old_bandwidth=None):
Line 1312: bandwidth = self.createXmlElem('bandwidth', None)
Line 1313: # Inbound and Outbound traffic can be indipendently shaped.
Done
Line 1314: for attr in ('inbound', 'outbound'):
Line 1315: new_settings = self.specParams.get(attr)
Line 1316: if old_bandwidth is not None:
Line 1317: attrXMLs = old_bandwidth.getElementsByTagName
Line 1311: def getXMLBandwidth(self, specParams, old_bandwidth=None):
Line 1312: bandwidth = self.createXmlElem('bandwidth', None)
Line 1313: # Inbound and Outbound traffic can be indipendently shaped.
Line 1314: for attr in ('inbound', 'outbound'):
Line 1315: new_settings = self.specParams.get(attr)
Done
Line 1316: if old_bandwidth is not None:
Line 1317: attrXMLs = old_bandwidth.getElementsByTagName
Line 1318: attrXML = attrXMLs[0] if len(attrXMLs) else None
Line 1319: else:
Line 1312: bandwidth = self.createXmlElem('bandwidth', None)
Line 1313: # Inbound and Outbound traffic can be indipendently shaped.
Line 1314: for attr in ('inbound', 'outbound'):
Line 1315: new_settings = self.specParams.get(attr)
Line 1316: if old_bandwidth is not None:
Done
Line 1317: attrXMLs = old_bandwidth.getElementsByTagName
Line 1318: attrXML = attrXMLs[0] if len(attrXMLs) else None
Line 1319: else:
Line 1320: attrXML = None
Line 3133: except IndexError:
Line 3134: link = xml.dom.minidom.Element('link')
Line 3135: vnicXML.appendChildWithArgs(link)
Line 3136: link.setAttribute('state', linkValue)
Line 3137: if specParams and \
Done
Line 3138: ('inbound' in specParams or 'outbound' in
specParams):
Line 3139: old_bandwidths = vnicXML.getElementsByTagName('bandwidth')
Line 3140: old_bandwidth = old_bandwidths[0] if len(old_bandwidths) else None
Line 3141: new_bandwidth = dev.getXMLBandwidth(specParams, old_bandwidth)
--
To view, visit
http://gerrit.ovirt.org/19545
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I43a383b2a9cf96366927beebf63f1344027169fb
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Petr Šebek <psebek(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap(a)redhat.com>
Gerrit-Reviewer: Assaf Muller <amuller(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Petr Šebek <psebek(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes