Commit d4d956e0 authored by Swann Perarnau's avatar Swann Perarnau

[fix] enforce region for blazar client

Since Chameleon changed to a multi-region setup the blazar client is
acting up. It looks like the current upstream doesn't support that
feature by default.

In theory, the session already contains the region info, but since the
client creation code doesn't use it by default, we force it. This is
adapted from the Chameleon-recommended client library.
parent f8865ee4
......@@ -30,7 +30,9 @@ def get_blazar_client(region=None):
session = cloud_config.get_session()
# blazar acces
return blazar_client.Client(1, session=session, service_type='reservation')
# for some reason the blazar client ignore the session region
return blazar_client.Client(1, session=session, service_type='reservation',
region_name=region)
def do_create(argv):
......
......@@ -23,7 +23,9 @@ def get_client(region=None):
session = cloud_config.get_session()
# blazar acces
return blazar_client.Client(1, session=session, service_type='reservation')
# for some reason the blazar client ignore the session region
return blazar_client.Client(1, session=session, service_type='reservation',
region_name=region)
def do_create(argv):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment