Exemplo n.º 1
0
def prepare_service(argv=None):
    cfg.CONF(project='entropy')
    log.setup('entropy')
    cfg.CONF.log_opt_values(LOG, logging.DEBUG)

    gettextutils.install('entropy')
    gettextutils.enable_lazy()

    cfg.set_defaults(log.log_opts)
    if argv is None:
        argv = sys.argv
    cfg.CONF(argv[1:], project='entropy')
Exemplo n.º 2
0
import argparse
import imp
import os
import re
import socket
import sys
import textwrap

from oslo.config import cfg
import six
import stevedore.named

from entropy.openstack.common import gettextutils
from entropy.openstack.common import importutils

gettextutils.install('entropy')

STROPT = "StrOpt"
BOOLOPT = "BoolOpt"
INTOPT = "IntOpt"
FLOATOPT = "FloatOpt"
LISTOPT = "ListOpt"
DICTOPT = "DictOpt"
MULTISTROPT = "MultiStrOpt"

OPT_TYPES = {
    STROPT: 'string value',
    BOOLOPT: 'boolean value',
    INTOPT: 'integer value',
    FLOATOPT: 'floating point value',
    LISTOPT: 'list value',