blob: 7816a2f58957159c14d225f8d06bda2b7854977d [file] [log] [blame]
Yuiko Takadab6527002015-12-07 11:49:12 +09001# All Rights Reserved.
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
15from tempest import clients
16from tempest.common import credentials_factory as common_creds
17from tempest import config
18
19from ironic_tempest_plugin.services.baremetal.v1.json.baremetal_client import \
20 BaremetalClient
21
22
23CONF = config.CONF
24
Emilien Macchi8ec45422016-05-29 21:56:23 -040025ADMIN_CREDS = common_creds.get_configured_admin_credentials()
Yuiko Takadab6527002015-12-07 11:49:12 +090026
27
28class Manager(clients.Manager):
29 def __init__(self,
30 credentials=ADMIN_CREDS,
Yuiko Takadaff785002015-12-17 15:56:42 +090031 service=None):
32 """Initialization of Manager class.
33
34 Setup service client and make it available for test cases.
35 :param credentials: type Credentials or TestResources
36 :param service: service name
37 """
Yuiko Takadab6527002015-12-07 11:49:12 +090038 super(Manager, self).__init__(credentials, service)
39 self.baremetal_client = BaremetalClient(
40 self.auth_provider,
41 CONF.baremetal.catalog_type,
42 CONF.identity.region,
43 endpoint_type=CONF.baremetal.endpoint_type,
44 **self.default_params_with_timeout_values)