Change in vdsm[master]: Qos feature: Adds bandwidth definition at configuration leve...

gvallare at redhat.com gvallare at redhat.com
Mon Jun 17 08:15:27 UTC 2013


Giuseppe Vallarelli has posted comments on this change.

Change subject: Qos feature: Adds bandwidth definition at configuration level.
......................................................................


Patch Set 1: (7 inline comments)

....................................................
File tests/netconfTests.py
Line 76:         Compare two xml artifacts for equality.
Line 77:         """
Line 78:         contents_a = ElementTree.tostring(ElementTree.fromstring(a))
Line 79:         contents_b = ElementTree.tostring(ElementTree.fromstring(b))
Line 80:         return contents_a == contents_b
I agree thanks for the feedback.
Line 81: 
Line 82:     def setUp(self):
Line 83:         self.cw = ifcfg.ConfigWriter()
Line 84: 


Line 79:         contents_b = ElementTree.tostring(ElementTree.fromstring(b))
Line 80:         return contents_a == contents_b
Line 81: 
Line 82:     def setUp(self):
Line 83:         self.cw = ifcfg.ConfigWriter()
Done
Line 84: 
Line 85:     @MonkeyPatch(subprocess, 'Popen', lambda x: None)
Line 86:     def testAtomicRestore(self):
Line 87:         self._createFiles()


Line 138:         actualDoc = self.cw.createNetXml(netName, network, True, None)
Line 139: 
Line 140:         self.assertEqualXml(expectedDoc, actualDoc)
Line 141: 
Line 142:     def testCreateNetXml(self):
Yes he/she can. There's no need to monkey-patch is just a plain and simple function which generates the xml string and does nothing more.
Line 143:         netName = "awesome_net"
Line 144:         iface = "dummy"
Line 145:         expectedDoc = ("""<network>
Line 146:                             <name>%s</name>


Line 146:                             <name>%s</name>
Line 147:                             <forward mode='passthrough'/>
Line 148:                             <interface dev='%s'/>
Line 149:                           </network>""" % (netName, iface))
Line 150:         actualDoc = self.cw.createNetXml(netName, None, False, iface)
There's no need for that see previous answer.
Line 151: 
Line 152:         self.assertEqualXml(expectedDoc, actualDoc)
Line 153: 
Line 154:     def testCreateNetXmlBridgedQos(self):


....................................................
File vdsm_api/vdsmapi-schema.json
Line 71: ##
Line 72: {'type': 'NetworkOptions',
Line 73:  'data': {'*ipaddr': 'str', '*netmask': 'str', '*gateway': 'str',
Line 74:           '*bootproto': 'str', '*delay': 'uint', '*onboot': 'str',
Line 75:           '*bondingOptions', 'str', '*qosInbound': 'VmInterfaceDeviceBandwidthParams',
OK.
Line 76:           '*qosOutbound': 'VmInterfaceDeviceBandwidthParams'}}
Line 77: 
Line 78: ##
Line 79: # @Host.addNetwork:


Line 79: # @Host.addNetwork:
Line 80: #
Line 81: # Add a new network to this host.
Line 82: #
Line 83: # @bridge:        The name of the bridge device
I may have added them due to some previous change, I'll remove it.
Line 84: #
Line 85: # @vlan:          #optional The name of a VLAN to create on the device
Line 86: #
Line 87: # @bond:          #optional The name of a bond device to create from @nics


Line 167: # @onboot:        #optional Start the network device automatically during boot
Line 168: #
Line 169: # @remove:        #optional If True, remove existing network only
Line 170: #
Line 171: # @qosInbound:    #optional VmInterfaceDeviceBandwidthParams for incoming traffic.
I just noticed a silly mistake that I did in one of my previous patches see fix here: http://gerrit.ovirt.org/#/c/15787/1 .
I understand that's not the most beautiful name ever but right now I can't think of a better name, anyway in change in the name is going to affect also VmInterfaceDeviceSpecParams definition.
Line 172: #
Line 173: # @qosOutbound:   #optional VmInterfaceDeviceBandwidthParams for outgoing traffic.
Line 174: # 
Line 175: # Since: 4.10.0


-- 
To view, visit http://gerrit.ovirt.org/15724
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If0c3b4b9a6fd5eb53579fb2e157b5325caa88d04
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Giuseppe Vallarelli <gvallare at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list