summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSushil Kumar <sushil.kumar2@globallogic.com>2014-02-07 01:48:23 +0000
committerSushilKM <skm.net@gmail.com>2014-06-03 07:07:41 +0000
commit8a632221320b91759b7b6018ec6097d4cc404701 (patch)
treec3f66c42175aa875a31f99a0e2b8fcb797e0b61a
parent68a6424256b0053fe554c1cf2101e95d60fe1c14 (diff)
downloadpython-troveclient-8a632221320b91759b7b6018ec6097d4cc404701.tar.gz
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
-rw-r--r--README.rst4
-rw-r--r--troveclient/v1/shell.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/README.rst b/README.rst
index 1646f58..a535c13 100644
--- a/README.rst
+++ b/README.rst
@@ -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.
diff --git a/troveclient/v1/shell.py b/troveclient/v1/shell.py
index 75f9127..a5ea87b 100644
--- a/troveclient/v1/shell.py
+++ b/troveclient/v1/shell.py
@@ -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})