-
-
Notifications
You must be signed in to change notification settings - Fork 32
cs_project.py: pass cleanup=true in deleteProject API #122
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
cc @resmo |
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.
code lgtm
the new flag was introduced in cloudstack 4.16, which breaks backwards compatibility somehow.
apache/cloudstack#4617
@weizhouapache well, didn't test it yet but in the past, cloudstack just ignored unknown flags? So for earlier versions, this shouldn't break backwards compatibility right? |
@resmo There will be a warning message in log (just a warning) like
|
plugins/modules/cs_project.py
Outdated
@@ -222,7 +222,8 @@ def absent_project(self): | |||
self.result['changed'] = True | |||
|
|||
args = { | |||
'id': project['id'] | |||
'id': project['id'], | |||
'cleanup': 'true' |
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.
This should actually be a bool like so 'cleanup': True
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.
Sure @resmo I can fix that. Does ansible/module, convert boolen True to 'true' string when pass the args in the API call?
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #122 +/- ##
=======================================
Coverage 83.77% 83.77%
=======================================
Files 56 56
Lines 5645 5645
Branches 1271 1271
=======================================
Hits 4729 4729
Misses 472 472
Partials 444 444
☔ View full report in Codecov by Sentry. |
Pass cleanup=true in the delete project module, refer:
https://cloudstack.apache.org/api/apidocs-4.18/apis/deleteProject.html