Add test to verify FQDN hostname sanitization
This scenario has impacted field engineers trying to spin up
instances with names containing freeform characters alongside
openstack-designate service for neutron.
Also, adding a config feature flag to enable/disable the test.
The get_class_validation_resources wrapper can only manage
one instance of class level validation resources that is used
by all tests defined in the parent class. However, this testcase
requires a custom server name of FQDN type be defined and managed
for the test to be verified successfully. Hence, placing it in a
separate class to prevent base class tests from failing.
Relates to https://bugs.launchpad.net/nova/+bug/1581977 and
gerrit https://review.opendev.org/c/openstack/nova/+/764482/
Devstack gate test:
[Master] https://review.opendev.org/c/openstack/devstack/+/801366
Change-Id: I6a89824e9b2d1b2387e35e55056ad251df3e8633
diff --git a/tempest/config.py b/tempest/config.py
index c409db6..148aa7d 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -437,6 +437,15 @@
cfg.BoolOpt('disk_config',
default=True,
help="If false, skip disk config tests"),
+ # TODO(pkesav): Make it True by default once wallaby
+ # is oldest supported stable for Tempest.
+ cfg.BoolOpt('hostname_fqdn_sanitization',
+ default=False,
+ help="If false, skip fqdn instance sanitization tests. "
+ "Nova started sanitizing the instance name by replacing "
+ "the '.' with '-' to comply with fqdn hostname. Nova "
+ "changed that in Wallaby cycle, if your cloud is older "
+ "than wallaby then you can keep/make it False."),
cfg.ListOpt('api_extensions',
default=['all'],
help='A list of enabled compute extensions with a special '