aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/impl_ifcfg.py
diff options
context:
space:
mode:
authorSarath Kumar <sarath.kutty@bigswitch.com>2016-09-23 15:56:30 -0700
committerSarath Kumar <sarath.kutty@bigswitch.com>2016-09-27 11:12:37 -0700
commit08590fc1a733a7f35958516f90258f1123791f06 (patch)
treead51f97bc312623e5a35faf797468cad2fac4786 /os_net_config/impl_ifcfg.py
parent35823f261506f9256c1a227dd4a2770a0508c62d (diff)
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
Diffstat (limited to 'os_net_config/impl_ifcfg.py')
-rw-r--r--os_net_config/impl_ifcfg.py12
1 files changed, 6 insertions, 6 deletions
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):