From 78e1b65d93a1c16d58fd72cb65f8e2adf1762854 Mon Sep 17 00:00:00 2001 From: Dan Sneddon Date: Wed, 13 Apr 2016 01:17:16 -0700 Subject: 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 --- etc/os-net-config/samples/ib_interface.json | 26 ++++++++++++++++++++++++++ etc/os-net-config/samples/ib_interface.yaml | 18 ++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 etc/os-net-config/samples/ib_interface.json create mode 100644 etc/os-net-config/samples/ib_interface.yaml (limited to 'etc') diff --git a/etc/os-net-config/samples/ib_interface.json b/etc/os-net-config/samples/ib_interface.json new file mode 100644 index 0000000..4e42867 --- /dev/null +++ b/etc/os-net-config/samples/ib_interface.json @@ -0,0 +1,26 @@ +{"network_config": [ + { + "type": "ib_interface", + "name": "ib0", + "use_dhcp": false, + "addresses": [ + { + "ip_netmask": "192.0.2.1/24" + } + ], + "routes": [ + { + "ip_netmask": "0.0.0.0/0", + "next_hop": "192.0.2.254", + "default": "true" + } + ] + }, + { + "type": "ib_interface", + "name": "ib1", + "use_dhcp": true, + "defroute": no + } + ] +} diff --git a/etc/os-net-config/samples/ib_interface.yaml b/etc/os-net-config/samples/ib_interface.yaml new file mode 100644 index 0000000..f930471 --- /dev/null +++ b/etc/os-net-config/samples/ib_interface.yaml @@ -0,0 +1,18 @@ +network_config: + - + type: ib_interface + name: ib0 + use_dhcp: false + addresses: + - + ip_netmask: 192.0.2.1/24 + routes: + - + ip_netmask: 0.0.0.0/0 + next_hop: 192.0.2.254 + default: true + - + type: interface + name: ib1 + use_dhcp: true + defroute: no \ No newline at end of file -- cgit 1.2.3-korg