From e6073532e5020203a8ec2247ca7ddd481c6ec517 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Sat, 5 Nov 2011 14:10:17 -0700 Subject: Separate metadata api into its own service part 1 of blueprint separate-nova-metadata * adds api/metadata/ and moves code from ec2 * moves metadata into separate binary * changes metadata forward to use metadata host and port * moves the metadata accept rule to the metadata api * adds nova-api-* to setup.py Change-Id: I7f5d8e6cafc55b5c383cd88991f29c6059fb8d82 --- nova/tests/__init__.py | 2 +- nova/tests/integrated/integrated_helpers.py | 1 + nova/tests/test_metadata.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/__init__.py b/nova/tests/__init__.py index 1109dfb70..676518a48 100644 --- a/nova/tests/__init__.py +++ b/nova/tests/__init__.py @@ -24,7 +24,7 @@ :platform: Unix .. moduleauthor:: Jesse Andrews .. moduleauthor:: Devin Carlen -.. moduleauthor:: Vishvananda Ishaya +.. moduleauthor:: Vishvananda Ishaya .. moduleauthor:: Joshua McKenty .. moduleauthor:: Manish Singh .. moduleauthor:: Andy Smith diff --git a/nova/tests/integrated/integrated_helpers.py b/nova/tests/integrated/integrated_helpers.py index 5351c53f6..f9e1c76c4 100644 --- a/nova/tests/integrated/integrated_helpers.py +++ b/nova/tests/integrated/integrated_helpers.py @@ -93,6 +93,7 @@ class _IntegratedTestBase(test.TestCase): # Auto-assign ports to allow concurrent tests f['ec2_listen_port'] = 0 f['osapi_listen_port'] = 0 + f['metadata_listen_port'] = 0 f['image_service'] = 'nova.image.fake.FakeImageService' f['fake_network'] = True diff --git a/nova/tests/test_metadata.py b/nova/tests/test_metadata.py index 5aba8a545..283b6a7cb 100644 --- a/nova/tests/test_metadata.py +++ b/nova/tests/test_metadata.py @@ -21,7 +21,7 @@ import base64 import webob -from nova.api.ec2 import metadatarequesthandler +from nova.api.metadata import handler from nova.db.sqlalchemy import api from nova import exception from nova import flags @@ -86,7 +86,7 @@ class MetadataTestCase(test.TestCase): self.stubs.Set(api, 'instance_get', instance_get) self.stubs.Set(api, 'instance_get_all_by_filters', instance_get_list) self.stubs.Set(api, 'instance_get_floating_address', floating_get) - self.app = metadatarequesthandler.MetadataRequestHandler() + self.app = handler.MetadataRequestHandler() network_manager = fake_network.FakeNetworkManager() self.stubs.Set(self.app.cc.network_api, 'get_instance_uuids_by_ip_filter', -- cgit