Ranger tempest changes:
- rename orm to ranger - update tempest-plugin to point to keystone v3 instead of v2 - update tempest_setup/tempest.conf Change-Id: I8c3bce9abf7087d3f0531b278323bf9764d30971
This commit is contained in:
parent
287d68523c
commit
91bb6db686
@ -29,19 +29,19 @@ class OrmClientManager(clients.Manager):
|
|||||||
|
|
||||||
def __init__(self, credentials=None):
|
def __init__(self, credentials=None):
|
||||||
super(OrmClientManager, self).__init__(credentials)
|
super(OrmClientManager, self).__init__(credentials)
|
||||||
self.cms_client = CmsClient(base_client.OrmAuthProvider(credentials),
|
self.cms_client = CmsClient(base_client.RangerAuthProvider(credentials),
|
||||||
CONF.identity.catalog_type,
|
CONF.identity.catalog_type,
|
||||||
CONF.identity.region,
|
CONF.identity.region,
|
||||||
CONF.orm.uri)
|
CONF.ranger.uri)
|
||||||
self.fms_client = FmsClient(base_client.OrmAuthProvider(credentials),
|
self.fms_client = FmsClient(base_client.RangerAuthProvider(credentials),
|
||||||
CONF.identity.catalog_type,
|
CONF.identity.catalog_type,
|
||||||
CONF.identity.region,
|
CONF.identity.region,
|
||||||
CONF.orm.uri)
|
CONF.ranger.uri)
|
||||||
self.rms_client = RmsClient(base_client.OrmAuthProvider(credentials),
|
self.rms_client = RmsClient(base_client.RangerAuthProvider(credentials),
|
||||||
CONF.identity.catalog_type,
|
CONF.identity.catalog_type,
|
||||||
CONF.identity.region,
|
CONF.identity.region,
|
||||||
CONF.orm.uri)
|
CONF.ranger.uri)
|
||||||
self.ims_client = ImsClient(base_client.OrmAuthProvider(credentials),
|
self.ims_client = ImsClient(base_client.RangerAuthProvider(credentials),
|
||||||
CONF.identity.catalog_type,
|
CONF.identity.catalog_type,
|
||||||
CONF.identity.region,
|
CONF.identity.region,
|
||||||
CONF.orm.uri)
|
CONF.ranger.uri)
|
||||||
|
@ -22,13 +22,13 @@ service_available_group = cfg.OptGroup(
|
|||||||
)
|
)
|
||||||
|
|
||||||
ServiceAvailableGroup = [
|
ServiceAvailableGroup = [
|
||||||
cfg.BoolOpt("orm", default=False,
|
cfg.BoolOpt("ranger", default=False,
|
||||||
help="Whether or not orm is expected to be available")
|
help="Whether or not ranger is expected to be available")
|
||||||
]
|
]
|
||||||
|
|
||||||
orm_group = cfg.OptGroup(
|
orm_group = cfg.OptGroup(
|
||||||
name="orm",
|
name="ranger",
|
||||||
title="Orm Service option"
|
title="Ranger Service option"
|
||||||
)
|
)
|
||||||
|
|
||||||
OrmGroup = [
|
OrmGroup = [
|
||||||
|
@ -22,7 +22,7 @@ from tempest.lib.common import rest_client
|
|||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class OrmClientBase(rest_client.RestClient):
|
class RangerClientBase(rest_client.RestClient):
|
||||||
|
|
||||||
def get_headers(self):
|
def get_headers(self):
|
||||||
headers = {'X-Auth-Region': CONF.identity.region,
|
headers = {'X-Auth-Region': CONF.identity.region,
|
||||||
@ -66,17 +66,18 @@ class OrmClientBase(rest_client.RestClient):
|
|||||||
return resp, body
|
return resp, body
|
||||||
|
|
||||||
|
|
||||||
class OrmAuthProvider(auth.KeystoneV2AuthProvider):
|
class RangerAuthProvider(auth.KeystoneV3AuthProvider):
|
||||||
|
|
||||||
def __init__(self, credentials, auth_url=CONF.identity.uri):
|
def __init__(self, credentials, auth_url=CONF.identity.uri_v3):
|
||||||
super(OrmAuthProvider, self).__init__(credentials, auth_url)
|
super(RangerAuthProvider, self).__init__(credentials, auth_url)
|
||||||
|
|
||||||
def auth_request(self, method, url, headers=None, body=None, filters=None):
|
def auth_request(self, method, url, headers=None, body=None, filters=None):
|
||||||
filters = {'service': 'identity'}
|
filters = {'service': 'identity'}
|
||||||
auth_headers = super(OrmAuthProvider,
|
auth_headers = super(RangerAuthProvider,
|
||||||
self).auth_request(method,
|
self).auth_request(method,
|
||||||
url,
|
url,
|
||||||
filters=filters)
|
filters=filters)
|
||||||
|
|
||||||
base_headers = auth_headers[1]
|
base_headers = auth_headers[1]
|
||||||
base_headers.update(headers)
|
base_headers.update(headers)
|
||||||
auth_req = dict(url=url, headers=base_headers, body=body)
|
auth_req = dict(url=url, headers=base_headers, body=body)
|
||||||
|
@ -24,9 +24,9 @@ from tempest import config
|
|||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class CmsClient(base_client.OrmClientBase):
|
class CmsClient(base_client.RangerClientBase):
|
||||||
|
|
||||||
cms_url = '%s:%s' % (CONF.orm.uri, CONF.orm.cms_port)
|
cms_url = '%s:%s' % (CONF.ranger.uri, CONF.ranger.cms_port)
|
||||||
version = 'v1'
|
version = 'v1'
|
||||||
|
|
||||||
# POST
|
# POST
|
||||||
|
@ -24,9 +24,9 @@ from tempest.lib.common import rest_client
|
|||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class FmsClient(base_client.OrmClientBase):
|
class FmsClient(base_client.RangerClientBase):
|
||||||
|
|
||||||
fms_url = '%s:%s' % (CONF.orm.uri, CONF.orm.fms_port)
|
fms_url = '%s:%s' % (CONF.ranger.uri, CONF.ranger.fms_port)
|
||||||
version = "v1"
|
version = "v1"
|
||||||
|
|
||||||
def get_extra_headers(self):
|
def get_extra_headers(self):
|
||||||
|
@ -22,9 +22,9 @@ from tempest import config
|
|||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class ImsClient(base_client.OrmClientBase):
|
class ImsClient(base_client.RangerClientBase):
|
||||||
|
|
||||||
ims_url = '%s:%s' % (CONF.orm.uri, CONF.orm.ims_port)
|
ims_url = '%s:%s' % (CONF.ranger.uri, CONF.ranger.ims_port)
|
||||||
version = "v1"
|
version = "v1"
|
||||||
|
|
||||||
def get_headers(self):
|
def get_headers(self):
|
||||||
|
@ -25,9 +25,9 @@ from tempest import config
|
|||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
||||||
|
|
||||||
class RmsClient(base_client.OrmClientBase):
|
class RmsClient(base_client.RangerClientBase):
|
||||||
|
|
||||||
rms_url = '%s:%s' % (CONF.orm.uri, CONF.orm.region_port)
|
rms_url = '%s:%s' % (CONF.ranger.uri, CONF.ranger.region_port)
|
||||||
version = "v2"
|
version = "v2"
|
||||||
|
|
||||||
def create_region(self, region_id, **kwargs):
|
def create_region(self, region_id, **kwargs):
|
||||||
|
@ -36,13 +36,13 @@ class BaseOrmTest(test.BaseTestCase):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def setup_clients(cls):
|
def setup_clients(cls):
|
||||||
super(BaseOrmTest, cls).setup_clients()
|
super(BaseOrmTest, cls).setup_clients()
|
||||||
cls.identity_client = cls.os_admin.tenants_client
|
cls.identity_client = cls.os_admin.projects_client
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def skip_checks(cls):
|
def skip_checks(cls):
|
||||||
super(BaseOrmTest, cls).skip_checks()
|
super(BaseOrmTest, cls).skip_checks()
|
||||||
if not CONF.service_available.orm:
|
if not CONF.service_available.ranger:
|
||||||
skip_msg = ("%s skipped as orm is not available" % cls.__name__)
|
skip_msg = ("%s skipped as ranger is not available" % cls.__name__)
|
||||||
raise cls.skipException(skip_msg)
|
raise cls.skipException(skip_msg)
|
||||||
|
|
||||||
def assertExpected(self, expected, actual, excluded_keys):
|
def assertExpected(self, expected, actual, excluded_keys):
|
||||||
|
@ -304,7 +304,7 @@ class CmsBaseOrmTest(base.BaseOrmTest):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _validate_customer_deletion_on_lcp(cls, customer_id):
|
def _validate_customer_deletion_on_lcp(cls, customer_id):
|
||||||
body = cls.identity_client.list_tenants()["tenants"]
|
body = cls.identity_client.list_projects()["projects"]
|
||||||
customer_ids = [customer["id"]
|
customer_ids = [customer["id"]
|
||||||
for customer in body
|
for customer in body
|
||||||
if customer["id"] == customer_id]
|
if customer["id"] == customer_id]
|
||||||
|
@ -38,10 +38,10 @@ class FmsBaseOrmTest(base.BaseOrmTest):
|
|||||||
super(FmsBaseOrmTest, cls).setup_clients()
|
super(FmsBaseOrmTest, cls).setup_clients()
|
||||||
cls.client = cls.os_primary.fms_client
|
cls.client = cls.os_primary.fms_client
|
||||||
cls.flavors_client = cls.os_admin.flavors_client
|
cls.flavors_client = cls.os_admin.flavors_client
|
||||||
cls.tenant_id = cls._get_tenant_id(
|
cls.tenant_id = cls._get_project_id(
|
||||||
cls.os_primary.credentials.tenant_name)
|
cls.os_primary.credentials.project_name)
|
||||||
cls.alt_tenant_id = cls._get_tenant_id(
|
cls.alt_tenant_id = cls._get_project_id(
|
||||||
cls.os_alt.credentials.tenant_name)
|
cls.os_alt.credentials.project_name)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_flavor_params(cls, set_region=True, single_tenant=True):
|
def _get_flavor_params(cls, set_region=True, single_tenant=True):
|
||||||
@ -230,12 +230,12 @@ class FmsBaseOrmTest(base.BaseOrmTest):
|
|||||||
raise exceptions.TempestException(message)
|
raise exceptions.TempestException(message)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _get_tenant_id(cls, tenant_name):
|
def _get_project_id(cls, project_name):
|
||||||
body = cls.identity_client.list_tenants()
|
body = cls.identity_client.list_projects()
|
||||||
for tenant in body["tenants"]:
|
for project in body["projects"]:
|
||||||
if(tenant["name"] == tenant_name):
|
if(project["name"] == project_name):
|
||||||
return tenant["id"]
|
return project["id"]
|
||||||
message = ('tenant %s not found on tenant list' % cls.tenant_name)
|
message = ('project %s not found on projects list' % project_name)
|
||||||
raise exceptions.TempestException(message)
|
raise exceptions.TempestException(message)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[metadata]
|
[metadata]
|
||||||
name = ranger-tempest-plugin
|
name = ranger-tempest-plugin
|
||||||
version = 0.0.1
|
version = 0.0.1
|
||||||
summary = Basic Tempest plugin for Orm with a mos tempest smoke test case
|
summary = Basic Tempest plugin for Ranger with a mos tempest smoke test case
|
||||||
description-file =
|
description-file =
|
||||||
author =
|
author =
|
||||||
author-email =
|
author-email =
|
||||||
|
@ -4,17 +4,20 @@ log_file = tempest.log
|
|||||||
log_dir = /var/log
|
log_dir = /var/log
|
||||||
|
|
||||||
[auth]
|
[auth]
|
||||||
test_accounts_file = /tempest/etc/accounts.yaml
|
test_accounts_file = /opt/stack/tempest/etc/accounts.yaml
|
||||||
use_dynamic_credentials = true
|
use_dynamic_credentials = true
|
||||||
tempest_roles = admin
|
tempest_roles = admin
|
||||||
admin_username = admin
|
admin_username = admin
|
||||||
admin_project_name = admin
|
admin_project_name = admin
|
||||||
admin_password = nomoresecrete
|
# set admin_password as appropriate
|
||||||
|
admin_password = password
|
||||||
admin_domain_name = Default
|
admin_domain_name = Default
|
||||||
|
|
||||||
|
|
||||||
[compute]
|
[compute]
|
||||||
image_ref = 199668fa-0cd4-4b84-92cb-f5c87a16628a
|
# uncomment image_ref and image_ref_alt and set their values accordingly
|
||||||
image_ref_alt = 199668fa-0cd4-4b84-92cb-f5c87a16628a
|
# image_ref =
|
||||||
|
# image_ref_alt =
|
||||||
flavor_ref = 1
|
flavor_ref = 1
|
||||||
flavor_ref_alt = 84
|
flavor_ref_alt = 84
|
||||||
fixed_network_name = public
|
fixed_network_name = public
|
||||||
@ -31,16 +34,17 @@ scheduler_available_filters = all
|
|||||||
[identity]
|
[identity]
|
||||||
disable_ssl_certificate_validation = false
|
disable_ssl_certificate_validation = false
|
||||||
ca_certificates_file = /etc/ssl/certs/ca-certificates.crt
|
ca_certificates_file = /etc/ssl/certs/ca-certificates.crt
|
||||||
uri = http://192.168.56.107:5000/v2.0
|
# change uri and uri_v3 IP address as needed
|
||||||
uri_v3 = http://192.168.56.107:5000/v3.0
|
uri = http://127.0.0.1:5000/v2.0
|
||||||
auth_version = v2
|
uri_v3 = http://127.0.0.1:5000/v3
|
||||||
# region = RegionOne
|
auth_version = v3
|
||||||
region = local
|
# set region value accordingly
|
||||||
|
region =
|
||||||
admin_role = admin
|
admin_role = admin
|
||||||
|
|
||||||
[identity-feature-enabled]
|
[identity-feature-enabled]
|
||||||
api_v2 = true
|
api_v2 = false
|
||||||
api_v2_admin = true
|
api_v2_admin = false
|
||||||
api_v3 = true
|
api_v3 = true
|
||||||
api_extensions = all
|
api_extensions = all
|
||||||
|
|
||||||
@ -48,7 +52,8 @@ api_extensions = all
|
|||||||
deactivate_image = true
|
deactivate_image = true
|
||||||
|
|
||||||
[network]
|
[network]
|
||||||
public_network_id = 6953ce50-6ea3-4091-8f68-fd7b0c5fdcd3
|
# set public_network_id to 'openstack network list | grep public' ID value
|
||||||
|
public_network_id =
|
||||||
floating_network_name = public
|
floating_network_name = public
|
||||||
|
|
||||||
[network-feature-enabled]
|
[network-feature-enabled]
|
||||||
@ -86,9 +91,8 @@ s3 = true
|
|||||||
glance = true
|
glance = true
|
||||||
neutron = true
|
neutron = true
|
||||||
nova = true
|
nova = true
|
||||||
ord = true
|
|
||||||
nova_ec2 = true
|
nova_ec2 = true
|
||||||
orm = true
|
ranger = true
|
||||||
contrail = true
|
contrail = true
|
||||||
mistral = true
|
mistral = true
|
||||||
|
|
||||||
@ -96,7 +100,8 @@ mistral = true
|
|||||||
run_validation = true
|
run_validation = true
|
||||||
connect_method = floating
|
connect_method = floating
|
||||||
image_ssh_user = cirros
|
image_ssh_user = cirros
|
||||||
image_ssh_password = cubswin:)
|
# set image_ssh_password as appropriate
|
||||||
|
image_ssh_password = password
|
||||||
|
|
||||||
[volume]
|
[volume]
|
||||||
backend_names = SOLIDFIRE
|
backend_names = SOLIDFIRE
|
||||||
@ -105,6 +110,7 @@ storage_protocol = iSCSI
|
|||||||
[volume-feature-enabled]
|
[volume-feature-enabled]
|
||||||
multi_backend = false
|
multi_backend = false
|
||||||
|
|
||||||
[orm]
|
[ranger]
|
||||||
|
# change uri IP address as needed
|
||||||
uri = http://127.0.0.1
|
uri = http://127.0.0.1
|
||||||
catalog_type = orm
|
catalog_type = ranger
|
||||||
|
Loading…
Reference in New Issue
Block a user