Revert "slapos.cli info/list: use raw print instead of logger."

This reverts commit f0c29e60.
parent cb576b62
......@@ -61,16 +61,16 @@ def do_info(logger, conf, local):
partition_reference=conf.reference,
)
except ResourceNotReady:
print('Instance does not exist or is not ready yet.')
return(3)
logger.warning('Instance does not exist or is not ready yet.')
return(2)
except NotFoundError:
print('Instance %s does not exist.' % conf.reference)
logger.warning('Instance %s does not exist.', conf.reference)
return(2)
print('Software Release URL: %s' % instance._software_release_url)
print('Instance state: %s' % instance._requested_state)
print('Instance parameters:')
print(pprint.pformat(instance._parameter_dict))
print('Connection parameters:')
print(pprint.pformat(instance._connection_dict))
logger.info('Software Release URL: %s', instance._software_release_url)
logger.info('Instance state: %s', instance._requested_state)
logger.info('Instance parameters:')
logger.info(pprint.pformat(instance._parameter_dict))
logger.info('Connection parameters:')
logger.info(pprint.pformat(instance._connection_dict))
......@@ -51,8 +51,8 @@ def do_list(logger, conf, local):
# XXX catch exception
instance_dict = local['slap'].getOpenOrderDict()
if instance_dict == {}:
print('No existing service.')
logger.info('No existing service.')
return
print('List of services:')
logger.info('List of services:')
for title, instance in instance_dict.iteritems():
print('%s %s' % title, instance._software_release_url)
logger.info('%s %s', title, instance._software_release_url)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment