Marc Koderer | d2690fe | 2014-07-16 14:17:47 +0200 | [diff] [blame] | 1 | # (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 | |
| 14 | import abc |
Matthew Treinish | 96e9e88 | 2014-06-09 18:37:19 -0400 | [diff] [blame] | 15 | |
Marc Koderer | d2690fe | 2014-07-16 14:17:47 +0200 | [diff] [blame] | 16 | import six |
| 17 | |
| 18 | from tempest import config |
| 19 | from tempest.openstack.common import log as logging |
| 20 | |
| 21 | CONF = config.CONF |
| 22 | LOG = logging.getLogger(__name__) |
| 23 | |
| 24 | |
| 25 | @six.add_metaclass(abc.ABCMeta) |
| 26 | class CredentialProvider(object): |
Andrea Frittoli | ae9aca0 | 2014-09-25 11:43:11 +0100 | [diff] [blame] | 27 | def __init__(self, name, interface='json', password='pass', |
| 28 | network_resources=None): |
Marc Koderer | d2690fe | 2014-07-16 14:17:47 +0200 | [diff] [blame] | 29 | 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 |