CI: Set the neutron network interface for dhcpless runs
So, the default settings we run standalone tests against ends up with
flat as the default network_interface which just directly binds the vif,
but that is not really the desired behavior for dhcpless testing unless
we've turned off ALL dhcp on all networks, which we can't in a multitest
environment with concurrent execution, so we attempt to reset the network
interface to neutron so the vif is not directly leveraged for provisioning,
and the workload gets deployed in such a way that it is also forced to boot
and use the configdrive data.
Change-Id: I58f300febc399ec316e6a46ff1cc0893ac081eb4
Signed-off-by: Julia Kreger <juliaashleykreger@gmail.com>
diff --git a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_advanced_ops.py b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_advanced_ops.py
index 0a7116a..b66309b 100644
--- a/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_advanced_ops.py
+++ b/ironic_tempest_plugin/tests/scenario/ironic_standalone/test_advanced_ops.py
@@ -27,6 +27,7 @@
driver = 'redfish'
deploy_interface = 'direct'
boot_interface = 'redfish-virtual-media'
+ # To force interface retoggling.
image_ref = CONF.baremetal.whole_disk_image_ref
image_checksum = CONF.baremetal.whole_disk_image_checksum
wholedisk_image = True
@@ -95,7 +96,23 @@
# Get the latest state for the node.
self.node = self.get_node(self.node['uuid'])
+ # This test, as far as I'm remembering after the fact, was developed
+ # in an environment where neutron was the default network interface.
+ # so we must try to set it to properly ensure dhcp-less operation.
prior_prov_net = self.node['driver_info'].get('provisioning_network')
+ try:
+ self.client.update_node(self.node['uuid'],
+ [{'path': '/network_interface',
+ 'op': 'replace',
+ 'value': 'neutron'}])
+ self.addCleanup(self.update_node,
+ self.node['uuid'],
+ [{'op': 'replace',
+ 'path': '/network_interface',
+ 'value': 'flat'}])
+ except Exception:
+ raise self.skipException(
+ "Ironic configuration incorrect to exercise this test.")
ip_version = CONF.validation.ip_version_for_ssh
tenant_cidr = '10.0.6.0/24'