diff --git a/ceilometer/alarm/evaluator/__init__.py b/ceilometer/alarm/evaluator/__init__.py index 22cce01e..d417b2a8 100644 --- a/ceilometer/alarm/evaluator/__init__.py +++ b/ceilometer/alarm/evaluator/__init__.py @@ -49,6 +49,7 @@ class Evaluator(object): auth_config = cfg.CONF.service_credentials creds = dict( os_auth_url=auth_config.os_auth_url, + os_region_name=auth_config.os_region_name, os_tenant_name=auth_config.os_tenant_name, os_password=auth_config.os_password, os_username=auth_config.os_username, diff --git a/ceilometer/alarm/service.py b/ceilometer/alarm/service.py index 60bba68f..ba5be58e 100644 --- a/ceilometer/alarm/service.py +++ b/ceilometer/alarm/service.py @@ -80,6 +80,7 @@ class AlarmService(object): auth_config = cfg.CONF.service_credentials creds = dict( os_auth_url=auth_config.os_auth_url, + os_region_name=auth_config.os_region_name, os_tenant_name=auth_config.os_tenant_name, os_password=auth_config.os_password, os_username=auth_config.os_username, diff --git a/ceilometer/central/manager.py b/ceilometer/central/manager.py index e5ba7490..782b3a21 100644 --- a/ceilometer/central/manager.py +++ b/ceilometer/central/manager.py @@ -72,7 +72,8 @@ class AgentManager(agent.AgentManager): tenant_id=cfg.CONF.service_credentials.os_tenant_id, tenant_name=cfg.CONF.service_credentials.os_tenant_name, cacert=cfg.CONF.service_credentials.os_cacert, - auth_url=cfg.CONF.service_credentials.os_auth_url) + auth_url=cfg.CONF.service_credentials.os_auth_url, + region_name=cfg.CONF.service_credentials.os_region_name) super(AgentManager, self).interval_task(task) diff --git a/ceilometer/nova_client.py b/ceilometer/nova_client.py index 5db255db..f927592d 100644 --- a/ceilometer/nova_client.py +++ b/ceilometer/nova_client.py @@ -51,6 +51,7 @@ class Client(object): api_key=conf.os_password, project_id=tenant, auth_url=conf.os_auth_url, + region_name=conf.os_region_name, endpoint_type=conf.os_endpoint_type, cacert=conf.os_cacert, no_cache=True) diff --git a/ceilometer/service.py b/ceilometer/service.py index 60428902..b3093bf9 100644 --- a/ceilometer/service.py +++ b/ceilometer/service.py @@ -65,6 +65,10 @@ CLI_OPTIONS = [ default=os.environ.get('OS_AUTH_URL', 'http://localhost:5000/v2.0'), help='Auth URL to use for openstack service access'), + cfg.StrOpt('os-region-name', + deprecated_group="DEFAULT", + default=os.environ.get('OS_REGION_NAME', None), + help='Region name to use for openstack service endpoints'), cfg.StrOpt('os-endpoint-type', default=os.environ.get('OS_ENDPOINT_TYPE', 'publicURL'), help='Type of endpoint in Identity service catalog to use for ' diff --git a/etc/ceilometer/ceilometer.conf.sample b/etc/ceilometer/ceilometer.conf.sample index 8c935dd1..e3b30980 100644 --- a/etc/ceilometer/ceilometer.conf.sample +++ b/etc/ceilometer/ceilometer.conf.sample @@ -679,6 +679,10 @@ # Auth URL to use for openstack service access (string value) #os_auth_url=http://localhost:5000/v2.0 +# Region name to use for openstack service endpoints (string +# value) +#os_region_name= + # Type of endpoint in Identity service catalog to use for # communication with OpenStack services. (string value) #os_endpoint_type=publicURL