コード例 #1
0
                           title='Agent base options group')
CONF.register_group(agent_group)

rpc_agent_opts = [
    cfg.StrOpt('zone',
               default='all',
               regex='^[a-z][a-z0-9]+$',
               help='Agent zone mark'),
    cfg.IntOpt('websokcets',
               default=5,
               min=0,
               max=10,
               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,
コード例 #2
0
ファイル: config.py プロジェクト: trustyboy/fluttercomic
from simpleutil.config import cfg
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')
]
コード例 #3
0
from simpleutil.config import cfg
from simpleutil.config import types

CONF = cfg.CONF

gop_rpc_server_opts = [
    cfg.IntOpt('expire_time',
               min=2,
               max=20,
               default=10,
               help='Rpc agent status expire time'),
    cfg.ListOpt('executers',
                item_type=types.String(),
                default=['http'],
                help='Rpc server executer class list'),
    cfg.ListOpt('conditions',
                item_type=types.String(),
                default=['agents', 'entitys'],
                help='Rpc server conditions class list'),
]


def list_opts():
    return gop_rpc_server_opts
コード例 #4
0
ファイル: config.py プロジェクト: trustyboy/fluttercomic
from simpleutil.config import cfg
from simpleutil.config import types

CONF = cfg.CONF

NAME = 'huawei'

huawei_opts = [
    cfg.ListOpt('huawei',
                item_type=types.String(),
                default=[],
                help='huawei opts'),
]


def register_opts(group):
    CONF.register_opts(huawei_opts, group)
コード例 #5
0
ファイル: config.py プロジェクト: soulhez/Goperation
import os
import ConfigParser
import logging as default_logging

from simpleutil.log import log as logging
from simpleutil.config import cfg
from simpleutil.config import types
from simpleutil.utils import systemutils

from simpleservice import config as service_config

CONF = cfg.CONF

endpoint_load_opts = [
    cfg.ListOpt('endpoints',
                item_type=types.String(),
                default=[],
                help='The endpoint group name or namespace'),
]

service_base_opts = [
    cfg.IPOpt('local_ip', version=4, help='Goperation local ip address'),
    cfg.ListOpt('external_ips',
                item_type=cfg.types.IPAddress(version=4),
                default=[],
                help='Goperation external network IP addresses'),
    cfg.FolderPathOpt('work_path', help='Goperation work in this path'),
    cfg.StrOpt('repo', help='Goperation rpm repo address'),
]


def set_all_default():
コード例 #6
0
ファイル: config.py プロジェクト: soulhez/Goperation
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'],