Merge "Log with info instead of warn when collector not configured"

This commit is contained in:
Jenkins 2015-06-04 17:15:33 +00:00 committed by Gerrit Code Review
commit e80616d15a
4 changed files with 12 additions and 12 deletions

View File

@ -66,20 +66,20 @@ class Collector(object):
with open(CONF.cfn.heat_metadata_hint) as hint:
CONF.cfn.metadata_url = '%s/v1/' % hint.read().strip()
else:
logger.warn('No metadata_url configured.')
logger.info('No metadata_url configured.')
raise exc.CfnMetadataNotConfigured
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
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
url = CONF.cfn.metadata_url
stack_name = CONF.cfn.stack_name
headers = {'Content-Type': 'application/json'}
final_content = {}
if CONF.cfn.path is None:
logger.warn('No path configured')
logger.info('No path configured')
raise exc.CfnMetadataNotConfigured
signer = ec2_utils.Ec2Signer(secret_key=CONF.cfn.secret_access_key)

View File

@ -49,22 +49,22 @@ class Collector(object):
def collect(self):
if CONF.heat.auth_url is None:
logger.warn('No auth_url configured.')
logger.info('No auth_url configured.')
raise exc.HeatMetadataNotConfigured
if CONF.heat.password is None:
logger.warn('No password configured.')
logger.info('No password configured.')
raise exc.HeatMetadataNotConfigured
if CONF.heat.project_id is None:
logger.warn('No project_id configured.')
logger.info('No project_id configured.')
raise exc.HeatMetadataNotConfigured
if CONF.heat.user_id is None:
logger.warn('No user_id configured.')
logger.info('No user_id configured.')
raise exc.HeatMetadataNotConfigured
if CONF.heat.stack_id is None:
logger.warn('No stack_id configured.')
logger.info('No stack_id configured.')
raise exc.HeatMetadataNotConfigured
if CONF.heat.resource_name is None:
logger.warn('No resource_name configured.')
logger.info('No resource_name configured.')
raise exc.HeatMetadataNotConfigured
try:

View File

@ -52,7 +52,7 @@ class Collector(object):
else:
final_content = value
if not final_content:
logger.warn('Local metadata not found (%s)' %
logger.info('Local metadata not found (%s)' %
cfg.CONF.heat_local.path)
raise exc.HeatLocalMetadataNotAvailable
return [('heat_local', final_content)]

View File

@ -66,7 +66,7 @@ class Collector(object):
def collect(self):
if CONF.request.metadata_url is None:
logger.warn('No metadata_url configured.')
logger.info('No metadata_url configured.')
raise exc.RequestMetadataNotConfigured
url = CONF.request.metadata_url
final_content = {}