From 86230e11d10a9a605f1eaaf9ab3619875224eb3d Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Tue, 10 Jun 2014 14:01:06 -0400 Subject: Implement apply for ifcfg implementation Adds an apply function to the ifcfg implementation which: 1) Shuts down existing interfaces w/ ifdown 2) writes new interfaces config files (routes too) 3) Starts up new interfaces w/ ifup --- 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 bdbc69f..27dc95e 100644 --- a/os_net_config/__init__.py +++ b/os_net_config/__init__.py @@ -23,7 +23,7 @@ class NotImplemented(Exception): pass -class NetworkConfig(object): +class NetConfig(object): """Configure network interfaces using the ifcfg format.""" def addInterface(self, interface): @@ -31,3 +31,6 @@ class NetworkConfig(object): def addRoutes(self, interface_name, routes=[]): raise NotImplemented("addRoutes is not implemented.") + + def apply(self): + raise NotImplemented("apply is not implemented.") -- cgit 1.2.3-korg