diff options
| author | Andy Smith <code@term.ie> | 2010-12-16 20:59:22 +0000 |
|---|---|---|
| committer | Tarmac <> | 2010-12-16 20:59:22 +0000 |
| commit | d67b9f7b8b1fb7d73ad08a04c6ee2d98fc9037d8 (patch) | |
| tree | 0634b59dcc7559f3dc97616a055a360acf1c4602 /bin/nova-api | |
| parent | edff8090714f11305d6dbc091a96eece20f0d1a1 (diff) | |
| parent | e306d236e3cf91c00a36940e277ad2d105b055a1 (diff) | |
This branch removes most of the dependencies on twisted and moves towards the plan described by https://blueprints.launchpad.net/nova/+spec/unified-service-architecture
Tests are currently passing besides objectstore which is being skipped because it is heavily reliant on our twisted pieces, and I can run everything using the nova.sh
Additionally this adds nova-combined that covers everythign except for nova-objectstore, to test it what I've usually done is run nova.sh as usual
$ sudo ./eventlet_merge/contrib/nova.sh run ignored eventlet_merge
and then quit all the services except for nova-objectstore and then in one of the screens do
$ ./eventlet_merge/bin/nova-combined
And then run whatever manual testing you normally run.
Once objectstore has been deprecated and removed nova-combined can be expected to run the whole nova stack in a single process for testing and dev.
Diffstat (limited to 'bin/nova-api')
| -rwxr-xr-x | bin/nova-api | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/bin/nova-api b/bin/nova-api index 2ae6a099a..1c671201e 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -17,9 +17,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -""" -Nova API daemon. -""" + +"""Starter script for Nova API.""" import gettext import os @@ -35,9 +34,11 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): gettext.install('nova', unicode=1) +from nova import api from nova import flags from nova import utils -from nova import server +from nova import wsgi + FLAGS = flags.FLAGS flags.DEFINE_integer('osapi_port', 8774, 'OpenStack API port') @@ -46,15 +47,10 @@ flags.DEFINE_integer('ec2api_port', 8773, 'EC2 API port') flags.DEFINE_string('ec2api_host', '0.0.0.0', 'EC2 API host') -def main(_args): - from nova import api - from nova import wsgi +if __name__ == '__main__': + utils.default_flagfile() + FLAGS(sys.argv) server = wsgi.Server() server.start(api.API('os'), FLAGS.osapi_port, host=FLAGS.osapi_host) server.start(api.API('ec2'), FLAGS.ec2api_port, host=FLAGS.ec2api_host) server.wait() - - -if __name__ == '__main__': - utils.default_flagfile() - server.serve('nova-api', main) |
