2
# vim: tabstop=4 shiftwidth=4 softtabstop=4
4
# Copyright 2010 United States Government as represented by the
5
# Administrator of the National Aeronautics and Space Administration.
8
# Licensed under the Apache License, Version 2.0 (the "License"); you may
9
# not use this file except in compliance with the License. You may obtain
10
# a copy of the License at
12
# http://www.apache.org/licenses/LICENSE-2.0
14
# Unless required by applicable law or agreed to in writing, software
15
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17
# License for the specific language governing permissions and limitations
20
"""Starter script for Nova Scheduler."""
23
eventlet.monkey_patch()
29
# If ../nova/__init__.py exists, add ../ to Python search path, so that
30
# it will override what happens to be installed in /usr/(local/)lib/python...
31
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
34
if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
35
sys.path.insert(0, possible_topdir)
37
gettext.install('nova', unicode=1)
39
from nova import flags
40
from nova import log as logging
41
from nova import service
42
from nova import utils
44
if __name__ == '__main__':
45
utils.default_flagfile()