Files
4a99c3f134e20445eb1f6bdabf0f0c53ff9c39c5
nova /bin /nova-compute

50 lines
1.6 KiB
Plaintext
Raw Normal View History

2010年05月27日 23:05:26 -07:00
#!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
2010年06月23日 22:04:16 -07:00
# Copyright 2010 United States Government as represented by the
2010年06月23日 23:15:06 -07:00
# Administrator of the National Aeronautics and Space Administration.
2010年06月23日 22:04:16 -07:00
# All Rights Reserved.
2010年06月24日 04:11:55 +01:00
#
2010年06月23日 22:04:16 -07:00
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
2010年06月24日 04:11:55 +01:00
#
2010年05月27日 23:05:26 -07:00
# Unless required by applicable law or agreed to in writing, software
2010年06月23日 22:04:16 -07:00
# distributed under the License is distributed on an "AS IS" BASIS, 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.
2010年12月09日 16:05:13 -08:00
"""Starter script for Nova Compute."""
2010年05月27日 23:05:26 -07:00
eventlet.monkey_patch()
import sys
# If ../nova/__init__.py exists, add ../ to Python search path, so that
# it will override what happens to be installed in /usr/(local/)lib/python...
2011年04月20日 12:56:44 -05:00
POSSIBLE_TOPDIR = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
os.pardir))
2011年04月20日 12:56:44 -05:00
if os.path.exists(os.path.join(POSSIBLE_TOPDIR, 'nova', '__init__.py')):
sys.path.insert(0, POSSIBLE_TOPDIR)
2011年02月21日 13:46:41 -08:00
from nova import flags
from nova import log as logging
from nova import service
2010年12月09日 16:45:51 -08:00
from nova import utils
2010年05月27日 23:05:26 -07:00
if __name__ == '__main__':
2010年12月09日 16:45:51 -08:00
utils.default_flagfile()
2011年02月21日 13:46:41 -08:00
flags.FLAGS(sys.argv)
logging.setup()
utils.monkey_patch()
2011年08月18日 11:28:02 -07:00
server = service.Service.create(binary='nova-compute')
2011年08月18日 10:55:39 -07:00
service.serve(server)
service.wait()