def get_options(cls): return [ cfg.IntOpt('a-int', default='3', help=cls.INT_DESC), cfg.BoolOpt('a-bool', help=cls.BOOL_DESC), cfg.FloatOpt('a-float', help=cls.FLOAT_DESC), cfg.StrOpt('a-str', help=cls.STR_DESC, default=cls.STR_DEFAULT), ]
cfg.CONF.register_group( cfg.OptGroup(name='service:agent', title="Configuration for the Agent Service")) OPTS = [ cfg.IntOpt('workers', default=None, help='Number of agent worker processes to spawn'), cfg.IntOpt('threads', default=1000, help='Number of agent greenthreads to spawn'), cfg.StrOpt('host', default='0.0.0.0', help='The Agent Bind Host'), cfg.IntOpt('port', default=5358, help='mDNS Port Number'), cfg.IntOpt('tcp-backlog', default=100, help='The Agent TCP Backlog'), cfg.FloatOpt('tcp-recv-timeout', default=0.5, help='Agent TCP Receive Timeout'), cfg.ListOpt('allow-notify', default=[], help='List of IP addresses allowed to NOTIFY The Agent'), cfg.ListOpt('masters', default=[], help='List of masters for the Agent, format ip:port'), cfg.StrOpt('backend-driver', default='bind9', help='The backend driver to use'), cfg.StrOpt('transfer-source', default=None, help='An IP address to be used to fetch zones transferred in'), ]
from oslo.config import cfg from nova.openstack.common.gettextutils import _ import nova.openstack.common.log as logging from nova.virt.xenapi import vm_utils LOG = logging.getLogger(__name__) xenapi_torrent_opts = [ cfg.StrOpt('torrent_base_url', deprecated_name='xenapi_torrent_base_url', deprecated_group='DEFAULT', help='Base URL for torrent files.'), cfg.FloatOpt('torrent_seed_chance', default=1.0, deprecated_name='xenapi_torrent_seed_chance', deprecated_group='DEFAULT', help='Probability that peer will become a seeder.' ' (1.0 = 100%)'), cfg.IntOpt('torrent_seed_duration', default=3600, deprecated_name='xenapi_torrent_seed_duration', deprecated_group='DEFAULT', help='Number of seconds after downloading an image via' ' BitTorrent that it should be seeded for other peers.'), cfg.IntOpt('torrent_max_last_accessed', default=86400, deprecated_name='xenapi_torrent_max_last_accessed', deprecated_group='DEFAULT', help='Cached torrent files not accessed within this number of' ' seconds can be reaped'), cfg.IntOpt('torrent_listen_port_start',
help='Base dir containing mount points for nfs shares'), cfg.BoolOpt('nexenta_sparsed_volumes', default=True, help=('Create volumes as sparsed files which take no space.' 'If set to False volume is created as regular file.' 'In such case volume creation takes a lot of time.')), cfg.StrOpt('nexenta_volume_compression', default='on', help='Default compression value for new ZFS folders.'), cfg.StrOpt('nexenta_mount_options', default=None, help='Mount options passed to the nfs client. See section ' 'of the nfs man page for details'), cfg.FloatOpt('nexenta_used_ratio', default=0.95, help=('Percent of ACTUAL usage of the underlying volume ' 'before no new volumes can be allocated to the volume ' 'destination.')), cfg.FloatOpt('nexenta_oversub_ratio', default=1.0, help=('This will compare the allocated to available space on ' 'the volume destination. If the ratio exceeds this ' 'number, the destination will no longer be valid.')), cfg.BoolOpt('nexenta_nms_cache_volroot', default=True, help=('If set True cache NexentaStor appliance volroot option ' 'value.')) ] NEXENTA_VOLUME_OPTIONS = [ cfg.StrOpt('nexenta_blocksize',
# 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 _LW from nova.openstack.common import log as logging from nova.scheduler import filters from nova.scheduler.filters import utils LOG = logging.getLogger(__name__) disk_allocation_ratio_opt = cfg.FloatOpt("disk_allocation_ratio", default=1.0, help="Virtual disk to physical disk allocation ratio") CONF = cfg.CONF CONF.register_opt(disk_allocation_ratio_opt) class DiskFilter(filters.BaseHostFilter): """Disk Filter with over subscription flag.""" def _get_disk_allocation_ratio(self, host_state, filter_properties): return CONF.disk_allocation_ratio def host_passes(self, host_state, filter_properties): """Filter based on disk usage.""" instance_type = filter_properties.get('instance_type') requested_disk = (1024 * (instance_type['root_gb'] +
metrics_weight_setting = name1=1.0, name2=-1.0 The final weight would be name1.value * 1.0 + name2.value * -1.0. """ from oslo.config import cfg from nova import exception from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.scheduler import weights metrics_weight_opts = [ cfg.FloatOpt('weight_multiplier', default=1.0, help='Multiplier used for weighing metrics.'), cfg.ListOpt('weight_setting', default=[], help='How the metrics are going to be weighed. This ' 'should be in the form of "<name1>=<ratio1>, ' '<name2>=<ratio2>, ...", where <nameX> is one ' 'of the metric to be weighed, and <ratioX> is ' 'the corresponding ratio. So for "name1=1.0, ' 'name2=-1.0" The final weight would be ' 'name1.value * 1.0 + name2.value * -1.0.'), ] CONF = cfg.CONF CONF.register_opts(metrics_weight_opts, group='metrics')
help='qemu-img is used to convert between ' 'different image types'), cfg.BoolOpt('config_drive_cdrom', default=False, help='Attaches the Config Drive image as a cdrom drive ' 'instead of a disk drive'), cfg.BoolOpt('enable_instance_metrics_collection', default=False, help='Enables metrics collections for an instance by using ' 'Hyper-V\'s metric APIs. Collected data can by retrieved ' 'by other apps and services, e.g.: Ceilometer. ' 'Requires Hyper-V / Windows Server 2012 and above'), cfg.FloatOpt('dynamic_memory_ratio', default=1.0, help='Enables dynamic memory allocation (ballooning) when ' 'set to a value greater than 1. The value expresses ' 'the ratio between the total RAM assigned to an ' 'instance and its startup RAM amount. For example a ' 'ratio of 2.0 for an instance with 1024MB of RAM ' 'implies 512MB of RAM allocated at startup') ] CONF = cfg.CONF CONF.register_opts(hyperv_opts, 'hyperv') CONF.import_opt('use_cow_images', 'nova.virt.driver') CONF.import_opt('network_api_class', 'nova.network') def check_admin_permissions(function): @functools.wraps(function) def wrapper(self, *args, **kwds):
netapp_basicauth_opts = [ cfg.StrOpt('netapp_login', default=None, help=('Administrative user account name used to access the ' 'storage system or proxy server.')), cfg.StrOpt('netapp_password', default=None, help=('Password for the administrative user account ' 'specified in the netapp_login option.'), secret=True), ] netapp_provisioning_opts = [ cfg.FloatOpt('netapp_size_multiplier', default=1.2, help=('The quantity to be multiplied by the requested ' 'volume size to ensure enough space is available on ' 'the virtual storage server (Vserver) to fulfill ' 'the volume creation request.')), cfg.StrOpt('netapp_volume_list', default=None, help=('This option is only utilized when the storage protocol ' 'is configured to use iSCSI or FC. This option is used ' 'to restrict provisioning to the specified controller ' 'volumes. Specify the value of this option to be a ' 'comma separated list of NetApp controller volume names ' 'to be used for provisioning.')), ] netapp_cluster_opts = [ cfg.StrOpt('netapp_vserver', default=None,
# 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 time from oslo.config import cfg from rally.benchmark.scenarios import base from rally.benchmark import utils as bench_utils cinder_benchmark_opts = [ cfg.FloatOpt('cinder_volume_create_prepoll_delay', default=2.0, help='Time to sleep after creating a resource before' ' polling for it status'), cfg.FloatOpt('cinder_volume_create_timeout', default=600.0, help='Time to wait for cinder volume to be created.'), cfg.FloatOpt('cinder_volume_create_poll_interval', default=2.0, help='Interval between checks when waiting for volume' ' creation.'), cfg.FloatOpt('cinder_volume_delete_timeout', default=600.0, help='Time to wait for cinder volume to be deleted.'), cfg.FloatOpt('cinder_volume_delete_poll_interval', default=2.0, help='Interval between checks when waiting for volume' ' deletion.')
from tacker.common import config from tacker.openstack.common import log as logging LOG = logging.getLogger(__name__) ROOT_HELPER_OPTS = [ cfg.StrOpt('root_helper', default='sudo', help=_('Root helper application.')), ] AGENT_STATE_OPTS = [ cfg.FloatOpt('report_interval', default=30, help=_('Seconds between nodes reporting state to server; ' 'should be less than agent_down_time, best if it ' 'is half or less than agent_down_time.')), ] INTERFACE_DRIVER_OPTS = [ cfg.StrOpt('interface_driver', help=_("The driver used to manage the virtual interface.")), ] USE_NAMESPACES_OPTS = [ cfg.BoolOpt('use_namespaces', default=True, help=_("Allow overlapping IP.")), ] def get_log_args(conf, log_file_name):
from quark.agent import utils LOG = logging.getLogger(__name__) CONF = cfg.CONF agent_opts = [ cfg.ListOpt("redis_sentinel_hosts", default=["localhost:26379"], help=_("Comma-separated list of host:port pairs for Redis " "sentinel hosts.")), cfg.StrOpt("redis_sentinel_master", default="mymaster", help=_("Service name for Redis master.")), cfg.StrOpt("redis_db", default="0"), cfg.FloatOpt("redis_socket_timeout", default=0.1) ] CONF.register_opts(agent_opts, "AGENT") SECURITY_GROUP_VERSION_UUID_KEY = "uuid" class RedisClient(object): def __init__(self): self._sentinels = [hostport.split(":") for hostport in CONF.AGENT.redis_sentinel_hosts] self._sentinel_master = CONF.AGENT.redis_sentinel_master self._db = CONF.AGENT.redis_db self._socket_timeout = CONF.AGENT.redis_socket_timeout
# 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. """Ram cost.""" from nova.openstack.common import log as logging from nova.scheduler.solvers import costs as solvercosts from oslo.config import cfg LOG = logging.getLogger(__name__) ram_weight_multiplier_opt = cfg.FloatOpt( 'ram_weight_multiplier', default=1.0, help='+ve values result in stacking, while -ve spreading') CONF = cfg.CONF CONF.register_opt(ram_weight_multiplier_opt, group='solver_scheduler') SOLVER_CONF = CONF.solver_scheduler class RamCost(solvercosts.BaseCost): """The cost is evaluated by the production of hosts' free memory and a pre-defined multiplier. """ def get_cost_matrix(self, hosts, instance_uuids, request_spec, filter_properties): """Calculate the cost matrix.""" num_hosts = len(hosts)
default='', help='IP address of the VMware Vsphere host.'), cfg.IntOpt('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.IntOpt('api_retry_count', default=10, help='Number of times a VMware Vsphere API may be retried.'), cfg.FloatOpt('task_poll_interval', default=0.5, help='Sleep time in seconds for polling an ongoing async ' 'task.'), cfg.StrOpt('wsdl_location', help='Optional vim service WSDL location ' 'e.g http://<server>/vimService.wsdl. ' 'Optional over-ride to default location for bug ' 'work-arounds.'), ] cfg.CONF.register_group(opt_group) cfg.CONF.register_opts(OPTS, group=opt_group) VC_AVERAGE_MEMORY_CONSUMED_CNTR = 'mem:consumed:average' VC_AVERAGE_CPU_CONSUMED_CNTR = 'cpu:usage:average' VC_NETWORK_RX_COUNTER = 'net:received:average' VC_NETWORK_TX_COUNTER = 'net:transmitted:average'
dst_compute = cfg.OptGroup(name='dst_compute', title='Config service for compute') dst_compute_opts = [ cfg.StrOpt('service', default='nova', help='name service for compute'), cfg.StrOpt('backend', default='ceph', help='backend for ephemeral drives'), cfg.BoolOpt('disk_overcommit', default=False, help='live-migration allow disk overcommit'), cfg.BoolOpt('block_migration', default=False, help='live-migration without shared_storage'), cfg.StrOpt('host_eph_drv', default='-', help='host ephemeral drive'), cfg.FloatOpt('cpu_allocation_ratio', default='16', help='cpu allocation ratio'), cfg.FloatOpt('ram_allocation_ratio', default='1', help='ram allocation ratio'), cfg.FloatOpt('disk_allocation_ratio', default='0.9', help='disk allocation ratio'), cfg.StrOpt('db_connection', default=None, help='driver for db connection'), cfg.StrOpt('db_host', default=None, help='compute mysql node ip address'), cfg.IntOpt('db_port', default=None, help='port for mysql connection'), cfg.StrOpt('db_name', default=None, help='compute database name'), cfg.StrOpt('db_user', default=None, help='user for db access'), cfg.StrOpt('db_password', default=None,
# 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 import db from nova.openstack.common import log as logging from nova.scheduler import filters LOG = logging.getLogger(__name__) ram_allocation_ratio_opt = cfg.FloatOpt( 'ram_allocation_ratio', default=1.5, help='Virtual ram to physical ram allocation ratio which affects ' 'all ram filters. This configuration specifies a global ratio ' 'for RamFilter. For AggregateRamFilter, it will fall back to ' 'this configuration value if no per-aggregate setting found.') CONF = cfg.CONF CONF.register_opt(ram_allocation_ratio_opt) class BaseRamFilter(filters.BaseHostFilter): def _get_ram_allocation_ratio(self, host_state, filter_properties): raise NotImplementedError def host_passes(self, host_state, filter_properties): """Only return hosts with sufficient available RAM.""" instance_type = filter_properties.get('instance_type')
cfg.StrOpt("directory", default=DEFAULT_SELFASSESSMENT_DIR, help="Directory where to grab configurations from") ] CONF.register_group(self_assessment) CONF.register_opts(self_assessment_opts, self_assessment) events = cfg.OptGroup(name='worker', title="Worker options") events_opts = [ cfg.BoolOpt("enable-events", default=True, help="Periodically enable Celery events"), cfg.BoolOpt("persistent", default=True, help="Enable persistent mode"), cfg.FloatOpt("inspect-timeout", default=1000, help="Inspect timeout (in milliseconds)"), cfg.IntOpt("max-tasks", default=10000, help="Maximum number of tasks to keep in memory"), cfg.StrOpt("db", default="testagent.db", help="Database file"), cfg.StrOpt("timezone", default="Europe/Rome", help="Timezone (default: Europe/Rome)") ] CONF.register_group(events) CONF.register_opts(events_opts, events) evidences = cfg.OptGroup(name='evidences', title="Evidences") evidences_opts = [
# License for the specific language governing permissions and limitations # under the License. from oslo.config import cfg from nova.i18n import _LW from nova.openstack.common import log as logging from nova.scheduler import filters from nova.scheduler.filters import utils LOG = logging.getLogger(__name__) cpu_allocation_ratio_opt = cfg.FloatOpt( 'cpu_allocation_ratio', default=16.0, help='Virtual CPU to physical CPU allocation ratio which affects ' 'all CPU filters. This configuration specifies a global ratio ' 'for CoreFilter. For AggregateCoreFilter, it will fall back to ' 'this configuration value if no per-aggregate setting found.') CONF = cfg.CONF CONF.register_opt(cpu_allocation_ratio_opt) class BaseCoreFilter(filters.BaseHostFilter): def _get_cpu_allocation_ratio(self, host_state, filter_properties): raise NotImplementedError def host_passes(self, host_state, filter_properties): """Return True if host has sufficient CPU cores.""" instance_type = filter_properties.get('instance_type')
help='Transport type protocol'), ] netapp_basicauth_opts = [ cfg.StrOpt('netapp_login', default=None, help='User name for the storage controller'), cfg.StrOpt('netapp_password', default=None, help='Password for the storage controller', secret=True), ] netapp_provisioning_opts = [ cfg.FloatOpt('netapp_size_multiplier', default=1.2, help='Volume size multiplier to ensure while creation'), cfg.StrOpt('netapp_volume_list', default=None, help='Comma separated volumes to be used for provisioning'), ] netapp_cluster_opts = [ cfg.StrOpt('netapp_vserver', default='openstack', help='Cluster vserver to use for provisioning'), ] netapp_7mode_opts = [ cfg.StrOpt('netapp_vfiler', default=None,
# # 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. """ Weigh cells by memory needed in a way that spreads instances. """ from oslo.config import cfg from nova.cells import weights ram_weigher_opts = [ cfg.FloatOpt('ram_weight_multiplier', default=10.0, help='Multiplier used for weighing ram. Negative ' 'numbers mean to stack vs spread.'), ] CONF = cfg.CONF CONF.register_opts(ram_weigher_opts, group='cells') class RamByInstanceTypeWeigher(weights.BaseCellWeigher): """Weigh cells by instance_type requested.""" def _weight_multiplier(self): return CONF.cells.ram_weight_multiplier def _weigh_object(self, cell, weight_properties): """ Use the 'ram_free' for a particular instance_type advertised from a
vmwareapi_opts = [ cfg.StrOpt('host_ip', help='Hostname or IP address for connection to VMware ESX/VC ' 'host.'), cfg.StrOpt('host_username', help='Username for connection to VMware ESX/VC host.'), cfg.StrOpt('host_password', help='Password for connection to VMware ESX/VC host.', secret=True), cfg.MultiStrOpt('cluster_name', help='Name of a VMware Cluster ComputeResource. Used only if ' 'compute_driver is vmwareapi.VMwareVCDriver.'), cfg.StrOpt('datastore_regex', help='Regex to match the name of a datastore.'), cfg.FloatOpt('task_poll_interval', default=0.5, help='The interval used for polling of remote tasks.'), cfg.IntOpt('api_retry_count', default=10, help='The number of times we retry on failures, e.g., ' 'socket error, etc.'), cfg.IntOpt('vnc_port', default=5900, help='VNC starting port'), cfg.IntOpt('vnc_port_total', default=10000, help='Total number of VNC ports'), cfg.BoolOpt('use_linked_clone', default=True, help='Whether to use linked clone'), ]
'vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.', secret=True), cfg.StrOpt('cluster_name', deprecated_name='vmwareapi_cluster_name', deprecated_group='DEFAULT', help='Name of a VMware Cluster ComputeResource. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareVCDriver.'), cfg.StrOpt('datastore_regex', help='Regex to match the name of a datastore. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareVCDriver.'), cfg.FloatOpt('task_poll_interval', default=5.0, deprecated_name='vmwareapi_task_poll_interval', deprecated_group='DEFAULT', help='The interval used for polling of remote tasks. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareESXDriver or ' 'vmwareapi.VMwareVCDriver.'), cfg.IntOpt('api_retry_count', default=10, deprecated_name='vmwareapi_api_retry_count', deprecated_group='DEFAULT', help='The number of times we retry on failures, e.g., ' 'socket error, etc. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.'), cfg.IntOpt('vnc_port', default=5900, deprecated_name='vnc_port', deprecated_group='DEFAULT',
import sys import time from oslo.config import cfg import heartbeat import data_stat import log global_opts = [ cfg.BoolOpt('enable_monitor', default=True, help='Enable vm monitor'), cfg.BoolOpt('enable_heartbeat', default=True, help='Enable reporting vm heartbeat'), cfg.FloatOpt('check_interval', default=0.5, help='The interval time to check run thread or not'), ] CONF = cfg.CONF CONF.register_opts(global_opts) LOG = log.getLogger(__name__) RUN = True def signal_handler(signum, frame): LOG.info("Receive signal: %s" % signum) global RUN RUN = False
'Required if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('connection_username', default='root', deprecated_name='xenapi_connection_username', deprecated_group='DEFAULT', help='Username for connection to XenServer/Xen Cloud Platform. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('connection_password', deprecated_name='xenapi_connection_password', deprecated_group='DEFAULT', help='Password for connection to XenServer/Xen Cloud Platform. ' 'Used only if compute_driver=xenapi.XenAPIDriver', secret=True), cfg.FloatOpt('vhd_coalesce_poll_interval', default=5.0, deprecated_name='xenapi_vhd_coalesce_poll_interval', deprecated_group='DEFAULT', help='The interval used for polling of coalescing vhds. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.BoolOpt('check_host', default=True, deprecated_name='xenapi_check_host', deprecated_group='DEFAULT', help='Ensure compute service is running on host XenAPI ' 'connects to.'), cfg.IntOpt('vhd_coalesce_max_attempts', default=5, deprecated_name='xenapi_vhd_coalesce_max_attempts', deprecated_group='DEFAULT', help='Max number of times to poll for VHD to coalesce. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('sr_base_path',
from fuel_agent import errors from fuel_agent.openstack.common import log as logging LOG = logging.getLogger(__name__) u_opts = [ cfg.IntOpt( 'http_max_retries', default=30, help='Maximum retries count for http requests. 0 means infinite', ), cfg.FloatOpt( 'http_request_timeout', # Setting it to 10 secs will allow fuel-agent to overcome the momentary # peak loads when network bandwidth becomes as low as 0.1MiB/s, thus # preventing of wasting too much retries on such false positives. default=10.0, help='Http request timeout in seconds', ), cfg.FloatOpt( 'http_retry_delay', default=2.0, help='Delay in seconds before the next http request retry', ), cfg.IntOpt( 'read_chunk_size', default=1048576, help='Block size of data to read for calculating checksum', ), cfg.FloatOpt( 'execute_retry_delay',
The default is to spread volumes across all hosts evenly. If you prefer stacking, you can set the 'capacity_weight_multiplier' option to a negative number and the weighing has the opposite effect of the default. """ import math from oslo.config import cfg from cinder import flags from cinder.openstack.common.scheduler import weights capacity_weight_opts = [ cfg.FloatOpt('capacity_weight_multiplier', default=1.0, help='Multiplier used for weighing volume capacity. ' 'Negative numbers mean to stack vs spread.'), ] FLAGS = flags.FLAGS FLAGS.register_opts(capacity_weight_opts) class CapacityWeigher(weights.BaseHostWeigher): def _weight_multiplier(self): """Override the weight multiplier.""" return FLAGS.capacity_weight_multiplier def _weigh_object(self, host_state, weight_properties): """Higher weights win. We want spreading to be the default.""" reserved = float(host_state.reserved_percentage) / 100
""" If a child cell hasn't sent capacity or capability updates in a while, downgrade its likelihood of being chosen for scheduling requests. """ from oslo.config import cfg from nova.cells import weights from nova.openstack.common import log as logging from nova.openstack.common import timeutils LOG = logging.getLogger(__name__) mute_weigher_opts = [ cfg.FloatOpt('mute_weight_multiplier', default=-10.0, help='Multiplier used to weigh mute children. (The value ' 'should be negative.)'), cfg.FloatOpt('mute_weight_value', default=1000.0, help='Weight value assigned to mute children. (The value ' 'should be positive.)'), cfg.IntOpt("mute_child_interval", default=300, help='Number of seconds after which a lack of capability and ' 'capacity updates signals the child cell is to be ' 'treated as a mute.') ] CONF = cfg.CONF CONF.register_opts(mute_weigher_opts, group='cells')
# # 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.scheduler.solvers import linearconstraints CONF = cfg.CONF cpu_allocation_ratio_opt = cfg.FloatOpt('cpu_allocation_ratio', default=1.0, help='cpu allocation ratio') CONF.register_opt(cpu_allocation_ratio_opt, group='solver_scheduler') #CONF.import_opt('cpu_allocation_ratio', 'nova.scheduler.filters.core_filter') class MaxVcpuAllocationPerHostConstraint( linearconstraints.ResourceAllocationConstraint): """Constraint of the total vcpu demand acceptable on each host.""" # The linear constraint should be formed as: # coeff_vectors * var_vectors' (operator) (constants) # where (operator) is ==, >, >=, <, <=, !=, etc. # For convenience, the (constants) is merged into left-hand-side, # thus the right-hand-side is 0.
xenapi_opts = [ cfg.StrOpt('connection_url', help='URL for connection to XenServer/Xen Cloud Platform. ' 'A special value of unix://local can be used to connect ' 'to the local unix socket. ' 'Required if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('connection_username', default='root', help='Username for connection to XenServer/Xen Cloud Platform. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('connection_password', help='Password for connection to XenServer/Xen Cloud Platform. ' 'Used only if compute_driver=xenapi.XenAPIDriver', secret=True), cfg.FloatOpt('vhd_coalesce_poll_interval', default=5.0, help='The interval used for polling of coalescing vhds. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.BoolOpt('check_host', default=True, help='Ensure compute service is running on host XenAPI ' 'connects to.'), cfg.IntOpt('vhd_coalesce_max_attempts', default=20, help='Max number of times to poll for VHD to coalesce. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('sr_base_path', default='/var/run/sr-mount', help='Base path to the storage repository'), cfg.StrOpt('target_host', help='The iSCSI Target Host'), cfg.StrOpt('target_port', default='3260',
default='', help='SSL version to use (valid only if SSL enabled). ' 'valid values are TLSv1, SSLv23 and SSLv3. SSLv2 may ' 'be available on some distributions.'), cfg.StrOpt('kombu_ssl_keyfile', default='', help='SSL key file (valid only if SSL enabled).'), cfg.StrOpt('kombu_ssl_certfile', default='', help='SSL cert file (valid only if SSL enabled).'), cfg.StrOpt('kombu_ssl_ca_certs', default='', help='SSL certification authority file ' '(valid only if SSL enabled).'), cfg.FloatOpt('kombu_reconnect_delay', default=1.0, help='How long to wait before reconnecting in response to an ' 'AMQP consumer cancel notification.'), cfg.StrOpt('rabbit_host', default='localhost', help='The RabbitMQ broker address where a single node is ' 'used.'), cfg.IntOpt('rabbit_port', default=5672, help='The RabbitMQ broker port where a single node is used.'), cfg.ListOpt('rabbit_hosts', default=['$rabbit_host:$rabbit_port'], help='RabbitMQ HA cluster host:port pairs.'), cfg.BoolOpt('rabbit_use_ssl', default=False, help='Connect over SSL for RabbitMQ.'), cfg.StrOpt('rabbit_userid', default='guest', help='The RabbitMQ userid.'),
'Used only if compute_driver is ' 'vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.'), cfg.StrOpt('vmwareapi_host_password', default=None, help='Password for connection to VMware ESX/VC host. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.', secret=True), cfg.StrOpt('vmwareapi_cluster_name', default=None, help='Name of a VMware Cluster ComputeResource. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareVCDriver.'), cfg.FloatOpt('vmwareapi_task_poll_interval', default=5.0, help='The interval used for polling of remote tasks. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareESXDriver or ' 'vmwareapi.VMwareVCDriver.'), cfg.IntOpt('vmwareapi_api_retry_count', default=10, help='The number of times we retry on failures, e.g., ' 'socket error, etc. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.'), cfg.IntOpt('vnc_port', default=5900, help='VNC starting port'), cfg.IntOpt('vnc_port_total', default=10000, help='Total number of VNC ports'), cfg.StrOpt('vnc_password', default=None, help='VNC password', secret=True), cfg.BoolOpt('use_linked_clone', default=True,