aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/__init__.py
diff options
context:
space:
mode:
authorDan Prince <dprince@redhat.com>2014-08-14 14:05:05 -0400
committerDan Prince <dprince@redhat.com>2014-08-14 14:05:05 -0400
commit462436fa4d339c80a888def1707f792c33cca715 (patch)
treec1e483e02de39f56062fa8531223b97de98c302f /os_net_config/__init__.py
parent9e515950c7eb4a73e02a4f4883c223dd24ba93ff (diff)
Add --cleanup, and impl for ifcfg
Adds a new cleanup option which can be used to ifdown and remove interfaces that exists but aren't specified in the object model (or JSON).
Diffstat (limited to 'os_net_config/__init__.py')
-rw-r--r--os_net_config/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/os_net_config/__init__.py b/os_net_config/__init__.py
index bd28bbc..9e451f2 100644
--- a/os_net_config/__init__.py
+++ b/os_net_config/__init__.py
@@ -56,10 +56,13 @@ class NetConfig(object):
def add_bond(self, bond):
raise NotImplemented("add_bond is not implemented.")
- def apply(self, noop=False):
+ def apply(self, noop=False, cleanup=False):
"""Apply the network configuration.
:param noop: A boolean which indicates whether this is a no-op.
+ :param cleanup: A boolean which indicates whether any undefined
+ (existing but not present in the object model) interfaces
+ should be disabled and deleted.
:returns: a dict of the format: filename/data which contains info
for each file that was changed (or would be changed if in --noop
mode).