diff options
| author | Jenkins <jenkins@review.openstack.org> | 2012-07-26 21:50:36 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2012-07-26 21:50:36 +0000 |
| commit | 66f9e085aae73ecfbf9ac3a1447917fa99d8a606 (patch) | |
| tree | dcb53582c55d51e634c8d55bc03943dc91e8f6e4 /nova/api | |
| parent | c8ee0c36e5e25c95403e2a49e989c2fcf447f7ff (diff) | |
| parent | fc82c6dbbd0fa1cdc130cefea534967e273d5570 (diff) | |
| download | nova-66f9e085aae73ecfbf9ac3a1447917fa99d8a606.tar.gz nova-66f9e085aae73ecfbf9ac3a1447917fa99d8a606.tar.xz nova-66f9e085aae73ecfbf9ac3a1447917fa99d8a606.zip | |
Merge "Convert fixed_ips to using instance_uuid."
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/metadata/base.py | 2 | ||||
| -rw-r--r-- | nova/api/openstack/compute/contrib/floating_ips.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/nova/api/metadata/base.py b/nova/api/metadata/base.py index 4ecf64649..2964d57f1 100644 --- a/nova/api/metadata/base.py +++ b/nova/api/metadata/base.py @@ -214,7 +214,7 @@ def get_metadata_by_address(address): ctxt = context.get_admin_context() fixed_ip = network.API().get_fixed_ip_by_address(ctxt, address) - instance = db.instance_get(ctxt, fixed_ip['instance_id']) + instance = db.instance_get_by_uuid(ctxt, fixed_ip['instance_uuid']) return InstanceMetadata(instance, address) diff --git a/nova/api/openstack/compute/contrib/floating_ips.py b/nova/api/openstack/compute/contrib/floating_ips.py index 4b290bb4c..6fb9f0cc1 100644 --- a/nova/api/openstack/compute/contrib/floating_ips.py +++ b/nova/api/openstack/compute/contrib/floating_ips.py @@ -120,13 +120,13 @@ class FloatingIPController(object): fixed_ip_id = floating_ip['fixed_ip_id'] floating_ip['fixed_ip'] = self._get_fixed_ip(context, fixed_ip_id) - instance_id = None + instance_uuid = None if floating_ip['fixed_ip']: - instance_id = floating_ip['fixed_ip']['instance_id'] + instance_uuid = floating_ip['fixed_ip']['instance_uuid'] - if instance_id: + if instance_uuid: floating_ip['instance'] = self._get_instance(context, - instance_id) + instance_uuid) else: floating_ip['instance'] = None |
