Python oslo_config.cfg.PortOpt() Examples

The following are 1 code examples of oslo_config.cfg.PortOpt(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module oslo_config.cfg , or try the search function .
Example #1
Source File: config.py    From freezer-api with Apache License 2.0 5 votes vote down vote up
def api_common_opts():

    _COMMON = [
        cfg.IPOpt('bind-host',
                  default='0.0.0.0',
                  dest='bind_host',
                  help='IP address to listen on. Default is 0.0.0.0'),
        cfg.PortOpt('bind-port',
                    default=9090,
                    dest='bind_port',
                    help='Port number to listen on. Default is 9090'
                    ),
        cfg.BoolOpt('enable_v1_api',
                    default=False,
                    help="""Default False, That is the v2 Freezer API
                    will be deployed. When this option is set
                    to ``True``, Freezer-api service will respond
                    to requests on registered endpoints conforming
                    to the v1 OpenStack Freezer api.
                    The v1 OpenStack Freezer API functions
                    as follows:
                        * Multi-tenancy is not supported under this
                         api version.
                        * Everything is user based.
                        * Freezer api v1 supports Oslo.db.
                        * Use elasticsearch db with v1 api version
                    The v2 OpenStack Freezer API functions
                    as follows:
                        * Multi-tenancy is supported under this api version.
                        * Freezer api v2 supports Oslo.db.
                        * Recommended to use oslo.db with api v2
                    Possible values:
                        * True
                        * False
                    """)
    ]

    return _COMMON