From 9e515950c7eb4a73e02a4f4883c223dd24ba93ff Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 14 Aug 2014 10:28:49 -0400 Subject: Use underscores for provider function names. --- os_net_config/__init__.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'os_net_config/__init__.py') diff --git a/os_net_config/__init__.py b/os_net_config/__init__.py index a3ea278..bd28bbc 100644 --- a/os_net_config/__init__.py +++ b/os_net_config/__init__.py @@ -30,31 +30,31 @@ class NotImplemented(Exception): class NetConfig(object): """Configure network interfaces using the ifcfg format.""" - def addObject(self, obj): + def add_object(self, obj): if isinstance(obj, objects.Interface): - self.addInterface(obj) + self.add_interface(obj) elif isinstance(obj, objects.Vlan): - self.addVlan(obj) + self.add_vlan(obj) elif isinstance(obj, objects.OvsBridge): - self.addBridge(obj) + self.add_bridge(obj) for member in obj.members: - self.addObject(member) + self.add_object(member) elif isinstance(obj, objects.OvsBond): - self.addBond(obj) + self.add_bond(obj) for member in obj.members: - self.addObject(member) + self.add_object(member) - def addInterface(self, interface): - raise NotImplemented("addInterface is not implemented.") + def add_interface(self, interface): + raise NotImplemented("add_interface is not implemented.") - def addVlan(self, vlan): - raise NotImplemented("addVlan is not implemented.") + def add_vlan(self, vlan): + raise NotImplemented("add_vlan is not implemented.") - def addBridge(self, bridge): - raise NotImplemented("addBridge is not implemented.") + def add_bridge(self, bridge): + raise NotImplemented("add_bridge is not implemented.") - def addBond(self, bond): - raise NotImplemented("addBond is not implemented.") + def add_bond(self, bond): + raise NotImplemented("add_bond is not implemented.") def apply(self, noop=False): """Apply the network configuration. -- cgit 1.2.3-korg