コード例 #1
0
        help="vNIC type used for binding.",
        choices=['baremetal', 'normal', 'direct',
                 'direct-physical', 'macvtap'],
        default='baremetal'),
    cfg.StrOpt(
        "neutron_host_id",
        help="Host ID to be used when creating neutron port. If not set "
             "host is set to manila-share host by default.",
        default=socket.gethostname()),
]

neutron_binding_profile = [
    cfg.ListOpt(
        "neutron_binding_profiles",
        help="A list of binding profiles to be used during port binding. This "
        "option can be used with the NeutronBindNetworkPlugin. The value for "
        "this option has to be a comma separated list of names that "
        "correspond to each binding profile. Each binding profile needs to be "
        "specified as an individual configuration section using the binding "
        "profile name as the section name."),
]

neutron_binding_profile_opts = [
    cfg.StrOpt(
        'neutron_switch_id',
        help="Switch ID for binding profile."),
    cfg.StrOpt(
        'neutron_port_id',
        help="Port ID on the given switch.",),
    cfg.DictOpt(
        'neutron_switch_info',
        help="Switch label. For example: 'switch_ip: 10.4.30.5'. Multiple "
コード例 #2
0
               '%(instance)s%(message)s',
               help='format string to use for log messages with context'),
    cfg.StrOpt('logging_default_format_string',
               default='sm-api %(process)d '
               '%(name)s [-] %(instance)s%(message)s',
               help='format string to use for log messages without context'),
    cfg.StrOpt('logging_debug_format_suffix',
               default='%(funcName)s %(pathname)s:%(lineno)d',
               help='data to append to log format when level is DEBUG'),
    cfg.StrOpt('logging_exception_prefix',
               default='%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s '
               '%(instance)s',
               help='prefix each line of exception output with this format'),
    cfg.ListOpt('default_log_levels',
                default=[
                    'amqplib=WARN', 'sqlalchemy=WARN', 'boto=WARN',
                    'suds=INFO', 'keystone=INFO', 'eventlet.wsgi.server=WARN'
                ],
                help='list of logger=LEVEL pairs'),
    cfg.BoolOpt('publish_errors', default=False, help='publish error events'),
    cfg.BoolOpt('deprecations_fatal',
                default=False,
                help='make deprecations fatal'),

    # NOTE(mikal): there are two options here because sometimes we are handed
    # a full instance (and could include more information), and other times we
    # are just handed a UUID for the instance.
    cfg.StrOpt('instance_format',
               default='[instance: %(uuid)s] ',
               help='If an instance is passed with the log message, format '
               'it like this'),
    cfg.StrOpt('instance_uuid_format',
コード例 #3
0
osapi_hide_opt = cfg.ListOpt('osapi_hide_server_address_states',
                             default=[BUILDING],
                             help="""
This option is a list of all instance states for which network address
information should not be returned from the API.

* Possible values:

    A list of strings, where each string is a valid VM state, as defined in
    nova/compute/vm_states.py. As of the Newton release, they are:

    * "active"
    * "building"
    * "paused"
    * "suspended"
    * "stopped"
    * "rescued"
    * "resized"
    * "soft-delete"
    * "deleted"
    * "error"
    * "shelved"
    * "shelved_offloaded"

    The default value is ["building"].

* Services that use this:

    ``nova-api``

* Related options:

    None
""")
コード例 #4
0
            "rdo-trunk-master-tested/delorean.repo")
# TODO(pbourke): update to buildlogs.centos.org once this moves
DELOREAN_DEPS = "http://trunk.rdoproject.org/centos7/delorean-deps.repo"
INSTALL_TYPE_CHOICES = ['binary', 'source', 'rdo', 'rhos']

_PROFILE_OPTS = [
    cfg.ListOpt('infra',
                default=[
                    'ceph',
                    'cron',
                    'elasticsearch',
                    'etcd',
                    'haproxy',
                    'heka',
                    'keepalived',
                    'kibana',
                    'kolla-toolbox',
                    'mariadb',
                    'memcached',
                    'mongodb',
                    'openvswitch',
                    'rabbitmq',
                    'tgtd',
                ],
                help='Infra images'),
    cfg.ListOpt('main',
                default=[
                    'ceilometer',
                    'cinder',
                    'glance',
                    'heat',
コード例 #5
0
#    under the License.
"""
This module manages configuration options
"""

from oslo_config import cfg

from neutron.agent.common import config as agconfig
from neutron.common import utils
from neutron.extensions import portbindings

restproxy_opts = [
    cfg.ListOpt('servers',
                default=['localhost:8800'],
                help=_("A comma separated list of Big Switch or Floodlight "
                       "servers and port numbers. The plugin proxies the "
                       "requests to the Big Switch/Floodlight server, "
                       "which performs the networking configuration. Only one"
                       "server is needed per deployment, but you may wish to"
                       "deploy multiple servers to support failover.")),
    cfg.StrOpt('server_auth',
               secret=True,
               help=_("The username and password for authenticating against "
                      " the Big Switch or Floodlight controller.")),
    cfg.BoolOpt('server_ssl',
                default=True,
                help=_("If True, Use SSL when connecting to the Big Switch or "
                       "Floodlight controller.")),
    cfg.BoolOpt('ssl_sticky',
                default=True,
                help=_("Trust and store the first certificate received for "
                       "each controller address and use it to validate future "
コード例 #6
0
ファイル: manager.py プロジェクト: will-wda/fuel-agent
 ),
 cfg.BoolOpt(
     'fix_udev_net_rules',
     default=True,
     help='Add udev rules for NIC remapping'
 ),
 cfg.BoolOpt(
     'skip_md_containers',
     default=True,
     help='Allow to skip MD containers (fake raid leftovers) while '
          'cleaning the rest of MDs',
 ),
 cfg.ListOpt(
     'lvm_filter_for_mpath',
     default=['r|^/dev/disk/.*|',
              'a|^/dev/mapper/.*|',
              'r/.*/'],
     help='Extra filters for lvm.conf to force LVM works with partitions '
          'on multipath devices properly.'
 ),
 cfg.ListOpt(
     'mpath_lvm_preferred_names',
     default=['^/dev/mapper/'],
     help='List of devlinks patterns which are preffered for LVM. If '
          'multipath device has a few devlinks, LVM will use the one '
          'matching to the given pattern.'
 ),
 cfg.ListOpt(
     'mpath_lvm_scan_dirs',
     default=['/dev/disk/', '/dev/mapper/'],
     help='List of directories to scan recursively for LVM physical '
          'volumes. Devices in directories outside this hierarchy will be '
コード例 #7
0
    def __init__(self):
        super(NovaManager, self).__init__("NovaManager")

        self.config_opts = [
            cfg.StrOpt("amqp_url",
                       help="the amqp transport url",
                       default=None,
                       required=False),
            cfg.StrOpt("amqp_exchange",
                       help="the amqp exchange",
                       default="nova",
                       required=False),
            cfg.StrOpt("amqp_backend",
                       help="the amqp backend tpye (e.g. rabbit, qpid)",
                       default=None,
                       required=False),
            cfg.ListOpt("amqp_hosts",
                        help="AMQP HA cluster host:port pairs",
                        default=None,
                        required=False),
            cfg.StrOpt("amqp_host",
                       help="the amqp host name",
                       default="localhost",
                       required=False),
            cfg.IntOpt("amqp_port",
                       help="the amqp listening port",
                       default=5672,
                       required=False),
            cfg.StrOpt("amqp_user",
                       help="the amqp user",
                       default=None,
                       required=False),
            cfg.StrOpt("amqp_password",
                       help="the amqp password",
                       default=None,
                       required=False),
            cfg.StrOpt("amqp_virtual_host",
                       help="the amqp virtual host",
                       default="/",
                       required=False),
            cfg.StrOpt("synergy_topic",
                       help="the Synergy topic",
                       default="synergy",
                       required=False),
            cfg.StrOpt("notification_topic",
                       help="the notifiction topic",
                       default="nova_notification",
                       required=False),
            cfg.StrOpt("conductor_topic",
                       help="the conductor topic",
                       default="conductor",
                       required=False),
            cfg.StrOpt("compute_topic",
                       help="the compute topic",
                       default="compute",
                       required=False),
            cfg.StrOpt("scheduler_topic",
                       help="the scheduler topic",
                       default="scheduler",
                       required=False),
            cfg.StrOpt("metadata_proxy_shared_secret",
                       help="the metadata proxy shared secret",
                       default="METADATA_SECRET",
                       required=True),
            cfg.FloatOpt("cpu_allocation_ratio",
                         help="the cpu allocation ratio",
                         default=float(16),
                         required=False),
            cfg.FloatOpt("ram_allocation_ratio",
                         help="the ram allocation ratio",
                         default=float(1.5),
                         required=False),
            cfg.StrOpt("db_connection",
                       help="the NOVA database connection",
                       default=None,
                       required=True),
            cfg.StrOpt("host",
                       help="the host name",
                       default="localhost",
                       required=False),
            cfg.IntOpt("timeout",
                       help="set the http connection timeout",
                       default=60,
                       required=False),
            cfg.StrOpt("ssl_ca_file",
                       help="set the PEM encoded Certificate Authority to "
                       "use when verifying HTTPs connections",
                       default=None,
                       required=False),
            cfg.StrOpt("ssl_cert_file",
                       help="set the SSL client certificate (PEM encoded)",
                       default=None,
                       required=False)
        ]
コード例 #8
0
 cfg.BoolOpt('enable_v1_api',
             default=False,
             help=_('Deploy v1 of the Manila API. This option is '
                    'deprecated, is not used, and will be removed '
                    'in a future release.')),
 cfg.BoolOpt('enable_v2_api',
             default=False,
             help=_('Deploy v2 of the Manila API. This option is '
                    'deprecated, is not used, and will be removed '
                    'in a future release.')),
 cfg.BoolOpt('api_rate_limit',
             default=True,
             help='Whether to rate limit the API.'),
 cfg.ListOpt('osapi_share_ext_list',
             default=[],
             help='Specify list of extensions to load when using osapi_'
             'share_extension option with manila.api.contrib.'
             'select_extensions.'),
 cfg.ListOpt('osapi_share_extension',
             default=['manila.api.contrib.standard_extensions'],
             help='The osapi share extensions to load.'),
 cfg.StrOpt('sqlite_db',
            default='manila.sqlite',
            help='The filename to use with sqlite.'),
 cfg.BoolOpt('sqlite_synchronous',
             default=True,
             help='If passed, use synchronous mode for sqlite.'),
 cfg.IntOpt('sql_idle_timeout',
            default=3600,
            help='Timeout before idle SQL connections are reaped.'),
 cfg.IntOpt('sql_max_retries',
コード例 #9
0
ファイル: scheduler.py プロジェクト: zsvic/nova
    cfg.ListOpt("enabled_filters",
                default=[
                    "RetryFilter",
                    "AvailabilityZoneFilter",
                    "ComputeFilter",
                    "ComputeCapabilitiesFilter",
                    "ImagePropertiesFilter",
                    "ServerGroupAntiAffinityFilter",
                    "ServerGroupAffinityFilter",
                ],
                deprecated_name="scheduler_default_filters",
                deprecated_group="DEFAULT",
                help="""
Filters that the scheduler will use.

An ordered list of filter class names that will be used for filtering
hosts. These filters will be applied in the order they are listed so
place your most restrictive filters first to make the filtering process more
efficient.

This option is only used by the FilterScheduler and its subclasses; if you use
a different scheduler, this option has no effect.

Possible values:

* A list of zero or more strings, where each string corresponds to the name of
  a filter to be used for selecting a host

Related options:

* All of the filters in this option *must* be present in the
  'available_filters' option, or a SchedulerHostFilterNotFound
  exception will be raised.
"""),
コード例 #10
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

ml2_opts = [
    cfg.ListOpt('type_drivers',
                default=['local', 'flat', 'vlan', 'gre', 'vxlan', 'geneve'],
                help=_("List of network type driver entrypoints to be loaded "
                       "from the neutron.ml2.type_drivers namespace.")),
    cfg.ListOpt('tenant_network_types',
                default=['local'],
                help=_("Ordered list of network_types to allocate as tenant "
                       "networks.")),
    cfg.ListOpt('mechanism_drivers',
                default=[],
                help=_("An ordered list of networking mechanism driver "
                       "entrypoints to be loaded from the "
                       "neutron.ml2.mechanism_drivers namespace.")),
    cfg.ListOpt('extension_drivers',
                default=[],
                help=_("An ordered list of extension driver "
                       "entrypoints to be loaded from the "
                       "neutron.ml2.extension_drivers namespace. "
コード例 #11
0
ファイル: service.py プロジェクト: xiaolihope/gringotts
OPTS = [
    cfg.StrOpt('master_topic',
               default='gringotts.master',
               help='the topic master listen on'),
    cfg.IntOpt('allow_delay_seconds',
               default=300,
               help="The delay seconds that allows between nodes"),
    cfg.IntOpt('clean_date_jobs_interval',
               default=30,
               help="The interval to clean date jobs, unit is minute"),
]

OPTS_GLOBAL = [
    cfg.ListOpt('ignore_tenants',
                default=[],
                help="A list of tenant that should not to check and deduct"),
    cfg.BoolOpt('enable_owe', default=False, help='Enable owe logic or not'),
    cfg.BoolOpt('try_to_fix', default=False, help='Try to auto-fix or not'),
]

cfg.CONF.register_opts(OPTS_GLOBAL)
cfg.CONF.register_opts(OPTS, group="master")
cfg.CONF.import_opt('region_name', 'gringotts.waiter.service')


class MasterService(rpc_service.Service):
    def __init__(self, *args, **kwargs):
        kwargs.update(
            host=cfg.CONF.host,
            topic=cfg.CONF.master.master_topic,
コード例 #12
0
ファイル: config.py プロジェクト: sinnershiki/st2
def _register_api_opts():
    # XXX: note : template_path value only works if started from the top-level of the codebase.
    # Brittle!
    pecan_opts = [
        cfg.StrOpt('root',
                   default='st2api.controllers.root.RootController',
                   help='Pecan root controller'),
        cfg.StrOpt('template_path',
                   default='%(confdir)s/st2api/st2api/templates'),
        cfg.ListOpt('modules', default=['st2api']),
        cfg.BoolOpt('debug', default=True),
        cfg.BoolOpt('auth_enable', default=True),
        cfg.DictOpt('errors',
                    default={
                        404: '/error/404',
                        '__force_dict__': True
                    })
    ]

    _register_opts(pecan_opts, group='api_pecan')

    api_opts = [
        cfg.BoolOpt('debug', default=True),
        cfg.IntOpt(
            'max_page_size',
            default=100,
            help=
            'Maximum limit (page size) argument which can be specified by the user in a query '
            'string. If a larger value is provided, it will default to this value.'
        )
    ]

    _register_opts(api_opts, group='api')

    messaging_opts = [
        cfg.StrOpt('url',
                   default='amqp://*****:*****@127.0.0.1:5672//',
                   help='URL of the messaging server.'),
        cfg.ListOpt(
            'cluster_urls',
            default=[],
            help='URL of all the nodes in a messaging service cluster.')
    ]

    _register_opts(messaging_opts, group='messaging')

    ssh_runner_opts = [
        cfg.StrOpt('remote_dir',
                   default='/tmp',
                   help='Location of the script on the remote filesystem.'),
        cfg.BoolOpt(
            'allow_partial_failure',
            default=False,
            help=
            'How partial success of actions run on multiple nodes should be treated.'
        ),
        cfg.BoolOpt(
            'use_ssh_config',
            default=False,
            help='Use the .ssh/config file. Useful to override ports etc.')
    ]

    _register_opts(ssh_runner_opts, group='ssh_runner')
コード例 #13
0
               help="Top-level directory for maintaining cinder's state"),
]

debug_opts = []

CONF.register_cli_opts(core_opts)
CONF.register_cli_opts(debug_opts)

global_opts = [
    cfg.StrOpt('my_ip', default=_get_my_ip(), help='IP address of this host'),
    cfg.StrOpt('glance_host',
               default='$my_ip',
               help='Default glance host name or IP'),
    cfg.IntOpt('glance_port', default=9292, help='Default glance port'),
    cfg.ListOpt('glance_api_servers',
                default=['$glance_host:$glance_port'],
                help='A list of the glance API servers available to cinder '
                '([hostname|ip]:port)'),
    cfg.IntOpt('glance_api_version',
               default=1,
               help='Version of the glance API to use'),
    cfg.IntOpt('glance_num_retries',
               default=0,
               help='Number retries when downloading an image from glance'),
    cfg.BoolOpt('glance_api_insecure',
                default=False,
                help='Allow to perform insecure SSL (https) requests to '
                'glance'),
    cfg.BoolOpt('glance_api_ssl_compression',
                default=False,
                help='Enables or disables negotiation of SSL layer '
                'compression. In some cases disabling compression '
コード例 #14
0
            help='The size in bytes that changes are tracked '
            'for incremental backups. backup_gcs_object_size '
            'has to be multiple of backup_gcs_block_size.'),
 cfg.IntOpt('backup_gcs_reader_chunk_size',
            default=2097152,
            help='GCS object will be downloaded in chunks of bytes.'),
 cfg.IntOpt('backup_gcs_writer_chunk_size',
            default=2097152,
            help='GCS object will be uploaded in chunks of bytes. '
            'Pass in a value of -1 if the file '
            'is to be uploaded as a single chunk.'),
 cfg.IntOpt('backup_gcs_num_retries',
            default=3,
            help='Number of times to retry.'),
 cfg.ListOpt('backup_gcs_retry_error_codes',
             default=['429'],
             help='List of GCS error codes.'),
 cfg.StrOpt('backup_gcs_bucket_location',
            default='US',
            help='Location of GCS bucket.'),
 cfg.StrOpt('backup_gcs_storage_class',
            default='NEARLINE',
            help='Storage class of GCS bucket.'),
 cfg.StrOpt('backup_gcs_credential_file',
            help='Absolute path of GCS service account credential file.'),
 cfg.StrOpt('backup_gcs_project_id',
            help='Owner project id for GCS bucket.'),
 cfg.StrOpt('backup_gcs_user_agent',
            default='gcscinder',
            help='Http user-agent string for gcs api.'),
 cfg.BoolOpt('backup_gcs_enable_progress_timer',
コード例 #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 oslo_config import cfg

from cyborg.common.i18n import _


opts = [
    cfg.ListOpt('enabled_drivers',
                default=['fake_driver'],
                help=_('The accelerator drivers enabled on this agent. Such '
                       'as intel_fpga_driver, inspur_fpga_driver,'
                       'nvidia_gpu_driver, intel_qat_driver, etc.')),
]

opt_group = cfg.OptGroup(name='agent',
                         title='Options for the cyborg-agent service')


AGENT_OPTS = (opts)


def register_opts(conf):
    conf.register_group(opt_group)
    conf.register_opts(opts, group=opt_group)
コード例 #16
0
        'hpexp_copy_speed',
        default=3,
        help='Copy speed of storage system',
        deprecated_name='hpxp_copy_speed'),
    cfg.IntOpt(
        'hpexp_copy_check_interval',
        default=3,
        help='Interval to check copy',
        deprecated_name='hpxp_copy_check_interval'),
    cfg.IntOpt(
        'hpexp_async_copy_check_interval',
        default=10,
        help='Interval to check copy asynchronously',
        deprecated_name='hpxp_async_copy_check_interval'),
    cfg.ListOpt(
        'hpexp_target_ports',
        help='Target port names for host group or iSCSI target',
        deprecated_name='hpxp_target_ports'),
    cfg.ListOpt(
        'hpexp_compute_target_ports',
        help=(
            'Target port names of compute node '
            'for host group or iSCSI target'),
        deprecated_name='hpxp_compute_target_ports'),
    cfg.BoolOpt(
        'hpexp_group_request',
        default=False,
        help='Request for creating host group or iSCSI target',
        deprecated_name='hpxp_group_request'),
]

HORCM_VOLUME_OPTS = [
コード例 #17
0
from cinder import exception
from cinder import objects
from cinder.scheduler import filters
from cinder import utils
from cinder.volume import volume_types
from cinder.volume import volume_utils

# FIXME: This file should be renamed to backend_manager, we should also rename
# HostManager class, and scheduler_host_manager option, and also the weight
# classes, and add code to maintain backward compatibility.

host_manager_opts = [
    cfg.ListOpt('scheduler_default_filters',
                default=[
                    'AvailabilityZoneFilter', 'CapacityFilter',
                    'CapabilitiesFilter'
                ],
                help='Which filter class names to use for filtering hosts '
                'when not specified in the request.'),
    cfg.ListOpt('scheduler_default_weighers',
                default=['CapacityWeigher'],
                help='Which weigher class names to use for weighing hosts.'),
    cfg.StrOpt('scheduler_weight_handler',
               default='cinder.scheduler.weights.OrderedHostWeightHandler',
               help='Which handler to use for selecting the host/pool '
               'after weighing'),
]

CONF = cfg.CONF
CONF.register_opts(host_manager_opts)
CONF.import_opt('scheduler_driver', 'cinder.scheduler.manager')
コード例 #18
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

from neutron._i18n import _

# if shared_physical_device_mappings is not configured KeyError will be thrown
fdb_population_opt = [
    cfg.ListOpt('shared_physical_device_mappings',
                default=[],
                help=_("Comma-separated list of "
                       "<physical_network>:<network_device> tuples mapping "
                       "physical network names to the agent's node-specific "
                       "shared physical network device between "
                       "SR-IOV and OVS or SR-IOV and linux bridge"))
]


def register_fdb_population_opts(cfg=cfg.CONF):
    cfg.register_opts(fdb_population_opt, 'FDB')
コード例 #19
0
    cfg.ListOpt('disk_cachemodes',
                default=[],
                help="""
Specific cache modes to use for different disk types.

For example: file=directsync,block=none,network=writeback

For local or direct-attached storage, it is recommended that you use
writethrough (default) mode, as it ensures data integrity and has acceptable
I/O performance for applications running in the guest, especially for read
operations. However, caching mode none is recommended for remote NFS storage,
because direct I/O operations (O_DIRECT) perform better than synchronous I/O
operations (with O_SYNC). Caching mode none effectively turns all guest I/O
operations into direct I/O operations on the host, which is the NFS client in
this environment.

Possible cache modes:

* default: Same as writethrough.
* none: With caching mode set to none, the host page cache is disabled, but
  the disk write cache is enabled for the guest. In this mode, the write
  performance in the guest is optimal because write operations bypass the host
  page cache and go directly to the disk write cache. If the disk write cache
  is battery-backed, or if the applications or storage stack in the guest
  transfer data properly (either through fsync operations or file system
  barriers), then data integrity can be ensured. However, because the host
  page cache is disabled, the read performance in the guest would not be as
  good as in the modes where the host page cache is enabled, such as
  writethrough mode.
* writethrough: writethrough mode is the default caching mode. With
  caching set to writethrough mode, the host page cache is enabled, but the
  disk write cache is disabled for the guest. Consequently, this caching mode
  ensures data integrity even if the applications and storage stack in the
  guest do not transfer data to permanent storage properly (either through
  fsync operations or file system barriers). Because the host page cache is
  enabled in this mode, the read performance for applications running in the
  guest is generally better. However, the write performance might be reduced
  because the disk write cache is disabled.
* writeback: With caching set to writeback mode, both the host page cache
  and the disk write cache are enabled for the guest. Because of this, the
  I/O performance for applications running in the guest is good, but the data
  is not protected in a power failure. As a result, this caching mode is
  recommended only for temporary data where potential data loss is not a
  concern.
* directsync: Like "writethrough", but it bypasses the host page cache.
* unsafe: Caching mode of unsafe ignores cache transfer operations
  completely. As its name implies, this caching mode should be used only for
  temporary data where data loss is not a concern. This mode can be useful for
  speeding up guest installations, but you should switch to another caching
  mode in production environments.
"""),
コード例 #20
0
ファイル: default.py プロジェクト: iveskim/cloudbase-init
    def __init__(self, config):
        super(GlobalOptions, self).__init__(config, group="DEFAULT")
        self._options = [
            cfg.StrOpt(
                'local_metadata_file_path',
                default='C:\Program Files\Cloudbase Solutions\Cloudbase-Init',
                help='Local meta_data json file path'),
            cfg.StrOpt(
                'local_metadata_file',
                default=
                'C:\Program Files\Cloudbase Solutions\Cloudbase-Init\openstack\latest\meta_data.json',
                help='Local meta_data json file'),
            cfg.BoolOpt('allow_reboot',
                        default=True,
                        help='Allows OS reboots requested by plugins'),
            cfg.BoolOpt(
                'stop_service_on_exit',
                default=True,
                help='In case of execution as a service, specifies if the '
                'service must be gracefully stopped before exiting'),
            cfg.BoolOpt(
                'check_latest_version',
                default=False,
                help='Check if there is a newer version of cloudbase-init '
                'available.  If this option is activated, a log '
                'message  will be  emitted if there is a newer version '
                'available.'),
            cfg.IntOpt('retry_count',
                       default=5,
                       help='Max. number of attempts for fetching metadata in '
                       'case of transient errors'),
            cfg.FloatOpt(
                'retry_count_interval',
                default=4,
                help='Interval between attempts in case of transient errors, '
                'expressed in seconds'),
            cfg.StrOpt(
                'mtools_path',
                default=None,
                help='Path to "mtools" program suite, used for interacting '
                'with VFAT filesystems'),
            cfg.StrOpt(
                'bsdtar_path',
                default='bsdtar.exe',
                help='Path to "bsdtar", used to extract ISO ConfigDrive '
                'files'),
            cfg.BoolOpt(
                'netbios_host_name_compatibility',
                default=True,
                help='Truncates the hostname to 15 characters for Netbios '
                'compatibility'),
            cfg.StrOpt('logging_serial_port_settings',
                       default=None,
                       help='Serial port logging settings. Format: '
                       '"port,baudrate,parity,bytesize", e.g.: '
                       '"COM1,115200,N,8". Set to None (default) to disable.'),
            cfg.BoolOpt('activate_windows',
                        default=False,
                        help='Activates Windows automatically'),
            cfg.BoolOpt(
                'set_kms_product_key',
                default=False,
                help='Sets the KMS product key for this operating system'),
            cfg.BoolOpt(
                'set_avma_product_key',
                default=False,
                help='Sets the AVMA product key for this operating system'),
            cfg.StrOpt('kms_host',
                       default=None,
                       help='The KMS host address in form <host>[:<port>], '
                       'e.g: "kmshost:1688"'),
            cfg.BoolOpt(
                'log_licensing_info',
                default=True,
                help='Logs the operating system licensing information'),
            cfg.BoolOpt('winrm_enable_basic_auth',
                        default=True,
                        help='Enables basic authentication for the WinRM '
                        'HTTPS listener'),
            cfg.BoolOpt('winrm_configure_http_listener',
                        default=False,
                        help='Configures the WinRM HTTP listener'),
            cfg.BoolOpt('winrm_configure_https_listener',
                        default=True,
                        help='Configures the WinRM HTTPS listener'),
            cfg.ListOpt(
                'volumes_to_extend',
                default=None,
                help='List of volumes that need to be extended '
                'if contiguous space is available on the disk. '
                'By default all the available volumes can be extended. '
                'Volumes must be specified using a comma separated list '
                'of volume indexes, e.g.: "1,2"'),
            cfg.StrOpt(
                'san_policy',
                default=None,
                choices=[
                    constant.SAN_POLICY_ONLINE_STR,
                    constant.SAN_POLICY_OFFLINE_STR,
                    constant.SAN_POLICY_OFFLINE_SHARED_STR
                ],
                help='If not None, the SAN policy is set to the given value'),
            cfg.StrOpt(
                'local_scripts_path',
                default=None,
                help='Path location containing scripts to be executed when '
                'the plugin runs'),
            cfg.BoolOpt(
                'mtu_use_dhcp_config',
                default=True,
                help='Configures the network interfaces MTU based on the '
                'values provided via DHCP'),
            cfg.StrOpt('username',
                       default='Admin',
                       help='User to be added to the '
                       'system or updated if already existing'),
            cfg.ListOpt(
                'groups',
                default=['Administrators'],
                help='List of local groups to which the user specified in '
                '"username" will be added'),
            cfg.BoolOpt(
                'rename_admin_user',
                default=False,
                help='Renames the builtin admin user instead of creating a '
                'new user'),
            cfg.StrOpt(
                'heat_config_dir',
                default='C:\\cfn',
                help='The directory where the Heat configuration files must '
                'be saved'),
            cfg.BoolOpt('ntp_enable_service',
                        default=True,
                        help='Enables the NTP client service'),
            cfg.BoolOpt(
                'ntp_use_dhcp_config',
                default=False,
                help='Configures NTP client time synchronization using '
                'the NTP servers provided via DHCP'),
            cfg.BoolOpt(
                'real_time_clock_utc',
                default=False,
                help='Sets the real time clock to use universal time (True) '
                'or local time (False)'),
            cfg.BoolOpt('inject_user_password',
                        default=True,
                        help='Set the password provided in the configuration. '
                        'If False or no password is provided, a random one '
                        'will be set'),
            cfg.StrOpt(
                'first_logon_behaviour',
                default=constant.CLEAR_TEXT_INJECTED_ONLY,
                choices=constant.LOGON_PASSWORD_CHANGE_OPTIONS,
                help='Control the behaviour of what happens at '
                'next logon. If this option is set to `always`, '
                'then the user will be forced to change the password '
                'at next logon. If it is set to '
                '`clear_text_injected_only`, '
                'then the user will have to change the password only if '
                'the password is a clear text password, coming from the '
                'metadata. The last option is `no`, when the user is '
                'never forced to change the password.'),
            cfg.ListOpt(
                'metadata_services',
                default=[
                    'cloudbaseinit.metadata.services.localfileservice.LocalFileService',
                    # 'cloudbaseinit.metadata.services.httpservice.HttpService',
                    # 'cloudbaseinit.metadata.services'
                    # '.configdrive.ConfigDriveService',
                    # 'cloudbaseinit.metadata.services.ec2service.EC2Service',
                    # 'cloudbaseinit.metadata.services'
                    # '.maasservice.MaaSHttpService',
                    # 'cloudbaseinit.metadata.services.cloudstack.CloudStack',
                    # 'cloudbaseinit.metadata.services'
                    # '.opennebulaservice.OpenNebulaService',
                ],
                help='List of enabled metadata service classes, '
                'to be tested for availability in the provided order. '
                'The first available service will be used to retrieve '
                'metadata'),
            cfg.ListOpt(
                'plugins',
                default=[
                    'cloudbaseinit.plugins.common.mtu.MTUPlugin',
                    'cloudbaseinit.plugins.windows.ntpclient'
                    '.NTPClientPlugin',
                    'cloudbaseinit.plugins.common.sethostname'
                    '.SetHostNamePlugin',
                    'cloudbaseinit.plugins.windows.createuser'
                    '.CreateUserPlugin',
                    'cloudbaseinit.plugins.common.networkconfig'
                    '.NetworkConfigPlugin',
                    'cloudbaseinit.plugins.windows.licensing'
                    '.WindowsLicensingPlugin',
                    'cloudbaseinit.plugins.common.sshpublickeys'
                    '.SetUserSSHPublicKeysPlugin',
                    'cloudbaseinit.plugins.windows.extendvolumes'
                    '.ExtendVolumesPlugin',
                    'cloudbaseinit.plugins.common.userdata.UserDataPlugin',
                    'cloudbaseinit.plugins.common.setuserpassword.'
                    'SetUserPasswordPlugin',
                    'cloudbaseinit.plugins.windows.winrmlistener.'
                    'ConfigWinRMListenerPlugin',
                    'cloudbaseinit.plugins.windows.winrmcertificateauth.'
                    'ConfigWinRMCertificateAuthPlugin',
                    'cloudbaseinit.plugins.common.localscripts'
                    '.LocalScriptsPlugin',
                ],
                help='List of enabled plugin classes, '
                'to be executed in the provided order'),
            cfg.ListOpt(
                'user_data_plugins',
                default=[
                    'cloudbaseinit.plugins.common.userdataplugins.parthandler.'
                    'PartHandlerPlugin',
                    'cloudbaseinit.plugins.common.userdataplugins.cloudconfig.'
                    'CloudConfigPlugin',
                    'cloudbaseinit.plugins.common.userdataplugins'
                    '.cloudboothook.CloudBootHookPlugin',
                    'cloudbaseinit.plugins.common.userdataplugins.shellscript.'
                    'ShellScriptPlugin',
                    'cloudbaseinit.plugins.common.userdataplugins'
                    '.multipartmixed.MultipartMixedPlugin',
                    'cloudbaseinit.plugins.common.userdataplugins.heat.'
                    'HeatPlugin',
                ],
                help='List of enabled userdata content plugins'),
            cfg.ListOpt(
                'cloud_config_plugins',
                default=[],
                help='List which contains the name of the cloud config '
                'plugins ordered by priority.'),
            cfg.BoolOpt('rdp_set_keepalive',
                        default=True,
                        help='Sets the RDP KeepAlive policy'),
            cfg.StrOpt('bcd_boot_status_policy',
                       default=None,
                       choices=[constant.POLICY_IGNORE_ALL_FAILURES],
                       help='Sets the Windows BCD boot status policy'),
            cfg.BoolOpt('bcd_enable_auto_recovery',
                        default=False,
                        help='Enables or disables the BCD auto recovery'),
            cfg.BoolOpt(
                'set_unique_boot_disk_id',
                default=True,
                help='Sets a new random unique id on the boot disk to avoid '
                'collisions'),
            cfg.IntOpt(
                'display_idle_timeout',
                default=0,
                help='The idle timeout, in seconds, before powering off '
                'the display. Set 0 to leave the display always on'),
            cfg.ListOpt(
                'page_file_volume_labels',
                default=[],
                help='Labels of volumes on which a Windows page file needs to '
                'be created. E.g.: "Temporary Storage"'),
            cfg.ListOpt(
                'page_file_volume_mount_points',
                default=[],
                help='Volume mount points on which a Windows page file needs '
                'to be created. E.g.: '
                '"\\\\?\\GLOBALROOT\\device\\Harddisk1\\Partition1\\"'),
            cfg.BoolOpt(
                'trim_enabled',
                default=False,
                help='Enables or disables TRIM delete notifications for '
                'the underlying storage device.'),
            cfg.BoolOpt(
                'process_userdata',
                default=True,
                help='Processes the userdata content based on the type, e.g. '
                'executing a PowerShell script'),
            cfg.StrOpt(
                'userdata_save_path',
                default=None,
                help='Copies the userdata to the given file path. The path '
                'can include environment variables that will be expanded,'
                ' e.g. "%%SYSTEMDRIVE%%\\CloudbaseInit\\UserData.bin"'),
            cfg.BoolOpt('enable_automatic_updates',
                        default=None,
                        help='If set, enables or disables automatic operating '
                        'system updates.'),
            cfg.BoolOpt(
                'metadata_report_provisioning_started',
                default=False,
                help='Reports to the metadata service that provisioning has '
                'started'),
            cfg.BoolOpt(
                'metadata_report_provisioning_completed',
                default=False,
                help='Reports to the metadata service that provisioning '
                'completed successfully or failed'),
            cfg.StrOpt(
                'ephemeral_disk_volume_label',
                default=None,
                help='Ephemeral disk volume label, e.g.: "Temporary Storage"'),
            cfg.StrOpt('ephemeral_disk_volume_mount_point',
                       default=None,
                       help='Ephemeral disk volume mount point, e.g.:'
                       '"\\\\?\\GLOBALROOT\\device\\Harddisk1\\Partition1\\"'),
            cfg.StrOpt(
                'ephemeral_disk_data_loss_warning_path',
                default=None,
                help='Ephemeral disk data loss warning path, relative to the '
                'ephemeral disk volume path. E.g.: '
                'DATALOSS_WARNING_README.txt'),
            cfg.IntOpt(
                'user_password_length',
                default=20,
                help='The length of the generated password for the user '
                'defined by the `username` config option.'),
        ]

        self._cli_options = [
            cfg.BoolOpt(
                'reset_service_password',
                default=True,
                help='If set to True, the service user password will be '
                'reset at each execution with a new random value of '
                'appropriate length and complexity, unless the user is '
                'a built-in or domain account.'
                'This is needed to avoid "pass the hash" attacks on '
                'Windows cloned instances.'),
        ]
コード例 #21
0
ファイル: vnc.py プロジェクト: zsvic/nova
* novncproxy_host
* novncproxy_base_url
"""),
    cfg.ListOpt(
        'auth_schemes',
        item_type=types.String(
            choices=['none', 'vencrypt']
        ),
        default=['none'],
        help="""
The authentication schemes to use with the compute node.

Control what RFB authentication schemes are permitted for connections between
the proxy and the compute host. If multiple schemes are enabled, the first
matching scheme will be used, thus the strongest schemes should be listed
first.

Possible values:

* ``none``: allow connection without authentication
* ``vencrypt``: use VeNCrypt authentication scheme

Related options:

* ``[vnc]vencrypt_client_key``, ``[vnc]vencrypt_client_cert``: must also be set
"""),
    cfg.StrOpt(
        'vencrypt_client_key',
        help="""The path to the client certificate PEM file (for x509)
コード例 #22
0
            'with pooling (oslo_cache.memcache_pool) is recommended. '
            'For environments with less than 100 threaded servers, '
            'Memcached (dogpile.cache.memcached) or Redis '
            '(dogpile.cache.redis) is recommended. Test environments '
            'with a single instance of the server can use the '
            'dogpile.cache.memory backend.'),
 cfg.MultiStrOpt('backend_argument',
                 default=[],
                 secret=True,
                 help='Arguments supplied to the backend module. '
                 'Specify this option once per argument to be '
                 'passed to the dogpile.cache backend. Example '
                 'format: "<argname>:<value>".'),
 cfg.ListOpt('proxies',
             default=[],
             help='Proxy classes to import that will affect the way '
             'the dogpile.cache backend functions. See the '
             'dogpile.cache documentation on '
             'changing-backend-behavior.'),
 cfg.BoolOpt('enabled',
             default=False,
             help='Global toggle for caching.'),
 cfg.BoolOpt('debug_cache_backend',
             default=False,
             help='Extra debugging from the cache backend (cache '
             'keys, get/set/delete/etc calls). This is only '
             'really useful if you need to see the specific '
             'cache-backend get/set/delete calls with the '
             'keys/values.  Typically this should be left set '
             'to false.'),
 cfg.ListOpt('memcache_servers',
             default=['localhost:11211'],
コード例 #23
0
 cfg.StrOpt('cafile',
            help='A PEM encoded Certificate Authority to use when '
                 'verifying HTTPs connections. Defaults to system CAs.'),
 cfg.BoolOpt('insecure', default=False, help='Verify HTTPS connections.'),
 cfg.StrOpt('region_name',
            help='The region in which the identity server can be found.'),
 cfg.StrOpt('signing_dir',
            deprecated_for_removal=True,
            deprecated_reason='PKI token format is no longer supported.',
            deprecated_since='Ocata',
            help='Directory used to cache files related to PKI tokens. This'
            ' option has been deprecated in the Ocata release and will be'
            ' removed in the P release.'),
 cfg.ListOpt('memcached_servers',
             deprecated_name='memcache_servers',
             help='Optionally specify a list of memcached server(s) to'
             ' use for caching. If left undefined, tokens will instead be'
             ' cached in-process.'),
 cfg.IntOpt('token_cache_time',
            default=300,
            help='In order to prevent excessive effort spent validating'
            ' tokens, the middleware caches previously-seen tokens for a'
            ' configurable duration (in seconds). Set to -1 to disable'
            ' caching completely.'),
 cfg.IntOpt('revocation_cache_time',
            default=10,
            deprecated_for_removal=True,
            deprecated_reason='PKI token format is no longer supported.',
            deprecated_since='Ocata',
            help='Determines the frequency at which the list of revoked'
            ' tokens is retrieved from the Identity service (in seconds). A'
コード例 #24
0
ファイル: glance.py プロジェクト: crowdy/cinder
from keystoneauth1.loading import session as ks_session
from oslo_config import cfg
from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import timeutils

from cinder import context
from cinder import exception
from cinder.i18n import _
from cinder import service_auth


image_opts = [
    cfg.ListOpt('allowed_direct_url_schemes',
                default=[],
                help='A list of url schemes that can be downloaded directly '
                     'via the direct_url.  Currently supported schemes: '
                     '[file, cinder].'),
    cfg.StrOpt('verify_glance_signatures',
               choices=['disabled', 'enabled'],
               default='enabled',
               help=textwrap.dedent(
                   """
                   Enable image signature verification.

                   Cinder uses the image signature metadata from Glance and
                   verifies the signature of a signed image while downloading
                   that image. There are two options here.

                   1. ``enabled``: verify when image has signature metadata.
                   2. ``disabled``: verification is turned off.
コード例 #25
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

from neutron._i18n import _

AGENT_EXT_MANAGER_OPTS = [
    cfg.ListOpt('extensions', default=[], help=_('Extensions list to use')),
]


def register_agent_ext_manager_opts(cfg=cfg.CONF):
    cfg.register_opts(AGENT_EXT_MANAGER_OPTS, 'agent')
コード例 #26
0
from neutron.common import exceptions
from neutron.db.quota import api as quota_api
from neutron.quota import resource_registry


LOG = logging.getLogger(__name__)
QUOTA_DB_MODULE = 'neutron.db.quota.driver'
QUOTA_DB_DRIVER = '%s.DbQuotaDriver' % QUOTA_DB_MODULE
QUOTA_CONF_DRIVER = 'neutron.quota.ConfDriver'
default_quota_items = ['network', 'subnet', 'port']


quota_opts = [
    cfg.ListOpt('quota_items',
                default=default_quota_items,
                deprecated_for_removal=True,
                help=_('Resource name(s) that are supported in quota '
                       'features. This option is now deprecated for '
                       'removal.')),
    cfg.IntOpt('default_quota',
               default=-1,
               help=_('Default number of resource allowed per tenant. '
                      'A negative value means unlimited.')),
    cfg.IntOpt('quota_network',
               default=10,
               help=_('Number of networks allowed per tenant. '
                      'A negative value means unlimited.')),
    cfg.IntOpt('quota_subnet',
               default=10,
               help=_('Number of subnets allowed per tenant, '
                      'A negative value means unlimited.')),
    cfg.IntOpt('quota_port',
コード例 #27
0
in by the plugins that create them.
"""

import copy
import uuid

from oslo_config import cfg
from oslo_utils import timeutils
import six

OPTS = [
    cfg.StrOpt('sample_source',
               default='openstack',
               help='Source for samples emitted on this instance.'),
    cfg.ListOpt('reserved_metadata_namespace',
                default=['metering.'],
                help='List of metadata prefixes reserved for metering use.'),
    cfg.IntOpt('reserved_metadata_length',
               default=256,
               help='Limit on length of reserved metadata values.'),
    cfg.ListOpt('reserved_metadata_keys',
                default=[],
                help='List of metadata keys reserved for metering use. And '
                'these keys are additional to the ones included in the '
                'namespace.'),
]


def add_reserved_user_metadata(conf, src_metadata, dest_metadata):
    limit = conf.reserved_metadata_length
    user_metadata = {}
コード例 #28
0
ファイル: mech_driver.py プロジェクト: p0i0/openstack-neutron
from neutron.plugins.ml2.drivers import mech_agent
from neutron.plugins.ml2.drivers.mech_sriov.mech_driver \
    import exceptions as exc
from neutron.services.qos import qos_consts

LOG = log.getLogger(__name__)
VIF_TYPE_HW_VEB = 'hw_veb'
VIF_TYPE_HOSTDEV_PHY = 'hostdev_physical'
FLAT_VLAN = 0

sriov_opts = [
    cfg.ListOpt('supported_pci_vendor_devs',
                help=_("Comma-separated list of supported PCI vendor devices, "
                       "as defined by vendor_id:product_id according to the "
                       "PCI ID Repository. Default None accept all PCI vendor "
                       "devices"
                       "DEPRECATED: This option is deprecated in the Newton "
                       "release and will be removed in the Ocata release. "
                       "Starting from Ocata the mechanism driver will accept "
                       "all PCI vendor devices."),
                deprecated_for_removal=True),
]

cfg.CONF.register_opts(sriov_opts, "ml2_sriov")


class SriovNicSwitchMechanismDriver(mech_agent.SimpleAgentMechanismDriverBase):
    """Mechanism Driver for SR-IOV capable NIC based switching.

    The SriovNicSwitchMechanismDriver integrates the ml2 plugin with the
    sriovNicSwitch L2 agent depending on configuration option.
    Port binding with this driver may require the sriovNicSwitch agent
コード例 #29
0
from alembic import command as alembic_command
from alembic import config as alembic_config
from alembic import script as alembic_script
from alembic import util as alembic_util
import os
from oslo_config import cfg

HEAD_FILENAME = 'HEAD'

_core_opts = [
    cfg.StrOpt('core_plugin',
               default='',
               help=_('Neutron plugin provider module')),
    cfg.ListOpt('service_plugins',
                default=[],
                help=_("The service plugins Neutron will use")),
]

_quota_opts = [
    cfg.StrOpt('quota_driver',
               default='',
               help=_('Neutron quota driver class')),
]

_db_opts = [
    cfg.StrOpt('connection',
               deprecated_name='sql_connection',
               default='',
               secret=True,
               help=_('URL to database')),
コード例 #30
0
import webob

from glance.common import exception
from glance.common import timeutils
from glance.domain import proxy as domain_proxy
from glance.i18n import _, _LE

notifier_opts = [
    cfg.StrOpt('default_publisher_id',
               default="image.localhost",
               help='Default publisher_id for outgoing notifications.'),
    cfg.ListOpt('disabled_notifications',
                default=[],
                help='List of disabled notifications. A notification can be '
                'given either as a notification type to disable a single '
                'event, or as a notification group prefix to disable all '
                'events within a group. Example: if this config option '
                'is set to ["image.create", "metadef_namespace"], then '
                '"image.create" notification will not be sent after '
                'image is created and none of the notifications for '
                'metadefinition namespaces will be sent.'),
]

CONF = cfg.CONF
CONF.register_opts(notifier_opts)

LOG = logging.getLogger(__name__)

_ALIASES = {
    'glance.openstack.common.rpc.impl_kombu': 'rabbit',
    'glance.openstack.common.rpc.impl_qpid': 'qpid',
    'glance.openstack.common.rpc.impl_zmq': 'zmq',