def setup_global_env(program=None, args=None): global __setup_complete assert not __setup_complete from magnetodb import storage from magnetodb.common import config from magnetodb.openstack.common import log from magnetodb.openstack.common import gettextutils gettextutils.install(PROJECT_NAME, lazy=False) config.parse_args(prog=program, args=args) log.setup(PROJECT_NAME) storage.setup() __setup_complete = True
def setup_global_env(program=None, args=None): global __setup_complete assert not __setup_complete from magnetodb import storage from magnetodb.common import config from magnetodb.openstack.common import log from magnetodb.openstack.common import gettextutils gettextutils.install(PROJECT_NAME, lazy=False) config.parse_args( prog=program, args=args ) log.setup(PROJECT_NAME) storage.setup() __setup_complete = True
# under the License. import hashlib import requests import webob from oslo.config import cfg from magnetodb.common import exception from magnetodb.common import wsgi from magnetodb.openstack.common import jsonutils as json from magnetodb.openstack.common import log as logging from magnetodb.openstack.common import gettextutils from magnetodb.openstack.common.gettextutils import _ gettextutils.install('magnetodb') logger = logging.getLogger(__name__) opts = [ cfg.StrOpt('auth_uri', default='', help=_("Authentication Endpoint URI.")), cfg.BoolOpt('multi_cloud', default=False, help=_('Allow orchestration of multiple clouds.')), cfg.ListOpt('allowed_auth_uris', default=[], help=_('Allowed keystone endpoints for auth_uri when ' 'multi_cloud is enabled. At least one endpoint needs '
import routes from magnetodb.openstack.common import gettextutils from magnetodb.openstack.common import log from magnetodb.common import wsgi from magnetodb.common import PROJECT_NAME from magnetodb import storage from magnetodb.api.amz import controller as amz_api_controller from magnetodb.api.amz import wsgi as amazon_wsgi from magnetodb.common import config gettextutils.install(PROJECT_NAME, lazy=False) class MagnetoDBApplication(wsgi.Router): """API""" def __init__(self, **options): args = [] for k, v in options.iteritems(): args.append(k) args.append(v) config.parse_args( prog=options.get("program", "magnetodb-api"), args=args )
import hashlib import requests import webob from oslo.config import cfg from magnetodb.common import exception from magnetodb.common import wsgi from magnetodb.openstack.common import jsonutils as json from magnetodb.openstack.common import log as logging from magnetodb.openstack.common import gettextutils from magnetodb.openstack.common.gettextutils import _ gettextutils.install('magnetodb') logger = logging.getLogger(__name__) opts = [ cfg.StrOpt('auth_uri', default='', help=_("Authentication Endpoint URI.")), cfg.BoolOpt('multi_cloud', default=False, help=_('Allow orchestration of multiple clouds.')), cfg.ListOpt('allowed_auth_uris', default=[], help=_('Allowed keystone endpoints for auth_uri when ' 'multi_cloud is enabled. At least one endpoint needs ' 'to be specified.')) ] cfg.CONF.register_opts(opts, group='ec2authtoken')