diff options
| author | masumotok <masumotok@nttdata.co.jp> | 2010-12-31 04:03:37 +0900 |
|---|---|---|
| committer | masumotok <masumotok@nttdata.co.jp> | 2010-12-31 04:03:37 +0900 |
| commit | bf7bc8725fcc26cc5074ea1628bcba6ac6093768 (patch) | |
| tree | dd845322f758c2353f295afa44d4e6455564ffff /bin/nova-api | |
| parent | 85acbbe916df8b2d18f0dc3a0b8cad9fcfdd6907 (diff) | |
| parent | bd6a3cb1acb68ac2252c1bafc531b3b12f9746d8 (diff) | |
merge recent revision(version of 2010/12/28)
Change:
1. Use greenthread instead of defer at nova.virt.libvirt_conn.live_migration.
2. Move nova.scheduler.manager.live_migration to nova.scheduler.driver
3. Move nova.scheduler.manager.has_enough_resource to nova.scheduler.driver
4. Any check routine in nova-manage.instance.live_migration is moved to
nova.scheduler.driver.schedule_live_migration.
Diffstat (limited to 'bin/nova-api')
| -rwxr-xr-x | bin/nova-api | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/bin/nova-api b/bin/nova-api index a9c53dbcd..1c671201e 100755 --- a/bin/nova-api +++ b/bin/nova-api @@ -17,10 +17,10 @@ # 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 import sys @@ -32,9 +32,13 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): sys.path.insert(0, possible_topdir) +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') @@ -43,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) |
