diff --git a/orm/base_config.py b/orm/base_config.py index 053087aa..8e4d3f89 100644 --- a/orm/base_config.py +++ b/orm/base_config.py @@ -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', diff --git a/orm/services/resource_distributor/config.py b/orm/services/resource_distributor/config.py index 1213e2ae..46c535cc 100755 --- a/orm/services/resource_distributor/config.py +++ b/orm/services/resource_distributor/config.py @@ -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, diff --git a/orm/services/resource_distributor/rds/ordupdate/ord_notifier.py b/orm/services/resource_distributor/rds/ordupdate/ord_notifier.py index 0bb837b9..99a9e380 100755 --- a/orm/services/resource_distributor/rds/ordupdate/ord_notifier.py +++ b/orm/services/resource_distributor/rds/ordupdate/ord_notifier.py @@ -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, ) diff --git a/orm/services/resource_distributor/rds/utils/utils.py b/orm/services/resource_distributor/rds/utils/utils.py index 6bfd2d16..f334c6c2 100755 --- a/orm/services/resource_distributor/rds/utils/utils.py +++ b/orm/services/resource_distributor/rds/utils/utils.py @@ -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