Merge "Log with info instead of warn when collector not configured"
This commit is contained in:
commit
e80616d15a
@ -66,20 +66,20 @@ class Collector(object):
|
|||||||
with open(CONF.cfn.heat_metadata_hint) as hint:
|
with open(CONF.cfn.heat_metadata_hint) as hint:
|
||||||
CONF.cfn.metadata_url = '%s/v1/' % hint.read().strip()
|
CONF.cfn.metadata_url = '%s/v1/' % hint.read().strip()
|
||||||
else:
|
else:
|
||||||
logger.warn('No metadata_url configured.')
|
logger.info('No metadata_url configured.')
|
||||||
raise exc.CfnMetadataNotConfigured
|
raise exc.CfnMetadataNotConfigured
|
||||||
if CONF.cfn.access_key_id is None:
|
if CONF.cfn.access_key_id is None:
|
||||||
logger.warn('No Access Key ID configured.')
|
logger.info('No Access Key ID configured.')
|
||||||
raise exc.CfnMetadataNotConfigured
|
raise exc.CfnMetadataNotConfigured
|
||||||
if CONF.cfn.secret_access_key is None:
|
if CONF.cfn.secret_access_key is None:
|
||||||
logger.warn('No Secret Access Key configured.')
|
logger.info('No Secret Access Key configured.')
|
||||||
raise exc.CfnMetadataNotConfigured
|
raise exc.CfnMetadataNotConfigured
|
||||||
url = CONF.cfn.metadata_url
|
url = CONF.cfn.metadata_url
|
||||||
stack_name = CONF.cfn.stack_name
|
stack_name = CONF.cfn.stack_name
|
||||||
headers = {'Content-Type': 'application/json'}
|
headers = {'Content-Type': 'application/json'}
|
||||||
final_content = {}
|
final_content = {}
|
||||||
if CONF.cfn.path is None:
|
if CONF.cfn.path is None:
|
||||||
logger.warn('No path configured')
|
logger.info('No path configured')
|
||||||
raise exc.CfnMetadataNotConfigured
|
raise exc.CfnMetadataNotConfigured
|
||||||
|
|
||||||
signer = ec2_utils.Ec2Signer(secret_key=CONF.cfn.secret_access_key)
|
signer = ec2_utils.Ec2Signer(secret_key=CONF.cfn.secret_access_key)
|
||||||
|
@ -49,22 +49,22 @@ class Collector(object):
|
|||||||
|
|
||||||
def collect(self):
|
def collect(self):
|
||||||
if CONF.heat.auth_url is None:
|
if CONF.heat.auth_url is None:
|
||||||
logger.warn('No auth_url configured.')
|
logger.info('No auth_url configured.')
|
||||||
raise exc.HeatMetadataNotConfigured
|
raise exc.HeatMetadataNotConfigured
|
||||||
if CONF.heat.password is None:
|
if CONF.heat.password is None:
|
||||||
logger.warn('No password configured.')
|
logger.info('No password configured.')
|
||||||
raise exc.HeatMetadataNotConfigured
|
raise exc.HeatMetadataNotConfigured
|
||||||
if CONF.heat.project_id is None:
|
if CONF.heat.project_id is None:
|
||||||
logger.warn('No project_id configured.')
|
logger.info('No project_id configured.')
|
||||||
raise exc.HeatMetadataNotConfigured
|
raise exc.HeatMetadataNotConfigured
|
||||||
if CONF.heat.user_id is None:
|
if CONF.heat.user_id is None:
|
||||||
logger.warn('No user_id configured.')
|
logger.info('No user_id configured.')
|
||||||
raise exc.HeatMetadataNotConfigured
|
raise exc.HeatMetadataNotConfigured
|
||||||
if CONF.heat.stack_id is None:
|
if CONF.heat.stack_id is None:
|
||||||
logger.warn('No stack_id configured.')
|
logger.info('No stack_id configured.')
|
||||||
raise exc.HeatMetadataNotConfigured
|
raise exc.HeatMetadataNotConfigured
|
||||||
if CONF.heat.resource_name is None:
|
if CONF.heat.resource_name is None:
|
||||||
logger.warn('No resource_name configured.')
|
logger.info('No resource_name configured.')
|
||||||
raise exc.HeatMetadataNotConfigured
|
raise exc.HeatMetadataNotConfigured
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -52,7 +52,7 @@ class Collector(object):
|
|||||||
else:
|
else:
|
||||||
final_content = value
|
final_content = value
|
||||||
if not final_content:
|
if not final_content:
|
||||||
logger.warn('Local metadata not found (%s)' %
|
logger.info('Local metadata not found (%s)' %
|
||||||
cfg.CONF.heat_local.path)
|
cfg.CONF.heat_local.path)
|
||||||
raise exc.HeatLocalMetadataNotAvailable
|
raise exc.HeatLocalMetadataNotAvailable
|
||||||
return [('heat_local', final_content)]
|
return [('heat_local', final_content)]
|
||||||
|
@ -66,7 +66,7 @@ class Collector(object):
|
|||||||
|
|
||||||
def collect(self):
|
def collect(self):
|
||||||
if CONF.request.metadata_url is None:
|
if CONF.request.metadata_url is None:
|
||||||
logger.warn('No metadata_url configured.')
|
logger.info('No metadata_url configured.')
|
||||||
raise exc.RequestMetadataNotConfigured
|
raise exc.RequestMetadataNotConfigured
|
||||||
url = CONF.request.metadata_url
|
url = CONF.request.metadata_url
|
||||||
final_content = {}
|
final_content = {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user