コード例 #1
0
#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
#    License for the specific language governing permissions and limitations
#    under the License.
"""Implementation of Inspector abstraction for VMware vSphere"""

from oslo_config import cfg
from oslo_utils import units
import six

from ceilometer.compute.virt import inspector as virt_inspector
from ceilometer.compute.virt.vmware import vsphere_operations
from ceilometer.i18n import _

vmware_api = None

opt_group = cfg.OptGroup(name='vmware', title='Options for VMware')

OPTS = [
    cfg.HostAddressOpt('host_ip',
                       default='127.0.0.1',
                       help='IP address of the VMware vSphere host.'),
    cfg.PortOpt('host_port',
                default=443,
                help='Port of the VMware vSphere host.'),
    cfg.StrOpt('host_username', default='',
               help='Username of VMware vSphere.'),
    cfg.StrOpt('host_password',
               default='',
               help='Password of VMware vSphere.',
               secret=True),
    cfg.StrOpt('ca_file',
コード例 #2
0
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

from oslo_config import cfg

nova_client = cfg.OptGroup(name='nova_client',
                           title='Configuration Options for Nova')

NOVA_CLIENT_OPTS = [
    cfg.StrOpt('api_version',
               default='2',
               help='Version of Nova API to use in novaclient.')
]


def register_opts(conf):
    conf.register_group(nova_client)
    conf.register_opts(NOVA_CLIENT_OPTS, group=nova_client)


def list_opts():
    return [('nova_client', NOVA_CLIENT_OPTS)]
コード例 #3
0
Licensed under the Apache License, Version 2.0 (the "License"); you may
not use this file except in compliance with the License. You may obtain
a copy of the License at
    http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either expressed or implied. See the
License for the specific language governing permissions and limitations
under the License.
"""
from oslo_config import cfg

from nova.compute import power_state


aws_group = cfg.OptGroup(name='AWS',
                         title='Options to connect to an AWS cloud')

aws_opts = [
    cfg.StrOpt('secret_key', help='Secret key of AWS account', secret=True),
    cfg.StrOpt('access_key', help='Access key of AWS account', secret=True),
    cfg.StrOpt('region_name', help='AWS region'),
    cfg.StrOpt('az', help='AWS availability zone'),
    cfg.BoolOpt('use_credsmgr', help='Endpoint to use for getting AWS '
                                     'credentials', default=True),
    cfg.IntOpt('vnc_port',
               default=5900,
               help='VNC starting port'),
    # 500 VCPUs
    cfg.IntOpt('max_vcpus',
               default=500,
               help='Max number of vCPUs that can be used'),
コード例 #4
0
ICMP_UP_STATUS = "ICMP UP"
ICMP_DOWN_STATUS = "ICMP DOWN"

VM_BENCHMARK_OPTS = [
    cfg.FloatOpt("vm_ping_poll_interval",
                 default=1.0,
                 help="Interval between checks when waiting for a VM to "
                 "become pingable"),
    cfg.FloatOpt("vm_ping_timeout",
                 default=120.0,
                 help="Time to wait for a VM to become pingable")
]

CONF = cfg.CONF
benchmark_group = cfg.OptGroup(name="benchmark", title="benchmark options")
CONF.register_opts(VM_BENCHMARK_OPTS, group=benchmark_group)


class VMScenario(nova_utils.NovaScenario, cinder_utils.CinderScenario):
    """Base class for VM scenarios with basic atomic actions.

    VM scenarios are scenarios executed inside some launched VM instance.
    """

    USER_RWX_OTHERS_RX_ACCESS_MODE = 0o755

    RESOURCE_NAME_PREFIX = "rally_vm_"

    @atomic.action_timer("vm.run_command_over_ssh")
    def _run_command_over_ssh(self, ssh, command):
コード例 #5
0
ファイル: pci.py プロジェクト: y00187570/nova
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

pci_group = cfg.OptGroup(
    name='pci',
    title='PCI passthrough options')

pci_opts = [
    cfg.MultiStrOpt('alias',
        default=[],
        deprecated_name='pci_alias',
        deprecated_group='DEFAULT',
        help="""
An alias for a PCI passthrough device requirement.

This allows users to specify the alias in the extra specs for a flavor, without
needing to repeat all the PCI property requirements.

This should be configured for the ``nova-api`` service and, assuming you wish
to use move operations, for each ``nova-compute`` service.
コード例 #6
0
"""Routines for configuring Heat."""
import os

from eventlet.green import socket
from oslo_config import cfg
from oslo_log import log as logging
from oslo_middleware import cors
from osprofiler import opts as profiler

from heat.common import exception
from heat.common.i18n import _
from heat.common import wsgi


LOG = logging.getLogger(__name__)
paste_deploy_group = cfg.OptGroup('paste_deploy')
paste_deploy_opts = [
    cfg.StrOpt('flavor',
               help=_("The flavor to use.")),
    cfg.StrOpt('api_paste_config', default="api-paste.ini",
               help=_("The API paste config file to use."))]


service_opts = [
    cfg.IntOpt('periodic_interval',
               default=60,
               help=_('Seconds between running periodic tasks.')),
    cfg.StrOpt('heat_metadata_server_url',
               help=_('URL of the Heat metadata server. '
                      'NOTE: Setting this is only needed if you require '
                      'instances to use a different endpoint than in the '
コード例 #7
0
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

from nova.i18n import _

image_file_url_group = cfg.OptGroup('image_file_url',
                                    title='Image File URL Options')

filesystems = cfg.ListOpt(
    name='filesystems',
    deprecated_for_removal=True,
    deprecated_reason='The feature to download images from glance via '
    'filesystem is not used and will be removed in the '
    'future.',
    default=[],
    help=_('List of file systems that are configured '
           'in this file in the '
           'image_file_url:<list entry name> '
           'sections'))

# NOTE(jbresnah) because the group under which these options are added is
# dynamically determined these options need to stay out of global space
コード例 #8
0
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, 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.
from oslo_config import cfg

CONF = cfg.CONF

worker_group = cfg.OptGroup(name='service:worker',
                            title="Configuration for the Worker Service")

OPTS = [
    cfg.BoolOpt('enabled',
                default=False,
                help='Whether to send events to worker instead of '
                'Pool Manager',
                deprecated_for_removal=True,
                deprecated_reason='In Newton, this option will disappear'
                'because worker will be enabled by default'),
    cfg.IntOpt('workers', help='Number of Worker worker processes to spawn'),
    cfg.IntOpt('threads',
               default=200,
               help='Number of Worker threads to spawn per process'),
    # cfg.ListOpt('enabled_tasks',
    #             help='Enabled tasks to run'),
コード例 #9
0
"""
import logging as sys_logging
import os

from eventlet.green import socket
from oslo_concurrency import processutils
from oslo_config import cfg
from oslo_log import log as logging

from heat.common import exception
from heat.common.i18n import _
from heat.common.i18n import _LW
from heat.common import wsgi

LOG = logging.getLogger(__name__)
paste_deploy_group = cfg.OptGroup('paste_deploy')
paste_deploy_opts = [
    cfg.StrOpt('flavor', help=_("The flavor to use.")),
    cfg.StrOpt('api_paste_config',
               default="api-paste.ini",
               help=_("The API paste config file to use."))
]

service_opts = [
    cfg.IntOpt('periodic_interval',
               default=60,
               help=_('Seconds between running periodic tasks.')),
    cfg.StrOpt('heat_metadata_server_url',
               default="",
               help=_('URL of the Heat metadata server.')),
    cfg.StrOpt('heat_waitcondition_server_url',
コード例 #10
0
ファイル: config.py プロジェクト: achoi0330/avos_test
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

service_available_group = cfg.OptGroup(name="service_available",
                                       title="Available OpenStack Services")

ServiceAvailableGroup = [
    cfg.BoolOpt("monasca",
                default=True,
                help="Whether or not Monasca is expected to be available"),
]

monitoring_group = cfg.OptGroup(name="monitoring",
                                title="Monitoring Service Options")

MonitoringGroup = [
    cfg.StrOpt("region",
               default="",
               help="The monitoring region name to use. If empty, the value "
               "of identity.region is used instead. If no such region "
コード例 #11
0
ファイル: config.py プロジェクト: toby82/murano
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

service_available_group = cfg.OptGroup(name="service_available",
                                       title="Available OpenStack Services")

ServiceAvailableGroup = [
    cfg.BoolOpt("murano",
                default=True,
                help="Whether or not murano is expected to be available"),
    cfg.BoolOpt("murano_cfapi",
                default=False,
                help="Whether or not murano-cfapi is expected to be "
                "unavailable by default")
]

application_catalog_group = cfg.OptGroup(name="application_catalog",
                                         title="Application Catalog Options")

service_broker_group = cfg.OptGroup(name="service_broker",
コード例 #12
0
'''
from oslo_config import cfg
from oslo_config import generator

import sys
'''
https://docs.openstack.org/oslo.config/latest/

This program demonstrates:
    1. arguments from config files.
    2. arguments from command line.
    3. saving arguments into files.

'''

opt_group = cfg.OptGroup(name="simple", title="A simple example")
simple_opts = [
    cfg.BoolOpt("enable", default=False, help=('True enables, False disables'))
]

cli_opts = [
    cfg.StrOpt("file", default="gen.conf", help="the config file to save as.")
]

CONF = cfg.CONF  # CONF: ConfigOpts

CONF.register_group(opt_group)
CONF.register_opts(simple_opts, opt_group)
CONF.register_cli_opts(cli_opts)

if __name__ == "__main__":
コード例 #13
0
ファイル: api.py プロジェクト: laashub-soa/watcher
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

from oslo_config import cfg

api = cfg.OptGroup(name='api', title='Options for the Watcher API service')

AUTH_OPTS = [
    cfg.BoolOpt('enable_authentication',
                default=True,
                help='This option enables or disables user authentication '
                'via keystone. Default value is True.'),
]

API_SERVICE_OPTS = [
    cfg.PortOpt('port',
                default=9322,
                help='The port for the watcher API server'),
    cfg.HostAddressOpt(
        'host',
        default='127.0.0.1',
コード例 #14
0
import signal
import sys
import time

from monasca_common.simport import simport
from oslo_config import cfg
from oslo_log import log

from repositories.persister import Persister

LOG = log.getLogger(__name__)

zookeeper_opts = [cfg.StrOpt('uri'),
                  cfg.IntOpt('partition_interval_recheck_seconds')]

zookeeper_group = cfg.OptGroup(name='zookeeper', title='zookeeper')
cfg.CONF.register_group(zookeeper_group)
cfg.CONF.register_opts(zookeeper_opts, zookeeper_group)

kafka_common_opts = [cfg.StrOpt('uri'),
                     cfg.StrOpt('group_id'),
                     cfg.StrOpt('topic'),
                     cfg.StrOpt('consumer_id'),
                     cfg.StrOpt('client_id'),
                     cfg.IntOpt('database_batch_size'),
                     cfg.IntOpt('max_wait_time_seconds'),
                     cfg.IntOpt('fetch_size_bytes'),
                     cfg.IntOpt('buffer_size'),
                     cfg.IntOpt('max_buffer_size'),
                     cfg.StrOpt('zookeeper_path'),
                     cfg.IntOpt('num_processors')]
コード例 #15
0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from keystoneauth1 import loading as ks_loading
from oslo_config import cfg

from cyborg.conf import utils as confutils

DEFAULT_SERVICE_TYPE = 'image'

glance_group = cfg.OptGroup('glance',
                            title='Glance Options',
                            help='Configuration options for the Image service')

glance_opts = [
    # NOTE(sdague/efried): there is intentionally no default here. This
    # requires configuration if ksa adapter config is not used.
    cfg.ListOpt('api_servers',
                help="""
List of glance api servers endpoints available to cyborg.

https is used for ssl-based glance api servers.

NOTE: The preferred mechanism for endpoint discovery is via keystoneauth1
loading options. Only use api_servers if you need multiple endpoints and are
unable to use a load balancer for some reason.
コード例 #16
0
ファイル: libvirt.py プロジェクト: manhnh251995/nova
#    under the License.

import itertools

from oslo_config import cfg

from oslo_config import types

from nova.conf import paths


libvirt_group = cfg.OptGroup("libvirt",
                             title="Libvirt Options",
                             help="""
Libvirt options allows cloud administrator to configure related
libvirt hypervisor driver to be used within an OpenStack deployment.

Almost all of the libvirt config options are influence by ``virt_type`` config
which describes the virtualization type (or so called domain type) libvirt
should use for specific features such as live migration, snapshot.
""")

libvirt_general_opts = [
    cfg.StrOpt('rescue_image_id',
               help="""
The ID of the image to boot from to rescue data from a corrupted instance.

If the rescue REST API operation doesn't provide an ID of an image to
use, the image which is referenced by this ID is used. If this
option is not set, the image from the instance is used.

Possible values:
コード例 #17
0
ファイル: ironic.py プロジェクト: zhouyang1222/nova
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

ironic_group = cfg.OptGroup('ironic', title='Ironic Options')

api_version = cfg.IntOpt(
    'api_version',
    default=1,
    deprecated_for_removal=True,
    help='Version of Ironic API service endpoint. '
    'DEPRECATED: Setting the API version is not possible anymore.')

api_endpoint = cfg.StrOpt('api_endpoint', help='URL for Ironic API endpoint.')

admin_username = cfg.StrOpt('admin_username',
                            help='Ironic keystone admin name')

admin_password = cfg.StrOpt('admin_password',
                            secret=True,
コード例 #18
0
ファイル: config.py プロジェクト: paperandsoap/ironic
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

from tempest import config  # noqa

baremetal_group = cfg.OptGroup(name='baremetal',
                               title='Baremetal provisioning service options',
                               help='When enabling baremetal tests, Nova '
                               'must be configured to use the Ironic '
                               'driver. The following parameters for the '
                               '[compute] section must be disabled: '
                               'console_output, interface_attach, '
                               'live_migration, pause, rescue, resize, '
                               'shelve, snapshot, and suspend')

# NOTE(maurosr): Until liberty-eol we need to keep config options and tests
# on tempest's tree to test stable branches and thus we have to comment the
# options bellow to avoid duplication. Only new options should live here.
BaremetalGroup = [
    # cfg.StrOpt('catalog_type',
    #            default='baremetal',
    #            help="Catalog type of the baremetal provisioning service"),
    # cfg.BoolOpt('driver_enabled',
    #             default=True,
    #             help="Whether the Ironic nova-compute driver is enabled"),
コード例 #19
0
ファイル: settings_oslo.py プロジェクト: sgudz/tcp-qa
def register_opts(config):
    config.register_group(
        cfg.OptGroup(name='hardware', title="Hardware settings", help=""))
    config.register_opts(group='hardware', opts=hardware_opts)

    config.register_group(
        cfg.OptGroup(name='underlay', title="Underlay configuration", help=""))
    config.register_opts(group='underlay', opts=underlay_opts)

    config.register_group(
        cfg.OptGroup(name='salt_deploy',
                     title="salt deploy configuration",
                     help=""))
    config.register_opts(group='salt_deploy', opts=salt_deploy_opts)

    config.register_group(
        cfg.OptGroup(name='salt', title="salt config and credentials",
                     help=""))
    config.register_opts(group='salt', opts=salt_opts)

    config.register_group(
        cfg.OptGroup(name='common_services',
                     title="Common services for Openstack",
                     help=""))
    config.register_opts(group='common_services', opts=common_services_opts)

    config.register_group(
        cfg.OptGroup(name='common_services_deploy',
                     title="Common services for Openstack deploy config",
                     help=""))
    config.register_opts(group='common_services_deploy',
                         opts=common_services_deploy_opts)

    config.register_group(
        cfg.OptGroup(name='oss',
                     title="Operational Support System Tools",
                     help=""))
    config.register_opts(group='oss', opts=oss_opts)

    config.register_group(
        cfg.OptGroup(name='oss_deploy', title="OSS deploy config", help=""))
    config.register_opts(group='oss_deploy', opts=oss_deploy_opts)

    config.register_group(
        cfg.OptGroup(name='decapod', title="Decapod options for Ceph",
                     help=""))
    config.register_opts(group='decapod', opts=decapod_opts)

    config.register_group(
        cfg.OptGroup(name='decapod_deploy',
                     title="Decapod deploy config",
                     help=""))
    config.register_opts(group='decapod_deploy', opts=decapod_deploy_opts)

    config.register_group(
        cfg.OptGroup(name='openstack',
                     title="Openstack config and credentials",
                     help=""))
    config.register_opts(group='openstack', opts=openstack_opts)

    config.register_group(
        cfg.OptGroup(name='openstack_deploy',
                     title="Openstack deploy config and credentials",
                     help=""))
    config.register_opts(group='openstack_deploy', opts=openstack_deploy_opts)

    config.register_group(
        cfg.OptGroup(name='opencontrail',
                     title="Options for Juniper contrail-tests",
                     help=""))
    config.register_opts(group='opencontrail', opts=opencontrail_opts)
    config.register_group(
        cfg.OptGroup(name='stack_light',
                     title="StackLight config and credentials",
                     help=""))
    config.register_opts(group='stack_light', opts=sl_opts)
    config.register_group(
        cfg.OptGroup(name='sl_deploy',
                     title="SL deploy config and credentials",
                     help=""))
    config.register_opts(group='sl_deploy', opts=sl_deploy_opts)
    config.register_group(
        cfg.OptGroup(name='virtlet_deploy',
                     title='Virtlet deploy config',
                     help=""))
    config.register_opts(group='virtlet_deploy', opts=virtlet_deploy_opts)
    config.register_group(
        cfg.OptGroup(name='virtlet', title='Virtlet config', help=""))
    config.register_opts(group='virtlet', opts=virtlet_opts)

    config.register_group(
        cfg.OptGroup(name='k8s_deploy', title="K8s deploy configuration"))
    config.register_opts(group='k8s_deploy', opts=k8s_deploy_opts)

    config.register_group(
        cfg.OptGroup(name='k8s', title="K8s config and credentials"))
    config.register_opts(group='k8s', opts=k8s_opts)
    return config
コード例 #20
0
               deprecated_group="osapi_v21",
               help="""
This option is a string representing a regular expression (regex) that matches
the project_id as contained in URLs. If not set, it will match normal UUIDs
created by keystone.

* Possible values:

    A string representing any legal regular expression

* Services that use this:

    ``nova-api``

* Related options:

    None
"""),
]

api_opts_group = cfg.OptGroup(name="osapi_v21", title="API v2.1 Options")


def register_opts(conf):
    conf.register_group(api_opts_group)
    conf.register_opts(api_opts, api_opts_group)


def list_opts():
    return {api_opts_group: api_opts}
コード例 #21
0
ファイル: ironic_client.py プロジェクト: ramineni/valence
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

from valence.common.i18n import _

ironic_group = cfg.OptGroup(name='ironic_client',
                            title='Options for the Ironic client')

common_security_opts = [
    cfg.StrOpt('os_cacert',
               help=_('Optional CA cert file to use in SSL connections.')),
    cfg.StrOpt('os_cert',
               help=_('Optional PEM-formatted certificate chain file.')),
    cfg.StrOpt('os_key',
               help=_('Optional PEM-formatted file that contains the '
                      'private key.')),
    cfg.BoolOpt('insecure',
                default=False,
                help=_("If set, then the server's certificate will not "
                       "be verified."))
]
コード例 #22
0
ファイル: server.py プロジェクト: achoi0330/avos_test
    cfg.StrOpt('metrics_measurements',
               default=None,
               help='Metrics measurements'),
    cfg.StrOpt('metrics_statistics', default=None, help='Metrics statistics'),
    cfg.StrOpt('metrics_names', default=None, help='Metrics names'),
    cfg.StrOpt('alarm_definitions', default=None, help='Alarm definitions'),
    cfg.StrOpt('alarms', default=None, help='Alarms'),
    cfg.StrOpt('alarms_state_history',
               default=None,
               help='Alarms state history'),
    cfg.StrOpt('notification_methods',
               default=None,
               help='Notification methods')
]

dispatcher_group = cfg.OptGroup(name='dispatcher', title='dispatcher')
cfg.CONF.register_group(dispatcher_group)
cfg.CONF.register_opts(dispatcher_opts, dispatcher_group)

LOG = log.getLogger(__name__)


def launch(conf, config_file="/etc/monasca/api-config.conf"):
    log.register_options(cfg.CONF)
    log.set_defaults()
    cfg.CONF(args=[],
             project='monasca_api',
             default_config_files=[config_file])
    log.setup(cfg.CONF, 'monasca_api')

    app = falcon.API()
コード例 #23
0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, 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.
from oslo_config import cfg
from oslo_log import log as logging
from IPy import IP

from designate.notification_handler.base import BaseAddressHandler

LOG = logging.getLogger(__name__)

cfg.CONF.register_group(
    cfg.OptGroup(
        name='handler:nova_filter_map',
        title=
        "Configuration for Nova Notification Handler WITH MAPPED FILTERING"))
cfg.CONF.register_opts([
    cfg.ListOpt('notification-topics', default=['notifications']),
    cfg.ListOpt('zone_items'),
    cfg.StrOpt('control-exchange', default='nova'),
    cfg.MultiStrOpt('formatv4'),
    cfg.MultiStrOpt(
        'format',
        deprecated_for_removal=True,
        deprecated_reason="Replaced by 'formatv4/formatv6'",
    ),
    cfg.MultiStrOpt('formatv6')
],
                       group='handler:nova_filter_map')
コード例 #24
0
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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 os

from oslo_config import cfg

TEST_CONF = None

identity_group = cfg.OptGroup(name='identity')
identity_options = [
    cfg.StrOpt('uri',
               default='http://localhost:5000/v3',
               help='Keystone endpoint'),
    cfg.StrOpt('username',
               default='admin',
               help='Keystone username'),
    cfg.StrOpt('password',
               default='secretadmin',
               help='Password used with Keystone username'),
    cfg.StrOpt('project_name',
               default='admin',
               help='Name of project, used by the given username')]

コード例 #25
0
ファイル: upgrade_levels.py プロジェクト: zhouyang1222/nova
#
#    Licensed under the Apache License, Version 2.0 (the "License"); you may
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

upgrade_group = cfg.OptGroup('upgrade_levels', title='Upgrade levels Options')

rpcapi_cap_cells_opt = cfg.StrOpt('cells',
                                  help="""
Cells version

Cells client-side RPC API version. Use this option to set a version
cap for messages sent to local cells services.

Possible values:

* None: This is the default value.
* grizzly: message version 1.6.
* havana: message version 1.24.
* icehouse: message version 1.27.
* juno: message version 1.29.
コード例 #26
0
                      "Default value 0 means, that service will start number "
                      "of workers equal number of cores on server."),
               deprecated_group='DEFAULT'),
    cfg.IntOpt('max_header_line',
               default=16384,
               help=_('Maximum line size of message headers to be accepted. '
                      'max_header_line may need to be increased when using '
                      'large tokens (typically those generated by the '
                      'Keystone v3 API with big service catalogs).')),
    cfg.IntOpt('tcp_keepidle',
               default=600,
               help=_('The value for the socket option TCP_KEEPIDLE.  This is '
                      'the time in seconds that the connection must be idle '
                      'before TCP starts sending keepalive probes.')),
]
api_group = cfg.OptGroup('heat_api')
cfg.CONF.register_group(api_group)
cfg.CONF.register_opts(api_opts, group=api_group)

api_cfn_opts = [
    cfg.IPOpt('bind_host',
              default='0.0.0.0',
              help=_('Address to bind the server. Useful when '
                     'selecting a particular network interface.'),
              deprecated_group='DEFAULT'),
    cfg.PortOpt('bind_port',
                default=8000,
                help=_('The port on which the server will listen.'),
                deprecated_group='DEFAULT'),
    cfg.IntOpt('backlog',
               default=4096,
コード例 #27
0
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.

from oslo_config import cfg

dummy_section = cfg.OptGroup('dummy_conf',
                             title='OpenStack compute agents\' '
                             'messaging options',
                             help='Configuration options of '
                             'the compute node agents\' RPC '
                             'flows.')

dummy_options = [
    #exchange general properties
    cfg.StrOpt('exchange_name',
               default='reply_q',
               help='Agent reply exchange name.'),
    cfg.StrOpt('exchange_type',
               default='direct',
               help='Agent reply exchange type.'),

    #exchange specific properties
    cfg.BoolOpt('is_passive', default=False,
                help='Exchange passive property.'),
コード例 #28
0
ファイル: scheduler.py プロジェクト: varun131185/nova
#    not use this file except in compliance with the License. You may obtain
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

from nova.virt import arch

scheduler_group = cfg.OptGroup(name="scheduler",
                               title="Scheduler configuration")

scheduler_opts = [
    cfg.StrOpt("driver",
               default="filter_scheduler",
               deprecated_name="scheduler_driver",
               deprecated_group="DEFAULT",
               help="""
The class of the driver used by the scheduler. This should be chosen from one
of the entrypoints under the namespace 'nova.scheduler.driver' of file
'setup.cfg'. If nothing is specified in this option, the 'filter_scheduler' is
used.

Other options are:

* 'fake_scheduler' which is used for testing.
コード例 #29
0
ファイル: mongodriver.py プロジェクト: mkmad/canary
                default=False,
                help='Communicate with Mongo over SSL?'),
    cfg.StrOpt('ssl_ca_certs',
               default='',
               help='Absolute path to the appropriate .crt file'),
    cfg.BoolOpt('auth_enabled',
                default=False,
                help='Does Mongo have authentication enabled?'),
    cfg.StrOpt('username', default='', help='Mongo username'),
    cfg.StrOpt('password', default='', help='Mongo password'),
    cfg.StrOpt('ssl_version', default='TLSv1.1', help='TLS version'),
    cfg.StrOpt('database', default='canary', help='database name'),
    cfg.StrOpt('collection', default='jobs', help='collection name')
]

MONGO_GROUP = cfg.OptGroup(name='mongo', title='mongo options')

conf.register_opts(_MONGO_OPTIONS, group=MONGO_GROUP)


def _connection(database):
    client = MongoClient(conf.mongo.uri)
    return client[database]


class MongoStorageDriver(object):
    def __init__(self, conf):
        super(MongoStorageDriver, self).__init__()
        self.session = _connection(database=conf.mongo.database)

    def insert_job_details(self, path, job_details, job_count):
コード例 #30
0
ファイル: notifications.py プロジェクト: yirenjie/TestNova
#    a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
#    Unless required by applicable law or agreed to in writing, software
#    distributed under the License is distributed on an "AS IS" BASIS, 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.

from oslo_config import cfg

notifications_group = cfg.OptGroup(name='notifications',
                                   title='Notifications options',
                                   help="""
Most of the actions in Nova which manipulate the system state generate
notifications which are posted to the messaging component (e.g. RabbitMQ) and
can be consumed by any service outside the OpenStack. More technical details
at https://docs.openstack.org/nova/latest/reference/notifications.html
""")

ALL_OPTS = [
    cfg.StrOpt('notify_on_state_change',
               choices=(None, 'vm_state', 'vm_and_task_state'),
               deprecated_group='DEFAULT',
               help="""
If set, send compute.instance.update notifications on
instance state changes.

Please refer to
https://docs.openstack.org/nova/latest/reference/notifications.html for
additional information on notifications.