cfg.IntOpt( 'wsgi_process', default=1, min=1, max=255, # snowflake id limit process max number help='The number of worker processes to serve the ' 'wsgi application'), cfg.IPOpt( 'bind_ip', version=4, # just ipv4 default='0.0.0.0', # nosec : Bind to all interfaces by # default for backwards compatibility. help='The IP address of the network interface for the ' 'wsgi application listen on.'), cfg.PortOpt('bind_port', default=7999, help='The port number which the wsgi application listens ' 'on.'), cfg.StrOpt('unix_socket_file', help='Listen on unix socket file'), cfg.StrOpt('paste_config', default='simpleservice-paste.ini', help='Name of the paste configuration file that defines ' 'the available pipelines.'), cfg.StrOpt('wsgi_log_format', default='%(client_ip)s "%(request_line)s" status: ' '%(status_code)s len: %(body_length)s time:' ' %(wall_seconds).7f', help='A python format string that is used as the template to ' 'generate log lines. The following values can be' 'formatted into it: client_ip, date_time, request_line, ' 'status_code, body_length, wall_seconds.'), cfg.IntOpt('tcp_keepidle',
from simpleutil.config import cfg CONF = cfg.CONF rabbit_opts = [ cfg.StrOpt('rabbit_host', default='localhost', help='The RabbitMQ broker address where a single node is ' 'used.'), cfg.PortOpt('rabbit_port', default=5672, help='The RabbitMQ broker port where a single node is used.'), cfg.StrOpt('rabbit_userid', default='guest', help='The RabbitMQ userid.'), cfg.StrOpt('rabbit_password', default='guest', help='The RabbitMQ password.', secret=True), cfg.StrOpt('rabbit_virtual_host', 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). '
from simpleutil.config import cfg from simpleutil.config import types client_opts = [ cfg.HostnameOrIPOpt('gcenter', default='127.0.0.1', help='Hostname or IP address of gcenter wsgi service'), cfg.PortOpt('gcenter_port', default=7999, help='Http port of gcenter wsgi service'), cfg.StrOpt('trusted', default='goperation-trusted-token', 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,
from simpleutil.config import cfg database_init_opts = [ cfg.StrOpt('user', default='root', help='mysql database root user name'), cfg.StrOpt('passwd', default='', help='mysql database root password'), cfg.StrOpt('host', default='127.0.0.1', help='mysql host or ipaddress'), cfg.PortOpt('port', default=3306, help='mysql server post'), cfg.StrOpt('schema', required=True, help='target mysql database schema') ]
from simpleutil.config import cfg redis_opts = [ cfg.HostnameOpt('redis_host', default='127.0.0.1', help='Redis connect host address'), cfg.PortOpt('redis_port', default=6379, help='Redis connect Port'), cfg.IntOpt('redis_db', default=1, help='Redis datababse id'), cfg.StrOpt('redis_password', max_length=32, regex='^[a-zA-Z0-9_]+$', help='Redis password'), cfg.FloatOpt('redis_socket_timeout', default=0.5, help='Timeout for socket send and receive'), cfg.FloatOpt('redis_connect_timeout', default=3.0, help='Timeout for socket connect'), cfg.IntOpt('redis_pool_size', min=2, max=20, default=3, help='Maximum number of redis connections to keep open in a ' 'pool.'), cfg.IntOpt('redis_heartbeat_overtime', default=3000, max=10000,
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' ), cfg.PortOpt('ntp_port', default=123, help='Specify port of ntp request' ), cfg.IntOpt('ntp_version', default=4, help='Specify the version of ntp request', min=1, max=4, ), cfg.IntOpt('ntp_timeout', default=1, help='Specify a timeout for ntp request', min=1, max=5, ), ]
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'), ]