Merge "[envs] Remove credentials base"

This commit is contained in:
Zuul
2018-01-19 14:19:25 +00:00
committed by Gerrit Code Review
3 changed files with 6 additions and 6 deletions

View File

@@ -15,14 +15,12 @@
from rally.common import logging from rally.common import logging
from rally import consts from rally import consts
from rally.deployment import credential
from rally.plugins.openstack import osclients from rally.plugins.openstack import osclients
LOG = logging.getLogger(__file__) LOG = logging.getLogger(__file__)
@credential.configure("openstack") class OpenStackCredential(object):
class OpenStackCredential(credential.Credential):
"""Credential for OpenStack.""" """Credential for OpenStack."""
def __init__(self, auth_url, username, password, tenant_name=None, def __init__(self, auth_url, username, password, tenant_name=None,

View File

@@ -173,3 +173,6 @@ class OpenStack(platform.Platform):
"services": osclients.Clients(active_user).list_services() "services": osclients.Clients(active_user).list_services()
} }
} }
def _get_validation_context(self):
return {"users@openstack": {}}

View File

@@ -16,7 +16,7 @@
import mock import mock
from rally import consts from rally import consts
from rally.deployment import credential from rally.plugins.openstack import credential
from tests.unit import test from tests.unit import test
@@ -24,8 +24,7 @@ class OpenStackCredentialTestCase(test.TestCase):
def setUp(self): def setUp(self):
super(OpenStackCredentialTestCase, self).setUp() super(OpenStackCredentialTestCase, self).setUp()
cred_cls = credential.get("openstack") self.credential = credential.OpenStackCredential(
self.credential = cred_cls(
"foo_url", "foo_user", "foo_password", "foo_url", "foo_user", "foo_password",
tenant_name="foo_tenant", tenant_name="foo_tenant",
permission=consts.EndpointPermission.ADMIN) permission=consts.EndpointPermission.ADMIN)