summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Andrews <anotherjesse@gmail.com>2012-03-06 20:49:16 -0800
committerJesse Andrews <anotherjesse@gmail.com>2012-03-06 20:56:10 -0800
commit8ecdc44690ced882205112e017f79dc98cd6aaca (patch)
tree4043a93c27b11a14024cbda5837feba2bf4eadf2
parentd954b11944a32b2465b62396855f249e6d09cdc6 (diff)
downloadnova-8ecdc44690ced882205112e017f79dc98cd6aaca.tar.gz
nova-8ecdc44690ced882205112e017f79dc98cd6aaca.tar.xz
nova-8ecdc44690ced882205112e017f79dc98cd6aaca.zip
remove undocumented, unused mpi 'extension' to ec2 metadata
Change-Id: I06fc99964ebfc6210bf6b462bc576a23ca3a01d9
-rw-r--r--nova/api/metadata/handler.py21
1 files changed, 1 insertions, 20 deletions
diff --git a/nova/api/metadata/handler.py b/nova/api/metadata/handler.py
index 99831fcf8..15bf9283e 100644
--- a/nova/api/metadata/handler.py
+++ b/nova/api/metadata/handler.py
@@ -76,23 +76,6 @@ class MetadataRequestHandler(wsgi.Application):
network_api=self.network_api,
volume_api=volume.API())
- def _get_mpi_data(self, context, project_id):
- result = {}
- search_opts = {'project_id': project_id, 'deleted': False}
- for instance in self.compute_api.get_all(context,
- search_opts=search_opts):
- ip_info = ec2utils.get_ip_info_for_instance(context, instance)
- # only look at ipv4 addresses
- fixed_ips = ip_info['fixed_ips']
- if fixed_ips:
- line = '%s slots=%d' % (fixed_ips[0], instance['vcpus'])
- key = str(instance['key_name'])
- if key in result:
- result[key].append(line)
- else:
- result[key] = [line]
- return result
-
def _format_instance_mapping(self, ctxt, instance_ref):
root_device_name = instance_ref['root_device_name']
if root_device_name is None:
@@ -150,7 +133,6 @@ class MetadataRequestHandler(wsgi.Application):
except exception.NotFound:
return None
- mpi = self._get_mpi_data(ctxt, instance_ref['project_id'])
hostname = "%s.%s" % (instance_ref['hostname'], FLAGS.dhcp_domain)
host = instance_ref['host']
services = db.service_get_all_by_host(ctxt.elevated(), host)
@@ -184,8 +166,7 @@ class MetadataRequestHandler(wsgi.Application):
'public-hostname': hostname,
'public-ipv4': floating_ip,
'reservation-id': instance_ref['reservation_id'],
- 'security-groups': security_groups,
- 'mpi': mpi}}
+ 'security-groups': security_groups}}
# public-keys should be in meta-data only if user specified one
if instance_ref['key_name']: