Browse Source

Add 'orchestration' config group for murano tempest

Since I1c02fd88c3d93b511ff4a6b54b668ebd306481a9 this commit
Remove deprecated 'orchestration' config group options,
cause the error in murano tempest test:
tempest.lib.exceptions.UnknownServiceClient: Service clients named orchestration are not known
we should add those config in murano tempest.

Change-Id: I5cd674b94ee472c5b5ab6a9a51170d89880887a4
zhurong 1 year ago
parent
commit
535e537647

+ 28
- 0
murano_tempest_tests/config.py View File

@@ -37,6 +37,9 @@ service_broker_group = cfg.OptGroup(name="service_broker",
37 37
 artifacts_group = cfg.OptGroup(name="artifacts",
38 38
                                title="Glance Artifacts Options")
39 39
 
40
+orchestration_group = cfg.OptGroup(name='orchestration',
41
+                                   title='Orchestration Service Options')
42
+
40 43
 ApplicationCatalogGroup = [
41 44
     # Application catalog tempest configuration
42 45
     cfg.StrOpt("region",
@@ -130,3 +133,28 @@ ArtifactsGroup = [
130 133
                help="Timeout in seconds to wait for a artifacts"
131 134
                     " to become available.")
132 135
 ]
136
+
137
+OrchestrationGroup = [
138
+    cfg.StrOpt('catalog_type',
139
+               default='orchestration',
140
+               help="Catalog type of the Orchestration service."),
141
+    cfg.StrOpt('region',
142
+               default='',
143
+               help="The orchestration region name to use. If empty, the "
144
+                    "value of identity.region is used instead. If no such "
145
+                    "region is found in the service catalog, the first found "
146
+                    "one is used."),
147
+    cfg.StrOpt('endpoint_type',
148
+               default='publicURL',
149
+               choices=['public', 'admin', 'internal',
150
+                        'publicURL', 'adminURL', 'internalURL'],
151
+               help="The endpoint type to use for the orchestration service."),
152
+    cfg.StrOpt('stack_owner_role', default='heat_stack_owner',
153
+               help='Role required for users to be able to manage stacks'),
154
+    cfg.IntOpt('build_interval',
155
+               default=1,
156
+               help="Time in seconds between build status checks."),
157
+    cfg.IntOpt('build_timeout',
158
+               default=1200,
159
+               help="Timeout in seconds to wait for a stack to build.")
160
+]

+ 6
- 1
murano_tempest_tests/plugin.py View File

@@ -42,6 +42,9 @@ class MuranoTempestPlugin(plugins.TempestPlugin):
42 42
         config.register_opt_group(
43 43
             conf, config_application_catalog.artifacts_group,
44 44
             config_application_catalog.ArtifactsGroup)
45
+        config.register_opt_group(
46
+            conf, config_application_catalog.orchestration_group,
47
+            config_application_catalog.OrchestrationGroup)
45 48
 
46 49
     def get_opt_lists(self):
47 50
         return [(config_application_catalog.application_catalog_group.name,
@@ -51,4 +54,6 @@ class MuranoTempestPlugin(plugins.TempestPlugin):
51 54
                 (config.service_available_group.name,
52 55
                  config_application_catalog.service_option),
53 56
                 (config_application_catalog.artifacts_group.name,
54
-                 config_application_catalog.ArtifactsGroup)]
57
+                 config_application_catalog.ArtifactsGroup),
58
+                (config_application_catalog.orchestration_group.name,
59
+                 config_application_catalog.OrchestrationGroup)]

+ 20
- 3
murano_tempest_tests/tests/scenario/application_catalog/base.py View File

@@ -53,9 +53,26 @@ class BaseApplicationCatalogScenarioTest(test.BaseTestCase):
53 53
             cls.os_primary.application_catalog_client
54 54
         cls.artifacts_client = cls.os_primary.artifacts_client
55 55
         cls.servers_client = cls.services_manager.servers_client
56
-        # NOTE(andreaf) The orchestration client is not initialised in Tempest
57
-        # by default anymore.
58
-        params = config.service_client_config('orchestration')
56
+        params = {
57
+            'disable_ssl_certificate_validation':
58
+                CONF.identity.disable_ssl_certificate_validation,
59
+            'ca_certs': CONF.identity.ca_certificates_file,
60
+            'trace_requests': CONF.debug.trace_requests,
61
+            'http_timeout': CONF.service_clients.http_timeout,
62
+            'proxy_url': CONF.service_clients.proxy_url,
63
+            'build_timeout': CONF.orchestration.build_timeout,
64
+            'build_interval': CONF.orchestration.build_interval,
65
+            'endpoint_type': CONF.orchestration.endpoint_type,
66
+            'service': CONF.orchestration.catalog_type
67
+        }
68
+        options = getattr(CONF, 'orchestration')
69
+        # Set region
70
+        # If a service client does not define region or region is not set
71
+        # default to the identity region
72
+        if not hasattr(options, 'region') or not getattr(options, 'region'):
73
+            params['region'] = CONF.identity.region
74
+        else:
75
+            params['region'] = getattr(options, 'region')
59 76
         cls.orchestration_client = orchestration.OrchestrationClient(
60 77
             cls.services_manager.auth_provider, **params)
61 78
         cls.images_client = cls.services_manager.image_client_v2

Loading…
Cancel
Save