-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check mode for delete operations #422
base: release/1.9.3
Are you sure you want to change the base?
Changes from 4 commits
fa7c5f6
82a6c7c
abfb18a
75adcce
a0e0051
bfe533f
69a39bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -715,6 +715,11 @@ def deleteCluster(module, result): | |
cluster_uuid = module.params.get("imaged_cluster_uuid") | ||
cluster = ImagedCluster(module) | ||
|
||
if module.check_mode: | ||
result["imaged_cluster_uuid"] = cluster_uuid | ||
result["msg"] = "Cluster with uuid:{0} will be deleted.".format(cluster_uuid) | ||
return | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bhati-pradeep could not find any test for deletion |
||
resp = cluster.delete(cluster_uuid, no_response=True) | ||
result["response"] = resp | ||
result["imaged_cluster_uuid"] = cluster_uuid | ||
|
alaa-bish marked this conversation as resolved.
Show resolved
Hide resolved
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bhati-pradeep there is no delete tests |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1499,6 +1499,12 @@ def delete_db_servers(module, result, database_info): | |
spec = db_servers.get_default_delete_spec( | ||
delete=module.params.get("delete_db_server_vms", False) | ||
) | ||
|
||
if module.check_mode: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test missing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we have check_sum for delete_db_servers, as we have it for delete_instance |
||
result["uuid"] = uuid | ||
result["msg"] = "Db server with uuid:{0} will be deleted.".format(uuid) | ||
return | ||
|
||
resp = db_servers.delete(uuid=uuid, data=spec) | ||
|
||
ops_uuid = resp["operationId"] | ||
|
@@ -1525,6 +1531,8 @@ def delete_instance(module, result): | |
|
||
if module.check_mode: | ||
Gevorg-Khachatryan-97 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
result["response"] = spec | ||
result["uuid"] = uuid | ||
result["msg"] = "Instance with uuid:{0} will be deleted.".format(uuid) | ||
return | ||
|
||
resp = _databases.delete(uuid, data=spec) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @bhati-pradeep there is no any test for delete stretched vlan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bhati-pradeep no test