Rename all visible occurrences of 'services' name

'services' is an obsolete name, now only applications should be used.

Change-Id: I137218961e1d7bdbed6e78b6940458cf3f565f52
Closes-bug: #1432580
This commit is contained in:
Ekaterina Chernova 2015-07-13 17:29:22 +03:00
parent dcc61f8021
commit c0c0a77c56
1 changed files with 9 additions and 9 deletions

View File

@ -154,11 +154,11 @@ def do_env_template_add_app(mc, args):
@utils.arg("id", metavar="<ENV_TEMPLATE_ID>", @utils.arg("id", metavar="<ENV_TEMPLATE_ID>",
help="Environment template ID") help="Environment template ID")
@utils.arg("service_id", metavar="<ENV_TEMPLATE_APP_ID>", @utils.arg("app_id", metavar="<ENV_TEMPLATE_APP_ID>",
help="Application ID") help="Application ID")
def do_env_template_del_app(mc, args): def do_env_template_del_app(mc, args):
"""Delete application from the environment template.""" """Delete application from the environment template."""
mc.env_templates.delete_app(args.name, args.service_id) mc.env_templates.delete_app(args.name, args.app_id)
do_env_template_list(mc) do_env_template_list(mc)
@ -495,28 +495,28 @@ def do_bundle_import(mc, args):
help='Environment ID to show applications from') help='Environment ID to show applications from')
@utils.arg('-p', '--path', metavar='<PATH>', @utils.arg('-p', '--path', metavar='<PATH>',
help='Level of detalization to show. ' help='Level of detalization to show. '
'Leave empty to browse all services in the environment', 'Leave empty to browse all applications in the environment',
default='/') default='/')
def do_service_show(mc, args): def do_app_show(mc, args):
"""List applications, added to specified environment. """List applications, added to specified environment.
""" """
if args.path == '/': if args.path == '/':
services = mc.services.list(args.id) apps = mc.services.list(args.id)
else: else:
if not args.path.startswith('/'): if not args.path.startswith('/'):
args.path = '/' + args.path args.path = '/' + args.path
services = [mc.services.get(args.id, args.path)] apps = [mc.services.get(args.id, args.path)]
field_labels = ['Id', 'Name', 'Type'] field_labels = ['Id', 'Name', 'Type']
fields = ['id', 'name', 'type'] fields = ['id', 'name', 'type']
formatters = {} formatters = {}
# If services is empty, first element exists and it's None # If app list is empty, first element exists and it's None
if hasattr(services[0], '?'): if hasattr(apps[0], '?'):
formatters = {'id': lambda x: getattr(x, '?')['id'], formatters = {'id': lambda x: getattr(x, '?')['id'],
'type': lambda x: getattr(x, '?')['type']} 'type': lambda x: getattr(x, '?')['type']}
utils.print_list(services, fields, field_labels, formatters=formatters) utils.print_list(apps, fields, field_labels, formatters=formatters)
@utils.arg('-t', '--template', metavar='<HEAT_TEMPLATE>', @utils.arg('-t', '--template', metavar='<HEAT_TEMPLATE>',