Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 1 | # Copyright 2016 Hewlett Packard Enterprise Development Company, L.P. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 4 | # not use this file except in compliance with the License. You may obtain |
| 5 | # a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | # License for the specific language governing permissions and limitations |
| 13 | # under the License. |
| 14 | from tempest import clients |
| 15 | from tempest import config |
| 16 | |
| 17 | from designate_tempest_plugin.services.dns.v2.json.zones_client import \ |
| 18 | ZonesClient |
sonu.kumar | aec952a | 2016-04-20 10:08:46 +0900 | [diff] [blame] | 19 | from designate_tempest_plugin.services.dns.v2.json.zone_imports_client import \ |
| 20 | ZoneImportsClient |
Paul Glass | 8abae33 | 2016-04-21 15:34:09 +0000 | [diff] [blame] | 21 | from designate_tempest_plugin.services.dns.v2.json.blacklists_client import \ |
| 22 | BlacklistsClient |
Paul Glass | 89edc11 | 2016-04-21 17:06:33 +0000 | [diff] [blame] | 23 | from designate_tempest_plugin.services.dns.admin.json.quotas_client import \ |
| 24 | QuotasClient |
sonu.kumar | c8f7a70 | 2016-04-29 21:07:16 +0900 | [diff] [blame^] | 25 | from designate_tempest_plugin.services.dns.v2.json.zone_exports_client import \ |
| 26 | ZoneExportsClient |
Kiall Mac Innes | 25fb29e | 2016-04-07 08:07:04 +0100 | [diff] [blame] | 27 | |
| 28 | CONF = config.CONF |
| 29 | |
| 30 | |
| 31 | class Manager(clients.Manager): |
| 32 | def __init__(self, credentials=None, service=None): |
| 33 | super(Manager, self).__init__(credentials, service) |
| 34 | |
| 35 | params = { |
| 36 | 'service': CONF.dns.catalog_type, |
| 37 | 'region': CONF.identity.region, |
| 38 | 'endpoint_type': CONF.dns.endpoint_type, |
| 39 | 'build_interval': CONF.dns.build_interval, |
| 40 | 'build_timeout': CONF.dns.build_timeout |
| 41 | } |
| 42 | params.update(self.default_params) |
| 43 | |
| 44 | self.zones_client = ZonesClient(self.auth_provider, **params) |
sonu.kumar | aec952a | 2016-04-20 10:08:46 +0900 | [diff] [blame] | 45 | self.zone_imports_client = ZoneImportsClient(self.auth_provider, |
| 46 | **params) |
Paul Glass | 8abae33 | 2016-04-21 15:34:09 +0000 | [diff] [blame] | 47 | self.blacklists_client = BlacklistsClient(self.auth_provider, **params) |
Paul Glass | 89edc11 | 2016-04-21 17:06:33 +0000 | [diff] [blame] | 48 | self.quotas_client = QuotasClient(self.auth_provider, **params) |
sonu.kumar | c8f7a70 | 2016-04-29 21:07:16 +0900 | [diff] [blame^] | 49 | self.zone_exports_client = ZoneExportsClient(self.auth_provider, |
| 50 | **params) |