-
Notifications
You must be signed in to change notification settings - Fork 29
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
change -all flag to remove whole group #13
Conversation
@laDok8 Please let me know when you have this open for review ! |
@jyejare as wrapanapi PR seems ok i think we are ready |
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.
Modify the PR to add another option to Azure base command --all_since
to preserve the usage of --all
.
README.md
Outdated
@@ -99,7 +99,7 @@ Usage: swach azure [OPTIONS] | |||
Cleanup Azure provider | |||
|
|||
Options: | |||
--all Remove all unused Resources from the provider | |||
--all Remove all Resources from the provider over SLA |
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.
The --all
is made for removing the VMs under SLA but the same is not applied for other resources lets say for NICs, discs etc. These resources are deleted with --all
when they are not attached to any VM. Also, this functioning of --all
for other Compute Providers like GCE, EC2 is similar.
This PR here will alter that behaviour just for Azure and that might confuse the users of cloudwash who are using this tool for multiple cloud providers cleanup.
Hence, I recommend adding an extra option --all_since
to Azure command base that can take by default take SLA minutes from settings file else accept it as argument to --all_since
option.
37510b3
to
f4ae352
Compare
@laDok8 Moved this to Draft state since you are amending the comments! Move it |
Ping @laDok8 !! Is it ready for review now ? |
076d02d
to
a7ee6a2
Compare
@jyejare ready for review. I was just trying to come up with better help option explanation, previous may have been a little confusing as this option doesn't selectively delete resources but whole group only if all its resources are older otherwise nothing is deleted. |
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.
Only few comments to go now :)
README.md
Outdated
--pips Remove only PiPs from the provider | ||
--help Show this message and exit. | ||
--all Remove all unused Resources from the provider | ||
--all_if_older Remove provider group if all resources are older than SLA |
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.
I am still filling for all_if_older
:)
Cant, we rename something like rg
? the description of that option is enough to tell what its going to delete.
delete azure resource group if newest resource is older than SLA
@laDok8 Would you like to see a new cloudwash version on merge of this PR ? Are you using versioned / PyPi_published package in your project ? |
@jyejare new version would be appreciated, I'm using pip version as desribed in README installation proces. |
delete whole resource group with
--all
if all resources are older than SLA. deleting individual resources would be difficult due to inability to delete dependent resources.depends on: RedHatQE/wrapanapi#453