Change in vdsm[master]: net: tests: wip first real tc test

ibarkan at redhat.com ibarkan at redhat.com
Tue Aug 11 13:50:34 UTC 2015


Ido Barkan has uploaded a new change for review.

Change subject: net: tests: wip first real tc test
......................................................................

net: tests: wip first real tc test

Change-Id: Ibad639a9ad04593cfd477f60a8272614f3446522
Signed-off-by: Ido Barkan <ibarkan at redhat.com>
---
M tests/tcTests.py
1 file changed, 25 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/44699/1

diff --git a/tests/tcTests.py b/tests/tcTests.py
index e84d96c..c17df93 100644
--- a/tests/tcTests.py
+++ b/tests/tcTests.py
@@ -30,10 +30,11 @@
 
 from testlib import VdsmTestCase as TestCaseBase
 from testValidation import ValidateRunningAsRoot
-from nettestlib import Bridge, Tap, requires_brctl, requires_tc
+from nettestlib import Bridge, Dummy, Tap, requires_tc
 
 from vdsm.constants import EXT_TC
 from network import tc
+from network.configurators import qos
 
 
 class TestQdisc(TestCaseBase):
@@ -352,3 +353,26 @@
         tc.setPortMirroring(self._bridge0.devName, self._bridge2.devName)
         self.testMirroring()
         tc.unsetPortMirroring(self._bridge0.devName, self._bridge2.devName)
+
+
+class TestConfigureOutbound(TestCaseBase):
+    def setUp(self):
+        self.device = Dummy()
+        self.device.create()
+
+    # TODO:
+    # test with/without vlan (see filters are right) and classes are on correct
+    # devices (use tc.filters/tc.classes for this)
+
+    def tearDown(self):
+        self.device.remove()
+
+    def test_sanity(self):
+        host_qos_outbound = {
+            'ls': {
+                'm1': 4 * 1000 ** 2,  # 4Mbit/s
+                'd': 100 * 1000,  # 100 microseconds
+                'm2': 3 * 1000 ** 2},  # 3Mbit/s
+            'ul': {
+                'm2': 8 * 1000 ** 2}}  # 8Mbit/s
+        qos.configure_outbound(host_qos_outbound, top_device=self.device)
\ No newline at end of file


-- 
To view, visit https://gerrit.ovirt.org/44699
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibad639a9ad04593cfd477f60a8272614f3446522
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <ibarkan at redhat.com>


More information about the vdsm-patches mailing list