Add test for dhcp-less vmedia based deployment
Creating test to help facilitate the fix of bug 2032377 and
ultimately help ensure we have a backwards compatible fix.
The scenario:
* Creates a shiny new network without dhcp, and adds a router.
* Sets that network as the provisioning network for the node.
* Creates a port on that network, assigns that port as the VIF.
* Creates a configuration drive network_data.json file payload
* Triggers deployment, utilizing the aformentioned network_data
payload and configuration drive.
* Once deployment has complete, attempts to ping the remote host.
* Once pingable, and this is configurable, it will then attempt
to rebuild the remote host, basically forcing the condition
covered in bug #2032377.
* Rebuild is completed, and the host is attempted to be pinged,
again.
To facilitate this, three configuration options have been added.
Two are external network settings. Because there is no way in
a devstack configuration of neutron to advertise the next hop
router, we have to have a pre-assigned/configured IP on the
external network we can attach a router to. We also need to know
the external network ID.
Then there is basically a option flag if we wish to exercise the
pattern for bug 2032377. Ideally, this would be always, but with
the complexity and fact a non-stock IPA image is required, one
sort of needs to know and then configure as appropriate.
Change-Id: Ic848b8051e4d863f30d47c833d334afc879e4f20
diff --git a/ironic_tempest_plugin/config.py b/ironic_tempest_plugin/config.py
index 8fbfbd5..e1a7c5e 100644
--- a/ironic_tempest_plugin/config.py
+++ b/ironic_tempest_plugin/config.py
@@ -238,6 +238,17 @@
cfg.StrOpt('default_boot_option',
# No good default here, we need to actually set it.
help="The default boot option the testing nodes are using."),
+ cfg.BoolOpt("rebuild_remote_dhcpless",
+ default=True,
+ help="If we should issue a rebuild request when testing "
+ "dhcpless virtual media deployments. This may be useful "
+ "if bug 2032377 is not fixed in the agent ramdisk."),
+ cfg.StrOpt("public_subnet_id",
+ help="The public subnet ID where routers will be bound for "
+ "testing purposes with the dhcp-less test scenario."),
+ cfg.StrOpt("public_subnet_ip",
+ help="The public subnet IP to bind the public router to for "
+ "dhcp-less testing.")
]
BaremetalFeaturesGroup = [
@@ -258,6 +269,14 @@
default=False,
help="Defines if in-band RAID can be built in deploy time "
"(possible starting with Victoria)."),
+ cfg.BoolOpt('dhcpless_vmedia',
+ default=False,
+ help="Defines if it is possible to execute DHCP-Less "
+ "deployment of baremetal nodes through virtual media. "
+ "This test requires full OS images with configuration "
+ "support for embedded network metadata through glean "
+ "or cloud-init, and thus cannot be executed with "
+ "most default job configurations."),
]
BaremetalIntrospectionGroup = [