diff --git a/config_tempest/services/orchestration.py b/config_tempest/services/orchestration.py index 4b5953ac..75325817 100644 --- a/config_tempest/services/orchestration.py +++ b/config_tempest/services/orchestration.py @@ -25,3 +25,44 @@ class OrchestrationService(Service): @staticmethod def get_codename(): return 'heat' + + def set_default_tempest_options(self, conf): + uri = conf.get('identity', 'uri') + if 'v3' not in uri: + return + sec = 'heat_plugin' + # Tempest doesn't differentiate between admin or demo creds anymore + username = conf.get('auth', 'admin_username') + password = conf.get('auth', 'admin_password') + conf.set(sec, 'username', username) + conf.set(sec, 'password', password) + conf.set(sec, 'admin_username', username) + conf.set(sec, 'admin_password', password) + conf.set(sec, 'project_name', conf.get('identity', 'project_name')) + conf.set(sec, 'region', conf.get('identity', 'region')) + + conf.set(sec, 'auth_url', uri) + v = '3' if conf.get('identity', 'auth_version') == 'v3' else '2' + conf.set(sec, 'auth_version', v) + + domain_name = conf.get('auth', 'admin_domain_name') + conf.set(sec, 'project_domain_name', domain_name) + conf.set(sec, 'user_domain_name', domain_name) + + conf.set(sec, 'image_ssh_user', 'root') + conf.set(sec, 'network_for_ssh', 'public') + conf.set(sec, 'fixed_network_name', 'public') + + # should be set to True if using self-signed SSL certificates which + # is a general case + conf.set(sec, 'disable_ssl_certificate_validation', 'True') + + def post_configuration(self, conf, is_service): + conf.set('heat_plugin', 'minimal_instance_type', + conf.get('compute', 'flavor_ref')) + conf.set('heat_plugin', 'instance_type', + conf.get('compute', 'flavor_ref_alt')) + conf.set('heat_plugin', 'minimal_image_ref', + conf.get('compute', 'image_ref')) + conf.set('heat_plugin', 'image_ref', + conf.get('compute', 'image_ref_alt')) diff --git a/releasenotes/notes/Add-heat-plugin-support-539c28e2b4376224.yaml b/releasenotes/notes/Add-heat-plugin-support-539c28e2b4376224.yaml new file mode 100644 index 00000000..d98e4de0 --- /dev/null +++ b/releasenotes/notes/Add-heat-plugin-support-539c28e2b4376224.yaml @@ -0,0 +1,7 @@ +--- +features: + - | + A support for heat-tempest-plugin is added to python-tempestconf which + means, that some options required by heat_plugin will be set automatically + in order to generate a tempest.conf which can pass at least some + heat-tempest-plugin tests and make user's life easier.