From 462436fa4d339c80a888def1707f792c33cca715 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 14 Aug 2014 14:05:05 -0400 Subject: 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). --- os_net_config/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'os_net_config/__init__.py') 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). -- cgit 1.2.3-korg