Beispiel #1
0
#  License for the specific language governing permissions and limitations
#  under the License.

from simpleutil.config import cfg

database_opts = [
    cfg.StrOpt('connection',
               help='The SQLAlchemy connection string to use to connect to '
               'the database.',
               secret=True),
    cfg.StrOpt('slave_connection',
               secret=True,
               help='The SQLAlchemy connection string to use to connect to the'
               ' slave database.'),
    cfg.BoolOpt('debug',
                default=False,
                help='Record raw sql to log(set echo of SQLAlchemy to true)'),
    cfg.StrOpt('mysql_sql_mode',
               default='TRADITIONAL',
               help='The SQL mode to be used for MySQL sessions. '
               'This option, including the default, overrides any '
               'server-set SQL mode. To use whatever SQL mode '
               'is set by the server configuration, '
               'set this to no value. Example: mysql_sql_mode='),
    cfg.IntOpt('idle_timeout',
               default=600,
               help='Timeout before idle SQL connections are reaped.'),
    cfg.IntOpt('min_pool_size',
               default=1,
               help='Minimum number of SQL connections to keep open in a '
               'pool.'),
Beispiel #2
0
    cfg.IntOpt('tcp_keepidle',
               default=60,
               help="Sets the value of TCP_KEEPIDLE in seconds for each "
               "server socket. Not supported on OS X."),
    cfg.IntOpt('wsgi_default_pool_size',
               default=100,
               help="Size of the pool of greenthreads used by wsgi"),
    cfg.IntOpt('max_header_line',
               default=16384,
               help="Maximum line size of message headers to be accepted. "
               "max_header_line may need to be increased when using "
               "large tokens (typically those generated when keystone "
               "is configured to use PKI tokens with big service "
               "catalogs)."),
    cfg.BoolOpt('wsgi_keep_alive',
                default=True,
                help="If False, closes the client socket connection "
                "explicitly."),
    cfg.IntOpt('client_socket_timeout',
               default=60,
               help="Timeout for client connections' socket operations. "
               "If an incoming connection is idle for this number of "
               "seconds it will be closed. A value of '0' means "
               "wait forever."),
    cfg.BoolOpt('x_real_ip',
                default=False,
                help='Get clent address from head of X-Real-IP'),
]


def find_paste_abs(conf):
    # isure paste_deploy config
Beispiel #3
0
            default='simpleservice',
            help='The RabbitMQ virtual host.'),
 cfg.StrOpt('exchange',
            default='simpleservice',
            help='The default exchange under which topics are scoped. May '
            'be overridden by an exchange name specified in the '
            'transport_url option.'),
 cfg.StrOpt('rabbit_login_method',
            default='AMQPLAIN',
            help='The RabbitMQ login method.'),
 cfg.BoolOpt('rabbit_ha_queues',
             default=False,
             help='Try to use HA queues in RabbitMQ (x-ha-policy: all). '
             'If you change this option, you must wipe the RabbitMQ '
             'database. In RabbitMQ 3.0, queue mirroring is no longer '
             'controlled by the x-ha-policy argument when declaring a '
             'queue. If you just want to make sure that all queues (except '
             ' those with auto-generated names) are mirrored across all '
             'nodes, run: '
             """\"rabbitmqctl set_policy HA '^(?!amq\.).*' """
             """'{"ha-mode": "all"}' \""""),
 cfg.FloatOpt('kombu_reconnect_delay',
              default=0.5,
              help='How long to wait before reconnecting in response to an '
              'AMQP consumer cancel notification.'),
 cfg.IntOpt('kombu_missing_consumer_retry_timeout',
            default=5,
            help='How long to wait a missing client beforce abandoning to '
            'send it its replies. This value should not be longer '
            'than rpc_send_timeout.'),
 cfg.StrOpt('kombu_failover_strategy',
Beispiel #4
0
            help='websocket sub process number'),
 cfg.ListOpt(
     'dnsnames',
     item_type=types.Hostname(),
     default=[],
     help='Agent dns hostnames',
 ),
 cfg.MultiOpt('ports_range',
              item_type=cfg.types.PortRange(),
              help='Rpc agent can alloc port from this range'),
 cfg.IntOpt('online_report_interval',
            default=5,
            choices=[1, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60],
            help='Rpc agent online report interval time in minute'),
 cfg.BoolOpt('report_performance',
             default=True,
             help='Rpc agent online report with system performance'),
 cfg.IntOpt('metadata_flush_probability',
            min=1,
            default=10,
            help='Agent metadata flush cache probability, 10 means 1/10'),
 cfg.StrOpt('taskflowcache',
            default='$work_path/taskflowcache',
            help='simpleflow storage file dir'),
 cfg.BoolOpt(
     'ramfscache',
     default=False,
     help='taskflow cache file in ramfs',
 ),
 cfg.StrOpt('taskflow_connection',
            help='taskflow storage connection url, taskflowcache '
Beispiel #5
0
               help='Trusted token, means a unlimit user'
               ),
    cfg.IntOpt('retries',
               default=3,
               help='Http client retry times, default is 3'
               ),
    cfg.IntOpt('apitimeout',
               default=5,
               help='Http client request timeout, defalut is 5'
               ),
]

