Change in vdsm[master]: net: Move tc under vdsm.network

edwardh at redhat.com edwardh at redhat.com
Sat May 7 21:30:52 UTC 2016


Edward Haas has uploaded a new change for review.

Change subject: net: Move tc under vdsm.network
......................................................................

net: Move tc under vdsm.network

Change-Id: I3b43b8bb38c16e6a352b9b0ab28ac26e0dea0cdd
Signed-off-by: Edward Haas <edwardh at redhat.com>
---
M configure.ac
M lib/vdsm/Makefile.am
M lib/vdsm/network/Makefile.am
M lib/vdsm/network/configurators/qos.py
M lib/vdsm/network/netinfo/qos.py
R lib/vdsm/network/tc/Makefile.am
R lib/vdsm/network/tc/__init__.py
R lib/vdsm/network/tc/_parser.py
R lib/vdsm/network/tc/_wrapper.py
R lib/vdsm/network/tc/cls.py
R lib/vdsm/network/tc/filter.py
R lib/vdsm/network/tc/qdisc.py
M tests/functional/networkTests.py
M tests/network/qos_test.py
M tests/network/tc_test.py
M vdsm.spec.in
M vdsm/supervdsm_api/network.py
17 files changed, 17 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/57171/1

diff --git a/configure.ac b/configure.ac
index c43ab5d..4845f54 100644
--- a/configure.ac
+++ b/configure.ac
@@ -399,9 +399,9 @@
 	lib/vdsm/network/netlink/Makefile
 	lib/vdsm/network/ovs/Makefile
 	lib/vdsm/network/ovs/driver/Makefile
+	lib/vdsm/network/tc/Makefile
 	lib/vdsm/rpc/Makefile
 	lib/vdsm/storage/Makefile
-	lib/vdsm/tc/Makefile
 	lib/vdsm/virt/Makefile
 	tests/Makefile
 	tests/common/Makefile
diff --git a/lib/vdsm/Makefile.am b/lib/vdsm/Makefile.am
index 7696bd1..3d08be7 100644
--- a/lib/vdsm/Makefile.am
+++ b/lib/vdsm/Makefile.am
@@ -19,7 +19,7 @@
 #
 include $(top_srcdir)/build-aux/Makefile.subs
 
-SUBDIRS=common tool infra profiling rpc tc network virt storage
+SUBDIRS=common tool infra profiling rpc network virt storage
 
 dist_vdsmpylib_PYTHON = \
 	__init__.py \
diff --git a/lib/vdsm/network/Makefile.am b/lib/vdsm/network/Makefile.am
index e0fc55f..eb50931 100644
--- a/lib/vdsm/network/Makefile.am
+++ b/lib/vdsm/network/Makefile.am
@@ -17,7 +17,7 @@
 # Refer to the README and COPYING files for full details of the license
 #
 
-SUBDIRS = configurators ip netinfo netlink ovs
+SUBDIRS = configurators ip netinfo netlink ovs tc
 
 include $(top_srcdir)/build-aux/Makefile.subs
 
diff --git a/lib/vdsm/network/configurators/qos.py b/lib/vdsm/network/configurators/qos.py
index 6a520eb..dfbff9a 100644
--- a/lib/vdsm/network/configurators/qos.py
+++ b/lib/vdsm/network/configurators/qos.py
@@ -21,9 +21,9 @@
 import os
 from distutils.version import StrictVersion
 
+from vdsm.network import tc
 from vdsm.network.netinfo.cache import ifaceUsed
 from vdsm.network.netinfo import qos as netinfo_qos
