blob: 56d34a57ca7565995398c29b2d6005f98080fc6d [file] [log] [blame]
Marc Kodererd2690fe2014-07-16 14:17:47 +02001# (c) 2014 Deutsche Telekom AG
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import abc
Matthew Treinish96e9e882014-06-09 18:37:19 -040015
Marc Kodererd2690fe2014-07-16 14:17:47 +020016import six
17
18from tempest import config
19from tempest.openstack.common import log as logging
20
21CONF = config.CONF
22LOG = logging.getLogger(__name__)
23
24
25@six.add_metaclass(abc.ABCMeta)
26class CredentialProvider(object):
Andrea Frittoliae9aca02014-09-25 11:43:11 +010027 def __init__(self, name, interface='json', password='pass',
28 network_resources=None):
Marc Kodererd2690fe2014-07-16 14:17:47 +020029 self.name = name
30
31 @abc.abstractmethod
32 def get_primary_creds(self):
33 return
34
35 @abc.abstractmethod
36 def get_admin_creds(self):
37 return
38
39 @abc.abstractmethod
40 def get_alt_creds(self):
41 return
42
43 @abc.abstractmethod
44 def clear_isolated_creds(self):
45 return