diff --git a/rally/deployment/serverprovider/providers/openstack.py b/rally/deployment/serverprovider/providers/openstack.py index 2c0c92f574..efab320051 100644 --- a/rally/deployment/serverprovider/providers/openstack.py +++ b/rally/deployment/serverprovider/providers/openstack.py @@ -69,6 +69,7 @@ class OpenStackProvider(provider.ProviderFactory): "password": {"type": "string"}, "tenant": {"type": "string"}, "auth_url": {"type": "string"}, + "region": {"type": "string"}, "flavor_id": {"type": "string"}, "image": { "type": "object", @@ -105,7 +106,8 @@ class OpenStackProvider(provider.ProviderFactory): def __init__(self, deployment, config): super(OpenStackProvider, self).__init__(deployment, config) user_endpoint = objects.Endpoint(config["auth_url"], config["user"], - config["password"], config["tenant"]) + config["password"], config["tenant"], + region_name=config.get("region")) clients = osclients.Clients(user_endpoint) self.nova = clients.nova() try: diff --git a/samples/deployments/for_deploying_openstack_with_rally/devstack-in-openstack.json b/samples/deployments/for_deploying_openstack_with_rally/devstack-in-openstack.json index 8c65128ad5..8a1ebd6113 100644 --- a/samples/deployments/for_deploying_openstack_with_rally/devstack-in-openstack.json +++ b/samples/deployments/for_deploying_openstack_with_rally/devstack-in-openstack.json @@ -5,6 +5,7 @@ "deployment_name": "Rally sample deployment", "user": "admin", "tenant": "admin", + "region": "RegionOne", "flavor_id": "2", "nics": [{"net-id": "97936015-128a-42f1-a3f2-1868ceeeeb6f"}], "password": "admin",