summaryrefslogtreecommitdiff
path: root/cloudinit/net/network_state.py
diff options
context:
space:
mode:
authorMark Goddard <mark@stackhpc.com>2018-09-26 17:59:07 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-09-26 17:59:07 +0000
commite7b0e5f72e134779cfe22cd07b09a42c22d2bfe1 (patch)
tree89ea5f457b95560975da3ef18e023bac9cb46c06 /cloudinit/net/network_state.py
parentfc4b966ba928b30b1c586407e752e0b51b1031e8 (diff)
downloadvyos-cloud-init-e7b0e5f72e134779cfe22cd07b09a42c22d2bfe1.tar.gz
vyos-cloud-init-e7b0e5f72e134779cfe22cd07b09a42c22d2bfe1.zip
Add support for Infiniband network interfaces (IPoIB).
OpenStack ironic references Infiniband interfaces via a 6 byte 'MAC address' formed from bytes 13-15 and 18-20 of interface's hardware address. This address is used as the ethernet_mac_address of Infiniband links in network_data.json in configdrives generated by OpenStack nova. We can use this address to map links in network_data.json to their corresponding interface names. When generating interface configuration files, we need to use the interface's full hardware address as the HWADDR, rather than the 6 byte MAC address provided by network_data.json. This change allows IB interfaces to be referenced in this dual mode - by MAC address and hardware address, depending on the context. Support TYPE=InfiniBand for sysconfig configuration of IB interfaces.
Diffstat (limited to 'cloudinit/net/network_state.py')
-rw-r--r--cloudinit/net/network_state.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py
index 72c803eb..f76e508a 100644
--- a/cloudinit/net/network_state.py
+++ b/cloudinit/net/network_state.py
@@ -483,6 +483,10 @@ class NetworkStateInterpreter(object):
interfaces.update({iface['name']: iface})
+ @ensure_command_keys(['name'])
+ def handle_infiniband(self, command):
+ self.handle_physical(command)
+
@ensure_command_keys(['address'])
def handle_nameserver(self, command):
dns = self._network_state.get('dns')