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): ...@@ -61,16 +61,16 @@ def do_info(logger, conf, local):
partition_reference=conf.reference, partition_reference=conf.reference,
) )
except ResourceNotReady: except ResourceNotReady:
print('Instance does not exist or is not ready yet.') logger.warning('Instance does not exist or is not ready yet.')
return(3) return(2)
except NotFoundError: except NotFoundError:
print('Instance %s does not exist.' % conf.reference) logger.warning('Instance %s does not exist.', conf.reference)
return(2) return(2)
print('Software Release URL: %s' % instance._software_release_url) logger.info('Software Release URL: %s', instance._software_release_url)
print('Instance state: %s' % instance._requested_state) logger.info('Instance state: %s', instance._requested_state)
print('Instance parameters:') logger.info('Instance parameters:')
print(pprint.pformat(instance._parameter_dict)) logger.info(pprint.pformat(instance._parameter_dict))
print('Connection parameters:') logger.info('Connection parameters:')
print(pprint.pformat(instance._connection_dict)) logger.info(pprint.pformat(instance._connection_dict))
...@@ -51,8 +51,8 @@ def do_list(logger, conf, local): ...@@ -51,8 +51,8 @@ def do_list(logger, conf, local):
# XXX catch exception # XXX catch exception
instance_dict = local['slap'].getOpenOrderDict() instance_dict = local['slap'].getOpenOrderDict()
if instance_dict == {}: if instance_dict == {}:
print('No existing service.') logger.info('No existing service.')
return return
print('List of services:') logger.info('List of services:')
for title, instance in instance_dict.iteritems(): 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