3
# Copyright 2013 NetApp
6
# Licensed under the Apache License, Version 2.0 (the "License"); you may
7
# not use this file except in compliance with the License. You may obtain
8
# 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, WITHOUT
14
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
# License for the specific language governing permissions and limitations
18
"""Starter script for manila Share."""
21
eventlet.monkey_patch()
25
from oslo_config import cfg
26
from oslo_log import log
28
from manila import i18n
31
from manila.common import config # Need to register global_opts # noqa
32
from manila import service
33
from manila import utils
34
from manila import version
40
log.register_options(CONF)
41
CONF(sys.argv[1:], project='manila',
42
version=version.version_string())
43
log.setup(CONF, "manila")
45
launcher = service.process_launcher()
46
if CONF.enabled_share_backends:
47
for backend in CONF.enabled_share_backends:
48
host = "%s@%s" % (CONF.host, backend)
49
server = service.Service.create(host=host,
51
binary='manila-share')
52
launcher.launch_service(server)
54
server = service.Service.create(binary='manila-share')
55
launcher.launch_service(server)
59
if __name__ == '__main__':