ariatosca-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ran-z <>
Subject [GitHub] incubator-ariatosca pull request #107: ARIA-148 CLI display commands
Date Wed, 10 May 2017 12:43:08 GMT
Github user ran-z commented on a diff in the pull request:
    --- Diff: aria/cli/commands/ ---
    @@ -43,32 +45,51 @@ def service_templates():
    -def show(service_template_name, model_storage, logger):
    -    """Show information for a specific service templates
    +def show(service_template_name, model_storage, all, types, json, yaml, logger):
    +    """Show information for a specific service template
         `SERVICE_TEMPLATE_NAME` is the name of the service template to show information on.
    -'Showing service template {0}...'.format(service_template_name))
         service_template = model_storage.service_template.get_by_name(service_template_name)
    -    service_template_dict = service_template.to_dict()
    -    service_template_dict['#services'] = len(
    -    column_formatters = \
    -        dict(description=table.trim_formatter_generator(DESCRIPTION_FIELD_LENGTH_LIMIT))
    -    columns = SERVICE_TEMPLATE_COLUMNS + ['#services']
    -    table.print_data(columns, service_template_dict, 'Service-template:',
    -                     column_formatters=column_formatters, col_max_width=50)
    -    if service_template_dict['description'] is not None:
or '',
    -                                    os.linesep))
    -    if
    -'Existing services:')
    -        for service in
    -  '\t{0}'.format(
    +    if json or yaml:
    --- End diff --
    i'm a bit confused by this. so `yaml`, `json`, and `all` all mean all,
    and `json` and `yaml` can be used simulatniously but only `json` will get printed.
    Re the latter problem, please have a look at `` for how to make flags mutually-exclusive.
    re the former, it might be better to also have the `all` flag as mutually-exclusive with
the other two..

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 or file a JIRA ticket
with INFRA.

View raw message