-from vdsm import tc
 
 _ROOT_QDISC_HANDLE = '%x:' % 5001  # Leave 0 free for leaf qdisc of vlan tag 0
 _FAIR_QDISC_KIND = 'fq_codel' if (StrictVersion(os.uname()[2].split('-')[0]) >
diff --git a/lib/vdsm/network/netinfo/qos.py b/lib/vdsm/network/netinfo/qos.py
index 7741118..6268587 100644
--- a/lib/vdsm/network/netinfo/qos.py
+++ b/lib/vdsm/network/netinfo/qos.py
@@ -21,7 +21,7 @@
 
 from collections import defaultdict
 
-from vdsm import tc
+from vdsm.network import tc
 
 NON_VLANNED_ID = 5000
 DEFAULT_CLASSID = '%x' % NON_VLANNED_ID
diff --git a/lib/vdsm/tc/Makefile.am b/lib/vdsm/network/tc/Makefile.am
similarity index 95%
rename from lib/vdsm/tc/Makefile.am
rename to lib/vdsm/network/tc/Makefile.am
index 80a8db8..66a2af4 100644
--- a/lib/vdsm/tc/Makefile.am
+++ b/lib/vdsm/network/tc/Makefile.am
@@ -19,7 +19,7 @@
 
 include $(top_srcdir)/build-aux/Makefile.subs
 
-vdsmnetworktcdir = $(vdsmpylibdir)/tc
+vdsmnetworktcdir = $(vdsmpylibdir)/network/tc
 dist_vdsmnetworktc_PYTHON = \
 	__init__.py \
 	_parser.py \
diff --git a/lib/vdsm/tc/__init__.py b/lib/vdsm/network/tc/__init__.py
similarity index 100%
rename from lib/vdsm/tc/__init__.py
rename to lib/vdsm/network/tc/__init__.py
diff --git a/lib/vdsm/tc/_parser.py b/lib/vdsm/network/tc/_parser.py
similarity index 100%
rename from lib/vdsm/tc/_parser.py
rename to lib/vdsm/network/tc/_parser.py
diff --git a/lib/vdsm/tc/_wrapper.py b/lib/vdsm/network/tc/_wrapper.py
similarity index 100%
rename from lib/vdsm/tc/_wrapper.py
rename to lib/vdsm/network/tc/_wrapper.py
diff --git a/lib/vdsm/tc/cls.py b/lib/vdsm/network/tc/cls.py
similarity index 100%
rename from lib/vdsm/tc/cls.py
rename to lib/vdsm/network/tc/cls.py
diff --git a/lib/vdsm/tc/filter.py b/lib/vdsm/network/tc/filter.py
similarity index 100%
rename from lib/vdsm/tc/filter.py
rename to lib/vdsm/network/tc/filter.py
diff --git a/lib/vdsm/tc/qdisc.py b/lib/vdsm/network/tc/qdisc.py
similarity index 100%
rename from lib/vdsm/tc/qdisc.py
rename to lib/vdsm/network/tc/qdisc.py
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index 3fb9797..21062b8 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -48,9 +48,9 @@
 from vdsm.network import errors
 from vdsm.network import legacy_switch
 from vdsm.network import sourceroute
+from vdsm.network import tc
 
 from vdsm import sysctl
-from vdsm import tc
 from vdsm.commands import execCmd
 from vdsm.utils import CommandPath, RollbackContext, pgrep, running
 
diff --git a/tests/network/qos_test.py b/tests/network/qos_test.py
index a4ecc95..695437d 100644
--- a/tests/network/qos_test.py
+++ b/tests/network/qos_test.py
@@ -23,7 +23,7 @@
 from testlib import VdsmTestCase as TestCaseBase
 
 from vdsm.network.netinfo import qos
-from vdsm.tc import cls
+from vdsm.network.tc import cls
 
 
 @attr(type='unit')
diff --git a/tests/network/tc_test.py b/tests/network/tc_test.py
index dd300e5..823a5c0 100644
--- a/tests/network/tc_test.py
+++ b/tests/network/tc_test.py
@@ -41,12 +41,12 @@
                          bridge_device, network_namespace, requires_iperf3,
                          requires_tc, requires_tun, veth_pair, vlan_device)
 from vdsm.constants import EXT_TC
+from vdsm.network import tc
 from vdsm.network.configurators import qos
 from vdsm.network.netinfo.qos import DEFAULT_CLASSID
 from vdsm.ipwrapper import addrAdd, linkSet, netns_exec, link_set_netns
 from vdsm import libvirtconnection
 from vdsm.utils import running
