Change to use rms url

Change-Id: Ia505e68918f98a16253455d08c5db391510e3e0e
This commit is contained in:
hosingh000 2020-04-15 13:02:54 -05:00
parent 14173e3111
commit efd73bbd37
4 changed files with 4 additions and 11 deletions

View File

@ -283,7 +283,7 @@ OrmRmsGroup = [
default=7003,
help='Rms port.'),
cfg.StrOpt('url',
default='http://127.0.0.1:7003/',
default='http://127.0.0.1:7003',
help='Rms url.'),
cfg.StrOpt('log',
default='rms.log',

View File

@ -53,8 +53,7 @@ rds = {
}
ordupdate = {
'discovery_url': 'http://' + config.orm_host,
'discovery_port': config.rms['port'],
'discovery_url': config.rms['base_url'],
'template_type': 'hot',
# This flag should be false only in case the ord does not support https.
'https_enabled': config.https_enabled,

View File

@ -284,10 +284,7 @@ def notify_ord(transaction_id,
error_msg = ''
transaction_type = '%s %s' % (operation, resource_type, )
try:
# Discover the ranger agent url
discover_url = '%s:%d' % (conf.ordupdate.discovery_url,
conf.ordupdate.discovery_port,)
ord_to_update = _find_correct_ord(discover_url, region_id, headers)
ord_to_update = _find_correct_ord(conf.ordupdate.discovery_url, region_id, headers)
if ord_to_update is None:
message = 'Ranger Agent URL of LCP %s not found' % (region_id, )

View File

@ -43,9 +43,6 @@ def invoke_delete_region(data):
def _get_all_rms_regions():
# rms url
discover_url = '%s:%d' % (conf.ordupdate.discovery_url,
conf.ordupdate.discovery_port,)
# get all regions
headers = {}
headers['X-Auth-Region'] = request.headers[
@ -55,7 +52,7 @@ def _get_all_rms_regions():
'X-Auth-Token'] if 'X-Auth-Token' in \
request.headers else ''
# get all regions
response = requests.get('%s/v2/orm/regions' % (discover_url),
response = requests.get('%s/v2/orm/regions' % (conf.ordupdate.discovery_url),
headers=headers, verify=conf.verify)
if response.status_code != 200:
# fail to get regions