Change in vdsm[master]: Change getVlansForNic to more general getVlansForIface

ilvovsky at redhat.com ilvovsky at redhat.com
Thu Sep 6 11:41:11 UTC 2012


Igor Lvovsky has uploaded a new change for review.

Change subject: Change getVlansForNic to more general getVlansForIface
......................................................................

Change getVlansForNic to more general getVlansForIface

Change-Id: I4dec06449f4393b8231c84cfc0d7873d366284d4
Signed-off-by: Igor Lvovsky <ilvovsky at redhat.com>
---
M vdsm/configNetwork.py
M vdsm/netinfo.py
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/10/7810/1

diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
index ee076fb..1ee4c4e 100755
--- a/vdsm/configNetwork.py
+++ b/vdsm/configNetwork.py
@@ -615,7 +615,7 @@
             vlans = [v for (_, v) in iface_bridged]
             iface = bonding
         else:
-            vlans = _netinfo.getVlansForNic(nics[0])
+            vlans = _netinfo.getVlansForIface(nics[0])
             iface = nics[0]
 
         newmtu = None
@@ -804,7 +804,7 @@
 
         # Make sure nics don't used by vlans if bond requested
         if bonding:
-            vlansForNic = tuple(_netinfo.getVlansForNic(nic))
+            vlansForNic = tuple(_netinfo.getVlansForIface(nic))
             if vlansForNic:
                 raise ConfigNetworkError(ne.ERR_USED_NIC,
                                     "nic %s already used by vlans %s" % \
diff --git a/vdsm/netinfo.py b/vdsm/netinfo.py
index 4fa39cc..caf82de 100644
--- a/vdsm/netinfo.py
+++ b/vdsm/netinfo.py
@@ -374,9 +374,9 @@
                 elif netdict['iface'].startswith(iface + '.'):
                     yield (network, netdict['iface'].split('.',1)[1])
 
-    def getVlansForNic(self, nic):
+    def getVlansForIface(self, iface):
         for v, vdict in self.vlans.iteritems():
-            if nic == vdict['iface']:
+            if iface == vdict['iface']:
                 yield v.split('.', 1)[1]
 
     def getNetworksForIface(self, iface):


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4dec06449f4393b8231c84cfc0d7873d366284d4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Igor Lvovsky <ilvovsky at redhat.com>


More information about the vdsm-patches mailing list