From d4074ccd96ad0f587abe792373b6bff7016ba8c8 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 20 Jan 2015 14:07:35 -0600 Subject: [PATCH] Remove unnecessary logic, return the database on delete --- cloud/rackspace/rax_cdb_database.py | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/cloud/rackspace/rax_cdb_database.py b/cloud/rackspace/rax_cdb_database.py index 421b6dcb094..cc7885ee31e 100644 --- a/cloud/rackspace/rax_cdb_database.py +++ b/cloud/rackspace/rax_cdb_database.py @@ -79,12 +79,6 @@ def find_database(instance, name): def save_database(module, cdb_id, name, character_set, collate): - - for arg, value in dict(cdb_id=cdb_id, name=name).iteritems(): - if not value: - module.fail_json(msg='%s is required for the "rax_cdb_database" ' - 'module' % arg) - cdb = pyrax.cloud_databases try: @@ -111,12 +105,6 @@ def save_database(module, cdb_id, name, character_set, collate): def delete_database(module, cdb_id, name): - - for arg, value in dict(cdb_id=cdb_id, name=name).iteritems(): - if not value: - module.fail_json(msg='%s is required for the "rax_cdb_database" ' - 'module' % arg) - cdb = pyrax.cloud_databases try: @@ -136,7 +124,8 @@ def delete_database(module, cdb_id, name): else: changed = True - module.exit_json(changed=changed, action='delete') + module.exit_json(changed=changed, action='delete', + database=rax_to_dict(database)) def rax_cdb_database(module, state, cdb_id, name, character_set, collate):