def configure(config): global _CONF global LOG _CONF = config _CONF.register_opts(OPTIONS, group=OPT_GROUP_NAME) logging.register(_CONF, OPT_GROUP_NAME) logging.setup(_CONF, OPT_GROUP_NAME) LOG = logging.getLogger(__name__)
def configure(config): global CONF global LOG CONF = config CONF.register_opt(cfg.StrOpt(OPTION_NAME), group=OPT_GROUP_NAME) logging.register(CONF, OPT_GROUP_NAME) logging.setup(CONF, OPT_GROUP_NAME) LOG = logging.getLogger(__name__)
def configure(config): global _CONF global LOG _CONF = config _CONF.register_opts(GOV_OPTIONS, group=GOV_GROUP_NAME) _CONF.register_opts(REDIS_OPTIONS, group=REDIS_GROUP_NAME) logging.register(_CONF, GOV_GROUP_NAME) logging.setup(_CONF, GOV_GROUP_NAME) LOG = logging.getLogger(__name__)
def configure(config): global _CONF global LOG _CONF = config _CONF.register_opts(AUTH_OPTIONS, group=AUTH_GROUP_NAME) _CONF.register_opts(REDIS_OPTIONS, group=REDIS_GROUP_NAME) logging.register(_CONF, AUTH_GROUP_NAME) logging.setup(_CONF, AUTH_GROUP_NAME) LOG = logging.getLogger(__name__)
def configure(config): global CONF global LOG CONF = config CONF.register_opts(GOV_OPTIONS, group=GOV_GROUP_NAME) CONF.register_opts(REDIS_OPTIONS, group=REDIS_GROUP_NAME) logging.register(CONF, GOV_GROUP_NAME) logging.setup(CONF, GOV_GROUP_NAME) LOG = logging.getLogger(__name__)
# See the License for the specific language governing permissions and # limitations under the License. from __future__ import division import re import time from oslo_config import cfg import redis import simplejson as json import six from eom.utils import log as logging _CONF = cfg.CONF LOG = logging.getLogger(__name__) GOV_GROUP_NAME = 'eom:governor' GOV_OPTIONS = [ cfg.StrOpt( 'rates_file', help='JSON file containing route, methods, limits and drain_velocity.' ), cfg.StrOpt( 'project_rates_file', help='JSON file with details on project id specific rate limiting.'), cfg.IntOpt('throttle_milliseconds', help='Number of milliseconds to sleep when bucket is full.') ] REDIS_GROUP_NAME = 'eom:redis'
# 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. import re import socket import time from oslo_config import cfg import statsd from eom.utils import log as logging _CONF = cfg.CONF LOG = logging.getLogger(__name__) OPT_GROUP_NAME = 'eom:metrics' OPTIONS = [ cfg.StrOpt('address', help='host for statsd server.', required=True, default='localhost'), cfg.IntOpt('port', help='port for statsd server.', required=False, default=8125), cfg.ListOpt('path_regexes_keys', help='keys for regexes for the paths of the WSGI app', required=False, default=[]),