index_opts = [
    cfg.IntOpt('page_num',
               default=0,
               help='Bluk select results page number'
               ),
    cfg.StrOpt('order',
               default=None,
               help='Bluk select results order key'
               ),
    cfg.BoolOpt('desc',
                default=False,
                help='Bluk select results order desc'
                ),
]

zone_opt = cfg.StrOpt('zone',
                      regex='^[a-z][a-z0-9]+$',
                      help='Agent zone mark defalut all')
Beispiel #6
0
from simpleutil.config import types

from fluttercomic.plugin import platforms

CONF = cfg.CONF

platforms_opts = [
    cfg.ListOpt('platforms',
                item_type=types.String(),
                default=[],
                help='Platforms list enabled'),
]

platform_opts = [
    cfg.BoolOpt('sandbox',
                default=True,
                help='paypal is sandbox api, just for send to paypal sandbox'),
    cfg.FloatOpt(
        'roe',
        default=1.0,
        help=
        'money rate of exchange, do not change this value if you don not what for'
    ),
    cfg.IntOpt('scale', default=100, help='scale for money to coins'),
    cfg.StrOpt('currency', default='USD', help='Pay currency type'),
    cfg.ListOpt('choices',
                default=[],
                item_type=types.Integer(),
                help='Pay money choice')
]
Beispiel #7
0
import socket
from simpleutil.config import cfg
from simpleutil.log import log as logging

CONF = cfg.CONF

default_opts = [
    cfg.HostnameOpt('host',
                    default=socket.gethostname(),
                    help="Hostname to be used by the server, agents and "
                         "services running on this machine. All the agents and "
                         "services running on this machine must use the same "
                         "host value."),
    cfg.BoolOpt('log_options',
                default=True,
                help='Enables or disables logging values of all registered '
                     'options when starting a service (at DEBUG level).'),
]


service_opts = [
    cfg.IntOpt('graceful_shutdown_timeout',
               default=60,
               help='Specify a timeout after which a gracefully shutdown '
                    'server will exit. Zero value means endless wait.')
]


ntp_opts = [
    cfg.IPOpt('ntp_server',
              help='Specify server ip address of ntp request'
Beispiel #8
0
from simpleutil.config import cfg

websocket_opts = [
    cfg.StrOpt('token',
               required=True,
               short='t',
               help='webesocket socket connect token'),
    cfg.StrOpt('home', required=True, help='webesocket home path'),
    cfg.IPOpt('listen',
              default='0.0.0.0',
              short='l',
              help='webesocket listen ip'),
    cfg.PortOpt('port',
                short='p',
                required=True,
                help='webesocket listen port'),
    cfg.BoolOpt('strict', default=True, help='webesocket use strict mode'),
    cfg.IntOpt('heartbeat',
               default=3,
               help='webesocket socket connect and heartbeat timeout'),
]
Beispiel #9
0
ipay_opts = [
    cfg.StrOpt('appId', help='ipay appId'),
    cfg.StrOpt('appUid', help='ipay app userid'),
    cfg.IntOpt('waresId', help='ipay waresId'),
    cfg.StrOpt('signtype',
               default='RSA',
               choices=['RSA'],
               help='ipay signtype appId'),
    cfg.StrOpt('rsa_private',
               default='/etc/goperation/endpoints/platforms/ipay_private.key',
               help='ipay signtype rsa private key file'),
    cfg.StrOpt('rsa_public',
               default='/etc/goperation/endpoints/platforms/ipay_public.key',
               help='ipay signtype rsa public key file'),
    cfg.BoolOpt('h5', default=False, help='ipay signtype use h5 api'),
    cfg.UrlOpt('url_r', help='ipay pay with h5 post request url(success)'),
    cfg.UrlOpt('url_h', help='ipay pay with h5 post request url(fail)'),
]


def register_opts(group):
    CONF.register_opts(ipay_opts + config.platform_opts, group)
    config.register_platform(
        name=NAME,
        choices=CONF[group.name].choices,
        scale=CONF[group.name].scale,
        currency=CONF[group.name].currency,
        appId=CONF[group.name].appId,
        h5=CONF[group.name].h5,
    )
Beispiel #10
0
from simpleutil.config import cfg
from simpleutil.config import types

CONF = cfg.CONF

authfilter_opts = [
    cfg.ListOpt('allowed_trusted_ip',
                item_type=types.IPAddress(version=4),
                default=[],
                help='Allowed ipaddress without token, 127.0.0.1 and local ip is allowed'),
    cfg.BoolOpt('allowed_same_subnet',
                default=True,
                help='Allow ipaddress without token in same subnet'),
    cfg.ListOpt('allowed_hostname',
                default=["*"],
                help='Allow hostname'),
]


cors_opts = [
    cfg.ListOpt('allowed_origin',
                default=["*"],
                help='Indicate whether this resource may be shared with the '
                     'domain received in the requests "origin" header.'),
    cfg.BoolOpt('allow_credentials',
                default=True,
                help='Indicate that the actual request can include user '
                     'credentials'),
    cfg.ListOpt('expose_headers',
                default=['Content-Type', 'Cache-Control', 'Content-Language',
                         'Expires', 'Last-Modified', 'Pragma'],