Change to use rms url
Change-Id: Ia505e68918f98a16253455d08c5db391510e3e0e
This commit is contained in:
@@ -283,7 +283,7 @@ OrmRmsGroup = [
|
|||||||
default=7003,
|
default=7003,
|
||||||
help='Rms port.'),
|
help='Rms port.'),
|
||||||
cfg.StrOpt('url',
|
cfg.StrOpt('url',
|
||||||
default='http://127.0.0.1:7003/',
|
default='http://127.0.0.1:7003',
|
||||||
help='Rms url.'),
|
help='Rms url.'),
|
||||||
cfg.StrOpt('log',
|
cfg.StrOpt('log',
|
||||||
default='rms.log',
|
default='rms.log',
|
||||||
|
@@ -53,8 +53,7 @@ rds = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ordupdate = {
|
ordupdate = {
|
||||||
'discovery_url': 'http://' + config.orm_host,
|
'discovery_url': config.rms['base_url'],
|
||||||
'discovery_port': config.rms['port'],
|
|
||||||
'template_type': 'hot',
|
'template_type': 'hot',
|
||||||
# This flag should be false only in case the ord does not support https.
|
# This flag should be false only in case the ord does not support https.
|
||||||
'https_enabled': config.https_enabled,
|
'https_enabled': config.https_enabled,
|
||||||
|
@@ -284,10 +284,7 @@ def notify_ord(transaction_id,
|
|||||||
error_msg = ''
|
error_msg = ''
|
||||||
transaction_type = '%s %s' % (operation, resource_type, )
|
transaction_type = '%s %s' % (operation, resource_type, )
|
||||||
try:
|
try:
|
||||||
# Discover the ranger agent url
|
ord_to_update = _find_correct_ord(conf.ordupdate.discovery_url, region_id, headers)
|
||||||
discover_url = '%s:%d' % (conf.ordupdate.discovery_url,
|
|
||||||
conf.ordupdate.discovery_port,)
|
|
||||||
ord_to_update = _find_correct_ord(discover_url, region_id, headers)
|
|
||||||
|
|
||||||
if ord_to_update is None:
|
if ord_to_update is None:
|
||||||
message = 'Ranger Agent URL of LCP %s not found' % (region_id, )
|
message = 'Ranger Agent URL of LCP %s not found' % (region_id, )
|
||||||
|
@@ -43,9 +43,6 @@ def invoke_delete_region(data):
|
|||||||
|
|
||||||
|
|
||||||
def _get_all_rms_regions():
|
def _get_all_rms_regions():
|
||||||
# rms url
|
|
||||||
discover_url = '%s:%d' % (conf.ordupdate.discovery_url,
|
|
||||||
conf.ordupdate.discovery_port,)
|
|
||||||
# get all regions
|
# get all regions
|
||||||
headers = {}
|
headers = {}
|
||||||
headers['X-Auth-Region'] = request.headers[
|
headers['X-Auth-Region'] = request.headers[
|
||||||
@@ -55,7 +52,7 @@ def _get_all_rms_regions():
|
|||||||
'X-Auth-Token'] if 'X-Auth-Token' in \
|
'X-Auth-Token'] if 'X-Auth-Token' in \
|
||||||
request.headers else ''
|
request.headers else ''
|
||||||
# get all regions
|
# 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)
|
headers=headers, verify=conf.verify)
|
||||||
if response.status_code != 200:
|
if response.status_code != 200:
|
||||||
# fail to get regions
|
# fail to get regions
|
||||||
|
Reference in New Issue
Block a user