1
by Jesse Andrews
initial commit |
1 |
#!/usr/bin/env python
|
2 |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
|
3 |
||
114
by Devin Carlen
Updated licenses |
4 |
# Copyright 2010 United States Government as represented by the
|
3.1.9
by Vishvananda Ishaya
Removed trailing whitespace from header |
5 |
# Administrator of the National Aeronautics and Space Administration.
|
114
by Devin Carlen
Updated licenses |
6 |
# All Rights Reserved.
|
7 |
#
|
|
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
|
|
11 |
#
|
|
12 |
# http://www.apache.org/licenses/LICENSE-2.0
|
|
13 |
#
|
|
1
by Jesse Andrews
initial commit |
14 |
# Unless required by applicable law or agreed to in writing, software
|
114
by Devin Carlen
Updated licenses |
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
|
|
18 |
# under the License.
|
|
19 |
||
1
by Jesse Andrews
initial commit |
20 |
"""
|
140.4.3
by Soren Hansen
Replace nova-objectstore with a twistd style wrapper. |
21 |
Twisted daemon for nova objectstore. Supports S3 API.
|
1
by Jesse Andrews
initial commit |
22 |
"""
|
23 |
||
454.2.2
by jaypipes at gmail
For some reason, I forgot to commit the other endpoints... |
24 |
import gettext |
265.1.1
by Soren Hansen
Make the scripts in bin/ detect if they're being run from a bzr checkout |
25 |
import os |
26 |
import sys |
|
27 |
||
28 |
# If ../nova/__init__.py exists, add ../ to Python search path, so that
|
|
29 |
# it will override what happens to be installed in /usr/(local/)lib/python...
|
|
30 |
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), |
|
31 |
os.pardir, |
|
32 |
os.pardir)) |
|
33 |
if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): |
|
34 |
sys.path.insert(0, possible_topdir) |
|
35 |
||
454.2.2
by jaypipes at gmail
For some reason, I forgot to commit the other endpoints... |
36 |
gettext.install('nova', unicode=1) |
37 |
||
1
by Jesse Andrews
initial commit |
38 |
from nova import flags |
39 |
from nova import utils |
|
140.4.3
by Soren Hansen
Replace nova-objectstore with a twistd style wrapper. |
40 |
from nova import twistd |
1
by Jesse Andrews
initial commit |
41 |
from nova.objectstore import handler |
42 |
||
43 |
||
44 |
FLAGS = flags.FLAGS |
|
45 |
||
46 |
||
47 |
if __name__ == '__main__': |
|
430.1.1
by Michael Gundlach
Move default_flagfile() call to where it will be parsed in time to load the flagfile |
48 |
utils.default_flagfile() |
140.4.3
by Soren Hansen
Replace nova-objectstore with a twistd style wrapper. |
49 |
twistd.serve(__file__) |
50 |
||
51 |
if __name__ == '__builtin__': |
|
237.1.70
by Vishvananda Ishaya
more pep8 |
52 |
application = handler.get_application() # pylint: disable-msg=C0103 |