summaryrefslogtreecommitdiff
path: root/ceilometer/nova_client.py
diff options
context:
space:
mode:
authorNejc Saje <nsaje@redhat.com>2014-08-27 17:14:15 -0400
committerNejc Saje <nsaje@redhat.com>2014-09-08 13:38:10 -0400
commitb6e1c7e5dcb405f01fd5160d94aecf0249d8ad59 (patch)
treeb9f7dec87af6fefac8a6137fff2c795823ce3d23 /ceilometer/nova_client.py
parentfcc6b0de4ef309a91dbf1ea94f475a8e5f168534 (diff)
downloadceilometer-b6e1c7e5dcb405f01fd5160d94aecf0249d8ad59.tar.gz
Migrate the rest of the central agent pollsters to use discoveries
Currently, not all the central agent pollsters use discoveries. In order to enable horizontal scaling, all pollsters must use discoveries so the resources can be partitioned across the pool of running central agents. For pollsters that don't poll specific resources, but only poll general info from services, we treat the service endpoints as resources. So in the case of Glance, there will be only one resource available for all the pollsters (a Glance endpoint). If there are multiple agents running, only one will be assigned that endpoint and only one will poll Glance API. DocImpact Co-Authored-By: Dina Belova <dbelova@mirantis.com> Closes-Bug: #1364352 Change-Id: I8f3b228db9aacf3a7cc4b719c50013cc30d5aa79
Diffstat (limited to 'ceilometer/nova_client.py')
-rw-r--r--ceilometer/nova_client.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ceilometer/nova_client.py b/ceilometer/nova_client.py
index 8b798922..e6a3c845 100644
--- a/ceilometer/nova_client.py
+++ b/ceilometer/nova_client.py
@@ -48,7 +48,7 @@ def logged(func):
class Client(object):
"""A client which gets information via python-novaclient."""
- def __init__(self):
+ def __init__(self, bypass_url=None, auth_token=None):
"""Initialize a nova client object."""
conf = cfg.CONF.service_credentials
tenant = conf.os_tenant_id or conf.os_tenant_name
@@ -57,8 +57,10 @@ class Client(object):
api_key=conf.os_password,
project_id=tenant,
auth_url=conf.os_auth_url,
+ auth_token=auth_token,
region_name=conf.os_region_name,
endpoint_type=conf.os_endpoint_type,
+ bypass_url=bypass_url,
cacert=conf.os_cacert,
insecure=conf.insecure,
http_log_debug=cfg.CONF.nova_http_log_debug,