diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-04-03 13:47:40 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@gmail.com> | 2012-04-03 13:49:50 -0700 |
| commit | 12d9a5a38b9968f488b26822dc082ecbc484bbe9 (patch) | |
| tree | baf05fdf1046ceb6fcf7743c0f68b155200b0135 /nova/api | |
| parent | adb212405684c798464861f6e188db3de0f04605 (diff) | |
| download | nova-12d9a5a38b9968f488b26822dc082ecbc484bbe9.tar.gz nova-12d9a5a38b9968f488b26822dc082ecbc484bbe9.tar.xz nova-12d9a5a38b9968f488b26822dc082ecbc484bbe9.zip | |
Make sure cloudpipe extension can retrieve network
* includes failing test
* fixes bug 972583
Change-Id: Idadac82c6a0fda8a1b912fb974e5754a1e82df39
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/cloudpipe.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/contrib/cloudpipe.py b/nova/api/openstack/compute/contrib/cloudpipe.py index b5d87477e..dcdc87d16 100644 --- a/nova/api/openstack/compute/contrib/cloudpipe.py +++ b/nova/api/openstack/compute/contrib/cloudpipe.py @@ -98,6 +98,13 @@ class CloudpipeController(object): ips = [ip for ip in vif.fixed_ips() if ip['version'] == 4] if ips: rv['internal_ip'] = ips[0]['address'] + # NOTE(vish): Currently network_api.get does an owner check on + # project_id. This is probably no longer necessary + # but rather than risk changes in the db layer, + # we are working around it here by changing the + # project_id in the context. This can be removed + # if we remove the project_id check in the db. + elevated.project_id = project_id network = self.network_api.get(elevated, vif['network']['id']) if network: vpn_ip = network['vpn_public_address'] |