-from vdsm import tc
 
 
 class TestQdisc(TestCaseBase):
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 41a4365..deeebfc 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -1137,12 +1137,12 @@
 %dir %{python_sitelib}/%{vdsm_name}/network/netlink
 %dir %{python_sitelib}/%{vdsm_name}/network/ovs
 %dir %{python_sitelib}/%{vdsm_name}/network/ovs/driver
+%dir %{python_sitelib}/%{vdsm_name}/network/tc
 %dir %{python_sitelib}/%{vdsm_name}/tool
 %dir %{python_sitelib}/%{vdsm_name}/tool/configurators
 %dir %{python_sitelib}/%{vdsm_name}/profiling
 %dir %{python_sitelib}/%{vdsm_name}/storage
 %dir %{python_sitelib}/%{vdsm_name}/virt
-%dir %{python_sitelib}/%{vdsm_name}/tc
 %{python_sitelib}/%{vdsm_name}/__init__.py*
 %{python_sitelib}/%{vdsm_name}/cmdutils.py*
 %{python_sitelib}/%{vdsm_name}/compat.py*
@@ -1203,6 +1203,12 @@
 %{python_sitelib}/%{vdsm_name}/network/netswitch.py*
 %{python_sitelib}/%{vdsm_name}/network/sourceroute.py*
 %{python_sitelib}/%{vdsm_name}/network/sourceroutethread.py*
+%{python_sitelib}/%{vdsm_name}/network/tc/__init__.py*
+%{python_sitelib}/%{vdsm_name}/network/tc/_parser.py*
+%{python_sitelib}/%{vdsm_name}/network/tc/_wrapper.py*
+%{python_sitelib}/%{vdsm_name}/network/tc/cls.py*
+%{python_sitelib}/%{vdsm_name}/network/tc/filter.py*
+%{python_sitelib}/%{vdsm_name}/network/tc/qdisc.py*
 %{python_sitelib}/%{vdsm_name}/network/utils.py*
 %{python_sitelib}/%{vdsm_name}/numa.py*
 %{python_sitelib}/%{vdsm_name}/osinfo.py*
@@ -1223,12 +1229,6 @@
 %{python_sitelib}/%{vdsm_name}/storage/rwlock.py*
 %{python_sitelib}/%{vdsm_name}/storage/securable.py*
 %{python_sitelib}/%{vdsm_name}/storage/sync.py*
-%{python_sitelib}/%{vdsm_name}/tc/__init__.py*
-%{python_sitelib}/%{vdsm_name}/tc/_parser.py*
-%{python_sitelib}/%{vdsm_name}/tc/_wrapper.py*
-%{python_sitelib}/%{vdsm_name}/tc/cls.py*
-%{python_sitelib}/%{vdsm_name}/tc/filter.py*
-%{python_sitelib}/%{vdsm_name}/tc/qdisc.py*
 %{python_sitelib}/%{vdsm_name}/protocoldetector.py*
 %{python_sitelib}/%{vdsm_name}/pthread.py*
 %{python_sitelib}/%{vdsm_name}/qemuimg.py*
diff --git a/vdsm/supervdsm_api/network.py b/vdsm/supervdsm_api/network.py
index fcf89c0..a97a0e8 100644
--- a/vdsm/supervdsm_api/network.py
+++ b/vdsm/supervdsm_api/network.py
@@ -23,7 +23,7 @@
 from vdsm.tool.restore_nets import restore
 from vdsm.network.api import (setSafeNetworkConfig, setupNetworks,
                               change_numvfs, caps_networks)
-from vdsm.tc import setPortMirroring, unsetPortMirroring
+from vdsm.network.tc import setPortMirroring, unsetPortMirroring
 
 
 @expose


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b43b8bb38c16e6a352b9b0ab28ac26e0dea0cdd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh at redhat.com>


More information about the vdsm-patches mailing list