cfg.StrOpt('host_username', deprecated_name='vmwareapi_host_username', deprecated_group='DEFAULT', help='Username for connection to VMware ESX/VC host. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.'), cfg.StrOpt('host_password', deprecated_name='vmwareapi_host_password', deprecated_group='DEFAULT', help='Password for connection to VMware ESX/VC host. ' 'Used only if compute_driver is ' 'vmwareapi.VMwareESXDriver or vmwareapi.VMwareVCDriver.', secret=True), cfg.MultiStrOpt( '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',
ldap_dns_opts = [ cfg.StrOpt('ldap_dns_url', default='ldap://ldap.example.com:389', help='URL for ldap server which will store dns entries'), cfg.StrOpt('ldap_dns_user', default='uid=admin,ou=people,dc=example,dc=org', help='user for ldap DNS'), cfg.StrOpt('ldap_dns_password', default='password', help='password for ldap DNS', secret=True), cfg.StrOpt('ldap_dns_soa_hostmaster', default='*****@*****.**', help='Hostmaster for ldap dns driver Statement of Authority'), cfg.MultiStrOpt('ldap_dns_servers', default=['dns.example.org'], help='DNS Servers for ldap dns driver'), cfg.StrOpt('ldap_dns_base_dn', default='ou=hosts,dc=example,dc=org', help='Base DN for DNS entries in ldap'), cfg.StrOpt('ldap_dns_soa_refresh', default='1800', help='Refresh interval (in seconds) for ldap dns driver ' 'Statement of Authority'), cfg.StrOpt('ldap_dns_soa_retry', default='3600', help='Retry interval (in seconds) for ldap dns driver ' 'Statement of Authority'), cfg.StrOpt('ldap_dns_soa_expiry', default='86400', help='Expiry interval (in seconds) for ldap dns driver '
from neutron.common import topics from neutron import context from neutron.openstack.common import importutils from neutron.openstack.common import log as logging from neutron.openstack.common import loopingcall from neutron.openstack.common import periodic_task from neutron.plugins.common import constants from neutron.services.loadbalancer.agent import agent_api LOG = logging.getLogger(__name__) OPTS = [ cfg.MultiStrOpt( 'device_driver', default=[ 'neutron.services.loadbalancer.drivers' '.haproxy.namespace_driver.HaproxyNSDriver' ], help=_('Drivers used to manage loadbalancing devices'), ), ] class DeviceNotFoundOnAgent(n_exc.NotFound): msg = _('Unknown device with pool_id %(pool_id)s') class LbaasAgentManager(periodic_task.PeriodicTasks): RPC_API_VERSION = '2.0' # history
# # 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 dragon.openstack.common.gettextutils import _ from dragon.openstack.common import importutils from dragon.openstack.common import log as logging list_notifier_drivers_opt = cfg.MultiStrOpt( 'list_notifier_drivers', default=['dragon.openstack.common.notifier.no_op_notifier'], help='List of drivers to send notifications') CONF = cfg.CONF CONF.register_opt(list_notifier_drivers_opt) LOG = logging.getLogger(__name__) drivers = None class ImportFailureNotifier(object): """Noisily re-raises some exception over-and-over when notify is called.""" def __init__(self, exception): self.exception = exception
cfg.BoolOpt('enable_v1_api', default=True, help=_("Deploy v1 of the Monitor API. ")), cfg.BoolOpt('enable_v2_api', default=True, help=_("Deploy v2 of the Monitor API. ")), cfg.BoolOpt('api_rate_limit', default=True, help='whether to rate limit the api'), cfg.ListOpt('osapi_servicemanage_ext_list', default=[], help='Specify list of extensions to load when using osapi_' 'servicemanage_extension option with monitor.api.contrib.' 'select_extensions'), cfg.MultiStrOpt('osapi_servicemanage_extension', default=['monitor.api.contrib.standard_extensions'], help='osapi servicemanage extension to load'), cfg.StrOpt('osapi_servicemanage_base_URL', default=None, help='Base URL that will be presented to users in links ' 'to the OpenStack ServiceManage API', deprecated_name='osapi_compute_link_prefix'), cfg.IntOpt('osapi_max_limit', default=1000, help='the maximum number of items returned in a single ' 'response from a collection resource'), cfg.StrOpt('sqlite_db', default='monitor.sqlite', help='the filename to use with sqlite'), cfg.BoolOpt('sqlite_synchronous', default=True,
cfg.StrOpt('backupjobs_topic', default='raksha-backupjobs', help='the topic backup job nodes listen on'), cfg.BoolOpt('enable_v1_api', default=True, help=_("Deploy v1 of the Raksha API. ")), cfg.BoolOpt('api_rate_limit', default=True, help='whether to rate limit the api'), cfg.ListOpt('osapi_dpaas_ext_list', default=[], help='Specify list of extensions to load when using osapi_' '_extension option with raksha.api.contrib.' 'select_extensions'), cfg.MultiStrOpt('osapi_dpaas_extension', default=['raksha.api.contrib.standard_extensions'], help='osapi dpaas extension to load'), cfg.StrOpt('osapi_dpaas_base_URL', default=None, help='Base URL that will be presented to users in links ' 'to the OpenStack DPaaS API'), cfg.IntOpt('osapi_max_limit', default=1000, help='the maximum number of items returned in a single ' 'response from a collection resource'), cfg.StrOpt('sqlite_db', default='raksha.sqlite', help='the filename to use with sqlite'), cfg.BoolOpt('sqlite_synchronous', default=True, help='If passed, use synchronous mode for sqlite'),
# 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.common import exceptions as n_exc from neutron.openstack.common import log as logging from neutron.plugins.common import constants LOG = logging.getLogger(__name__) serviceprovider_opts = [ cfg.MultiStrOpt('service_provider', default=[], help=_('Defines providers for advanced services ' 'using the format: ' '<service_type>:<name>:<driver>[:default]')) ] cfg.CONF.register_opts(serviceprovider_opts, 'service_providers') #global scope function that should be used in service APIs def normalize_provider_name(name): return name.lower() def parse_service_provider_opt(): """Parse service definition opts and returns result.""" def validate_name(name): if len(name) > 255:
# NOTE(yamahata): ListOpt won't work because the command may include a # comma. For example: # # mkfs.ext3 -O dir_index,extent -E stride=8,stripe-width=16 # --label %(fs_label)s %(target)s # # list arguments are comma separated and there is no way to # escape such commas. # cfg.MultiStrOpt( 'virt_mkfs', default=[ 'default=mkfs.ext3 -L %(fs_label)s -F %(target)s', 'linux=mkfs.ext3 -L %(fs_label)s -F %(target)s', 'windows=mkfs.ntfs' ' --force --fast --label %(fs_label)s %(target)s', # NOTE(yamahata): vfat case #'windows=mkfs.vfat -n %(fs_label)s %(target)s', ], help='mkfs commands for ephemeral device. ' 'The format is <os_type>=<mkfs command>'), ] CONF = cfg.CONF CONF.register_opts(disk_opts) _MKFS_COMMAND = {} _DEFAULT_MKFS_COMMAND = None for s in CONF.virt_mkfs: # NOTE(yamahata): mkfs command may includes '=' for its options.
from ceilometer.storage import models from ceilometer import transformer OPTS = [ cfg.StrOpt('udp_address', default='0.0.0.0', help='address to bind the UDP socket to' 'disabled if set to an empty string'), cfg.IntOpt('udp_port', default=4952, help='port to bind the UDP socket to'), cfg.BoolOpt('ack_on_event_error', default=True, help='Acknowledge message when event persistence fails'), cfg.BoolOpt('store_events', default=False, help='Save event details'), cfg.MultiStrOpt('dispatcher', default=['database'], help='dispatcher to process metering data'), ] cfg.CONF.register_opts(OPTS, group="collector") LOG = log.getLogger(__name__) class CollectorBase(object): DISPATCHER_NAMESPACE = 'ceilometer.dispatcher' def __init__(self, *args, **kwargs): super(CollectorBase, self).__init__(*args, **kwargs) LOG.debug('loading dispatchers from %s', self.DISPATCHER_NAMESPACE)
""" import types import six from oslo.config import cfg from nova import loadables from nova.openstack.common.gettextutils import _ from nova.openstack.common import log as logging from nova.openstack.common import timeutils compute_monitors_opts = [ cfg.MultiStrOpt('compute_available_monitors', default=['nova.compute.monitors.all_monitors'], help='Monitor classes available to the compute which may ' 'be specified more than once.'), cfg.ListOpt('compute_monitors', default=[], help='A list of monitors that can be used for getting ' 'compute metrics.'), ] CONF = cfg.CONF CONF.register_opts(compute_monitors_opts) LOG = logging.getLogger(__name__) class ResourceMonitorMeta(type): def __init__(cls, names, bases, dict_): """Metaclass that allows us to create a function map and call it later
from nova import exception from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.pci import pci_utils from nova import utils from oslo.config import cfg pci_alias_opts = [ cfg.MultiStrOpt('pci_alias', default=[], help='An alias for a PCI passthrough device requirement. ' 'This allows users to specify the alias in the ' 'extra_spec for a flavor, without needing to repeat ' 'all the PCI property requirements. For example: ' 'pci_alias = ' '{ "name": "QuicAssist", ' ' "product_id": "0443", ' ' "vendor_id": "8086", ' ' "device_type": "ACCEL" ' '} ' 'defines an alias for the Intel QuickAssist card. ' '(multi valued)') ] CONF = cfg.CONF CONF.register_opts(pci_alias_opts) LOG = logging.getLogger(__name__) _ALIAS_DEV_TYPE = ['NIC', 'ACCEL', 'GPU'] _ALIAS_CAP_TYPE = ['pci']
from quantum.common import exceptions as q_exc from quantum import context from quantum.db import api as db from quantum.db import model_base from quantum.db import models_v2 from quantum.openstack.common import log as logging LOG = logging.getLogger(__name__) DEFAULT_SVCTYPE_NAME = 'default' default_servicetype_opts = [ cfg.StrOpt('description', default='', help=_('Textual description for the default service type')), cfg.MultiStrOpt('service_definition', help=_('Defines a provider for an advanced service ' 'using the format: <service>:<plugin>[:<driver>]')) ] cfg.CONF.register_opts(default_servicetype_opts, 'default_servicetype') def parse_service_definition_opt(): """Parse service definition opts and returns result.""" results = [] svc_def_opt = cfg.CONF.default_servicetype.service_definition try: for svc_def_str in svc_def_opt: split = svc_def_str.split(':') svc_def = {'service_class': split[0], 'plugin': split[1]} try:
LOG = logging.getLogger(__name__) vmwareapi_opts = [ cfg.StrOpt('host_ip', help='Hostname or IP address for connection to VMware VC ' 'host.'), cfg.IntOpt('host_port', default=443, help='Port for connection to VMware VC host.'), cfg.StrOpt('host_username', help='Username for connection to VMware VC host.'), cfg.StrOpt('host_password', help='Password for connection to VMware VC host.', secret=True), cfg.MultiStrOpt('cluster_name', help='Name of a VMware Cluster ComputeResource.'), 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,
import pkg_resources from oslo.config import cfg import stevedore.named # noqa LOG = logging.getLogger(__name__) _generator_opts = [ cfg.StrOpt('output-file', help='Path of the file to write to. Defaults to stdout.'), cfg.IntOpt('wrap-width', default=70, help='The maximum length of help lines.'), cfg.MultiStrOpt('namespace', help='Option namespace under "oslo.config.opts" in which ' 'to query for options.'), ] def register_cli_opts(conf): """Register the formatter's CLI options with a ConfigOpts instance. Note, this must be done before the ConfigOpts instance is called to parse the configuration. :param conf: a ConfigOpts instance :raises: DuplicateOptError, ArgsAlreadyParsedError """ conf.register_cli_opts(_generator_opts)
default='keystone.common.cache.noop', help='Dogpile.cache backend module. It is recommended ' 'that Memcache (dogpile.cache.memcache) or Redis ' '(dogpile.cache.redis) be used in production ' 'deployments. Small workloads (single process) ' 'like devstack can use the dogpile.cache.memory ' 'backend.'), cfg.BoolOpt('use_key_mangler', default=True, help='Use a key-mangling function (sha1) to ensure ' 'fixed length cache-keys. This is toggle-able for ' 'debugging purposes, it is highly recommended to ' 'always leave this set to True.'), cfg.MultiStrOpt('backend_argument', default=[], 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. Comma delimited ' 'list e.g. ' 'my.dogpile.proxy.Class, my.dogpile.proxyClass2'), cfg.BoolOpt('enabled', default=False, help='Global toggle for all caching using the ' 'should_cache_fn mechanism'), cfg.BoolOpt('debug_cache_backend',
default=10, help=_("Maximum number of seconds to wait for proxy request " "to connect and complete.")), cfg.StrOpt('neutron_id', default='neutron-' + utils.get_hostname(), deprecated_name='quantum_id', help=_("User defined identifier for this Neutron deployment")), cfg.BoolOpt('add_meta_server_route', default=True, help=_("Flag to decide if a route to the metadata server " "should be injected into the VM")), ] router_opts = [ cfg.MultiStrOpt('tenant_default_router_rule', default=['*:any:any:permit'], help=_("The default router rules installed in new tenant " "routers. Repeat the config option for each rule. " "Format is <tenant>:<source>:<destination>:<action>" " Use an * to specify default for all tenants.")), cfg.IntOpt('max_router_rules', default=200, help=_("Maximum number of router rules")), ] nova_opts = [ cfg.StrOpt('vif_type', default='ovs', help=_("Virtual interface type to configure on " "Nova compute nodes")), ] # Each VIF Type can have a list of nova host IDs that are fixed to that type for i in portbindings.VIF_TYPES:
# 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.utils import importutils from neutron.agent import l3_agent from neutron.extensions import vpnaas vpn_agent_opts = [ cfg.MultiStrOpt('vpn_device_driver', default=[ 'neutron.services.vpn.device_drivers.' 'ipsec.OpenSwanDriver' ], help=_("The vpn device drivers Neutron will use")), ] cfg.CONF.register_opts(vpn_agent_opts, 'vpnagent') class VPNAgent(l3_agent.L3NATAgentWithStateReport): """VPNAgent class which can handle vpn service drivers.""" def __init__(self, host, conf=None): super(VPNAgent, self).__init__(host=host, conf=conf) self.setup_device_drivers(host) def setup_device_drivers(self, host): """Setting up device drivers.
from nova.virt.vmwareapi import volumeops LOG = logging.getLogger(__name__) 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,
from stevedore import named from ceilometer.openstack.common import gettextutils from ceilometer.openstack.common.gettextutils import _ # noqa from ceilometer.openstack.common import log from ceilometer.openstack.common import rpc from ceilometer import utils OPTS = [ cfg.StrOpt('host', default=socket.gethostname(), help='Name of this node, which must be valid in an AMQP ' 'key. Can be an opaque identifier. For ZeroMQ only, must ' 'be a valid host name, FQDN, or IP address.'), cfg.MultiStrOpt('dispatcher', deprecated_group="collector", default=['database'], help='Dispatcher to process data.'), cfg.IntOpt('collector_workers', default=1, help='Number of workers for collector service. A single ' 'collector is enabled by default.'), cfg.IntOpt('notification_workers', default=1, help='Number of workers for notification service. A single ' 'notification agent is enabled by default.'), ] cfg.CONF.register_opts(OPTS) CLI_OPTIONS = [ cfg.StrOpt('os-username', deprecated_group="DEFAULT",
disk_opts = [ cfg.StrOpt('injected_network_template', default=paths.basedir_def('nova/virt/interfaces.template'), help='Template file for injected network'), # NOTE(yamahata): ListOpt won't work because the command may include a # comma. For example: # # mkfs.ext3 -O dir_index,extent -E stride=8,stripe-width=16 # --label %(fs_label)s %(target)s # # list arguments are comma separated and there is no way to # escape such commas. # cfg.MultiStrOpt('virt_mkfs', default=[], help='Name of the mkfs commands for ephemeral device. ' 'The format is <os_type>=<mkfs command>'), cfg.BoolOpt('resize_fs_using_block_device', default=False, help='Attempt to resize the filesystem by accessing the ' 'image over a block device. This is done by the host ' 'and may not be necessary if the image contains a recent ' 'version of cloud-init. Possible mechanisms require ' 'the nbd driver (for qcow and raw), or loop (for raw).'), ] CONF = cfg.CONF CONF.register_opts(disk_opts) CONF.import_opt('default_ephemeral_format', 'nova.virt.driver') _MKFS_COMMAND = {}
cfg.BoolOpt('enable_v1_api', default=True, help=_("Deploy v1 of the Cinder API.")), cfg.BoolOpt('enable_v2_api', default=True, help=_("Deploy v2 of the Cinder API.")), cfg.BoolOpt('api_rate_limit', default=True, help='whether to rate limit the api'), cfg.ListOpt('osapi_volume_ext_list', default=[], help='Specify list of extensions to load when using osapi_' 'volume_extension option with cinder.api.contrib.' 'select_extensions'), cfg.MultiStrOpt('osapi_volume_extension', default=['cinder.api.contrib.standard_extensions'], help='osapi volume extension to load'), cfg.StrOpt('volume_manager', default='cinder.volume.manager.VolumeManager', help='full class name for the Manager for volume'), cfg.StrOpt('backup_manager', default='cinder.backup.manager.BackupManager', help='full class name for the Manager for volume backup'), cfg.StrOpt('scheduler_manager', default='cinder.scheduler.manager.SchedulerManager', help='full class name for the Manager for scheduler'), cfg.StrOpt('host', default=socket.gethostname(), help='Name of this node. This can be an opaque identifier. ' 'It is not necessarily a hostname, FQDN, or IP address.'), # NOTE(vish): default to nova for compatibility with nova installs
from sahara.openstack.common import fileutils from sahara.openstack.common._i18n import _, _LE, _LI policy_opts = [ cfg.StrOpt('policy_file', default='policy.json', help=_('The JSON file that defines policies.')), cfg.StrOpt('policy_default_rule', default='default', help=_('Default rule. Enforced when a requested rule is not ' 'found.')), cfg.MultiStrOpt('policy_dirs', default=['policy.d'], help=_('Directories where policy configuration files are ' 'stored. They can be relative to any directory ' 'in the search path defined by the config_dir ' 'option, or absolute paths. The file defined by ' 'policy_file must exist for these directories to ' 'be searched.')), ] CONF = cfg.CONF CONF.register_opts(policy_opts) LOG = logging.getLogger(__name__) _checks = {} def list_opts(): """Entry point for oslo.config-generator."""
cfg.StrOpt('admin_user'), cfg.StrOpt('admin_password', secret=True), cfg.StrOpt('admin_tenant_name'), cfg.StrOpt('connection_cacert', default=None), cfg.StrOpt('powervc_default_image_name', default='PowerVC Default Image'), cfg.BoolOpt('http_insecure', default=False), cfg.StrOpt('keystone_version', default="v3"), cfg.IntOpt('expiration_stale_duration', default=3600), # manager cfg.StrOpt('powervc_manager', default='powervc.compute.manager.PowerVCCloudManager'), # driver cfg.StrOpt('powervc_driver', default='powervc.virt.powervc.driver.PowerVCDriver'), cfg.MultiStrOpt('storage_connectivity_group'), # Hosting OS staging project name. This project must exist in the # hosting OS cfg.StrOpt('staging_project_name', default=constants.DEFAULT_STAGING_PROJECT_NAME), cfg.StrOpt('staging_user', default=constants.DEFAULT_STAGING_USER_NAME), cfg.IntOpt('max_host_disk_size', default=2907152) ] } for section in FILE_OPTIONS: for option in FILE_OPTIONS[section]: if section: CONF.register_opt(option, group=section) else:
from ceilometer import sample cfg.CONF.import_opt('nova_control_exchange', 'ceilometer.compute.notifications') cfg.CONF.import_opt('glance_control_exchange', 'ceilometer.image.notifications') cfg.CONF.import_opt('neutron_control_exchange', 'ceilometer.network.notifications') cfg.CONF.import_opt('cinder_control_exchange', 'ceilometer.volume.notifications') OPTS = [ cfg.MultiStrOpt('http_control_exchanges', default=[ cfg.CONF.nova_control_exchange, cfg.CONF.glance_control_exchange, cfg.CONF.neutron_control_exchange, cfg.CONF.cinder_control_exchange ], help="Exchanges name to listen for notifications."), ] cfg.CONF.register_opts(OPTS) class HTTPRequest(plugin_base.NotificationBase): event_types = ['http.request'] @staticmethod def get_targets(conf): """Return a sequence of oslo.messaging.Target
from nova.compute import vm_states from nova import db from nova import exception from nova.openstack.common.gettextutils import _ from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova.pci import pci_request from nova.pci import pci_stats from nova.scheduler import filters from nova.scheduler import weights host_manager_opts = [ cfg.MultiStrOpt('scheduler_available_filters', default=['nova.scheduler.filters.all_filters'], help='Filter classes available to the scheduler which may ' 'be specified more than once. An entry of ' '"nova.scheduler.filters.standard_filters" ' 'maps to all filters included with nova.'), cfg.ListOpt('scheduler_default_filters', default=[ 'RetryFilter', 'AvailabilityZoneFilter', 'RamFilter', 'ComputeFilter', 'ComputeCapabilitiesFilter', 'ImagePropertiesFilter' ], help='Which filter class names to use for filtering hosts ' 'when not specified in the request.'), cfg.ListOpt('scheduler_weight_classes', default=['nova.scheduler.weights.all_weighers'],
# License for the specific language governing permissions and limitations # under the License. from oslo.config import cfg from qonos.common import utils from qonos.openstack.common.gettextutils import _ import qonos.openstack.common.log as logging import qonos.openstack.common.wsgi as wsgi LOG = logging.getLogger(__name__) api_opts = [ cfg.BoolOpt('daemonized', default=False), cfg.IntOpt('port', default=7667), cfg.MultiStrOpt('action_overrides', default=[]), cfg.StrOpt( 'wsgi_log_format', default='%(client_ip)s "%(request_line)s" status: %(status_code)s' ' len: %(body_length)s time: %(wall_seconds).7f', help='A python format string that is used as the template to ' 'generate log lines. The following values can be formatted ' 'into it: client_ip, date_time, request_line, status_code, ' 'body_length, wall_seconds.'), ] action_opts = [ cfg.IntOpt('timeout_seconds', default=60), ] CONF = cfg.CONF
from ceilometer.openstack.common import fileutils from ceilometer.openstack.common._i18n import _, _LE, _LW from ceilometer.openstack.common import log as logging policy_opts = [ cfg.StrOpt('policy_file', default='policy.json', help=_('The JSON file that defines policies.')), cfg.StrOpt('policy_default_rule', default='default', help=_('Default rule. Enforced when a requested rule is not ' 'found.')), cfg.MultiStrOpt('policy_dirs', default=['policy.d'], help=_('The directories of policy configuration files is ' 'stored')), ] CONF = cfg.CONF CONF.register_opts(policy_opts) LOG = logging.getLogger(__name__) _checks = {} class PolicyNotAuthorized(Exception): def __init__(self, rule): msg = _("Policy doesn't allow %s to be performed.") % rule
from heat.common import messaging from heat.openstack.common import log LOG = log.getLogger(__name__) SERVICE = 'orchestration' INFO = 'INFO' ERROR = 'ERROR' notifier_opts = [ cfg.StrOpt('default_notification_level', default=INFO, help='Default notification level for outgoing notifications'), cfg.StrOpt('default_publisher_id', help='Default publisher_id for outgoing notifications'), cfg.MultiStrOpt('list_notifier_drivers', help='List of drivers to send notifications (DEPRECATED)') ] CONF = cfg.CONF CONF.register_opts(notifier_opts) def _get_default_publisher(): publisher_id = CONF.default_publisher_id if publisher_id is None: publisher_id = "%s.%s" % (SERVICE, CONF.host) return publisher_id def get_default_level(): return CONF.default_notification_level.upper()
import uuid from oslo.config import cfg from heat.openstack.common import context from heat.openstack.common.gettextutils import _ from heat.openstack.common import importutils from heat.openstack.common import jsonutils from heat.openstack.common import log as logging from heat.openstack.common import timeutils LOG = logging.getLogger(__name__) notifier_opts = [ cfg.MultiStrOpt('notification_driver', default=[], help='Driver or drivers to handle sending notifications'), cfg.StrOpt('default_notification_level', default='INFO', help='Default notification level for outgoing notifications'), cfg.StrOpt('default_publisher_id', default='$host', help='Default publisher_id for outgoing notifications'), ] CONF = cfg.CONF CONF.register_opts(notifier_opts) WARN = 'WARN' INFO = 'INFO' ERROR = 'ERROR'
cfg.BoolOpt('enable_v1_api', default=True, help=_("Deploy v1 of the Manila API.")), cfg.BoolOpt('enable_v2_api', default=True, help=_("Deploy v2 of the Manila API.")), 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.MultiStrOpt('osapi_share_extension', default=['manila.api.contrib.standard_extensions'], help='The osapi share extension to load.'), cfg.StrOpt('osapi_share_base_URL', default=None, help='Base URL that will be presented to users in links ' 'to the OpenStack Share API.', deprecated_name='osapi_compute_link_prefix'), cfg.IntOpt('osapi_max_limit', default=1000, help='The maximum number of items returned in a single ' 'response from a collection resource.'), cfg.StrOpt('sqlite_db', default='manila.sqlite', help='The filename to use with sqlite.'), cfg.BoolOpt('sqlite_synchronous', default=True,