diff options
Diffstat (limited to 'tests/unittests/test_net.py')
-rw-r--r-- | tests/unittests/test_net.py | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/tests/unittests/test_net.py b/tests/unittests/test_net.py index a8b18ee2..dafe9d06 100644 --- a/tests/unittests/test_net.py +++ b/tests/unittests/test_net.py @@ -4045,7 +4045,7 @@ class TestGenerateFallbackConfig(CiTestCase): "dormant": False, "operstate": "down", "address": "00:11:22:33:44:55", - "device/driver": "hv_netsvc", + "device/driver": "hv_netvsc", "device/device": "0x3", "name_assign_type": "4", }, @@ -4078,7 +4078,7 @@ class TestGenerateFallbackConfig(CiTestCase): "set-name": "eth0", "match": { "macaddress": "00:11:22:33:44:55", - "driver": "hv_netsvc", + "driver": "hv_netvsc", }, } }, @@ -4099,7 +4099,7 @@ class TestGenerateFallbackConfig(CiTestCase): "dormant": False, "operstate": "down", "address": "00:11:22:33:44:55", - "device/driver": "hv_netsvc", + "device/driver": "hv_netvsc", "device/device": "0x3", "name_assign_type": "4", "addr_assign_type": "0", @@ -4164,7 +4164,7 @@ iface eth0 inet dhcp expected_rule = [ 'SUBSYSTEM=="net"', 'ACTION=="add"', - 'DRIVERS=="hv_netsvc"', + 'DRIVERS=="hv_netvsc"', 'ATTR{address}=="00:11:22:33:44:55"', 'NAME="eth0"', ] @@ -4173,7 +4173,7 @@ iface eth0 inet dhcp @mock.patch("cloudinit.net.sys_dev_path") @mock.patch("cloudinit.net.read_sys_net") @mock.patch("cloudinit.net.get_devicelist") - def test_device_driver_blacklist( + def test_hv_netvsc_vf_filter( self, mock_get_devicelist, mock_read_sys_net, mock_sys_dev_path ): devices = { @@ -4183,7 +4183,7 @@ iface eth0 inet dhcp "dormant": False, "operstate": "down", "address": "00:11:22:33:44:55", - "device/driver": "hv_netsvc", + "device/driver": "hv_netvsc", "device/device": "0x3", "name_assign_type": "4", "addr_assign_type": "0", @@ -4195,7 +4195,7 @@ iface eth0 inet dhcp "carrier": False, "dormant": False, "operstate": "down", - "address": "00:11:22:33:44:56", + "address": "00:11:22:33:44:55", "device/driver": "mlx4_core", "device/device": "0x7", "name_assign_type": "4", @@ -4214,10 +4214,7 @@ iface eth0 inet dhcp dev_attrs=devices, ) - blacklist = ["mlx4_core"] - network_cfg = net.generate_fallback_config( - blacklist_drivers=blacklist, config_driver=True - ) + network_cfg = net.generate_fallback_config(config_driver=True) ns = network_state.parse_net_config_data( network_cfg, skip_broken=False ) @@ -4251,7 +4248,7 @@ iface eth1 inet dhcp expected_rule = [ 'SUBSYSTEM=="net"', 'ACTION=="add"', - 'DRIVERS=="hv_netsvc"', + 'DRIVERS=="hv_netvsc"', 'ATTR{address}=="00:11:22:33:44:55"', 'NAME="eth1"', ] @@ -4278,7 +4275,7 @@ iface eth1 inet dhcp "dormant": False, "operstate": "down", "address": "00:11:22:33:44:55", - "device/driver": "hv_netsvc", + "device/driver": "hv_netvsc", "device/device": "0x3", "name_assign_type": False, }, @@ -4327,7 +4324,7 @@ iface eth1 inet dhcp "dormant": False, "operstate": "down", "address": "00:11:22:33:44:55", - "device/driver": "hv_netsvc", + "device/driver": "hv_netvsc", "device/device": "0x3", "name_assign_type": False, }, @@ -5252,7 +5249,7 @@ USERCTL=no "dormant": False, "operstate": "down", "address": "CF:D6:AF:48:E8:80", - "device/driver": "hv_netsvc", + "device/driver": "hv_netvsc", "device/device": "0x3", "name_assign_type": "4", "addr_assign_type": "0", @@ -8490,14 +8487,14 @@ class TestRenameInterfaces(CiTestCase): @mock.patch("cloudinit.subp.subp") def test_rename_duplicate_macs(self, mock_subp): renames = [ - ("00:11:22:33:44:55", "eth0", "hv_netsvc", "0x3"), + ("00:11:22:33:44:55", "eth0", "hv_netvsc", "0x3"), ("00:11:22:33:44:55", "vf1", "mlx4_core", "0x5"), ] current_info = { "eth0": { "downable": True, "device_id": "0x3", - "driver": "hv_netsvc", + "driver": "hv_netvsc", "mac": "00:11:22:33:44:55", "name": "eth0", "up": False, @@ -8524,14 +8521,14 @@ class TestRenameInterfaces(CiTestCase): @mock.patch("cloudinit.subp.subp") def test_rename_duplicate_macs_driver_no_devid(self, mock_subp): renames = [ - ("00:11:22:33:44:55", "eth0", "hv_netsvc", None), + ("00:11:22:33:44:55", "eth0", "hv_netvsc", None), ("00:11:22:33:44:55", "vf1", "mlx4_core", None), ] current_info = { "eth0": { "downable": True, "device_id": "0x3", - "driver": "hv_netsvc", + "driver": "hv_netvsc", "mac": "00:11:22:33:44:55", "name": "eth0", "up": False, @@ -8558,7 +8555,7 @@ class TestRenameInterfaces(CiTestCase): @mock.patch("cloudinit.subp.subp") def test_rename_multi_mac_dups(self, mock_subp): renames = [ - ("00:11:22:33:44:55", "eth0", "hv_netsvc", "0x3"), + ("00:11:22:33:44:55", "eth0", "hv_netvsc", "0x3"), ("00:11:22:33:44:55", "vf1", "mlx4_core", "0x5"), ("00:11:22:33:44:55", "vf2", "mlx4_core", "0x7"), ] @@ -8566,7 +8563,7 @@ class TestRenameInterfaces(CiTestCase): "eth0": { "downable": True, "device_id": "0x3", - "driver": "hv_netsvc", + "driver": "hv_netvsc", "mac": "00:11:22:33:44:55", "name": "eth0", "up": False, |