summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@yahoo.com>2010-09-20 19:17:36 -0700
committerVishvananda Ishaya <vishvananda@yahoo.com>2010-09-20 19:17:36 -0700
commit026f6f2b7f5457f15a258ebed66bb8dda3263eec (patch)
tree146dcfe5e69bd4c7bea76e46fa97fbeb39828581 /bin
parentc791229d11e3baf2a5828ee8efe98ed827a35dde (diff)
parentd8861d04a85044ae57ffd7eb9ab682879beecf7d (diff)
downloadnova-026f6f2b7f5457f15a258ebed66bb8dda3263eec.tar.gz
nova-026f6f2b7f5457f15a258ebed66bb8dda3263eec.tar.xz
nova-026f6f2b7f5457f15a258ebed66bb8dda3263eec.zip
merged trunk
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nova-scheduler43
1 files changed, 43 insertions, 0 deletions
diff --git a/bin/nova-scheduler b/bin/nova-scheduler
new file mode 100755
index 000000000..38a8f213f
--- /dev/null
+++ b/bin/nova-scheduler
@@ -0,0 +1,43 @@
+#!/usr/bin/env python
+# vim: tabstop=4 shiftwidth=4 softtabstop=4
+
+# Copyright 2010 United States Government as represented by the
+# Administrator of the National Aeronautics and Space Administration.
+# All Rights Reserved.
+#
+# 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
+#
+# Unless required by applicable law or agreed to in writing, software
+# 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.
+
+"""
+ Twistd daemon for the nova scheduler nodes.
+"""
+
+import os
+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...
+possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
+ os.pardir,
+ os.pardir))
+if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')):
+ sys.path.insert(0, possible_topdir)
+
+from nova import service
+from nova import twistd
+
+
+if __name__ == '__main__':
+ twistd.serve(__file__)
+
+if __name__ == '__builtin__':
+ application = service.Service.create()