"Fossies" - the Fresh Open Source Software Archive

Member "monasca-api-3.1.0/monasca_api/conf/influxdb.py" (27 Sep 2019, 1654 Bytes) of package /linux/misc/openstack/monasca-api-3.1.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Python source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. For more information about "influxdb.py" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 3.0.0_vs_3.1.0.

    1 # Copyright 2014 IBM Corp.
    2 # Copyright 2016-2017 FUJITSU LIMITED
    3 # (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
    4 #
    5 # Licensed under the Apache License, Version 2.0 (the "License");
    6 # you may not use this file except in compliance with the License.
    7 # You may obtain a copy of the License at
    8 #
    9 # http://www.apache.org/licenses/LICENSE-2.0
   10 #
   11 # Unless required by applicable law or agreed to in writing, software
   12 # distributed under the License is distributed on an "AS IS" BASIS,
   13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
   14 # implied.
   15 # See the License for the specific language governing permissions and
   16 # limitations under the License.
   17 
   18 from oslo_config import cfg
   19 
   20 influxdb_opts = [
   21     cfg.StrOpt('database_name', default='mon',
   22                help='''
   23 Database name where metrics are stored
   24 '''),
   25     cfg.BoolOpt('db_per_tenant', default=False,
   26                 help='''
   27 Whether to use a separate database per tenant
   28 '''),
   29     cfg.HostAddressOpt('ip_address', default='127.0.0.1',
   30                        help='''
   31 IP address to Influxdb server
   32 '''),
   33     cfg.PortOpt('port', default=8086,
   34                 help='Port to Influxdb server'),
   35     cfg.StrOpt('user', required=True,
   36                sample_default='monasca-api', help='''
   37 Influxdb user
   38 '''),
   39     cfg.StrOpt('password', secret=True, sample_default='password',
   40                help='''
   41 Influxdb password
   42 ''')
   43 ]
   44 
   45 influxdb_group = cfg.OptGroup(name='influxdb', title='influxdb')
   46 
   47 
   48 def register_opts(conf):
   49     conf.register_group(influxdb_group)
   50     conf.register_opts(influxdb_opts, influxdb_group)
   51 
   52 
   53 def list_opts():
   54     return influxdb_group, influxdb_opts