mirror of
https://github.com/CumulusNetworks/ifupdown2.git
synced 2024-05-06 15:54:50 +00:00
Remove batch support when deleting addresses. batching code does not
update the cache yet and that can cause problems during add Ticket: CM-2491 Reviewed By: Testing Done: Still working on the cache update support during batching.
This commit is contained in:
@@ -14,18 +14,19 @@ reload network interface configuration
|
||||
|
||||
SYNOPSIS
|
||||
========
|
||||
ifreload [-h] [-a] [-v] [-d] [--allow CLASS] [--with-depends]
|
||||
[-X EXCLUDEPATS] [-f] [-n] [--print-dependency {list,dot}]
|
||||
[--down-changediface]
|
||||
[IFACE [IFACE ...]]
|
||||
ifreload [-h] [-a] [-v] [-d] [-f] [-n]
|
||||
|
||||
DESCRIPTION
|
||||
===========
|
||||
reloads network interfaces(5) file /etc/network/interfaces.
|
||||
|
||||
runs ifdown on interfaces that were there previously but are no longer
|
||||
in the interfaces file and ifup on all interfaces in the current
|
||||
/etc/network/interfaces file.
|
||||
runs ifdown on interfaces that changed in the interfaces file and
|
||||
subsequently runs ifup on all interfaces.
|
||||
|
||||
ifreload is equivalent to ``ifdown -a`` followed by ``ifup -a``
|
||||
but it skips ifdown for interfaces that did not change in the config
|
||||
file.
|
||||
|
||||
|
||||
OPTIONS
|
||||
=======
|
||||
@@ -39,14 +40,8 @@ OPTIONS
|
||||
|
||||
-f, --force force run all operations
|
||||
|
||||
--down-changediface run down and then up on interfaces that changed from
|
||||
the last installed version of the interfaces file.
|
||||
Without this option, ifup is executed on all
|
||||
interfaces
|
||||
|
||||
|
||||
CHEATSHEET
|
||||
==========
|
||||
EXAMPLES
|
||||
========
|
||||
# reload /etc/network/interfaces file
|
||||
ifreload -a
|
||||
|
||||
|
@@ -25,8 +25,6 @@ from sets import Set
|
||||
class ifupdownMain(ifupdownBase):
|
||||
""" ifupdown2 main class """
|
||||
|
||||
|
||||
|
||||
# Flags
|
||||
WITH_DEPENDS = False
|
||||
ALL = False
|
||||
@@ -736,7 +734,7 @@ class ifupdownMain(ifupdownBase):
|
||||
return
|
||||
|
||||
def reload(self, upops, downops, auto=False, allow=None,
|
||||
ifacenames=None, excludepats=None, downchangediface=False):
|
||||
ifacenames=None, excludepats=None):
|
||||
""" reload interface config """
|
||||
|
||||
allow_classes = []
|
||||
@@ -792,8 +790,6 @@ class ifupdownMain(ifupdownBase):
|
||||
if not newifaceobjlist:
|
||||
ifacedownlist.append(ifname)
|
||||
continue
|
||||
if not downchangediface:
|
||||
continue
|
||||
# If interface has changed between the current file
|
||||
# and the last installed append it to the down list
|
||||
if len(newifaceobjlist) != len(lastifaceobjlist):
|
||||
|
@@ -123,8 +123,7 @@ def run_reload(args):
|
||||
ifupdown_handle.reload(['pre-up', 'up', 'post-up'],
|
||||
['pre-down', 'down', 'post-down'],
|
||||
args.all, None, None,
|
||||
excludepats=args.excludepats,
|
||||
downchangediface=args.downchangediface)
|
||||
excludepats=args.excludepats)
|
||||
except:
|
||||
raise
|
||||
|
||||
@@ -264,14 +263,12 @@ def update_ifreload_argparser(argparser):
|
||||
help=argparse.SUPPRESS)
|
||||
argparser.add_argument('-j', '--jobs', dest='jobs', type=int,
|
||||
default=-1, choices=range(1,12), help=argparse.SUPPRESS)
|
||||
argparser.add_argument('--down-changediface', dest='downchangediface',
|
||||
action='store_true', help='down interfaces whose ' +
|
||||
'config have changed before bringing them up. By' +
|
||||
' default all interfaces are brought up')
|
||||
|
||||
def parse_args(argsv, op):
|
||||
if op == 'query':
|
||||
descr = 'query interfaces (all or interface list)'
|
||||
elif op == 'reload':
|
||||
descr = 'reload interface configuration.'
|
||||
else:
|
||||
descr = 'interface management'
|
||||
argparser = argparse.ArgumentParser(description=descr)
|
||||
|
Reference in New Issue
Block a user