diff options
author | Dan Prince <dprince@redhat.com> | 2014-06-10 14:01:06 -0400 |
---|---|---|
committer | Dan Prince <dprince@redhat.com> | 2014-06-10 14:01:06 -0400 |
commit | 86230e11d10a9a605f1eaaf9ab3619875224eb3d (patch) | |
tree | cac4dce869f1049b86b576dfb4e034f41e40e784 /os_net_config/__init__.py | |
parent | 3e1474324568a277bd3d8e493d26021ec3f3767c (diff) |
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
Diffstat (limited to 'os_net_config/__init__.py')
-rw-r--r-- | os_net_config/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
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.") |