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 <zbitter@redhat.com>
This commit is contained in:
Zane Bitter 2012-05-15 11:42:37 +02:00
parent 4f34681d1d
commit 0720684956
3 changed files with 21 additions and 19 deletions

View File

@ -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 <stack name>
Usage: heat event-list <stack name>
'''
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 <distribution> <architecture> <image type>
Usage: heat jeos-create <distribution> <architecture> <image type>
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
"""

View File

@ -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
--------------------------------

View File

@ -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 <distribution> <architecture> <image type>
Usage: heat jeos-create <distribution> <architecture> <image type>
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 <distro> <arch> <instancetype>'
print ' heat jeos-create <distro> <arch> <instancetype>'
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)