mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Fixing errors and typos
Ticket: None Reviewed By: Roopa Testing Done: Signed-off-by: Julien Fortin <julien@cumulusnetworks.com>
This commit is contained in:
@@ -1315,8 +1315,8 @@ class bridge(moduleBase):
|
||||
running_bridge_port_vids = ''
|
||||
portlist = self.parse_port_list(ifaceobj.name, attrval)
|
||||
if not portlist:
|
||||
self.log_warn('%s: could not parse \'%s %s\''
|
||||
%(ifaceobj.name, attrname, attrval))
|
||||
self.log_warn('%s: could not parse \'bridge-port-vids %s\''
|
||||
%(ifaceobj.name, attrval))
|
||||
return
|
||||
err = 0
|
||||
for p in portlist:
|
||||
@@ -1347,8 +1347,8 @@ class bridge(moduleBase):
|
||||
if attrval:
|
||||
portlist = self.parse_port_list(ifaceobj.name, attrval)
|
||||
if not portlist:
|
||||
self.log_warn('%s: could not parse \'%s %s\''
|
||||
%(ifaceobj.name, attrname, attrval))
|
||||
self.log_warn('%s: could not parse \'bridge-port-pvids %s\''
|
||||
%(ifaceobj.name, attrval))
|
||||
return
|
||||
running_bridge_port_pvids = ''
|
||||
err = 0
|
||||
|
@@ -18,9 +18,7 @@ except ImportError, e:
|
||||
class graph():
|
||||
""" graph functions to sort and print interface graph """
|
||||
|
||||
def __init__(self):
|
||||
self.logger = logging.getLogger('ifupdown.' +
|
||||
self.__class__.__name__)
|
||||
logger = logging.getLogger('ifupdown.graph')
|
||||
|
||||
@classmethod
|
||||
def topological_sort_graphs_all(cls, dependency_graphs, indegrees_arg):
|
||||
@@ -54,7 +52,7 @@ class graph():
|
||||
try:
|
||||
indegrees[y] = indegrees.get(y) - 1
|
||||
except:
|
||||
self.logger.debug('topological_sort_graphs_all: did not find %s' %y)
|
||||
cls.logger.debug('topological_sort_graphs_all: did not find %s' %y)
|
||||
indegrees[y] = 0
|
||||
pass
|
||||
if indegrees.get(y) == 0:
|
||||
|
@@ -408,7 +408,7 @@ class ifaceScheduler():
|
||||
cls.run_iface_list_ops(ifupdownobj, ifaceobjs, ops)
|
||||
except Exception, e:
|
||||
if continueonfailure:
|
||||
self.logger.warn('%s' %str(e))
|
||||
ifupdownobj.logger.warn('%s' %str(e))
|
||||
|
||||
@classmethod
|
||||
def get_sorted_iface_list(cls, ifupdownobj, ifacenames, ops,
|
||||
|
@@ -9,6 +9,7 @@
|
||||
import cPickle
|
||||
from collections import OrderedDict
|
||||
import logging
|
||||
import exceptions
|
||||
import os
|
||||
from iface import *
|
||||
|
||||
@@ -177,7 +178,7 @@ class stateManager():
|
||||
for i in ifacenames:
|
||||
ifaceobj = self.ifaces.get(i)
|
||||
if ifaceobj is None:
|
||||
raise ifaceNotFoundError('ifname %s'
|
||||
raise exceptions.ifaceNotFoundError('ifname %s'
|
||||
%i + ' not found')
|
||||
ifaceobj.dump(self.logger)
|
||||
else:
|
||||
|
@@ -241,8 +241,7 @@ class bondutil(utilsBase):
|
||||
return self._cache_get([bondname, 'linkinfo', 'lacp_rate'])
|
||||
|
||||
def set_lacp_bypass_allow(self, bondname, allow, prehook=None, posthook=None):
|
||||
if (self._cache_check([bondname, 'linkinfo', 'lacp_bypass'],
|
||||
lacp_bypass)):
|
||||
if (self._cache_check([bondname, 'linkinfo', 'lacp_bypass'], allow)):
|
||||
return
|
||||
if prehook:
|
||||
prehook(bondname)
|
||||
|
Reference in New Issue
Block a user