aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/__init__.py
diff options
context:
space:
mode:
authorSarath Kumar <sarath.kutty@bigswitch.com>2016-07-21 11:14:39 -0700
committerSarath Kumar <sarath.kutty@bigswitch.com>2016-08-02 11:45:46 -0700
commit15974244f6212905540e1daf9ca596c83f510bdd (patch)
tree26bcd9086d93e4501e9387a126725a847ce3f9bb /os_net_config/__init__.py
parent311df0c3828fe7571079fad9763bca9e2414b51a (diff)
Enable os-net-config to support and configure NFVSwitch
These changes are to generate /etc/sysconf/network-scripts/ifcfg-* and /etc/sysconfig/nfvswitch configuration files for nfvswitch and its interfaces. NFVSwitch is a virtual switch implementation based on DPDK for datacenter workloads with very high throughput needs. Change-Id: If02edb9c4c54c014f67290fe0c34e2fc73cb95bd
Diffstat (limited to 'os_net_config/__init__.py')
-rw-r--r--os_net_config/__init__.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/os_net_config/__init__.py b/os_net_config/__init__.py
index 18c96a2..2aafc23 100644
--- a/os_net_config/__init__.py
+++ b/os_net_config/__init__.py
@@ -51,6 +51,8 @@ class NetConfig(object):
self.add_vlan(obj)
elif isinstance(obj, objects.IvsInterface):
self.add_ivs_interface(obj)
+ elif isinstance(obj, objects.NfvswitchInternal):
+ self.add_nfvswitch_internal(obj)
elif isinstance(obj, objects.OvsBridge):
self.add_bridge(obj)
for member in obj.members:
@@ -63,6 +65,10 @@ class NetConfig(object):
self.add_ivs_bridge(obj)
for member in obj.members:
self.add_object(member)
+ elif isinstance(obj, objects.NfvswitchBridge):
+ self.add_nfvswitch_bridge(obj)
+ for member in obj.members:
+ self.add_object(member)
elif isinstance(obj, objects.OvsBond):
self.add_bond(obj)
for member in obj.members:
@@ -117,6 +123,13 @@ class NetConfig(object):
"""
raise NotImplemented("add_ivs_bridge is not implemented.")
+ def add_nfvswitch_bridge(self, bridge):
+ """Add a NfvswitchBridge object to the net config object.
+
+ :param bridge: The NfvswitchBridge object to add.
+ """
+ raise NotImplemented("add_nfvswitch_bridge is not implemented.")
+
def add_bond(self, bond):
"""Add an OvsBond object to the net config object.