Validation support
validation.image_ssh_user option is heavily used in CI and it's also needed in refstack. Therefor set the value automatically when image used is cirros. Change-Id: Ib823380225fda78462c727e50a0f4f82b6da4e74
This commit is contained in:
parent
1e3caa063c
commit
275b6b7591
@ -377,7 +377,7 @@ def config_tempest(**kwargs):
|
|||||||
|
|
||||||
image = services.get_service('image')
|
image = services.get_service('image')
|
||||||
image.set_image_preferences(kwargs.get('create', False),
|
image.set_image_preferences(kwargs.get('create', False),
|
||||||
kwargs.get('image_name', C.DEFAULT_IMAGE),
|
kwargs.get('image_path', C.DEFAULT_IMAGE),
|
||||||
kwargs.get('image_disk_format',
|
kwargs.get('image_disk_format',
|
||||||
C.DEFAULT_IMAGE_FORMAT))
|
C.DEFAULT_IMAGE_FORMAT))
|
||||||
image.create_tempest_images(conf)
|
image.create_tempest_images(conf)
|
||||||
@ -416,7 +416,7 @@ def main():
|
|||||||
cloud_creds=cloud_creds,
|
cloud_creds=cloud_creds,
|
||||||
debug=args.debug,
|
debug=args.debug,
|
||||||
deployer_input=args.deployer_input,
|
deployer_input=args.deployer_input,
|
||||||
image_name=args.image,
|
image_path=args.image,
|
||||||
image_disk_format=args.image_disk_format,
|
image_disk_format=args.image_disk_format,
|
||||||
network_id=args.network_id,
|
network_id=args.network_id,
|
||||||
non_admin=args.non_admin,
|
non_admin=args.non_admin,
|
||||||
|
@ -44,6 +44,13 @@ class ImageService(VersionedService):
|
|||||||
self.image_path = image_path
|
self.image_path = image_path
|
||||||
self.disk_format = disk_format
|
self.disk_format = disk_format
|
||||||
|
|
||||||
|
def set_default_tempest_options(self, conf):
|
||||||
|
# When cirros is the image, set validation.image_ssh_user to cirros.
|
||||||
|
# The option is heavily used in CI and it's also usefull for refstack,
|
||||||
|
# because we don't have to specify overrides.
|
||||||
|
if 'cirros' in self.image_path.rsplit('/')[-1]:
|
||||||
|
conf.set('validation', 'image_ssh_user', 'cirros')
|
||||||
|
|
||||||
def set_versions(self):
|
def set_versions(self):
|
||||||
super(ImageService, self).set_versions(top_level=False)
|
super(ImageService, self).set_versions(top_level=False)
|
||||||
|
|
||||||
|
@ -27,13 +27,6 @@ admin_project_name=admin
|
|||||||
|
|
||||||
admin_domain_name=Default
|
admin_domain_name=Default
|
||||||
|
|
||||||
[compute]
|
|
||||||
|
|
||||||
# Should the tests ssh to instances? (boolean value)
|
|
||||||
#run_ssh=false $$$ REDHAT: use true
|
|
||||||
# This parameter is deprecated and will be removed in a future release
|
|
||||||
image_ssh_user = cirros
|
|
||||||
|
|
||||||
[identity]
|
[identity]
|
||||||
|
|
||||||
# Full URI of the OpenStack Identity API (Keystone), v3
|
# Full URI of the OpenStack Identity API (Keystone), v3
|
||||||
@ -69,7 +62,7 @@ admin_username=admin
|
|||||||
|
|
||||||
# Administrative Tenant name to use for Keystone API requests.
|
# Administrative Tenant name to use for Keystone API requests.
|
||||||
# (string value)
|
# (string value)
|
||||||
# Parameter moved to auth section as admin_project_name. Would
|
# Parameter moved to auth section as admin_project_name. Would
|
||||||
# be deprecated in future releases
|
# be deprecated in future releases
|
||||||
admin_tenant_name=admin
|
admin_tenant_name=admin
|
||||||
|
|
||||||
@ -132,6 +125,3 @@ preserve_ports=true
|
|||||||
[network-feature-enabled]
|
[network-feature-enabled]
|
||||||
# Added in juno
|
# Added in juno
|
||||||
ipv6_subnet_attributes=true
|
ipv6_subnet_attributes=true
|
||||||
|
|
||||||
[validation]
|
|
||||||
image_ssh_user = cirros
|
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
validation.image_sh_user option is heavily used in CI and it's also needed
|
||||||
|
in refstack. Therefor the value is set to cirros automatically from now
|
||||||
|
everytime when image used is cirros.
|
||||||
|
The hardcoded value in default-overrides.conf is removed.
|
||||||
|
other:
|
||||||
|
- |
|
||||||
|
By this change compute.image_ssh_user is removed from
|
||||||
|
default-overrides.conf too, because it was deprecated. All of the
|
||||||
|
image_ssh_user values from different sections were moved to validation
|
||||||
|
section by this change:
|
||||||
|
|
||||||
|
https://review.openstack.org/#/c/434097/
|
||||||
|
|
||||||
|
Since that change, there is only one image_ssh_user value and it's the one
|
||||||
|
under validation section.
|
Loading…
Reference in New Issue
Block a user