Skip to content

Commit

Permalink
Adds configurable nova endpoint type in svc monitor
Browse files Browse the repository at this point in the history
The current code of svc mon uses internalURL of the nova endpoint.
In practice, the internalURL is not a mandatory endpoint type.
Hence the code fails whenever internalURL is not configured.
This change makes it configurable.

Closes Bug: #1546356

Change-Id: I1a529f3b3ad416784559ec6a04d4775c0c43bcf9
  • Loading branch information
rtapadar committed Jun 17, 2016
1 parent a4de788 commit 720977c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/config/svc-monitor/contrail-svc-monitor.conf
Expand Up @@ -13,6 +13,7 @@ log_level=SYS_NOTICE
#disc_server_port=5998
#region_name=None
cassandra_server_list=127.0.0.1:9160
#nova_endpoint_type=publicURL

[SECURITY]
#use_certs=False
Expand Down
2 changes: 1 addition & 1 deletion src/config/svc-monitor/svc_monitor/nova_client.py
Expand Up @@ -23,7 +23,7 @@ def _novaclient_get(self, proj_name, reauthenticate=False):
api_key=self._args.admin_password,
region_name=self._args.region_name, service_type='compute',
auth_url=auth_url, insecure=self._args.auth_insecure, cacert=self._kscert,
endpoint_type='internalURL')
endpoint_type=self._args.nova_endpoint_type)
return self._nova[proj_name]

def _novaclient_exec(self, resource, oper, proj_name,
Expand Down
3 changes: 2 additions & 1 deletion src/config/svc-monitor/svc_monitor/svc_monitor.py
Expand Up @@ -1051,7 +1051,8 @@ def parse_args(args_str):
'logging_conf': '',
'logger_class': None,
'sandesh_send_rate_limit' : SandeshSystem.get_sandesh_send_rate_limit(),
}
'nova_endpoint_type': 'internalURL',
}
secopts = {
'use_certs': False,
'keyfile': '',
Expand Down

0 comments on commit 720977c

Please sign in to comment.