diff options
author | Darren Birkett <darren.birkett@gmail.com> | 2019-10-21 16:17:03 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2019-10-21 16:17:03 +0000 |
commit | 02c8214eac857e29b40ecc65992c1da6983083e1 (patch) | |
tree | fd4098986e46b8089a21ce08f400b2ca7465ce7e /tests/unittests/test_net.py | |
parent | ecb501b84338f078be18c38c68c3ce87fed3584b (diff) | |
download | vyos-cloud-init-02c8214eac857e29b40ecc65992c1da6983083e1.tar.gz vyos-cloud-init-02c8214eac857e29b40ecc65992c1da6983083e1.zip |
net: enable infiniband support in eni and sysconfig renderers
Commit e7b0e5f72 added support for configuring infiniband devices by
adding a new infiniband 'type'. This commit updates eni and sysconfig
renderers to consume this new type and configure infiniband devices
correctly.
LP: #1847114
Diffstat (limited to 'tests/unittests/test_net.py')
-rw-r--r-- | tests/unittests/test_net.py | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py index f5a9cae6..d2201998 100644 --- a/tests/unittests/test_net.py +++ b/tests/unittests/test_net.py @@ -1176,6 +1176,12 @@ iface eth4 inet manual # control-manual eth5 iface eth5 inet dhcp +auto ib0 +iface ib0 inet static + address 192.168.200.7/24 + mtu 9000 + hwaddress a0:00:02:20:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:15:e2:c1 + auto bond0 iface bond0 inet6 dhcp bond-mode active-backup @@ -1457,7 +1463,19 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true ONBOOT=no STARTMODE=manual TYPE=Ethernet - USERCTL=no""") + USERCTL=no"""), + 'ifcfg-ib0': textwrap.dedent("""\ + BOOTPROTO=none + DEVICE=ib0 + HWADDR=a0:00:02:20:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:15:e2:c1 + IPADDR=192.168.200.7 + MTU=9000 + NETMASK=255.255.255.0 + NM_CONTROLLED=no + ONBOOT=yes + STARTMODE=auto + TYPE=InfiniBand + USERCTL=no"""), }, 'yaml': textwrap.dedent(""" version: 1 @@ -1532,6 +1550,15 @@ pre-down route del -net 10.0.0.0/8 gw 11.0.0.1 metric 3 || true vlan_id: 200 subnets: - type: dhcp4 + # An infiniband + - type: infiniband + name: ib0 + mac_address: >- + a0:00:02:20:fe:80:00:00:00:00:00:00:ec:0d:9a:03:00:15:e2:c1 + subnets: + - type: static + address: 192.168.200.7/24 + mtu: 9000 # A bridge. - type: bridge name: br0 |