diff options
author | Dan Sneddon <dsneddon@redhat.com> | 2016-04-13 01:17:16 -0700 |
---|---|---|
committer | Dan Sneddon <dsneddon@redhat.com> | 2016-07-05 10:27:45 -0700 |
commit | 78e1b65d93a1c16d58fd72cb65f8e2adf1762854 (patch) | |
tree | 150a8e2a68c41b0bd76dc17829181e4b4842b1de /os_net_config/__init__.py | |
parent | 6bb8412ef3d3f163d91f2884081b743f07a78f18 (diff) |
Add support for Infiniband interfaces
This patch adds support for Infiniband interfaces. The only difference
between Inifiniband and regular interfaces at this time is that an
interface with type "ib_interface" will have "TYPE=Infiniband" added
to the ifcfg file.
However, the Infiniband interface is implemented as a full new class,
so in the future we can add script functions or additional config
options to the Infiniband interface config if needed.
Unit tests for both the object and the ifcfg implementation are
included. This patch does not include an implementation for systems
that use /etc/network/interfaces (Debian-based systems).
Note that this change has not yet been tested on bare metal with
Infiniband hardware.
Fixes bug: https://bugzilla.redhat.com/show_bug.cgi?id=1326616
Change-Id: Iaeaca9cd71e2cea6147951d49aecc7458be4ca0b
Diffstat (limited to 'os_net_config/__init__.py')
-rw-r--r-- | os_net_config/__init__.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/os_net_config/__init__.py b/os_net_config/__init__.py index 88e8900..fc1a38a 100644 --- a/os_net_config/__init__.py +++ b/os_net_config/__init__.py @@ -75,6 +75,8 @@ class NetConfig(object): self.add_ovs_tunnel(obj) elif isinstance(obj, objects.OvsPatchPort): self.add_ovs_patch_port(obj) + elif isinstance(obj, objects.IbInterface): + self.add_ib_interface(obj) def add_interface(self, interface): """Add an Interface object to the net config object. @@ -139,6 +141,13 @@ class NetConfig(object): """ raise NotImplemented("add_ovs_patch_port is not implemented.") + def add_ib_interface(self, ib_interface): + """Add an InfiniBand Interface object to the net config object. + + :param interface: The InfiniBand Interface object to add. + """ + raise NotImplemented("add_ib_interface is not implemented.") + def apply(self, cleanup=False): """Apply the network configuration. |