Skip to content
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-477 Add list/delete/create network (VPC) calls within EC... #203

Closed
wants to merge 7 commits into from
Closed

Issue: LIBCLOUD-477 Add list/delete/create network (VPC) calls within EC... #203

wants to merge 7 commits into from

Conversation

cderamus
Copy link
Contributor

...2

params = {'Action': 'DescribeVpcs'}

result = self.connection.request(self.path,
params=params.copy()).object
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is .copy call necessary here?

request method shouldn't mutate params so the copy call here should be unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certainly isn't, just came over with a copy paste from a different call :).

cderamus and others added 3 commits December 22, 2013 06:37
Pulling in latest updates
Pulling in latest changes
result = self.connection.request(self.path, params=params).object

# Get our properties
response = {'vpc_id': findtext(element=result,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method should now also return EC2Network instance.

Something like network = self._to_network(elem=respose.object should do (you might need to select a correct element first though).

You can then also pass this instance to self.ex_create_tags method.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also appreciate if you could synchronize your branch with trunk after you make those changes.

Otherwise I will have a bad time merging this patch since there will be a bunch of merge conflicts.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup my fault on that. I'll make sure to synchronize my branch before submitting future PRs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem and thanks for all those PRs :)

Chris DeRamus added 3 commits December 23, 2013 23:29
Conflicts:
	libcloud/compute/drivers/ec2.py
	libcloud/test/compute/test_ec2.py
Updated test_ex_create_network accordingly

return network

def ex_delete_network(self, vpc_id):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we have EC2Network class, this method should take an instance of this class to be consistent with other methods (delete_key_pair, destroy_volume, etc.).

If you only have an ID, you can always constructor the EC2Network object manually and pass it to this method to avoid the ex_list_networks call.

@Kami
Copy link
Member

Kami commented Dec 25, 2013

@cderamus I went ahead, made the "ex_delete_network" change mentioned above and merged changes into trunk.

I had some issues (conflicts) with applying the patch and squashing the commits so I just went ahead and directly merged your branch into trunk.

@cderamus cderamus closed this Dec 25, 2013
@cderamus cderamus deleted the LIBCLOUD-467_Add_VPC_Lifecycle_Support branch December 27, 2013 18:54
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.

None yet

2 participants