1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

ifupdown: add new ifupdownflags class to carry ifupdown flags

Ticket: cleanup
Reviewed By:
Testing Done: Tested ifupdown sanity

This gets rid of some ugly previous flag handling which was
passed through modules. This creates a global instance of
flags that all addon modules and helper modules can use.

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-04-14 14:45:47 -07:00
parent 96a71b65cb
commit fc5e1735c0
24 changed files with 144 additions and 151 deletions

View File

@@ -8,6 +8,7 @@
#
from statemanager import *
import ifupdown.ifupdownflags as ifupdownflags
from iface import *
from graph import *
from collections import deque
@@ -179,7 +180,7 @@ class ifaceScheduler():
if (ifupdownobj.flags.SCHED_SKIP_CHECK_UPPERIFACES):
return True
if (ifupdownobj.FORCE or
if (ifupdownflags.flags.FORCE or
not ifupdownobj.flags.ADDONS_ENABLE or
(not ifupdownobj.is_ifaceobj_noconfig(ifaceobj) and
ifupdownobj.config.get('warn_on_ifdown', '0') == '0' and