Amador Pahim has uploaded a new change for review.

Change subject: Introducing hidden_vlans configurable
......................................................................

Introducing hidden_vlans configurable

Change-Id: Id4340936fb998c5ab9ee46e16a16ae15461176f2
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=995517
Signed-off-by: Amador Pahim <[email protected]>
---
M lib/vdsm/config.py.in
M lib/vdsm/netinfo.py
2 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/82/18082/1

diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index bdbd91a..84820e1 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -72,6 +72,10 @@
             'Comma-separated list of fnmatch-patterns for host bonds to be '
             'hidden from vdsm.'),
 
+        ('hidden_vlans', '',
+            'Comma-separated list of fnmatch-patterns for host vlans to be '
+            'hidden from vdsm.'),
+
         ('default_bridge', 'engine', None),
 
         ('migration_downtime', '500',
diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py
index 1081ec9..b494722 100644
--- a/lib/vdsm/netinfo.py
+++ b/lib/vdsm/netinfo.py
@@ -140,7 +140,9 @@
 
 
 def vlans():
-    return [b.split('/')[-1] for b in iglob('/sys/class/net/*.*')]
+    hidden_vlans = config.get('vars', 'hidden_vlans').split(',')
+    return [b.split('/')[-1] for b in iglob('/sys/class/net/*.*')
+            if b.split('/')[-1] not in hidden_vlans]
 
 
 def bridges():


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4340936fb998c5ab9ee46e16a16ae15461176f2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Amador Pahim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to