2
# vim: tabstop=4 shiftwidth=4 softtabstop=4
4
# Copyright [2010] [Anso Labs, LLC]
6
# Licensed under the Apache License, Version 2.0 (the "License");
7
# you may not use this file except in compliance with the License.
8
# You may obtain a copy of the License at
10
# http://www.apache.org/licenses/LICENSE-2.0
12
# Unless required by applicable law or agreed to in writing, software
13
# distributed under the License is distributed on an "AS IS" BASIS,
14
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
# See the License for the specific language governing permissions and
16
# limitations under the License.
18
Tornado daemon for nova objectstore. Supports S3 API.
23
from nova import vendor
24
from tornado import httpserver
25
from tornado import ioloop
27
from nova import flags
28
from nova import server
29
from nova import utils
30
from nova.auth import users
31
from nova.objectstore import handler
38
# FIXME: if this log statement isn't here, no logging
39
# appears from other files and app won't start daemonized
40
logging.debug('Started HTTP server on %s' % (FLAGS.s3_internal_port))
41
app = handler.Application(users.UserManager())
42
server = httpserver.HTTPServer(app)
43
server.listen(FLAGS.s3_internal_port)
44
ioloop.IOLoop.instance().start()
47
if __name__ == '__main__':
48
utils.default_flagfile()
49
server.serve('nova-objectstore', main)