libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bchazalet <>
Subject [GitHub] libcloud pull request #1179: Allow shared vpc in managed instance group crea...
Date Thu, 08 Mar 2018 13:45:23 GMT
GitHub user bchazalet opened a pull request:

    Allow shared vpc in managed instance group creation

    ## Allow creation of MIG with an instance template whose network and subnetwork are shared
from a different project
    ### Description
    It's currently not possible to create a Managed Instance Group with an instance template
that creates instances in a network and subnetwork that are shared from a different project.
    The problem seems to be that, when parsing the json representing the instance group (in
`_to_instancegroup`), the name part of the network (or subnetwork) is extracted from a fully
qualified URL, i.e. implictly assuming that the network is under the same project that we
are in. But if we're using a shared VPC, the network resource will be under a different project
and we must stick to using fully qualified URL.
    This PR modifies the `_to_instancegroup` method so that the network and subnetwork values
contained in the json representation are used as they are and passed directly to `ex_get_network`
and `ex_get_subnetwork` which know how to handle fully qualified resource URLs.
    ### Status
    Done, ready for review. To be honest I am not sure the test I've added is useful, but
I am not too sure about how to test this: I'll happily receive feedback.
    ### Checklist (tick everything that applies)
    - [ ] [Code linting](
(required, can be done after the PR checks)
    - [ ] Documentation
    - [ ] [Tests](
    - [ ] [ICLA](
(required for bigger changes)

You can merge this pull request into a Git repository by running:

    $ git pull allow-shared-vpc-in-instance-group

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1179
commit 5436f492d71eb32c83af5bf69e4c51dad44e9c8b
Author: Boris Chazalet <bchazalet@...>
Date:   2018-03-07T17:35:13Z

    Allow for shared networks in instance groups
    By using fully qualified names of networks.

commit ad1587386e0c0aaa05209c38b3f1704032ec05a1
Author: Boris Chazalet <bchazalet@...>
Date:   2018-03-08T13:22:07Z

    Add a test for gce MIG with shared network



View raw message