예제 #1
0
#    limitations under the License.
"""Karbor OS API WSGI application."""

import sys
import warnings

from karbor import objects

warnings.simplefilter('once', DeprecationWarning)

from oslo_config import cfg  # noqa: E402
from oslo_log import log as logging  # noqa: E402
from oslo_service import wsgi  # noqa: E402

from karbor import i18n  # noqa: E402
i18n.enable_lazy()

# Need to register global_opts
from karbor.common import config  # noqa
from karbor import rpc  # noqa: E402
from karbor import version  # noqa: E402

CONF = cfg.CONF


def initialize_application():
    objects.register_all()
    CONF(sys.argv[1:], project='karbor', version=version.version_string())
    logging.setup(CONF, "karbor")

    rpc.init(CONF)
예제 #2
0
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.

"""Starter script for karbor OperationEngine."""

import eventlet
eventlet.monkey_patch()

import sys

from oslo_config import cfg
from oslo_log import log as logging

from karbor import i18n
i18n.enable_lazy()
from karbor import objects

# Need to register global_opts
from karbor.common import config  # noqa
from karbor import service
from karbor import version


CONF = cfg.CONF


def main():
    objects.register_all()
    CONF(sys.argv[1:], project='karbor',
         version=version.version_string())