Skip to content

Issue LIBCLOUD-464: Add security group delete/destroy into the EC2 drive...#199

Closed
cderamus wants to merge 3 commits into
apache:trunkfrom
DivvyCloud:LIBCLOUD-464_Add_Delete_Security_Group
Closed

Issue LIBCLOUD-464: Add security group delete/destroy into the EC2 drive...#199
cderamus wants to merge 3 commits into
apache:trunkfrom
DivvyCloud:LIBCLOUD-464_Add_Delete_Security_Group

Conversation

@cderamus
Copy link
Copy Markdown
Contributor

...r

Comment thread libcloud/compute/drivers/ec2.py Outdated
Copy link
Copy Markdown
Member

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:

  1. Add two new methods - ex_destroy_security_group_by_id(group_id) and ex_destroy_security_group_by_name(group_name)
  2. Add a wrapper method - ex_destroy_security_group(name) which calls ex_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.

@cderamus cderamus closed this Dec 20, 2013
@cderamus cderamus deleted the LIBCLOUD-464_Add_Delete_Security_Group branch December 20, 2013 12:18
@cderamus cderamus restored the LIBCLOUD-464_Add_Delete_Security_Group branch December 20, 2013 13:06
@cderamus cderamus reopened this Dec 20, 2013
@cderamus
Copy link
Copy Markdown
Contributor Author

Let me know if this is more in the vein of what you'd like buddy.

@Kami
Copy link
Copy Markdown
Member

Kami commented Dec 21, 2013

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" (ex_destroy_security_group -> ex_delete_security_group, ...) ?

Besides that, the patch looks good.

@cderamus
Copy link
Copy Markdown
Contributor Author

Ah, nice catch on that. I try to stay consistent, but I clearly missed that one. I've updated for your review!

@Kami
Copy link
Copy Markdown
Member

Kami commented Dec 22, 2013

Thanks!

While reviewing and merging the patch, I've noticed that you forgot to update ex_delete_security_group method and the tests didn't detect that because they had a typo in the name so they didn't actually run (text instead of test).

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.

@cderamus
Copy link
Copy Markdown
Contributor Author

Ah, that's what I get for updating code with egg nog in hand. Thanks for catching that!

@cderamus cderamus closed this Dec 22, 2013
@cderamus cderamus deleted the LIBCLOUD-464_Add_Delete_Security_Group branch December 22, 2013 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants