Fix rally test can't update device_id

In neutron-lib new default policy disallowed create_port and update_port
with device_id parameter. This parameter is only for admin.

Bug #1986969

Change-Id: Ie2b42192b0233c3c30f08d2ef79de754922f012d
This commit is contained in:
Pierre Libeau 2023-01-23 09:30:30 +01:00 committed by Andrey Kurilin
parent 4ef9de1628
commit 72f4e27e2d
2 changed files with 0 additions and 5 deletions

View File

@ -54,10 +54,8 @@ class CreateAndListTrunks(neutron_utils.NeutronScenario):
trunk_payload = {"port_id": parent["port"]["id"],
"sub_ports": subport_payload}
trunk = self._create_trunk(trunk_payload)
self._update_port(parent, {"device_id": "sometrunk"})
self._list_trunks()
self._list_subports_by_trunk(trunk["trunk"]["id"])
self._list_ports_by_device_id("sometrunk")
@types.convert(image={"type": "glance_image"},

View File

@ -31,7 +31,6 @@ class NeutronTrunkTestCase(test.ScenarioTestCase):
scenario._create_trunk = mock.MagicMock()
scenario._list_subports_by_trunk = mock.MagicMock()
scenario._update_port = mock.Mock()
scenario._list_ports_by_device_id = mock.Mock()
scenario.run(network_create_args=network_create_args,
subport_count=subport_count)
scenario._create_network.assert_called_once_with(
@ -40,9 +39,7 @@ class NeutronTrunkTestCase(test.ScenarioTestCase):
[mock.call(net, {})
for _ in range(subport_count + 1)])
self.assertEqual(1, scenario._create_trunk.call_count)
self.assertEqual(1, scenario._update_port.call_count)
self.assertEqual(1, scenario._list_subports_by_trunk.call_count)
self.assertEqual(1, scenario._list_ports_by_device_id.call_count)
def test_boot_server_with_subports(self):
img_name = "img"