diff options
author | Dan Prince <dprince@redhat.com> | 2014-08-14 15:10:23 -0400 |
---|---|---|
committer | Dan Prince <dprince@redhat.com> | 2014-08-14 15:10:23 -0400 |
commit | c227a9d17a4fe386d7b1f9983739aae1b0416a7b (patch) | |
tree | b684e1bfcf86b7d31828e43ce30471a91e702e99 /os_net_config/__init__.py | |
parent | 462436fa4d339c80a888def1707f792c33cca715 (diff) |
Docstring updates to NetConfig objects.
Diffstat (limited to 'os_net_config/__init__.py')
-rw-r--r-- | os_net_config/__init__.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/os_net_config/__init__.py b/os_net_config/__init__.py index 9e451f2..30baac1 100644 --- a/os_net_config/__init__.py +++ b/os_net_config/__init__.py @@ -31,6 +31,11 @@ class NetConfig(object): """Configure network interfaces using the ifcfg format.""" def add_object(self, obj): + """Convenience method to add any type of object to the network config. + See objects.py. + + :param obj: The object to add. + """ if isinstance(obj, objects.Interface): self.add_interface(obj) elif isinstance(obj, objects.Vlan): @@ -45,15 +50,31 @@ class NetConfig(object): self.add_object(member) def add_interface(self, interface): + """Add an Interface object to the net config object. + + :param interface: The Interface object to add. + """ raise NotImplemented("add_interface is not implemented.") def add_vlan(self, vlan): + """Add a Vlan object to the net config object. + + :param vlan: The vlan object to add. + """ raise NotImplemented("add_vlan is not implemented.") def add_bridge(self, bridge): + """Add an OvsBridge object to the net config object. + + :param bridge: The OvsBridge object to add. + """ raise NotImplemented("add_bridge is not implemented.") def add_bond(self, bond): + """Add an OvsBond object to the net config object. + + :param bridge: The OvsBond object to add. + """ raise NotImplemented("add_bond is not implemented.") def apply(self, noop=False, cleanup=False): |