From 0720684956380ad3b5140f474a1c5a568bcd66f9 Mon Sep 17 00:00:00 2001 From: Zane Bitter Date: Tue, 15 May 2012 11:42:37 +0200 Subject: [PATCH] Modify command names for consistency Replace 'events_list' with 'event-list' and 'jeos_create' with 'jeos-create'. This makes things consistent with the conventions of OpenStack projects. The old versions will continue to work for now. Signed-off-by: Zane Bitter --- bin/heat | 18 ++++++++++-------- docs/GettingStarted.rst | 10 +++++----- heat/utils.py | 12 ++++++------ 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/bin/heat b/bin/heat index b67d824e..04845bfc 100755 --- a/bin/heat +++ b/bin/heat @@ -233,12 +233,12 @@ def stack_describe(options, arguments): print json.dumps(result, indent=2) -@utils.catch_error('events_list') +@utils.catch_error('event-list') def stack_events_list(options, arguments): ''' List events associated with the given stack. - Usage: heat events_list + Usage: heat event-list ''' parameters = {} try: @@ -263,12 +263,12 @@ def stack_list(options, arguments): print json.dumps(result, indent=2) -@utils.catch_error('jeos_create') +@utils.catch_error('jeos-create') def jeos_create(options, arguments): ''' Create a new JEOS (Just Enough Operating System) image. - Usage: heat jeos_create + Usage: heat jeos-create Distribution: Distribution such as 'F16', 'F17', 'U10', 'D6'. Architecture: Architecture such as 'i386' 'i686' or 'x86_64'. @@ -452,11 +452,13 @@ def lookup_command(parser, command_name): 'update': stack_update, 'delete': stack_delete, 'list': stack_list, - 'events_list': stack_events_list, + 'events_list': stack_events_list, # DEPRECATED + 'event-list': stack_events_list, 'validate': template_validate, 'gettemplate': get_template, 'describe': stack_describe, - 'jeos_create': jeos_create} + 'jeos_create': jeos_create, # DEPRECATED + 'jeos-create': jeos_create} commands = {} for command_set in (base_commands, stack_commands): @@ -495,9 +497,9 @@ Commands: validate Validate a template - jeos_create Create a JEOS image + jeos-create Create a JEOS image - events_list List events for a stack + event-list List events for a stack """ diff --git a/docs/GettingStarted.rst b/docs/GettingStarted.rst index 011bca27..dcd7f14f 100644 --- a/docs/GettingStarted.rst +++ b/docs/GettingStarted.rst @@ -128,13 +128,13 @@ Create a JEOS :: - sudo -E heat -y jeos_create F16 x86_64 cfntools + sudo -E heat -y jeos-create F16 x86_64 cfntools -Note: The ``-E`` option to ``sudo`` preserves the environment, specifically the keystone credentials, when ``jeos_create`` is run as root. +Note: The ``-E`` option to ``sudo`` preserves the environment, specifically the keystone credentials, when ``jeos-create`` is run as root. -Note: ``jeos_create`` must be run as root in order to create the cfntools disk image. +Note: ``jeos-create`` must be run as root in order to create the cfntools disk image. -Note: If you want to enable debugging output from Oz, add '``-d``' (debugging) to the ``jeos_create`` command. +Note: If you want to enable debugging output from Oz, add '``-d``' (debugging) to the ``jeos-create`` command. Verify JEOS registration ~~~~~~~~~~~~~~~~~~~~~~~~ @@ -182,7 +182,7 @@ List stack events :: - heat events_list wordpress + heat event-list wordpress Describe the ``wordpress`` stack -------------------------------- diff --git a/heat/utils.py b/heat/utils.py index 1a8294b8..1212f0f6 100644 --- a/heat/utils.py +++ b/heat/utils.py @@ -58,12 +58,12 @@ def catch_error(action): return wrap -@catch_error('jeos_create') +@catch_error('jeos-create') def jeos_create(options, arguments, jeos_path, cfntools_path): ''' Create a new JEOS (Just Enough Operating System) image. - Usage: heat jeos_create + Usage: heat jeos-create Distribution: Distribution such as 'F16', 'F17', 'U10', 'D6'. Architecture: Architecture such as 'i386' 'i686' or 'x86_64'. @@ -77,12 +77,12 @@ def jeos_create(options, arguments, jeos_path, cfntools_path): # if not running as root, return EPERM to command line if os.geteuid() != 0: - logging.error("jeos_create must be run as root") + logging.error("jeos-create must be run as root") sys.exit(1) if len(arguments) < 3: print '\n Please provide the distro, arch, and instance type.' print ' Usage:' - print ' heat jeos_create ' + print ' heat jeos-create ' print ' instance type can be:' print ' gold builds a base image where userdata is used to' \ ' initialize the instance' @@ -102,13 +102,13 @@ def jeos_create(options, arguments, jeos_path, cfntools_path): if not arch in arches: logging.error('arch %s not supported' % arch) - logging.error('try: heat jeos_create %s [ %s ]' % (distro, arches_str)) + logging.error('try: heat jeos-create %s [ %s ]' % (distro, arches_str)) sys.exit(1) if not instance_type in instance_types: logging.error('A JEOS instance type of %s not supported' %\ instance_type) - logging.error('try: heat jeos_create %s %s [ %s ]' %\ + logging.error('try: heat jeos-create %s %s [ %s ]' %\ (distro, arch, instances_str)) sys.exit(1) -- 2.45.2