blob: 1dc79d562af479c496fd5087acf275032bc50f4a [file] [log] [blame]
ZhiQiang Fan39f97222013-09-20 04:49:44 +08001# Copyright 2012 OpenStack Foundation
Jay Pipes3f981df2012-03-27 18:59:44 -04002# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
Andrea Frittolif9cde7e2014-02-18 09:57:04 +000016import keystoneclient.exceptions
17import keystoneclient.v2_0.client
Andrea Frittolif9cde7e2014-02-18 09:57:04 +000018
Marc Koderer24eb89c2014-01-31 11:23:33 +010019from tempest.common.rest_client import NegativeRestClient
Jay Pipesf38eaac2012-06-21 13:37:35 -040020from tempest import config
Daryl Walleck587385b2012-03-03 13:00:26 -060021from tempest import exceptions
Andrea Frittolif9cde7e2014-02-18 09:57:04 +000022from tempest import manager
Matthew Treinishf4a9b0f2013-07-26 16:58:26 -040023from tempest.openstack.common import log as logging
Roman Prykhodchenko62b1ed12013-10-16 21:51:47 +030024from tempest.services.baremetal.v1.client_json import BaremetalClientJSON
Attila Fazekas1aed6202013-02-11 14:47:45 +010025from tempest.services import botoclients
Mitsuhiko Yamazaki74f07072013-04-02 11:52:31 +090026from tempest.services.compute.json.aggregates_client import \
27 AggregatesClientJSON
Leo Toyodaa5278912013-04-16 15:40:12 +090028from tempest.services.compute.json.availability_zone_client import \
29 AvailabilityZoneClientJSON
ivan-zhud57f3cf2013-11-06 16:59:52 +080030from tempest.services.compute.json.certificates_client import \
31 CertificatesClientJSON
dwallecke62b9f02012-10-10 23:34:42 -050032from tempest.services.compute.json.extensions_client import \
harika-vakadi1a9ad612012-12-14 19:12:08 +053033 ExtensionsClientJSON
Sean Dague2416cf32013-04-10 08:29:07 -040034from tempest.services.compute.json.fixed_ips_client import FixedIPsClientJSON
dwallecke62b9f02012-10-10 23:34:42 -050035from tempest.services.compute.json.flavors_client import FlavorsClientJSON
36from tempest.services.compute.json.floating_ips_client import \
harika-vakadi1a9ad612012-12-14 19:12:08 +053037 FloatingIPsClientJSON
Attila Fazekas8e99b992013-02-24 09:53:23 +010038from tempest.services.compute.json.hosts_client import HostsClientJSON
Tony Yang3d5f1632013-06-06 14:17:57 +080039from tempest.services.compute.json.hypervisor_client import \
40 HypervisorClientJSON
dwallecke62b9f02012-10-10 23:34:42 -050041from tempest.services.compute.json.images_client import ImagesClientJSON
ivan-zhuef7a1bd2013-10-22 17:56:46 +080042from tempest.services.compute.json.instance_usage_audit_log_client import \
43 InstanceUsagesAuditLogClientJSON
Sean Dague2416cf32013-04-10 08:29:07 -040044from tempest.services.compute.json.interfaces_client import \
45 InterfacesClientJSON
Attila Fazekas6968dd52013-02-15 17:05:53 +010046from tempest.services.compute.json.keypairs_client import KeyPairsClientJSON
dwallecke62b9f02012-10-10 23:34:42 -050047from tempest.services.compute.json.limits_client import LimitsClientJSON
Ken'ichi Ohmichi2fdc1822014-03-18 09:10:57 +090048from tempest.services.compute.json.migrations_client import \
49 MigrationsClientJSON
Attila Fazekas6968dd52013-02-15 17:05:53 +010050from tempest.services.compute.json.quotas_client import QuotasClientJSON
Matthew Treinisha83a16e2012-12-07 13:44:02 -050051from tempest.services.compute.json.security_groups_client import \
harika-vakadi1a9ad612012-12-14 19:12:08 +053052 SecurityGroupsClientJSON
Attila Fazekas6968dd52013-02-15 17:05:53 +010053from tempest.services.compute.json.servers_client import ServersClientJSON
Leo Toyoda3ae31e12013-04-19 11:19:57 +090054from tempest.services.compute.json.services_client import ServicesClientJSON
Leo Toyodad80b6a02013-05-08 12:15:13 +090055from tempest.services.compute.json.tenant_usages_client import \
56 TenantUsagesClientJSON
Matthew Treinisha83a16e2012-12-07 13:44:02 -050057from tempest.services.compute.json.volumes_extensions_client import \
harika-vakadi1a9ad612012-12-14 19:12:08 +053058 VolumesExtensionsClientJSON
YuikoTakada8a2ec112014-02-18 21:13:51 +000059from tempest.services.compute.v3.json.agents_client import AgentsV3ClientJSON
ivan-zhu00fe64f2013-08-20 19:35:51 +080060from tempest.services.compute.v3.json.aggregates_client import \
61 AggregatesV3ClientJSON
ivan-zhuac7b3802013-08-21 16:03:53 +080062from tempest.services.compute.v3.json.availability_zone_client import \
63 AvailabilityZoneV3ClientJSON
ivan-zhu0e062922013-12-17 16:14:12 +080064from tempest.services.compute.v3.json.certificates_client import \
65 CertificatesV3ClientJSON
ivan-zhu31d98482013-08-22 10:51:48 +080066from tempest.services.compute.v3.json.extensions_client import \
67 ExtensionsV3ClientJSON
ivan-zhub25900a2013-12-13 16:28:45 +080068from tempest.services.compute.v3.json.flavors_client import FlavorsV3ClientJSON
ivan-zhu00fe64f2013-08-20 19:35:51 +080069from tempest.services.compute.v3.json.hosts_client import HostsV3ClientJSON
ivan-zhu6f5f9e92013-08-21 22:16:37 +080070from tempest.services.compute.v3.json.hypervisor_client import \
71 HypervisorV3ClientJSON
ivan-zhu91feab92013-08-15 18:25:33 +080072from tempest.services.compute.v3.json.interfaces_client import \
73 InterfacesV3ClientJSON
ivan-zhu7e7e6a32013-11-20 16:07:29 +080074from tempest.services.compute.v3.json.keypairs_client import \
75 KeyPairsV3ClientJSON
Ken'ichi Ohmichi8f088c12014-03-28 15:16:11 +090076from tempest.services.compute.v3.json.migration_client import \
77 MigrationsV3ClientJSON
ivan-zhub6d69ee2013-12-17 14:16:31 +080078from tempest.services.compute.v3.json.quotas_client import \
79 QuotasV3ClientJSON
ivan-zhu8f992be2013-07-31 14:56:58 +080080from tempest.services.compute.v3.json.servers_client import \
81 ServersV3ClientJSON
ivan-zhu5c86ae62013-08-20 21:09:01 +080082from tempest.services.compute.v3.json.services_client import \
83 ServicesV3ClientJSON
Ken'ichi Ohmichi3d6b6fa2014-01-08 04:42:16 +090084from tempest.services.compute.v3.json.version_client import \
85 VersionV3ClientJSON
Mitsuhiko Yamazakiae8fc532013-04-22 11:17:35 +090086from tempest.services.compute.xml.aggregates_client import AggregatesClientXML
Leo Toyodaa5278912013-04-16 15:40:12 +090087from tempest.services.compute.xml.availability_zone_client import \
88 AvailabilityZoneClientXML
ivan-zhud57f3cf2013-11-06 16:59:52 +080089from tempest.services.compute.xml.certificates_client import \
90 CertificatesClientXML
dwallecke62b9f02012-10-10 23:34:42 -050091from tempest.services.compute.xml.extensions_client import ExtensionsClientXML
Sean Dague2416cf32013-04-10 08:29:07 -040092from tempest.services.compute.xml.fixed_ips_client import FixedIPsClientXML
dwallecke62b9f02012-10-10 23:34:42 -050093from tempest.services.compute.xml.flavors_client import FlavorsClientXML
94from tempest.services.compute.xml.floating_ips_client import \
harika-vakadi1a9ad612012-12-14 19:12:08 +053095 FloatingIPsClientXML
Ken'ichi Ohmichia1aa44c2013-12-06 20:48:24 +090096from tempest.services.compute.xml.hosts_client import HostsClientXML
Tony Yang3d5f1632013-06-06 14:17:57 +080097from tempest.services.compute.xml.hypervisor_client import HypervisorClientXML
dwallecke62b9f02012-10-10 23:34:42 -050098from tempest.services.compute.xml.images_client import ImagesClientXML
ivan-zhuef7a1bd2013-10-22 17:56:46 +080099from tempest.services.compute.xml.instance_usage_audit_log_client import \
100 InstanceUsagesAuditLogClientXML
Sean Dague2416cf32013-04-10 08:29:07 -0400101from tempest.services.compute.xml.interfaces_client import \
102 InterfacesClientXML
dwallecke62b9f02012-10-10 23:34:42 -0500103from tempest.services.compute.xml.keypairs_client import KeyPairsClientXML
104from tempest.services.compute.xml.limits_client import LimitsClientXML
rajalakshmi-ganesan1982c3c2013-01-10 14:56:45 +0530105from tempest.services.compute.xml.quotas_client import QuotasClientXML
dwallecke62b9f02012-10-10 23:34:42 -0500106from tempest.services.compute.xml.security_groups_client \
harika-vakadi1a9ad612012-12-14 19:12:08 +0530107 import SecurityGroupsClientXML
dwallecke62b9f02012-10-10 23:34:42 -0500108from tempest.services.compute.xml.servers_client import ServersClientXML
Leo Toyoda3ae31e12013-04-19 11:19:57 +0900109from tempest.services.compute.xml.services_client import ServicesClientXML
Leo Toyodad80b6a02013-05-08 12:15:13 +0900110from tempest.services.compute.xml.tenant_usages_client import \
111 TenantUsagesClientXML
Matthew Treinisha83a16e2012-12-07 13:44:02 -0500112from tempest.services.compute.xml.volumes_extensions_client import \
harika-vakadi1a9ad612012-12-14 19:12:08 +0530113 VolumesExtensionsClientXML
Sergey Lukjanov3bc60e92013-12-10 16:40:50 +0400114from tempest.services.data_processing.v1_1.client import DataProcessingClient
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800115from tempest.services.database.json.flavors_client import \
116 DatabaseFlavorsClientJSON
Attila Fazekas407b6db2013-01-19 12:48:36 +0100117from tempest.services.identity.json.identity_client import IdentityClientJSON
118from tempest.services.identity.json.identity_client import TokenClientJSON
nayna-patel914b4712013-07-16 08:29:05 +0000119from tempest.services.identity.v3.json.credentials_client import \
120 CredentialsClientJSON
Sean Dague2416cf32013-04-10 08:29:07 -0400121from tempest.services.identity.v3.json.endpoints_client import \
122 EndPointClientJSON
rajalakshmi-ganesan7312bb52013-01-29 20:03:42 +0530123from tempest.services.identity.v3.json.identity_client import \
124 IdentityV3ClientJSON
nayna-patelb35f7232013-06-28 07:08:44 +0000125from tempest.services.identity.v3.json.identity_client import V3TokenClientJSON
harika-vakadi40e10112013-02-08 14:38:09 +0530126from tempest.services.identity.v3.json.policy_client import PolicyClientJSON
harika-vakadia92dd742013-02-19 20:41:22 +0530127from tempest.services.identity.v3.json.service_client import \
128 ServiceClientJSON
nayna-patel914b4712013-07-16 08:29:05 +0000129from tempest.services.identity.v3.xml.credentials_client import \
130 CredentialsClientXML
rajalakshmi-ganesanab426722013-02-08 15:49:15 +0530131from tempest.services.identity.v3.xml.endpoints_client import EndPointClientXML
rajalakshmi-ganesan7312bb52013-01-29 20:03:42 +0530132from tempest.services.identity.v3.xml.identity_client import \
133 IdentityV3ClientXML
nayna-patelb35f7232013-06-28 07:08:44 +0000134from tempest.services.identity.v3.xml.identity_client import V3TokenClientXML
harika-vakadi40e10112013-02-08 14:38:09 +0530135from tempest.services.identity.v3.xml.policy_client import PolicyClientXML
harika-vakadia92dd742013-02-19 20:41:22 +0530136from tempest.services.identity.v3.xml.service_client import \
137 ServiceClientXML
Attila Fazekas407b6db2013-01-19 12:48:36 +0100138from tempest.services.identity.xml.identity_client import IdentityClientXML
139from tempest.services.identity.xml.identity_client import TokenClientXML
Matthew Treinish6d59c992013-03-01 16:20:04 -0500140from tempest.services.image.v1.json.image_client import ImageClientJSON
Matthew Treinisha62347f2013-03-01 16:37:30 -0500141from tempest.services.image.v2.json.image_client import ImageClientV2JSON
raiesmh0867698322013-08-20 13:09:01 +0530142from tempest.services.network.json.network_client import NetworkClientJSON
143from tempest.services.network.xml.network_client import NetworkClientXML
dwalleck5d734432012-10-04 01:11:47 -0500144from tempest.services.object_storage.account_client import AccountClient
harika-vakadi2daed0a2013-01-01 20:51:39 +0530145from tempest.services.object_storage.account_client import \
146 AccountClientCustomizedHeader
Attila Fazekas6968dd52013-02-15 17:05:53 +0100147from tempest.services.object_storage.container_client import ContainerClient
148from tempest.services.object_storage.object_client import ObjectClient
149from tempest.services.object_storage.object_client import \
150 ObjectClientCustomizedHeader
Steve Bakerc60e4e32013-05-06 15:22:41 +1200151from tempest.services.orchestration.json.orchestration_client import \
152 OrchestrationClient
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500153from tempest.services.queuing.json.queuing_client import QueuingClientJSON
Nikolay Pliashechnikovb053aab2013-11-05 06:06:44 -0800154from tempest.services.telemetry.json.telemetry_client import \
155 TelemetryClientJSON
156from tempest.services.telemetry.xml.telemetry_client import \
157 TelemetryClientXML
Nayna Patel4a5024c2013-11-18 07:08:23 +0000158from tempest.services.volume.json.admin.volume_hosts_client import \
159 VolumeHostsClientJSON
Sylvain Baubeaufdd34592014-02-20 18:40:10 +0100160from tempest.services.volume.json.admin.volume_quotas_client import \
161 VolumeQuotasClientJSON
Attila Fazekas6968dd52013-02-15 17:05:53 +0100162from tempest.services.volume.json.admin.volume_types_client import \
163 VolumeTypesClientJSON
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100164from tempest.services.volume.json.backups_client import BackupsClientJSON
Matthew Treinish2324e6b2013-10-21 20:25:17 +0000165from tempest.services.volume.json.extensions_client import \
166 ExtensionsClientJSON as VolumeExtensionClientJSON
Attila Fazekas6968dd52013-02-15 17:05:53 +0100167from tempest.services.volume.json.snapshots_client import SnapshotsClientJSON
168from tempest.services.volume.json.volumes_client import VolumesClientJSON
Zhi Kun Liu8cc3c842014-01-07 10:44:34 +0800169from tempest.services.volume.v2.json.volumes_client import VolumesV2ClientJSON
170from tempest.services.volume.v2.xml.volumes_client import VolumesV2ClientXML
Nayna Patel4a5024c2013-11-18 07:08:23 +0000171from tempest.services.volume.xml.admin.volume_hosts_client import \
172 VolumeHostsClientXML
Sylvain Baubeaufdd34592014-02-20 18:40:10 +0100173from tempest.services.volume.xml.admin.volume_quotas_client import \
174 VolumeQuotasClientXML
Attila Fazekas6968dd52013-02-15 17:05:53 +0100175from tempest.services.volume.xml.admin.volume_types_client import \
176 VolumeTypesClientXML
Giulio Fidente74b08ad2014-01-18 04:02:51 +0100177from tempest.services.volume.xml.backups_client import BackupsClientXML
Matthew Treinish2324e6b2013-10-21 20:25:17 +0000178from tempest.services.volume.xml.extensions_client import \
179 ExtensionsClientXML as VolumeExtensionClientXML
Attila Fazekas6968dd52013-02-15 17:05:53 +0100180from tempest.services.volume.xml.snapshots_client import SnapshotsClientXML
181from tempest.services.volume.xml.volumes_client import VolumesClientXML
Vincent Hou6b8a7b72012-08-25 01:24:33 +0800182
Sean Dague86bd8422013-12-20 09:56:44 -0500183CONF = config.CONF
Jay Pipes3f981df2012-03-27 18:59:44 -0400184LOG = logging.getLogger(__name__)
185
Vincent Hou6b8a7b72012-08-25 01:24:33 +0800186
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000187class Manager(manager.Manager):
Daryl Walleck1465d612011-11-02 02:22:15 -0500188
Jay Pipes3f981df2012-03-27 18:59:44 -0400189 """
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000190 Top level manager for OpenStack tempest clients
Jay Pipes3f981df2012-03-27 18:59:44 -0400191 """
192
James E. Blaire6d8ee12013-01-18 21:33:45 +0000193 def __init__(self, username=None, password=None, tenant_name=None,
Marc Koderer24eb89c2014-01-31 11:23:33 +0100194 interface='json', service=None):
Jay Pipesff10d552012-04-06 14:18:50 -0400195 """
196 We allow overriding of the credentials used within the various
197 client classes managed by the Manager object. Left as None, the
198 standard username/password/tenant_name is used.
199
200 :param username: Override of the username
201 :param password: Override of the password
202 :param tenant_name: Override of the tenant name
203 """
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000204 self.interface = interface
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000205 self.client_type = 'tempest'
206 # super cares for credentials validation
207 super(Manager, self).__init__(
208 username=username, password=password, tenant_name=tenant_name)
Brant Knudsonc7ca3342013-03-28 21:08:50 -0500209
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000210 if self.interface == 'xml':
211 self.certificates_client = CertificatesClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000212 self.auth_provider)
213 self.servers_client = ServersClientXML(self.auth_provider)
214 self.limits_client = LimitsClientXML(self.auth_provider)
215 self.images_client = ImagesClientXML(self.auth_provider)
216 self.keypairs_client = KeyPairsClientXML(self.auth_provider)
217 self.quotas_client = QuotasClientXML(self.auth_provider)
218 self.flavors_client = FlavorsClientXML(self.auth_provider)
219 self.extensions_client = ExtensionsClientXML(self.auth_provider)
Attila Fazekas7e678de2013-07-13 14:13:28 +0200220 self.volumes_extensions_client = VolumesExtensionsClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000221 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000222 self.floating_ips_client = FloatingIPsClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000223 self.auth_provider)
224 self.backups_client = BackupsClientXML(self.auth_provider)
225 self.snapshots_client = SnapshotsClientXML(self.auth_provider)
226 self.volumes_client = VolumesClientXML(self.auth_provider)
227 self.volumes_v2_client = VolumesV2ClientXML(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000228 self.volume_types_client = VolumeTypesClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000229 self.auth_provider)
230 self.identity_client = IdentityClientXML(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000231 self.identity_v3_client = IdentityV3ClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000232 self.auth_provider)
Attila Fazekas7e678de2013-07-13 14:13:28 +0200233 self.security_groups_client = SecurityGroupsClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000234 self.auth_provider)
235 self.interfaces_client = InterfacesClientXML(self.auth_provider)
236 self.endpoints_client = EndPointClientXML(self.auth_provider)
237 self.fixed_ips_client = FixedIPsClientXML(self.auth_provider)
Attila Fazekas7e678de2013-07-13 14:13:28 +0200238 self.availability_zone_client = AvailabilityZoneClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000239 self.auth_provider)
240 self.service_client = ServiceClientXML(self.auth_provider)
241 self.aggregates_client = AggregatesClientXML(self.auth_provider)
242 self.services_client = ServicesClientXML(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000243 self.tenant_usages_client = TenantUsagesClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000244 self.auth_provider)
245 self.policy_client = PolicyClientXML(self.auth_provider)
246 self.hosts_client = HostsClientXML(self.auth_provider)
247 self.hypervisor_client = HypervisorClientXML(self.auth_provider)
248 self.network_client = NetworkClientXML(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000249 self.credentials_client = CredentialsClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000250 self.auth_provider)
ivan-zhuef7a1bd2013-10-22 17:56:46 +0800251 self.instance_usages_audit_log_client = \
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000252 InstanceUsagesAuditLogClientXML(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000253 self.volume_hosts_client = VolumeHostsClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000254 self.auth_provider)
Sylvain Baubeaufdd34592014-02-20 18:40:10 +0100255 self.volume_quotas_client = VolumeQuotasClientXML(
256 self.auth_provider)
Matthew Treinish2324e6b2013-10-21 20:25:17 +0000257 self.volumes_extension_client = VolumeExtensionClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000258 self.auth_provider)
Nikolay Pliashechnikovb053aab2013-11-05 06:06:44 -0800259 if CONF.service_available.ceilometer:
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000260 self.telemetry_client = TelemetryClientXML(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000261 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000262 self.token_client = TokenClientXML()
263 self.token_v3_client = V3TokenClientXML()
Brant Knudsonc7ca3342013-03-28 21:08:50 -0500264
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000265 elif self.interface == 'json':
266 self.certificates_client = CertificatesClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000267 self.auth_provider)
ivan-zhu0e062922013-12-17 16:14:12 +0800268 self.certificates_v3_client = CertificatesV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000269 self.auth_provider)
270 self.baremetal_client = BaremetalClientJSON(self.auth_provider)
271 self.servers_client = ServersClientJSON(self.auth_provider)
272 self.servers_v3_client = ServersV3ClientJSON(self.auth_provider)
273 self.limits_client = LimitsClientJSON(self.auth_provider)
274 self.images_client = ImagesClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000275 self.keypairs_v3_client = KeyPairsV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000276 self.auth_provider)
277 self.keypairs_client = KeyPairsClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000278 self.keypairs_v3_client = KeyPairsV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000279 self.auth_provider)
280 self.quotas_client = QuotasClientJSON(self.auth_provider)
281 self.quotas_v3_client = QuotasV3ClientJSON(self.auth_provider)
282 self.flavors_client = FlavorsClientJSON(self.auth_provider)
283 self.flavors_v3_client = FlavorsV3ClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000284 self.extensions_v3_client = ExtensionsV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000285 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000286 self.extensions_client = ExtensionsClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000287 self.auth_provider)
Attila Fazekas7e678de2013-07-13 14:13:28 +0200288 self.volumes_extensions_client = VolumesExtensionsClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000289 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000290 self.floating_ips_client = FloatingIPsClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000291 self.auth_provider)
292 self.backups_client = BackupsClientJSON(self.auth_provider)
293 self.snapshots_client = SnapshotsClientJSON(self.auth_provider)
294 self.volumes_client = VolumesClientJSON(self.auth_provider)
295 self.volumes_v2_client = VolumesV2ClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000296 self.volume_types_client = VolumeTypesClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000297 self.auth_provider)
298 self.identity_client = IdentityClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000299 self.identity_v3_client = IdentityV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000300 self.auth_provider)
Attila Fazekas7e678de2013-07-13 14:13:28 +0200301 self.security_groups_client = SecurityGroupsClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000302 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000303 self.interfaces_v3_client = InterfacesV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000304 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000305 self.interfaces_client = InterfacesClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000306 self.auth_provider)
307 self.endpoints_client = EndPointClientJSON(self.auth_provider)
308 self.fixed_ips_client = FixedIPsClientJSON(self.auth_provider)
ivan-zhuac7b3802013-08-21 16:03:53 +0800309 self.availability_zone_v3_client = AvailabilityZoneV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000310 self.auth_provider)
Attila Fazekas7e678de2013-07-13 14:13:28 +0200311 self.availability_zone_client = AvailabilityZoneClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000312 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000313 self.services_v3_client = ServicesV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000314 self.auth_provider)
315 self.service_client = ServiceClientJSON(self.auth_provider)
YuikoTakada8a2ec112014-02-18 21:13:51 +0000316 self.agents_v3_client = AgentsV3ClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000317 self.aggregates_v3_client = AggregatesV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000318 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000319 self.aggregates_client = AggregatesClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000320 self.auth_provider)
321 self.services_client = ServicesClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000322 self.tenant_usages_client = TenantUsagesClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000323 self.auth_provider)
324 self.version_v3_client = VersionV3ClientJSON(self.auth_provider)
Ken'ichi Ohmichi8f088c12014-03-28 15:16:11 +0900325 self.migrations_v3_client = MigrationsV3ClientJSON(
326 self.auth_provider)
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000327 self.policy_client = PolicyClientJSON(self.auth_provider)
328 self.hosts_client = HostsClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000329 self.hypervisor_v3_client = HypervisorV3ClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000330 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000331 self.hypervisor_client = HypervisorClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000332 self.auth_provider)
333 self.network_client = NetworkClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000334 self.credentials_client = CredentialsClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000335 self.auth_provider)
ivan-zhuef7a1bd2013-10-22 17:56:46 +0800336 self.instance_usages_audit_log_client = \
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000337 InstanceUsagesAuditLogClientJSON(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000338 self.volume_hosts_client = VolumeHostsClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000339 self.auth_provider)
Sylvain Baubeaufdd34592014-02-20 18:40:10 +0100340 self.volume_quotas_client = VolumeQuotasClientJSON(
341 self.auth_provider)
Matthew Treinish2324e6b2013-10-21 20:25:17 +0000342 self.volumes_extension_client = VolumeExtensionClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000343 self.auth_provider)
344 self.hosts_v3_client = HostsV3ClientJSON(self.auth_provider)
Nikhil Manchandadd6886f2014-03-03 01:58:45 -0800345 self.database_flavors_client = DatabaseFlavorsClientJSON(
346 self.auth_provider)
Malini Kamalambal6e7b3b82014-02-06 06:49:04 -0500347 self.queuing_client = QueuingClientJSON(self.auth_provider)
Nikolay Pliashechnikovb053aab2013-11-05 06:06:44 -0800348 if CONF.service_available.ceilometer:
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000349 self.telemetry_client = TelemetryClientJSON(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000350 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000351 self.token_client = TokenClientJSON()
352 self.token_v3_client = V3TokenClientJSON()
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000353 self.negative_client = NegativeRestClient(self.auth_provider)
Marc Koderer24eb89c2014-01-31 11:23:33 +0100354 self.negative_client.service = service
Attila Fazekas7e678de2013-07-13 14:13:28 +0200355
Attila Fazekas7e678de2013-07-13 14:13:28 +0200356 else:
Dan Smithcf8fab62012-08-14 08:03:48 -0700357 msg = "Unsupported interface type `%s'" % interface
358 raise exceptions.InvalidConfiguration(msg)
Attila Fazekas7e678de2013-07-13 14:13:28 +0200359
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000360 # TODO(andreaf) EC2 client still do their auth, v2 only
361 ec2_client_args = (self.credentials.get('username'),
362 self.credentials.get('password'),
363 CONF.identity.uri,
364 self.credentials.get('tenant_name'))
365
Attila Fazekas7e678de2013-07-13 14:13:28 +0200366 # common clients
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000367 self.account_client = AccountClient(self.auth_provider)
Sean Dague86bd8422013-12-20 09:56:44 -0500368 if CONF.service_available.glance:
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000369 self.image_client = ImageClientJSON(self.auth_provider)
370 self.image_client_v2 = ImageClientV2JSON(self.auth_provider)
371 self.container_client = ContainerClient(self.auth_provider)
372 self.object_client = ObjectClient(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000373 self.orchestration_client = OrchestrationClient(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000374 self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000375 self.ec2api_client = botoclients.APIClientEC2(*ec2_client_args)
376 self.s3_client = botoclients.ObjectClientS3(*ec2_client_args)
377 self.custom_object_client = ObjectClientCustomizedHeader(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000378 self.auth_provider)
harika-vakadi2daed0a2013-01-01 20:51:39 +0530379 self.custom_account_client = \
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000380 AccountClientCustomizedHeader(self.auth_provider)
Andrea Frittoli8bbdb162014-01-06 11:06:13 +0000381 self.data_processing_client = DataProcessingClient(
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000382 self.auth_provider)
Ken'ichi Ohmichi2fdc1822014-03-18 09:10:57 +0900383 self.migrations_client = MigrationsClientJSON(self.auth_provider)
Jay Pipes50677282012-01-06 15:39:20 -0500384
385
Jay Pipesff10d552012-04-06 14:18:50 -0400386class AltManager(Manager):
387
388 """
389 Manager object that uses the alt_XXX credentials for its
390 managed client objects
391 """
392
Marc Koderer24eb89c2014-01-31 11:23:33 +0100393 def __init__(self, interface='json', service=None):
Sean Dague86bd8422013-12-20 09:56:44 -0500394 super(AltManager, self).__init__(CONF.identity.alt_username,
395 CONF.identity.alt_password,
396 CONF.identity.alt_tenant_name,
Marc Koderer24eb89c2014-01-31 11:23:33 +0100397 interface=interface,
398 service=service)
Jay Pipesff10d552012-04-06 14:18:50 -0400399
400
401class AdminManager(Manager):
402
403 """
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100404 Manager object that uses the admin credentials for its
Jay Pipesff10d552012-04-06 14:18:50 -0400405 managed client objects
406 """
407
Marc Koderer24eb89c2014-01-31 11:23:33 +0100408 def __init__(self, interface='json', service=None):
Sean Dague86bd8422013-12-20 09:56:44 -0500409 super(AdminManager, self).__init__(CONF.identity.admin_username,
410 CONF.identity.admin_password,
411 CONF.identity.admin_tenant_name,
Marc Koderer24eb89c2014-01-31 11:23:33 +0100412 interface=interface,
413 service=service)
Jay Pipesff10d552012-04-06 14:18:50 -0400414
415
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100416class ComputeAdminManager(Manager):
417
418 """
419 Manager object that uses the compute_admin credentials for its
420 managed client objects
421 """
422
Marc Koderer24eb89c2014-01-31 11:23:33 +0100423 def __init__(self, interface='json', service=None):
Attila Fazekascadcb1f2013-01-21 23:10:53 +0100424 base = super(ComputeAdminManager, self)
Sean Dague86bd8422013-12-20 09:56:44 -0500425 base.__init__(CONF.compute_admin.username,
426 CONF.compute_admin.password,
427 CONF.compute_admin.tenant_name,
Marc Koderer24eb89c2014-01-31 11:23:33 +0100428 interface=interface,
429 service=service)
Steve Bakerc60e4e32013-05-06 15:22:41 +1200430
431
432class OrchestrationManager(Manager):
433 """
434 Manager object that uses the admin credentials for its
435 so that heat templates can create users
436 """
Marc Koderer24eb89c2014-01-31 11:23:33 +0100437 def __init__(self, interface='json', service=None):
Steve Bakerc60e4e32013-05-06 15:22:41 +1200438 base = super(OrchestrationManager, self)
Steve Bakerb07f9742014-02-19 10:03:57 +1300439 # heat currently needs an admin user so that stacks can create users
440 # however the tests need the demo tenant so that the neutron
441 # private network is the default. DO NOT change this auth combination
442 # until heat can run with the demo user.
Sean Dague86bd8422013-12-20 09:56:44 -0500443 base.__init__(CONF.identity.admin_username,
444 CONF.identity.admin_password,
Steve Bakerb07f9742014-02-19 10:03:57 +1300445 CONF.identity.tenant_name,
Marc Koderer24eb89c2014-01-31 11:23:33 +0100446 interface=interface,
447 service=service)
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000448
449
450class OfficialClientManager(manager.Manager):
451 """
452 Manager that provides access to the official python clients for
453 calling various OpenStack APIs.
454 """
455
456 NOVACLIENT_VERSION = '2'
457 CINDERCLIENT_VERSION = '1'
458 HEATCLIENT_VERSION = '1'
Adam Gandelman4a48a602014-03-20 18:23:18 -0700459 IRONICCLIENT_VERSION = '1'
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000460
461 def __init__(self, username, password, tenant_name):
462 # FIXME(andreaf) Auth provider for client_type 'official' is
463 # not implemented yet, setting to 'tempest' for now.
464 self.client_type = 'tempest'
465 self.interface = None
466 # super cares for credentials validation
467 super(OfficialClientManager, self).__init__(
468 username=username, password=password, tenant_name=tenant_name)
Adam Gandelman4a48a602014-03-20 18:23:18 -0700469 self.baremetal_client = self._get_baremetal_client()
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000470 self.compute_client = self._get_compute_client(username,
471 password,
472 tenant_name)
473 self.identity_client = self._get_identity_client(username,
474 password,
475 tenant_name)
476 self.image_client = self._get_image_client()
477 self.network_client = self._get_network_client()
478 self.volume_client = self._get_volume_client(username,
479 password,
480 tenant_name)
481 self.object_storage_client = self._get_object_storage_client(
482 username,
483 password,
484 tenant_name)
485 self.orchestration_client = self._get_orchestration_client(
486 username,
487 password,
488 tenant_name)
489
Adam Gandelman4a48a602014-03-20 18:23:18 -0700490 def _get_roles(self):
491 keystone_admin = self._get_identity_client(
492 CONF.identity.admin_username,
493 CONF.identity.admin_password,
494 CONF.identity.admin_tenant_name)
495
496 username = self.credentials['username']
497 tenant_name = self.credentials['tenant_name']
498 user_id = keystone_admin.users.find(name=username).id
499 tenant_id = keystone_admin.tenants.find(name=tenant_name).id
500
501 roles = keystone_admin.roles.roles_for_user(
502 user=user_id, tenant=tenant_id)
503
504 return [r.name for r in roles]
505
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000506 def _get_compute_client(self, username, password, tenant_name):
507 # Novaclient will not execute operations for anyone but the
508 # identified user, so a new client needs to be created for
509 # each user that operations need to be performed for.
Zhi Kun Liufaa6b5f2014-04-14 01:38:16 -0500510 if not CONF.service_available.nova:
511 return None
512 import novaclient.client
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000513 self._validate_credentials(username, password, tenant_name)
514
515 auth_url = CONF.identity.uri
516 dscv = CONF.identity.disable_ssl_certificate_validation
517 region = CONF.identity.region
518
519 client_args = (username, password, tenant_name, auth_url)
520
521 # Create our default Nova client to use in testing
522 service_type = CONF.compute.catalog_type
523 endpoint_type = CONF.compute.endpoint_type
524 return novaclient.client.Client(self.NOVACLIENT_VERSION,
525 *client_args,
526 service_type=service_type,
527 endpoint_type=endpoint_type,
528 region_name=region,
529 no_cache=True,
530 insecure=dscv,
531 http_log_debug=True)
532
533 def _get_image_client(self):
Zhi Kun Liufaa6b5f2014-04-14 01:38:16 -0500534 if not CONF.service_available.glance:
535 return None
536 import glanceclient
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000537 token = self.identity_client.auth_token
538 region = CONF.identity.region
539 endpoint_type = CONF.image.endpoint_type
540 endpoint = self.identity_client.service_catalog.url_for(
541 attr='region', filter_value=region,
542 service_type=CONF.image.catalog_type, endpoint_type=endpoint_type)
543 dscv = CONF.identity.disable_ssl_certificate_validation
544 return glanceclient.Client('1', endpoint=endpoint, token=token,
545 insecure=dscv)
546
547 def _get_volume_client(self, username, password, tenant_name):
Zhi Kun Liufaa6b5f2014-04-14 01:38:16 -0500548 if not CONF.service_available.cinder:
549 return None
550 import cinderclient.client
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000551 auth_url = CONF.identity.uri
552 region = CONF.identity.region
553 endpoint_type = CONF.volume.endpoint_type
Rob Crittenden1aba5d02014-03-25 23:27:09 -0400554 dscv = CONF.identity.disable_ssl_certificate_validation
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000555 return cinderclient.client.Client(self.CINDERCLIENT_VERSION,
556 username,
557 password,
558 tenant_name,
559 auth_url,
560 region_name=region,
561 endpoint_type=endpoint_type,
Rob Crittenden1aba5d02014-03-25 23:27:09 -0400562 insecure=dscv,
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000563 http_log_debug=True)
564
565 def _get_object_storage_client(self, username, password, tenant_name):
Zhi Kun Liufaa6b5f2014-04-14 01:38:16 -0500566 if not CONF.service_available.swift:
567 return None
568 import swiftclient
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000569 auth_url = CONF.identity.uri
570 # add current tenant to swift operator role group.
571 keystone_admin = self._get_identity_client(
572 CONF.identity.admin_username,
573 CONF.identity.admin_password,
574 CONF.identity.admin_tenant_name)
575
576 # enable test user to operate swift by adding operator role to him.
577 roles = keystone_admin.roles.list()
578 operator_role = CONF.object_storage.operator_role
579 member_role = [role for role in roles if role.name == operator_role][0]
580 # NOTE(maurosr): This is surrounded in the try-except block cause
581 # neutron tests doesn't have tenant isolation.
582 try:
583 keystone_admin.roles.add_user_role(self.identity_client.user_id,
584 member_role.id,
585 self.identity_client.tenant_id)
586 except keystoneclient.exceptions.Conflict:
587 pass
588
589 endpoint_type = CONF.object_storage.endpoint_type
590 os_options = {'endpoint_type': endpoint_type}
591 return swiftclient.Connection(auth_url, username, password,
592 tenant_name=tenant_name,
593 auth_version='2',
594 os_options=os_options)
595
596 def _get_orchestration_client(self, username=None, password=None,
597 tenant_name=None):
Zhi Kun Liufaa6b5f2014-04-14 01:38:16 -0500598 if not CONF.service_available.heat:
599 return None
600 import heatclient.client
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000601 if not username:
602 username = CONF.identity.admin_username
603 if not password:
604 password = CONF.identity.admin_password
605 if not tenant_name:
606 tenant_name = CONF.identity.tenant_name
607
608 self._validate_credentials(username, password, tenant_name)
609
610 keystone = self._get_identity_client(username, password, tenant_name)
611 region = CONF.identity.region
612 endpoint_type = CONF.orchestration.endpoint_type
613 token = keystone.auth_token
614 service_type = CONF.orchestration.catalog_type
615 try:
616 endpoint = keystone.service_catalog.url_for(
617 attr='region',
618 filter_value=region,
619 service_type=service_type,
620 endpoint_type=endpoint_type)
621 except keystoneclient.exceptions.EndpointNotFound:
622 return None
623 else:
624 return heatclient.client.Client(self.HEATCLIENT_VERSION,
625 endpoint,
626 token=token,
627 username=username,
628 password=password)
629
630 def _get_identity_client(self, username, password, tenant_name):
631 # This identity client is not intended to check the security
632 # of the identity service, so use admin credentials by default.
633 self._validate_credentials(username, password, tenant_name)
634
635 auth_url = CONF.identity.uri
636 dscv = CONF.identity.disable_ssl_certificate_validation
637
638 return keystoneclient.v2_0.client.Client(username=username,
639 password=password,
640 tenant_name=tenant_name,
641 auth_url=auth_url,
642 insecure=dscv)
643
Adam Gandelman4a48a602014-03-20 18:23:18 -0700644 def _get_baremetal_client(self):
645 # ironic client is currently intended to by used by admin users
Zhi Kun Liufaa6b5f2014-04-14 01:38:16 -0500646 if not CONF.service_available.ironic:
647 return None
648 import ironicclient.client
Adam Gandelman4a48a602014-03-20 18:23:18 -0700649 roles = self._get_roles()
650 if CONF.identity.admin_role not in roles:
651 return None
652
653 auth_url = CONF.identity.uri
654 api_version = self.IRONICCLIENT_VERSION
655 insecure = CONF.identity.disable_ssl_certificate_validation
656 service_type = CONF.baremetal.catalog_type
657 endpoint_type = CONF.baremetal.endpoint_type
658 creds = {
659 'os_username': self.credentials['username'],
660 'os_password': self.credentials['password'],
661 'os_tenant_name': self.credentials['tenant_name']
662 }
663
664 try:
665 return ironicclient.client.get_client(
666 api_version=api_version,
667 os_auth_url=auth_url,
668 insecure=insecure,
669 os_service_type=service_type,
670 os_endpoint_type=endpoint_type,
671 **creds)
672 except keystoneclient.exceptions.EndpointNotFound:
673 return None
674
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000675 def _get_network_client(self):
676 # The intended configuration is for the network client to have
677 # admin privileges and indicate for whom resources are being
678 # created via a 'tenant_id' parameter. This will often be
679 # preferable to authenticating as a specific user because
680 # working with certain resources (public routers and networks)
681 # often requires admin privileges anyway.
Zhi Kun Liufaa6b5f2014-04-14 01:38:16 -0500682 if not CONF.service_available.neutron:
683 return None
684 import neutronclient.v2_0.client
Andrea Frittolif9cde7e2014-02-18 09:57:04 +0000685 username = CONF.identity.admin_username
686 password = CONF.identity.admin_password
687 tenant_name = CONF.identity.admin_tenant_name
688
689 self._validate_credentials(username, password, tenant_name)
690
691 auth_url = CONF.identity.uri
692 dscv = CONF.identity.disable_ssl_certificate_validation
693 endpoint_type = CONF.network.endpoint_type
694
695 return neutronclient.v2_0.client.Client(username=username,
696 password=password,
697 tenant_name=tenant_name,
698 endpoint_type=endpoint_type,
699 auth_url=auth_url,
700 insecure=dscv)