-
Notifications
You must be signed in to change notification settings - Fork 924
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
Issue LIBCLOUD-464: Add security group delete/destroy into the EC2 drive... #199
Issue LIBCLOUD-464: Add security group delete/destroy into the EC2 drive... #199
Conversation
@@ -1277,6 +1277,31 @@ def ex_create_security_group(self, name, description): | |||
'GroupDescription': description} | |||
return self.connection.request(self.path, params=params).object | |||
|
|||
def ex_destroy_security_group(self, group_id=None, group_name=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.
For consistency with other drivers and to make it easier to promote security group management methods to a top-level API in the near future, I would do the following:
- Add two new methods -
ex_destroy_security_group_by_id(group_id)
andex_destroy_security_group_by_name(group_name)
- Add a wrapper method -
ex_destroy_security_group(name)
which callsex_destroy_security_group_by_name
underneath
As noted above, those methods will hopefully be promoted to a top-level API in the near-future and guaranteeing consistency and compatibility between drivers will be a bit easier then.
Edit: Fixed a typo.
…add a default destroy_group call
Let me know if this is more in the vein of what you'd like buddy. |
Ugh, sorry, looks like I've missed one thing in my previous review. For consistency with other drivers, can you please also rename the methods from "destroy" to "delete" ( Besides that, the patch looks good. |
Ah, nice catch on that. I try to stay consistent, but I clearly missed that one. I've updated for your review! |
Thanks! While reviewing and merging the patch, I've noticed that you forgot to update I've squashed your commits, fixed those two issues in 4df8dd2 & adba6de and merged your patch into trunk. When I find some more time, I'll also have a look at how we can automatically detect and prevent issues like this from happening in the feature. It seems that for a start, we could do a simple integration with coverage.py and make sure that all the newly added test cases are actually executed. |
Ah, that's what I get for updating code with egg nog in hand. Thanks for catching that! |
...r