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:
@@ -10,6 +10,7 @@ try:
|
||||
from ifupdown.iface import *
|
||||
from ifupdownaddons.modulebase import moduleBase
|
||||
from ifupdownaddons.iproute2 import iproute2
|
||||
import ifupdown.ifupdownflags as ifupdownflags
|
||||
import os
|
||||
import glob
|
||||
import logging
|
||||
@@ -70,7 +71,7 @@ class vrrpd(moduleBase):
|
||||
""" up vrrpd -n -D -i $IFACE -v 1 -p 20 10.0.1.254
|
||||
up ifplugd -i $IFACE -b -f -u0 -d1 -I -p -q """
|
||||
|
||||
if (not self.DRYRUN and
|
||||
if (not ifupdownflags.flags.DRYRUN and
|
||||
not os.path.exists('/sys/class/net/%s' %ifaceobj.name)):
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user