Remove /extra/vif_port_id usage
A long time ago, in a galaxy far far away, the use of
/extra/vif_port_id was deprecated in favor of vif attachment and
detachment. This change updates a test which was using the
/extra/vif_port_id field value to bind a vif, and then list/detach
it using the vif attach/detach/list API interfaces.
Since the action is to add/list/detach, this seems appropriate and
should be widely supported going back 4+ years.
Change-Id: I0b0cd0aaf9a87803386e096ab768638476f9ca52
diff --git a/ironic_tempest_plugin/tests/api/admin/test_nodes.py b/ironic_tempest_plugin/tests/api/admin/test_nodes.py
index 2709905..e4443d9 100644
--- a/ironic_tempest_plugin/tests/api/admin/test_nodes.py
+++ b/ironic_tempest_plugin/tests/api/admin/test_nodes.py
@@ -400,16 +400,12 @@
self.assertNotIn('tenant_vif_port_id', portgroup['internal_info'])
@decorators.idempotent_id('a3d319d0-cacb-4e55-a3dc-3fa8b74880f2')
- def test_vif_already_set_on_extra(self):
+ def test_vif_already_set(self):
self.useFixture(
api_microversion_fixture.APIMicroversionFixture('1.28'))
_, self.port = self.create_port(self.node['uuid'],
data_utils.rand_mac_address())
- patch = [{'path': '/extra/vif_port_id',
- 'op': 'add',
- 'value': self.nport_id}]
- self.client.update_port(self.port['uuid'], patch)
-
+ self.client.vif_attach(self.node['uuid'], self.nport_id)
_, body = self.client.vif_list(self.node['uuid'])
self.assertEqual({'vifs': [{'id': self.nport_id}]}, body)