From 08590fc1a733a7f35958516f90258f1123791f06 Mon Sep 17 00:00:00 2001 From: Sarath Kumar Date: Fri, 23 Sep 2016 15:56:30 -0700 Subject: Add options attribute to NFVSwitch Adding options to NFVSwitch type bridge will give flexibility and avoid specific attributes like 'cpus' in the yaml file (which will now be moved into the options) Change-Id: I4d715b641c54de969b9195b1a4b16195b2d7e595 --- os_net_config/impl_ifcfg.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'os_net_config/impl_ifcfg.py') diff --git a/os_net_config/impl_ifcfg.py b/os_net_config/impl_ifcfg.py index ab8b094..56f2b33 100644 --- a/os_net_config/impl_ifcfg.py +++ b/os_net_config/impl_ifcfg.py @@ -63,7 +63,7 @@ class IfcfgNetConfig(os_net_config.NetConfig): self.interface_data = {} self.ivsinterface_data = {} self.nfvswitch_intiface_data = {} - self.nfvswitch_cpus = None + self.nfvswitch_options = None self.vlan_data = {} self.route_data = {} self.route6_data = {} @@ -446,7 +446,7 @@ class IfcfgNetConfig(os_net_config.NetConfig): is running, the nfvswitch virtual switch will be available. :param bridge: The NfvswitchBridge object to add. """ - self.nfvswitch_cpus = bridge.cpus + self.nfvswitch_options = bridge.options def add_bond(self, bond): """Add an OvsBond object to the net config object. @@ -583,9 +583,9 @@ class IfcfgNetConfig(os_net_config.NetConfig): nfvswitch_internal_ifaces): """Generate configuration content for nfvswitch.""" - cpu_str = "" - if self.nfvswitch_cpus: - cpu_str = " -c " + self.nfvswitch_cpus + options_str = "" + if self.nfvswitch_options: + options_str = self.nfvswitch_options ifaces = [] for iface in nfvswitch_ifaces: @@ -599,7 +599,7 @@ class IfcfgNetConfig(os_net_config.NetConfig): ifaces.append(iface) internal_str = ''.join(ifaces) - data = "SETUP_ARGS=\"%s%s%s\"" % (cpu_str, iface_str, internal_str) + data = "SETUP_ARGS=\"%s%s%s\"" % (options_str, iface_str, internal_str) return data def apply(self, cleanup=False, activate=True): -- cgit 1.2.3-korg