diff options
author | Andrew Laski <andrew.laski@rackspace.com> | 2013-05-14 10:49:15 -0400 |
---|---|---|
committer | Andrew Laski <andrew.laski@rackspace.com> | 2013-06-04 13:42:04 -0400 |
commit | 6b16c8731c44e4a6c80b803f3e8afdd88386d577 (patch) | |
tree | 026ab652b6de81a08553498b62d00d8993cb7942 /nova/tests/integrated | |
parent | 22604a972fb8369d5e826b9034e72d1478c1e7ae (diff) | |
download | nova-6b16c8731c44e4a6c80b803f3e8afdd88386d577.tar.gz nova-6b16c8731c44e4a6c80b803f3e8afdd88386d577.tar.xz nova-6b16c8731c44e4a6c80b803f3e8afdd88386d577.zip |
Call scheduler for run_instance from conductor
This prepares for having the conductor query the scheduler for a list of
hosts to build an instance on. In order to accomplish this the API
sends a build_instances message to conductor, or spawns a greenthread in
local mode, rather than sending a message to the scheduler. This is
being done so that conductor can handle the orchestration of long
running tasks like spawning instances. By making this move, the API is
free to return to the caller while conductor queries the scheduler for a
host to provision to.
In the case of cells the build_instances message first goes to the
cells scheduler in order to pick a cell to send it to, and then it is
sent to the conductor in that cell.
Part of bp query-scheduler
Change-Id: I4539888e78ebdbb8cef6647273b959a012280110
Diffstat (limited to 'nova/tests/integrated')
-rw-r--r-- | nova/tests/integrated/test_api_samples.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py index cfd1877f5..c3895678c 100644 --- a/nova/tests/integrated/test_api_samples.py +++ b/nova/tests/integrated/test_api_samples.py @@ -54,6 +54,7 @@ from nova.tests.api.openstack.compute.contrib import test_services from nova.tests.api.openstack import fakes from nova.tests import fake_instance_actions from nova.tests import fake_network +from nova.tests import fake_utils from nova.tests.image import fake from nova.tests.integrated import integrated_helpers from nova.tests import utils as test_utils @@ -95,6 +96,7 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase): super(ApiSampleTestBase, self).setUp() self.useFixture(test.SampleNetworks()) fake_network.stub_compute_with_ips(self.stubs) + fake_utils.stub_out_utils_spawn_n(self.stubs) self.generate_samples = os.getenv('GENERATE_SAMPLES') is not None def _pretty_data(self, data): |