summaryrefslogtreecommitdiff
path: root/trove/extensions/common/models.py
diff options
context:
space:
mode:
authorDuk Loi <duk@tesora.com>2015-06-08 13:42:37 -0400
committerDuk Loi <duk@tesora.com>2016-02-03 11:26:52 -0500
commit2a5439aad2ce831ecebc633ba2c7f07088b1060f (patch)
tree688b138f976484f82d5bb9f05d6454d213bddc5e /trove/extensions/common/models.py
parentfac6e76b54560b0414e7b176ccbdd5f4baa92fe3 (diff)
downloadtrove-2a5439aad2ce831ecebc633ba2c7f07088b1060f.tar.gz
Add support for root-disable
Added the route action for disabling the root user in the extensions. Modified the resource extension to allow the generation of a DELETE route on the resource itself. Implemented root-disable on the mysql guest. Added not implemented error messages for all other datastores. Change-Id: I52519b86c47694c554b624d1d2fbe7a001af55fc Partially implements: blueprint root-disable Depends-On: I27831eb361c2b219a9623f152b9def73a2865d67
Diffstat (limited to 'trove/extensions/common/models.py')
-rw-r--r--trove/extensions/common/models.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/trove/extensions/common/models.py b/trove/extensions/common/models.py
index 4b80fb40..dfe77a6d 100644
--- a/trove/extensions/common/models.py
+++ b/trove/extensions/common/models.py
@@ -76,6 +76,11 @@ class Root(object):
return root_user
+ @classmethod
+ def delete(cls, context, instance_id):
+ load_and_verify(context, instance_id)
+ create_guest_client(context, instance_id).disable_root()
+
class RootHistory(object):