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

parent fcb5a79e
...@@ -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:
logger.warning('Instance does not exist or is not ready yet.') print('Instance does not exist or is not ready yet.')
return(2) return(3)
except NotFoundError: except NotFoundError:
logger.warning('Instance %s does not exist.', conf.reference) print('Instance %s does not exist.' % conf.reference)
return(2) return(2)
logger.info('Software Release URL: %s', instance._software_release_url) print('Software Release URL: %s' % instance._software_release_url)
logger.info('Instance state: %s', instance._requested_state) print('Instance state: %s' % instance._requested_state)
logger.info('Instance parameters:') print('Instance parameters:')
logger.info(pprint.pformat(instance._parameter_dict)) print(pprint.pformat(instance._parameter_dict))
logger.info('Connection parameters:') print('Connection parameters:')
logger.info(pprint.pformat(instance._connection_dict)) print(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 == {}:
logger.info('No existing service.') print('No existing service.')
return return
logger.info('List of services:') print('List of services:')
for title, instance in instance_dict.iteritems(): for title, instance in instance_dict.iteritems():
logger.info('%s %s', title, instance._software_release_url) print('%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