Allow service type to be customized

Change-Id: Ia442ec02b8fdaa4110661e7592452544cff1fb94
This commit is contained in:
Rob Raymond 2014-10-30 10:57:41 -06:00
parent 1f14ac66ab
commit 2327939bd9

View File

@ -33,7 +33,8 @@ def monascaclient(request, password=None):
api_version = "2_0"
insecure = getattr(settings, 'OPENSTACK_SSL_NO_VERIFY', False)
cacert = getattr(settings, 'OPENSTACK_SSL_CACERT', None)
endpoint = base.url_for(request, 'monitoring')
service_type = getattr(settings, 'MONITORING_SERVICE_TYPE', 'monitoring')
endpoint = base.url_for(request, service_type)
if endpoint.endswith('/'):
endpoint = endpoint[:-1]
LOG.debug('monascaclient connection created using token "%s" , url "%s"' %