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

[google compute] Add support for subnetworks #780

Closed
wants to merge 1 commit into
base: trunk
from

Conversation

Projects
None yet
2 participants
@erjohnso
Member

erjohnso commented May 3, 2016

Adding support subnetworks to GCE driver

Description

This PR adds support Google Compute Engine's subnetworks feature[1]. When this feature was introduced, Google suggested users begin using automatically allocated regional subnetworks versus a single global network. The GCE driver predates subnetworks, so the default is still set to create legacy networks, even though this is no longer recommended.

Subnetworks are a necessary prerequisite for other GCE networking features that will be added to libcloud shortly.

[1] https://cloud.google.com/compute/docs/subnetworks

Status

I intend to leave this PR open for community review for 7 days and will merge it to trunk if there are no outstanding issues on 10-May-2016.

  • done, ready for review

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)
@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami May 7, 2016

Member

Cool.

I really wish we could find someone who would be willing to finish this - #345

Then we would also have a standard API for managing networks... :)

Member

Kami commented May 7, 2016

Cool.

I really wish we could find someone who would be willing to finish this - #345

Then we would also have a standard API for managing networks... :)

if 'items' in response:
if region is None:
for v in response['items'].values():

This comment has been minimized.

@Kami

Kami May 7, 2016

Member

That's quite some levels of nesting, would probably make it a bit easier to rid if this functionality was refactored in a separate method.

In any case, not a blocker for me.

@Kami

Kami May 7, 2016

Member

That's quite some levels of nesting, would probably make it a bit easier to rid if this functionality was refactored in a separate method.

In any case, not a blocker for me.

if not region:
raise ValueError("Must provide a region for the subnetwork.")
else:
if isinstance(region, GCERegion):

This comment has been minimized.

@Kami

Kami May 7, 2016

Member

Refactoring this region related functionality in a separate utility method would be nice.

Again not a blocker right now, but it would be great we at least have tests for all those various ways you can pass region in (if there aren't any already) so we can easily refactor it later on.

@Kami

Kami May 7, 2016

Member

Refactoring this region related functionality in a separate utility method would be nice.

Again not a blocker right now, but it would be great we at least have tests for all those various ways you can pass region in (if there aren't any already) so we can easily refactor it later on.

This comment has been minimized.

@erjohnso

erjohnso May 7, 2016

Member

Thanks for the review @Kami. Yes, I put in quite a few tests for this already, so should be fairly easy to refactor down the road.

@erjohnso

erjohnso May 7, 2016

Member

Thanks for the review @Kami. Yes, I put in quite a few tests for this already, so should be fairly easy to refactor down the road.

@erjohnso

This comment has been minimized.

Show comment
Hide comment
@erjohnso

erjohnso May 7, 2016

Member

Merged with 3246566

Member

erjohnso commented May 7, 2016

Merged with 3246566

@erjohnso erjohnso closed this May 7, 2016

@larsla larsla referenced this pull request May 10, 2016

Closed

Option to provision node with subnetwork #783

0 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment