-
Notifications
You must be signed in to change notification settings - Fork 81
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
Image removal for azure and aws #465
Conversation
afdbd59
to
61d4496
Compare
5d708eb
to
51b32f2
Compare
51b32f2
to
63499f9
Compare
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.
ACK pending comments !
wrapanapi/systems/msazure.py
Outdated
@@ -1130,6 +1166,21 @@ def delete_stack_by_date(self, days_old, resource_group=None): | |||
result) | |||
return results | |||
|
|||
def delete_compute_image_using_name(self, resource_group=None, image_list=None): |
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.
Instead this should be delete images same as you have in EC2 systems. We cannot say by name becuase we are not passing as parameter name , we are just passing image_list be its all free images list or list of all images !
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.
Changed the name to delete_compute_image_by_resource_group(). Having "resource_group" becomes explicit which I think it fine.
63499f9
to
04462a9
Compare
free_images = [] | ||
vm_list = self.list_vms() | ||
|
||
if not vm_list: |
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 block is unnecessary and repetitive.
for vm in vm_list:
free_images.append()
return free_images
This loop will noop when vm_list
is an empty list, which the function is written to return.
No description provided.