ariatosca-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From AviaE <...@git.apache.org>
Subject [GitHub] incubator-ariatosca pull request #146: ARIA-199 Add "services outputs" CLI c...
Date Sun, 04 Jun 2017 13:31:58 GMT
Github user AviaE commented on a diff in the pull request:

    https://github.com/apache/incubator-ariatosca/pull/146#discussion_r120009119
  
    --- Diff: aria/cli/commands/services.py ---
    @@ -192,17 +192,17 @@ def outputs(service_name, model_storage, logger):
         """
         logger.info('Showing outputs for service {0}...'.format(service_name))
         service = model_storage.service.get_by_name(service_name)
    -    #TODO fix this section..
    -    outputs_def = service.outputs
    -    response = model_storage.service.outputs.get(service_name)
    -    outputs_ = StringIO()
    -    for output_name, output in response.outputs.iteritems():
    -        outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
    -        description = outputs_def[output_name].get('description', '')
    -        outputs_.write('     Description: {0}{1}'.format(description,
    -                                                         os.linesep))
    -        outputs_.write('     Value: {0}{1}'.format(output, os.linesep))
    -    logger.info(outputs_.getvalue())
    +
    +    if service.outputs:
    +        outputs_ = StringIO()
    +        for output_name, output in service.outputs.iteritems():
    +            outputs_.write(' - "{0}":{1}'.format(output_name, os.linesep))
    +            outputs_.write('     Description: {0}{1}'.format(output.description,
    --- End diff --
    
    Put the `os.linesep` in the `Description` line in the same line. It is short enough =)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message