Updates root-enable & root-show help messages

Reasons:
- Help message for root-enable does not gives complete information, it
  misses that API also resets root, on existence.
- Current help message for root-show makes it feel like current status
  of root user is fetched, but instead we are also returning True for
  historical root access enabled.

Changes:
- Updated the root-enable and root-show API help message.
- Updated README for updated help messages.

Change-Id: Ide7c331bdfe5437e6966f6cd4f331cb3b22d0c3f
Closes-Bug: #1277308
This commit is contained in:
Sushil Kumar
2014-02-07 01:48:23 +00:00
committed by SushilKM
parent 68a6424256
commit 8a63222132
2 changed files with 4 additions and 4 deletions

View File

@@ -120,8 +120,8 @@ You'll find complete documentation on the shell by running
resize-flavor Resizes the flavor of an instance.
resize-volume Resizes the volume size of an instance.
restart Restarts an instance.
root-enable Enables root for an instance.
root-show Shows 'root enabled' status of an instance.
root-enable Enables root for an instance and resets if already exists.
root-show Gets status if root was ever enabled for an instance.
secgroup-add-rule Creates a security group rule.
secgroup-delete-rule
Deletes a security group rule.

View File

@@ -548,7 +548,7 @@ def do_limit_list(cs, args):
@utils.arg('instance', metavar='<instance>', help='ID of the instance.')
@utils.service_type('database')
def do_root_enable(cs, args):
"""Enables root for an instance."""
"""Enables root for an instance and resets if already exists."""
root = cs.root.create(args.instance)
utils.print_dict({'name': root[0], 'password': root[1]})
@@ -556,7 +556,7 @@ def do_root_enable(cs, args):
@utils.arg('instance', metavar='<instance>', help='ID of the instance.')
@utils.service_type('database')
def do_root_show(cs, args):
"""Shows 'root enabled' status of an instance."""
"""Gets status if root was ever enabled for an instance."""
root = cs.root.is_root_enabled(args.instance)
utils.print_dict({'is_root_enabled': root.rootEnabled})