diff options
| author | Trey Morris <trey.morris@rackspace.com> | 2011-06-30 14:42:51 -0500 |
|---|---|---|
| committer | Trey Morris <trey.morris@rackspace.com> | 2011-06-30 14:42:51 -0500 |
| commit | bad24563babf34668a4a2fcbd883c3e2c6fee5f2 (patch) | |
| tree | dcfc446a85a420204d371a23ee9c2a7f78d98839 | |
| parent | fa8f7421f48a3bd1f6b01b2ff3cc754c24e0a424 (diff) | |
| download | nova-bad24563babf34668a4a2fcbd883c3e2c6fee5f2.tar.gz nova-bad24563babf34668a4a2fcbd883c3e2c6fee5f2.tar.xz nova-bad24563babf34668a4a2fcbd883c3e2c6fee5f2.zip | |
updated osapi 1.0 addresses view to work with multiple fixed ips
| -rw-r--r-- | nova/api/openstack/views/addresses.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/api/openstack/views/addresses.py b/nova/api/openstack/views/addresses.py index dc9e23450..b59eb4751 100644 --- a/nova/api/openstack/views/addresses.py +++ b/nova/api/openstack/views/addresses.py @@ -33,14 +33,15 @@ class ViewBuilderV10(ViewBuilder): return dict(public=public_ips, private=private_ips) def build_public_parts(self, inst): - return utils.get_from_path(inst, 'fixed_ip/floating_ips/address') + return utils.get_from_path(inst, 'fixed_ips/floating_ips/address') def build_private_parts(self, inst): - return utils.get_from_path(inst, 'fixed_ip/address') + return utils.get_from_path(inst, 'fixed_ips/address') class ViewBuilderV11(ViewBuilder): def build(self, inst): + # TODO(tr3buchet) - this shouldn't be hard coded to 4... private_ips = utils.get_from_path(inst, 'fixed_ips/address') private_ips = [dict(version=4, addr=a) for a in private_ips] public_ips = utils.get_from_path(inst, |
