[449122] Ranger: OsloConfig libraries upon install of Ranger
Implement Oslo Config options for Ranger. Change-Id: I5f4b3f58281b9e840dcd3ae49db9363f35ab58d0
This commit is contained in:
parent
8f7af62100
commit
9e469032f5
53
etc/ranger/ranger.conf
Normal file
53
etc/ranger/ranger.conf
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
protocol =
|
||||||
|
orm_host =
|
||||||
|
ranger_base =
|
||||||
|
ssl_verify =
|
||||||
|
log_location =
|
||||||
|
|
||||||
|
[keystone_authtoken]
|
||||||
|
username =
|
||||||
|
password =
|
||||||
|
project_name =
|
||||||
|
region =
|
||||||
|
project_domain_name =
|
||||||
|
user_domain_name =
|
||||||
|
|
||||||
|
[database]
|
||||||
|
connection =
|
||||||
|
max_retries =
|
||||||
|
|
||||||
|
[uuid]
|
||||||
|
port =
|
||||||
|
log =
|
||||||
|
|
||||||
|
[cms]
|
||||||
|
port =
|
||||||
|
log =
|
||||||
|
|
||||||
|
[fms]
|
||||||
|
port =
|
||||||
|
log =
|
||||||
|
|
||||||
|
[audit]
|
||||||
|
port =
|
||||||
|
log =
|
||||||
|
|
||||||
|
[ims]
|
||||||
|
port =
|
||||||
|
log =
|
||||||
|
|
||||||
|
[rms]
|
||||||
|
port =
|
||||||
|
log =
|
||||||
|
|
||||||
|
[rds]
|
||||||
|
port =
|
||||||
|
repo_local_location =
|
||||||
|
repo_remote_location =
|
||||||
|
repo_user =
|
||||||
|
repo_email =
|
||||||
|
log =
|
||||||
|
|
||||||
|
[cli]
|
||||||
|
base_region =
|
@ -1,70 +1,285 @@
|
|||||||
orm_protocal = 'http'
|
# Copyright 2018 AT&T Corporation.
|
||||||
orm_host = '127.0.0.1'
|
# All Rights Reserved.
|
||||||
log_location = '{}'
|
#
|
||||||
ranger_base = '/opt/app/ranger'
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
log_location = '/var/log/ranger/{}'
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
|
CONF = cfg.CONF
|
||||||
|
|
||||||
|
|
||||||
|
# Orm config options in DEFAULT block
|
||||||
|
OrmOpts = [
|
||||||
|
cfg.StrOpt('protocol',
|
||||||
|
default='http',
|
||||||
|
help='Orm protocol used.'),
|
||||||
|
cfg.HostAddressOpt('orm_host',
|
||||||
|
default='127.0.0.1',
|
||||||
|
help='Orm server IP address.'),
|
||||||
|
cfg.StrOpt('ranger_base',
|
||||||
|
default='/opt/app/ranger',
|
||||||
|
help='Orm base directory.'),
|
||||||
|
cfg.BoolOpt('ssl_verify',
|
||||||
|
default=False,
|
||||||
|
help='Flag for SSL verfiy Enabled/Disabled.'),
|
||||||
|
cfg.StrOpt('log_location',
|
||||||
|
default='/var/log/ranger',
|
||||||
|
help='Orm log directory.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_opts(OrmOpts)
|
||||||
|
|
||||||
|
# Keystone config options in [keystone_autotoken] group
|
||||||
|
orm_token_group = cfg.OptGroup(name='token',
|
||||||
|
title='Orm Keystone Token Options')
|
||||||
|
|
||||||
|
OrmAuthGroup = [
|
||||||
|
cfg.StrOpt('username',
|
||||||
|
default='admin',
|
||||||
|
help='Token user name.'),
|
||||||
|
cfg.StrOpt('password',
|
||||||
|
default='devstack',
|
||||||
|
help='Token password.'),
|
||||||
|
cfg.StrOpt('project_name',
|
||||||
|
default='admin',
|
||||||
|
help='Project name.'),
|
||||||
|
cfg.StrOpt('region',
|
||||||
|
default='local',
|
||||||
|
help='Region.'),
|
||||||
|
cfg.StrOpt('project_domain_name',
|
||||||
|
default='default',
|
||||||
|
help='Project domain name.'),
|
||||||
|
cfg.StrOpt('user_domain_name',
|
||||||
|
default='default',
|
||||||
|
help='User domain name.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_token_group)
|
||||||
|
CONF.register_opts(OrmAuthGroup, orm_token_group)
|
||||||
|
|
||||||
|
# Database config options in [database] group
|
||||||
|
orm_database_group = cfg.OptGroup(name='database',
|
||||||
|
title='Orm Database Options')
|
||||||
|
|
||||||
|
OrmDatabaseGroup = [
|
||||||
|
cfg.StrOpt('connection',
|
||||||
|
help='The SQLAlchemy connection string to use to connect to '
|
||||||
|
'the ORM database.',
|
||||||
|
secret=True),
|
||||||
|
cfg.IntOpt('max_retries',
|
||||||
|
default=-1,
|
||||||
|
help='The maximum number of retries for database connection.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_database_group)
|
||||||
|
CONF.register_opts(OrmDatabaseGroup, orm_database_group)
|
||||||
|
|
||||||
|
# UUID config options in [uuid] group
|
||||||
|
orm_uuid_group = cfg.OptGroup(name='uuid', title='Orm UUID Options')
|
||||||
|
|
||||||
|
OrmUuidGroup = [
|
||||||
|
cfg.PortOpt('port',
|
||||||
|
default=7001,
|
||||||
|
help='UUID port.'),
|
||||||
|
cfg.StrOpt('log',
|
||||||
|
default='uuidgen.log',
|
||||||
|
help='UUID log name.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_uuid_group)
|
||||||
|
CONF.register_opts(OrmUuidGroup, orm_uuid_group)
|
||||||
|
|
||||||
|
|
||||||
|
# cms config options in [cms] group
|
||||||
|
orm_cms_group = cfg.OptGroup(name='cms', title='Orm Cms Options')
|
||||||
|
|
||||||
|
OrmCmsGroup = [
|
||||||
|
cfg.PortOpt('port',
|
||||||
|
default=7080,
|
||||||
|
help='Cms port.'),
|
||||||
|
cfg.StrOpt('log',
|
||||||
|
default='cms.log',
|
||||||
|
help='Cms log name.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_cms_group)
|
||||||
|
CONF.register_opts(OrmCmsGroup, orm_cms_group)
|
||||||
|
|
||||||
|
|
||||||
|
# fms config options in [fms] group
|
||||||
|
orm_fms_group = cfg.OptGroup(name='fms', title='Orm Fms Options')
|
||||||
|
|
||||||
|
OrmFmsGroup = [
|
||||||
|
cfg.PortOpt('port',
|
||||||
|
default=8082,
|
||||||
|
help='Fms port.'),
|
||||||
|
cfg.StrOpt('log',
|
||||||
|
default='fms.log',
|
||||||
|
help='Fms log name.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_fms_group)
|
||||||
|
CONF.register_opts(OrmFmsGroup, orm_fms_group)
|
||||||
|
|
||||||
|
|
||||||
|
# audit config options in [audit] group
|
||||||
|
orm_audit_group = cfg.OptGroup(name='audit', title='Orm Audit Options')
|
||||||
|
|
||||||
|
OrmAuditGroup = [
|
||||||
|
cfg.PortOpt('port',
|
||||||
|
default=7002,
|
||||||
|
help='Audit port.'),
|
||||||
|
cfg.StrOpt('log',
|
||||||
|
default='audit_server.log',
|
||||||
|
help='Audit log name.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_audit_group)
|
||||||
|
CONF.register_opts(OrmAuditGroup, orm_audit_group)
|
||||||
|
|
||||||
|
|
||||||
|
# ims config options in [ims] group
|
||||||
|
orm_ims_group = cfg.OptGroup(name='ims', title='Orm Ims Options')
|
||||||
|
|
||||||
|
OrmImsGroup = [
|
||||||
|
cfg.PortOpt('port',
|
||||||
|
default=8084,
|
||||||
|
help='Ims port.'),
|
||||||
|
cfg.StrOpt('log',
|
||||||
|
default='ims.log',
|
||||||
|
help='Ims log name.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_ims_group)
|
||||||
|
CONF.register_opts(OrmImsGroup, orm_ims_group)
|
||||||
|
|
||||||
|
|
||||||
|
# rms config options in [rms] group
|
||||||
|
orm_rms_group = cfg.OptGroup(name='rms', title='Orm Rms Options')
|
||||||
|
|
||||||
|
OrmRmsGroup = [
|
||||||
|
cfg.PortOpt('port',
|
||||||
|
default=7003,
|
||||||
|
help='Rms port.'),
|
||||||
|
cfg.StrOpt('log',
|
||||||
|
default='rms.log',
|
||||||
|
help='Rms log name.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_rms_group)
|
||||||
|
CONF.register_opts(OrmRmsGroup, orm_rms_group)
|
||||||
|
|
||||||
|
|
||||||
|
# rds config options in [rds] group
|
||||||
|
orm_rds_group = cfg.OptGroup(name='rds', title='Orm Rds Options')
|
||||||
|
|
||||||
|
OrmRdsGroup = [
|
||||||
|
cfg.PortOpt('port',
|
||||||
|
default=8777,
|
||||||
|
help='Rds port.'),
|
||||||
|
cfg.StrOpt('repo_local_location',
|
||||||
|
default='/opt/app/git_repo',
|
||||||
|
help='Path to repo location.'),
|
||||||
|
cfg.StrOpt('repo_remote_location',
|
||||||
|
default='git@127.0.0.1:/home/repo/ORM.git',
|
||||||
|
help='Repo remote location.'),
|
||||||
|
cfg.StrOpt('repo_user',
|
||||||
|
default='orm',
|
||||||
|
help='Repo user name.'),
|
||||||
|
cfg.StrOpt('repo_email',
|
||||||
|
default='orm@test.com',
|
||||||
|
help='Repo email address.'),
|
||||||
|
cfg.StrOpt('log',
|
||||||
|
default='rds.log',
|
||||||
|
help='Rds log name.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_rds_group)
|
||||||
|
CONF.register_opts(OrmRdsGroup, orm_rds_group)
|
||||||
|
|
||||||
|
|
||||||
|
# cli config options in [cli] group
|
||||||
|
orm_cli_group = cfg.OptGroup(name='cli', title='Orm CLI Options')
|
||||||
|
|
||||||
|
OrmCliGroup = [
|
||||||
|
cfg.StrOpt('base_region',
|
||||||
|
default='local',
|
||||||
|
help='Base region.')
|
||||||
|
]
|
||||||
|
|
||||||
|
CONF.register_group(orm_cli_group)
|
||||||
|
CONF.register_opts(OrmCliGroup, orm_cli_group)
|
||||||
|
|
||||||
|
################################################################
|
||||||
|
# The following global variables are kept in here for
|
||||||
|
# backward compatiblitiy as other modules still
|
||||||
|
# referenced to them.
|
||||||
|
################################################################
|
||||||
|
|
||||||
|
protocol = CONF.protocol
|
||||||
|
orm_host = CONF.orm_host
|
||||||
|
ranger_base = CONF.ranger_base
|
||||||
db_user = 'root'
|
db_user = 'root'
|
||||||
db_pass = 'devstack'
|
db_pass = 'devstack'
|
||||||
db_host = '127.0.0.1'
|
db_host = '127.0.0.1'
|
||||||
ssl_verify = False
|
ssl_verify = CONF.ssl_verify
|
||||||
token_auth_enabled = False
|
token_auth_enabled = False
|
||||||
token_auth_user = 'admin'
|
token_auth_user = CONF.token.username
|
||||||
token_auth_pass = 'devstack'
|
token_auth_pass = CONF.token.password
|
||||||
token_auth_tenant = 'admin'
|
token_auth_tenant = CONF.token.project_name
|
||||||
token_auth_user_role = 'admin'
|
token_auth_user_role = 'admin'
|
||||||
uuid_port = 7001
|
|
||||||
audit_port = 7002
|
|
||||||
rms_port = 7003
|
|
||||||
rds_port = 8777
|
|
||||||
cms_port = 7080
|
|
||||||
fms_port = 8082
|
|
||||||
ims_port = 8084
|
|
||||||
|
|
||||||
db_url = 'mysql://' + db_user + ':' + db_pass + '@' + db_host + ':3306/'
|
db_url = 'mysql://{}:{}@{}:3306/'.format(db_user, db_pass, db_host)
|
||||||
|
|
||||||
uuid = {
|
uuid = {'port': CONF.uuid.port,
|
||||||
'port': uuid_port,
|
'base_url': '{}://{}:{}/'.
|
||||||
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, uuid_port),
|
format(protocol, orm_host, CONF.uuid.port),
|
||||||
'log': log_location.format('uuidgen.log')
|
'log': '{}/{}'.format(CONF.log_location, CONF.uuid.log)}
|
||||||
}
|
|
||||||
cms = {
|
cms = {'port': CONF.cms.port,
|
||||||
'port': cms_port,
|
'base_url': '{}://{}:{}/'.format(protocol, orm_host, CONF.cms.port),
|
||||||
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, cms_port),
|
'policy_file': CONF.ranger_base +
|
||||||
'policy_file': ranger_base + '/orm/services/customer_manager/cms_rest/etc/policy.json',
|
'/orm/services/customer_manager/cms_rest/etc/policy.json',
|
||||||
'log': log_location.format('cms.log')
|
'log': '{}/{}'.format(CONF.log_location, CONF.cms.log)}
|
||||||
}
|
|
||||||
fms = {
|
fms = {'port': CONF.fms.port,
|
||||||
'port': fms_port,
|
'base_url': '{}://{}:{}/'.format(protocol, orm_host, CONF.fms.port),
|
||||||
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, fms_port),
|
'policy_file': CONF.ranger_base +
|
||||||
'policy_file': ranger_base + '/orm/services/flavor_manager/fms_rest/etc/policy.json',
|
'/orm/services/flavor_manager/fms_rest/etc/policy.json',
|
||||||
'log': log_location.format('fms.log')
|
'log': '{}/{}'.format(CONF.log_location, CONF.fms.log)}
|
||||||
}
|
|
||||||
audit_server = {
|
audit_server = {'port': CONF.audit.port,
|
||||||
'port': audit_port,
|
'base_url': '{}://{}:{}/'
|
||||||
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, audit_port),
|
.format(protocol, orm_host, CONF.audit.port),
|
||||||
'log': log_location.format('audit_server.log')
|
'log': '{}/{}'.format(CONF.log_location, CONF.audit.log)}
|
||||||
}
|
|
||||||
ims = {
|
ims = {'port': CONF.ims.port,
|
||||||
'port': ims_port,
|
'base_url': '{}://{}:{}/'.format(protocol, orm_host, CONF.ims.port),
|
||||||
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, ims_port),
|
'policy_file': CONF.ranger_base +
|
||||||
'policy_file': ranger_base + '/orm/services/image_manager/ims/etc/policy.json',
|
'/orm/services/image_manager/ims/etc/policy.json',
|
||||||
'log': log_location.format('ims.log')
|
'log': '{}/{}'.format(CONF.log_location, CONF.ims.log)}
|
||||||
}
|
|
||||||
rms = {
|
rms = {'port': CONF.rms.port,
|
||||||
'port': rms_port,
|
'base_url': '{}://{}:{}/'.format(protocol, orm_host, CONF.rms.port),
|
||||||
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, rms_port),
|
'policy_file': CONF.ranger_base +
|
||||||
'policy_file': ranger_base + '/orm/services/region_manager/rms/etc/policy.json',
|
'/orm/services/region_manager/rms/etc/policy.json',
|
||||||
'log': log_location.format('rms.log')
|
'log': '{}/{}'.format(CONF.log_location, CONF.rms.log)}
|
||||||
}
|
|
||||||
rds = {
|
rds = {'port': CONF.rds.port,
|
||||||
'port': rds_port,
|
'repo_local_location': CONF.rds.repo_local_location,
|
||||||
'repo_local_location': '/opt/app/git_repo',
|
'repo_remote_location': CONF.rds.repo_remote_location,
|
||||||
'repo_user': 'orm',
|
'repo_user': CONF.rds.repo_user,
|
||||||
'repo_email': 'orm@test.com',
|
'repo_email': CONF.rds.repo_email,
|
||||||
'repo_remote_location': 'git@127.0.0.1:/home/repo/ORM.git',
|
'base_url': '{}://{}:{}/'.format(protocol, orm_host, CONF.rds.port),
|
||||||
'base_url': '{}://{}:{}/'.format(orm_protocal, orm_host, rds_port),
|
'log': '{}/{}'.format(CONF.log_location, CONF.rds.log)}
|
||||||
'log': log_location.format('rds.log')
|
|
||||||
}
|
cli = {'base_region': CONF.cli.base_region}
|
||||||
cli = {
|
|
||||||
'base_region': 'local'
|
|
||||||
}
|
|
||||||
|
@ -12,15 +12,8 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
from oslo_config import cfg
|
|
||||||
|
|
||||||
from orm.common import config
|
|
||||||
from orm.services.id_generator.uuidgen import app
|
from orm.services.id_generator.uuidgen import app
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
config.parse_args()
|
|
||||||
app.main()
|
app.main()
|
||||||
|
@ -6,5 +6,5 @@ tenant_name = config.token_auth_tenant
|
|||||||
username = config.token_auth_user
|
username = config.token_auth_user
|
||||||
password = config.token_auth_pass
|
password = config.token_auth_pass
|
||||||
auth_region = config.cli['base_region']
|
auth_region = config.cli['base_region']
|
||||||
orm_base_url = '{}://{}'.format(config.orm_protocal, config.orm_host)
|
orm_base_url = '{}://{}'.format(config.protocol, config.orm_host)
|
||||||
verify = config.ssl_verify
|
verify = config.ssl_verify
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
"""app module."""
|
"""app module."""
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from orm.services.audit_trail_manager.audit_server import model
|
from orm.services.audit_trail_manager.audit_server import model
|
||||||
from orm.services.audit_trail_manager.audit_server.storage import factory
|
from orm.services.audit_trail_manager.audit_server.storage import factory
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from pecan.commands import CommandRunner
|
from pecan.commands import CommandRunner
|
||||||
from pecan import make_app
|
from pecan import make_app
|
||||||
|
|
||||||
@ -28,7 +31,11 @@ def setup_app(config):
|
|||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(argv=None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv
|
||||||
|
cfg.CONF(argv[1:], project='ranger', validate_default_values=True)
|
||||||
|
|
||||||
dir_name = os.path.dirname(__file__)
|
dir_name = os.path.dirname(__file__)
|
||||||
drive, path_and_file = os.path.splitdrive(dir_name)
|
drive, path_and_file = os.path.splitdrive(dir_name)
|
||||||
path, filename = os.path.split(path_and_file)
|
path, filename = os.path.split(path_and_file)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from pecan.commands import CommandRunner
|
from pecan.commands import CommandRunner
|
||||||
from pecan import make_app
|
from pecan import make_app
|
||||||
|
import sys
|
||||||
|
|
||||||
from orm.common.orm_common.policy import policy
|
from orm.common.orm_common.policy import policy
|
||||||
from orm.common.orm_common.utils import utils
|
from orm.common.orm_common.utils import utils
|
||||||
@ -8,6 +9,8 @@ from orm.services.customer_manager.cms_rest.logger import get_logger
|
|||||||
from orm.services.customer_manager.cms_rest import model
|
from orm.services.customer_manager.cms_rest import model
|
||||||
from orm.services.customer_manager.cms_rest.utils import authentication
|
from orm.services.customer_manager.cms_rest.utils import authentication
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
logger = get_logger(__name__)
|
logger = get_logger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@ -29,7 +32,11 @@ def setup_app(config):
|
|||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(argv=None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv
|
||||||
|
cfg.CONF(argv[1:], project='ranger', validate_default_values=True)
|
||||||
|
|
||||||
dir_name = os.path.dirname(__file__)
|
dir_name = os.path.dirname(__file__)
|
||||||
drive, path_and_file = os.path.splitdrive(dir_name)
|
drive, path_and_file = os.path.splitdrive(dir_name)
|
||||||
path, filename = os.path.split(path_and_file)
|
path, filename = os.path.split(path_and_file)
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from orm.common.orm_common.policy import policy
|
from orm.common.orm_common.policy import policy
|
||||||
from orm.services.flavor_manager.fms_rest.data import wsme
|
from orm.services.flavor_manager.fms_rest.data import wsme
|
||||||
from orm.services.flavor_manager.fms_rest.logger import get_logger
|
from orm.services.flavor_manager.fms_rest.logger import get_logger
|
||||||
from orm.services.flavor_manager.fms_rest.utils import authentication
|
from orm.services.flavor_manager.fms_rest.utils import authentication
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from pecan.commands import CommandRunner
|
from pecan.commands import CommandRunner
|
||||||
from pecan import make_app
|
from pecan import make_app
|
||||||
|
|
||||||
@ -26,7 +29,11 @@ def setup_app(config):
|
|||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(argv=None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv
|
||||||
|
cfg.CONF(argv[1:], project='ranger', validate_default_values=True)
|
||||||
|
|
||||||
dir_name = os.path.dirname(__file__)
|
dir_name = os.path.dirname(__file__)
|
||||||
drive, path_and_file = os.path.splitdrive(dir_name)
|
drive, path_and_file = os.path.splitdrive(dir_name)
|
||||||
path, filename = os.path.split(path_and_file)
|
path, filename = os.path.split(path_and_file)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
|
||||||
from pecan.commands import CommandRunner
|
from pecan.commands import CommandRunner
|
||||||
@ -18,7 +20,11 @@ def setup_app(config):
|
|||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(argv=None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv
|
||||||
|
cfg.CONF(argv[1:], project='ranger', validate_default_values=True)
|
||||||
|
|
||||||
dir_name = os.path.dirname(__file__)
|
dir_name = os.path.dirname(__file__)
|
||||||
drive, path_and_file = os.path.splitdrive(dir_name)
|
drive, path_and_file = os.path.splitdrive(dir_name)
|
||||||
path, filename = os.path.split(path_and_file)
|
path, filename = os.path.split(path_and_file)
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from orm.common.orm_common.policy import policy
|
from orm.common.orm_common.policy import policy
|
||||||
from orm.common.orm_common.utils.utils import set_utils_conf
|
from orm.common.orm_common.utils.utils import set_utils_conf
|
||||||
from orm.services.image_manager.ims.logger import get_logger
|
from orm.services.image_manager.ims.logger import get_logger
|
||||||
from orm.services.image_manager.ims.utils import authentication as auth
|
from orm.services.image_manager.ims.utils import authentication as auth
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from pecan import conf, make_app
|
from pecan import conf, make_app
|
||||||
from pecan.commands import CommandRunner
|
from pecan.commands import CommandRunner
|
||||||
|
|
||||||
@ -28,7 +31,11 @@ def setup_app(config):
|
|||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(argv=None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv
|
||||||
|
cfg.CONF(argv[1:], project='ranger', validate_default_values=True)
|
||||||
|
|
||||||
dir_name = os.path.dirname(__file__)
|
dir_name = os.path.dirname(__file__)
|
||||||
drive, path_and_file = os.path.splitdrive(dir_name)
|
drive, path_and_file = os.path.splitdrive(dir_name)
|
||||||
path, filename = os.path.split(path_and_file)
|
path, filename = os.path.split(path_and_file)
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
from orm.common.orm_common.policy import policy
|
from orm.common.orm_common.policy import policy
|
||||||
from orm.common.orm_common.utils import utils
|
from orm.common.orm_common.utils import utils
|
||||||
from orm.services.region_manager.rms import model
|
from orm.services.region_manager.rms import model
|
||||||
from orm.services.region_manager.rms.utils import authentication
|
from orm.services.region_manager.rms.utils import authentication
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from pecan.commands import CommandRunner
|
from pecan.commands import CommandRunner
|
||||||
from pecan import make_app
|
from pecan import make_app
|
||||||
|
|
||||||
@ -30,7 +33,11 @@ def setup_app(config):
|
|||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(argv=None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv
|
||||||
|
cfg.CONF(argv[1:], project='ranger', validate_default_values=True)
|
||||||
|
|
||||||
dir_name = os.path.dirname(__file__)
|
dir_name = os.path.dirname(__file__)
|
||||||
drive, path_and_file = os.path.splitdrive(dir_name)
|
drive, path_and_file = os.path.splitdrive(dir_name)
|
||||||
path, filename = os.path.split(path_and_file)
|
path, filename = os.path.split(path_and_file)
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from oslo_config import cfg
|
||||||
|
|
||||||
from orm.common.client.audit.audit_client.api import audit
|
from orm.common.client.audit.audit_client.api import audit
|
||||||
from pecan import conf, make_app
|
from pecan import conf, make_app
|
||||||
@ -62,7 +65,11 @@ def validate_sot():
|
|||||||
sot_factory.get_sot().validate_sot_state()
|
sot_factory.get_sot().validate_sot_state()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main(argv=None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv
|
||||||
|
cfg.CONF(argv[1:], project='ranger', validate_default_values=True)
|
||||||
|
|
||||||
dir_name = os.path.dirname(__file__)
|
dir_name = os.path.dirname(__file__)
|
||||||
drive, path_and_file = os.path.splitdrive(dir_name)
|
drive, path_and_file = os.path.splitdrive(dir_name)
|
||||||
path, filename = os.path.split(path_and_file)
|
path, filename = os.path.split(path_and_file)
|
||||||
|
Loading…
Reference in New Issue
Block a user