# under the License. """Support for mounting images with qemu-nbd""" import os import time from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import utils from nova.virt.disk.mount import api LOG = logging.getLogger(__name__) nbd_opts = [ cfg.IntOpt('timeout_nbd', default=10, help='time to wait for a NBD device coming up'), cfg.IntOpt('max_nbd_devices', default=16, help='maximum number of possible nbd devices'), ] CONF = cfg.CONF CONF.register_opts(nbd_opts) class NbdMount(api.Mount): """qemu-nbd support disk images.""" mode = 'nbd' # NOTE(padraig): There are three issues with this nbd device handling
from nova.db import base from nova import exception from nova.network.api import refresh_cache from nova.network import model as network_model from nova.network import quantumv2 from nova.openstack.common import cfg from nova.openstack.common import excutils from nova.openstack.common import log as logging from nova.openstack.common import uuidutils quantum_opts = [ cfg.StrOpt('quantum_url', default='http://127.0.0.1:9696', help='URL for connecting to quantum'), cfg.IntOpt('quantum_url_timeout', default=30, help='timeout value for connecting to quantum in seconds'), cfg.StrOpt('quantum_admin_username', help='username for connecting to quantum in admin context'), cfg.StrOpt('quantum_admin_password', help='password for connecting to quantum in admin context'), cfg.StrOpt('quantum_admin_tenant_name', help='tenant name for connecting to quantum in admin context'), cfg.StrOpt('quantum_admin_auth_url', default='http://localhost:5000/v2.0', help='auth url for connecting to quantum in admin context'), cfg.StrOpt('quantum_auth_strategy', default='keystone', help='auth strategy for connecting to ' 'quantum in admin context'), ]
# under the License. """ Request Body limiting middleware. """ import webob.dec import webob.exc from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import wsgi #default request size is 112k max_request_body_size_opt = cfg.IntOpt('osapi_max_request_body_size', default=114688, help='the maximum body size ' 'per each osapi request(bytes)') CONF = cfg.CONF CONF.register_opt(max_request_body_size_opt) LOG = logging.getLogger(__name__) class RequestBodySizeLimiter(wsgi.Middleware): """Add a 'nova.context' to WSGI environ.""" def __init__(self, *args, **kwargs): super(RequestBodySizeLimiter, self).__init__(*args, **kwargs) @webob.dec.wsgify(RequestClass=wsgi.Request) def __call__(self, req): if (req.content_length > CONF.osapi_max_request_body_size
import time from nova import exception from nova.openstack.common import cfg from nova.openstack.common import lockutils from nova.openstack.common import log as logging from nova import paths from nova import utils from nova.virt.libvirt import config as vconfig from nova.virt.libvirt import utils as virtutils LOG = logging.getLogger(__name__) volume_opts = [ cfg.IntOpt('num_iscsi_scan_tries', default=3, help='number of times to rescan iSCSI target to find volume'), cfg.StrOpt('rbd_user', default=None, help='the RADOS client name for accessing rbd volumes'), cfg.StrOpt('rbd_secret_uuid', default=None, help='the libvirt uuid of the secret for the rbd_user' 'volumes'), cfg.StrOpt('nfs_mount_point_base', default=paths.state_path_def('mnt'), help='Dir where the nfs volume is mounted on the compute node'), cfg.StrOpt('nfs_mount_options', default=None, help='Mount options passed to the nfs client. See section ' 'of the nfs man page for details'),
Request Body limiting middleware. """ import webob.dec import webob.exc from nova import context from nova import flags from nova import log as logging from nova.openstack.common import cfg from nova import wsgi #default request size is 112k max_request_body_size_opt = cfg.IntOpt('osapi_max_request_body_size', default=114688, help='') FLAGS = flags.FLAGS FLAGS.register_opt(max_request_body_size_opt) LOG = logging.getLogger(__name__) class RequestBodySizeLimiter(wsgi.Middleware): """Add a 'nova.context' to WSGI environ.""" def __init__(self, *args, **kwargs): super(RequestBodySizeLimiter, self).__init__(*args, **kwargs) @webob.dec.wsgify(RequestClass=wsgi.Request) def __call__(self, req): if (req.content_length > FLAGS.osapi_max_request_body_size
san_opts = [ cfg.BoolOpt('san_thin_provision', default=True, help='Use thin provisioning for SAN volumes?'), cfg.StrOpt('san_ip', default='', help='IP address of SAN controller'), cfg.StrOpt('san_login', default='admin', help='Username for SAN controller'), cfg.StrOpt('san_password', default='', help='Password for SAN controller'), cfg.StrOpt('san_private_key', default='', help='Filename of private key to use for SSH authentication'), cfg.StrOpt('san_clustername', default='', help='Cluster name to use for creating volumes'), cfg.IntOpt('san_ssh_port', default=22, help='SSH port to use with SAN'), cfg.BoolOpt('san_is_local', default=False, help='Execute commands locally instead of over SSH; ' 'use if the volume service is running on the SAN device'), cfg.StrOpt('san_zfs_volume_base', default='rpool/', help='The ZFS path under which to create zvols for volumes.'), ] FLAGS = flags.FLAGS FLAGS.register_opts(san_opts) class SanISCSIDriver(nova.volume.driver.ISCSIDriver): """Base class for SAN-style storage volumes
default='localhost', help='Qpid broker hostname'), cfg.StrOpt('qpid_port', default='5672', help='Qpid broker port'), cfg.StrOpt('qpid_username', default='', help='Username for qpid connection'), cfg.StrOpt('qpid_password', default='', help='Password for qpid connection'), cfg.StrOpt('qpid_sasl_mechanisms', default='', help='Space separated list of SASL mechanisms to use for auth'), cfg.BoolOpt('qpid_reconnect', default=True, help='Automatically reconnect'), cfg.IntOpt('qpid_reconnect_timeout', default=0, help='Reconnection timeout in seconds'), cfg.IntOpt('qpid_reconnect_limit', default=0, help='Max reconnections before giving up'), cfg.IntOpt('qpid_reconnect_interval_min', default=0, help='Minimum seconds between reconnection attempts'), cfg.IntOpt('qpid_reconnect_interval_max', default=0, help='Maximum seconds between reconnection attempts'), cfg.IntOpt('qpid_reconnect_interval', default=0, help='Equivalent to setting max and min to the same value'), cfg.IntOpt('qpid_heartbeat', default=5,
xvp_opts = [ cfg.StrOpt('console_xvp_conf_template', default='$pybasedir/nova/console/xvp.conf.template', help='XVP conf template'), cfg.StrOpt('console_xvp_conf', default='/etc/xvp.conf', help='generated XVP conf file'), cfg.StrOpt('console_xvp_pid', default='/var/run/xvp.pid', help='XVP master process pid file'), cfg.StrOpt('console_xvp_log', default='/var/log/xvp.log', help='XVP log file'), cfg.IntOpt('console_xvp_multiplex_port', default=5900, help='port for XVP to multiplex VNC connections on'), ] FLAGS = flags.FLAGS FLAGS.register_opts(xvp_opts) LOG = logging.getLogger(__name__) class XVPConsoleProxy(object): """Sets up XVP config, and manages XVP daemon.""" def __init__(self): self.xvpconf_template = open(FLAGS.console_xvp_conf_template).read() self.host = FLAGS.host # default, set by manager. super(XVPConsoleProxy, self).__init__()
help='Username for connection to VMWare ESX host. ' 'Used only if compute_driver is ' 'vmwareapi.VMWareESXDriver.'), cfg.StrOpt('vmwareapi_host_password', default=None, help='Password for connection to VMWare ESX host. ' 'Used only if compute_driver is ' 'vmwareapi.VMWareESXDriver.'), 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.'), 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.'), cfg.StrOpt('vmwareapi_vlan_interface', default='vmnic0', help='Physical ethernet adapter name for vlan networking'), ] CONF = cfg.CONF CONF.register_opts(vmwareapi_opts) TIME_BETWEEN_API_CALL_RETRIES = 2.0 class Failure(Exception): """Base Exception class for handling task failures."""
import random import string from nova import db from nova import flags from nova import exception from nova.openstack.common import cfg from nova.scheduler import driver from nova import utils from nova import log as logging LOG = logging.getLogger('nova.scheduler.ArchitectureScheduler') ArchetectureScheduler_opts = [ cfg.IntOpt('max_cores', default=16, help='maximum number of instance cores to allow per host'), cfg.IntOpt('max_gigabytes', default=10000, help='maximum number of volume gigabytes to allow per host'), cfg.IntOpt('max_networks', default=1000, help='maximum number of networks to allow per host'), cfg.BoolOpt('skip_isolated_core_check', default=True, help='Allow overcommitting vcpus on isolated hosts'), ] FLAGS = flags.FLAGS #FLAGS.add_options(ArchetectureScheduler_opts) FLAGS.register_opts(ArchetectureScheduler_opts)
import webob from xml.dom import minidom from nova.api.openstack import wsgi from nova.api.openstack import xmlutil from nova.compute import task_states from nova.compute import utils as compute_utils from nova.compute import vm_states from nova import exception from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import quota osapi_opts = [ cfg.IntOpt('osapi_max_limit', default=1000, help='the maximum number of items returned in a single ' 'response from a collection resource'), cfg.StrOpt('osapi_compute_link_prefix', default=None, help='Base URL that will be presented to users in links ' 'to the OpenStack Compute API'), cfg.StrOpt('osapi_glance_link_prefix', default=None, help='Base URL that will be presented to users in links ' 'to glance resources'), ] CONF = cfg.CONF CONF.register_opts(osapi_opts) LOG = logging.getLogger(__name__) QUOTAS = quota.QUOTAS
from nova.cells import state as cells_state from nova.cells import utils as cells_utils from nova import context from nova import exception from nova import manager from nova.openstack.common import cfg from nova.openstack.common import importutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils cell_manager_opts = [ cfg.StrOpt('driver', default='nova.cells.rpc_driver.CellsRPCDriver', help='Cells communication driver to use'), cfg.IntOpt("instance_updated_at_threshold", default=3600, help="Number of seconds after an instance was updated " "or deleted to continue to update cells"), cfg.IntOpt("instance_update_num_instances", default=1, help="Number of instances to update per periodic task run") ] LOG = logging.getLogger(__name__) CONF = cfg.CONF CONF.register_opts(cell_manager_opts, group='cells') class CellsManager(manager.Manager): """The nova-cells manager class. This class defines RPC methods that the local cell may call. This class is NOT used for
default='$pybasedir/bin', help='Directory where nova binaries are installed'), cfg.StrOpt('state_path', default='$pybasedir', help="Top-level directory for maintaining nova's state"), cfg.StrOpt('lock_path', default='$pybasedir', help='Directory to use for lock files'), ] debug_opts = [ cfg.BoolOpt('fake_network', default=False, help='If passed, use fake network devices and addresses'), cfg.IntOpt('sql_connection_debug', default=0, help='Verbosity of SQL debugging information. 0=None, ' '100=Everything'), cfg.BoolOpt('sql_connection_trace', default=False, help='Add python stack traces to SQL as comment strings'), ] FLAGS.register_cli_opts(core_opts) FLAGS.register_cli_opts(debug_opts) global_opts = [ cfg.StrOpt('my_ip', default=_get_my_ip(), help='ip address of this host'), cfg.ListOpt('region_list', default=[],
from nova.compute import vm_states from nova import db from nova import flags from nova.openstack.common import cfg from nova.openstack.common import log as logging from nova import utils from nova.virt.libvirt import utils as virtutils LOG = logging.getLogger(__name__) imagecache_opts = [ cfg.BoolOpt('remove_unused_base_images', default=True, help='Should unused base images be removed?'), cfg.IntOpt('remove_unused_resized_minimum_age_seconds', default=3600, help='Unused resized base images younger than this will not be ' 'removed'), cfg.IntOpt('remove_unused_original_minimum_age_seconds', default=(24 * 3600), help='Unused unresized base images younger than this will not ' 'be removed'), cfg.BoolOpt('checksum_base_images', default=False, help='Write a checksum for files in _base to disk'), ] flags.DECLARE('instances_path', 'nova.compute.manager') flags.DECLARE('base_dir_name', 'nova.compute.manager') FLAGS = flags.FLAGS FLAGS.register_opts(imagecache_opts)
kombu_opts = [ cfg.StrOpt('kombu_ssl_version', default='', help='SSL version to use (valid only if SSL enabled)'), 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.StrOpt('rabbit_host', default='localhost', help='the RabbitMQ host'), cfg.IntOpt('rabbit_port', default=5672, help='the RabbitMQ port'), cfg.BoolOpt('rabbit_use_ssl', default=False, help='connect over SSL for RabbitMQ'), cfg.StrOpt('rabbit_userid', default='guest', help='the RabbitMQ userid'), cfg.StrOpt('rabbit_password', default='guest', help='the RabbitMQ password'), cfg.StrOpt('rabbit_virtual_host', default='/', help='the RabbitMQ virtual host'), cfg.IntOpt('rabbit_retry_interval', default=1, help='how frequently to retry connecting with RabbitMQ'), cfg.IntOpt('rabbit_retry_backoff', default=2,
from nova.compute import instance_types from nova.compute import task_states from nova.compute import vm_states from nova import context from nova import db from nova import exception from nova import notifications from nova.openstack.common import cfg from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import lockutils from nova.openstack.common import log as logging resource_tracker_opts = [ cfg.IntOpt('reserved_host_disk_mb', default=0, help='Amount of disk in MB to reserve for the host'), cfg.IntOpt('reserved_host_memory_mb', default=512, help='Amount of memory in MB to reserve for the host'), cfg.StrOpt('compute_stats_class', default='nova.compute.stats.Stats', help='Class that will manage stats for the local compute host') ] CONF = cfg.CONF CONF.register_opts(resource_tracker_opts) LOG = logging.getLogger(__name__) COMPUTE_RESOURCE_SEMAPHORE = claims.COMPUTE_RESOURCE_SEMAPHORE
A remote procedure call (rpc) abstraction. For some wrappers that add message versioning to rpc, see: rpc.dispatcher rpc.proxy """ from nova.openstack.common import cfg from nova.openstack.common import importutils rpc_opts = [ cfg.StrOpt('rpc_backend', default='nova.rpc.impl_kombu', help="The messaging module to use, defaults to kombu."), cfg.IntOpt('rpc_thread_pool_size', default=64, help='Size of RPC thread pool'), cfg.IntOpt('rpc_conn_pool_size', default=30, help='Size of RPC connection pool'), cfg.IntOpt('rpc_response_timeout', default=60, help='Seconds to wait for a response from call or multicall'), cfg.IntOpt('rpc_cast_timeout', default=30, help='Seconds to wait before a cast expires (TTL). ' 'Only supported by impl_zmq.'), cfg.ListOpt('allowed_rpc_exception_modules', default=['nova.exception'], help='Modules of exceptions that are permitted to be recreated' 'upon receiving exception data from an rpc call.'),
from nova.volume import volume_types LOG = logging.getLogger(__name__) volume_opts = [ cfg.StrOpt('volume_group', default='nova-volumes', help='Name for the VG that will contain exported volumes'), cfg.StrOpt('num_shell_tries', default=3, help='number of times to attempt to run flakey shell commands'), cfg.StrOpt('num_iscsi_scan_tries', default=3, help='number of times to rescan iSCSI target to find volume'), cfg.IntOpt('iscsi_num_targets', default=100, help='Number of iscsi target ids per host'), cfg.StrOpt('iscsi_target_prefix', default='iqn.2010-10.org.openstack:', help='prefix for iscsi volumes'), cfg.StrOpt('iscsi_ip_address', default='$my_ip', help='use this ip for iscsi'), cfg.IntOpt('iscsi_port', default=3260, help='The port that the iSCSI daemon is listening on'), cfg.StrOpt('rbd_pool', default='rbd', help='the rbd pool in which volumes are stored'), ]
# 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 nova import flags from nova import utils from nova.openstack.common import cfg billing_opts = [ cfg.StrOpt('farmer_listen', default='localhost', help='IP address for dough farmer to bind.'), cfg.IntOpt('farmer_listen_port', default=5558, help='Port for dough farmer to bind.'), cfg.StrOpt('keystone_username', default='someusername', help='Username for keystone client.'), cfg.StrOpt('keystone_password', default='somepassword', help='Password for keystone client.'), cfg.StrOpt('keystone_tenant_name', default='sometenantname', help='Tenant name for keystone client.'), cfg.StrOpt('keystone_auth_url', default='someurl', help='Auth URL for keystone client.'), cfg.StrOpt('demux_host', default='somehost', help='Host for demux client.'),
import webob from nova import flags from nova.openstack.common import cfg from nova import utils from nova import wsgi s3_opts = [ cfg.StrOpt('buckets_path', default='$state_path/buckets', help='path to s3 buckets'), cfg.StrOpt('s3_listen', default="0.0.0.0", help='IP address for S3 API to listen'), cfg.IntOpt('s3_listen_port', default=3333, help='port for s3 api to listen'), ] FLAGS = flags.FLAGS FLAGS.register_opts(s3_opts) def get_wsgi_server(): return wsgi.Server("S3 Objectstore", S3Application(FLAGS.buckets_path), port=FLAGS.s3_listen_port, host=FLAGS.s3_listen) class S3Application(wsgi.Router):
from nova.openstack.common import timeutils monkey_patch_opts = [ cfg.BoolOpt('monkey_patch', default=False, help='Whether to log monkey patching'), cfg.ListOpt('monkey_patch_modules', default=[ 'nova.api.ec2.cloud:nova.notifier.api.notify_decorator', 'nova.compute.api:nova.notifier.api.notify_decorator' ], help='List of modules/decorators to monkey patch'), ] utils_opts = [ cfg.IntOpt('password_length', default=12, help='Length of generated instance admin passwords'), cfg.BoolOpt('disable_process_locking', default=False, help='Whether to disable inter-process locks'), cfg.StrOpt('instance_usage_audit_period', default='month', help='time period to generate instance usages for. ' 'Time period must be hour, day, month or year'), cfg.StrOpt('rootwrap_config', default="/etc/nova/rootwrap.conf", help='Path to the rootwrap configuration file to use for ' 'running commands as root'), ] CONF = cfg.CONF CONF.register_opts(monkey_patch_opts)
(addr, port) = csock.getsockname() csock.close() return addr except socket.error: return "127.0.0.1" 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 hostname or ip'), cfg.IntOpt('glance_port', default=9292, help='default glance port'), cfg.StrOpt('glance_protocol', default='http', help='Default protocol to use when connecting to glance. ' 'Set to https for SSL.'), cfg.IntOpt('s3_port', default=3333, help='port used when accessing the s3 api'), cfg.StrOpt('s3_host', default='$my_ip', help='hostname or ip for openstack to use when accessing ' 'the s3 api'), cfg.StrOpt('cert_topic', default='cert', help='the topic cert nodes listen on'),
xenapi_opts = [ cfg.StrOpt('xenapi_connection_url', default=None, help='URL for connection to XenServer/Xen Cloud Platform. ' 'Required if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('xenapi_connection_username', default='root', help='Username for connection to XenServer/Xen Cloud Platform. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('xenapi_connection_password', default=None, help='Password for connection to XenServer/Xen Cloud Platform. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.IntOpt('xenapi_connection_concurrent', default=5, help='Maximum number of concurrent XenAPI connections. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.FloatOpt('xenapi_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('xenapi_check_host', default=True, help='Ensure compute service is running on host XenAPI ' 'connects to.'), cfg.IntOpt('xenapi_vhd_coalesce_max_attempts', default=5, help='Max number of times to poll for VHD to coalesce. ' 'Used only if compute_driver=xenapi.XenAPIDriver'), cfg.StrOpt('xenapi_sr_base_path', default='/var/run/sr-mount',
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.'), cfg.StrOpt('ssl_ca_file', default=None, help="CA certificate file to use to verify " "connecting clients"), cfg.StrOpt('ssl_cert_file', default=None, help="SSL certificate of API server"), cfg.StrOpt('ssl_key_file', default=None, help="SSL private key of API server"), cfg.IntOpt('tcp_keepidle', default=600, help="Sets the value of TCP_KEEPIDLE in seconds for each " "server socket. Not supported on OS X.") ] CONF = cfg.CONF CONF.register_opts(wsgi_opts) LOG = logging.getLogger(__name__) class Server(object): """Server class to manage a WSGI server, serving a WSGI application.""" default_pool_size = 1000 def __init__(self, name,
Simple Scheduler - for Volumes Note: Deprecated in Folsom. Will be removed along with nova-volumes """ from nova import db from nova import exception from nova import flags from nova.openstack.common import cfg from nova.scheduler import chance from nova.scheduler import driver from nova import utils simple_scheduler_opts = [ cfg.IntOpt("max_gigabytes", default=10000, help="maximum number of volume gigabytes to allow per host"), ] FLAGS = flags.FLAGS FLAGS.register_opts(simple_scheduler_opts) class SimpleScheduler(chance.ChanceScheduler): """Implements Naive Scheduler that tries to find least loaded host.""" def schedule_create_volume(self, context, volume_id, *_args, **_kwargs): """Picks a host that is up and has the fewest volumes.""" elevated = context.elevated() volume_ref = db.volume_get(context, volume_id) availability_zone = volume_ref.get('availability_zone')
from nova import exception from nova import manager from nova.openstack.common import cfg from nova import service from nova import test from nova import wsgi test_service_opts = [ cfg.StrOpt("fake_manager", default="nova.tests.test_service.FakeManager", help="Manager for testing"), cfg.StrOpt("test_service_listen", default='127.0.0.1', help="Host to bind test service to"), cfg.IntOpt("test_service_listen_port", default=0, help="Port number to bind test service to"), ] CONF = cfg.CONF CONF.register_opts(test_service_opts) class FakeManager(manager.Manager): """Fake manager for tests.""" def test_method(self): return 'manager' class ExtendedService(service.Service): def test_method(self):
# 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 nova.openstack.common import cfg from nova.openstack.common import log as logging from nova.scheduler import filters LOG = logging.getLogger(__name__) max_io_ops_per_host_opt = cfg.IntOpt("max_io_ops_per_host", default=8, help="Ignore hosts that have too many builds/resizes/snaps/migrations") CONF = cfg.CONF CONF.register_opt(max_io_ops_per_host_opt) class IoOpsFilter(filters.BaseHostFilter): """Filter out hosts with too many concurrent I/O operations.""" def host_passes(self, host_state, filter_properties): """Use information about current vm and task states collected from compute node statistics to decide whether to filter. """ num_io_ops = host_state.num_io_ops max_io_ops = CONF.max_io_ops_per_host
import json import zmq from nova import utils from nova import flags from nova.openstack.common import cfg from nova import log as logging utils.default_flagfile(filename='/etc/dough/dough.conf') logging.setup() api_opts = [ cfg.StrOpt('api_host', default='127.0.0.1', help='IP address of dough API.'), cfg.IntOpt('api_port', default=8783, help='Port of dough api.'), ] cli_opts = [ cfg.StrOpt('monthly_report', short='m', default='name1', help='monthly_report.'), cfg.StrOpt('subscribe_item', short='s', default='default1', help='subscribe_item.'), cfg.StrOpt('unsubscribe_item', short='u', default='default1', help='unsubscribe_item.'),
from nova import context from nova import exception from nova.openstack.common import cfg from nova.openstack.common import importutils from nova.openstack.common import jsonutils from nova.openstack.common import log as logging from nova.openstack.common import timeutils from nova import utils from nova import wsgi LOG = logging.getLogger(__name__) ec2_opts = [ cfg.IntOpt('lockout_attempts', default=5, help='Number of failed auths before lockout.'), cfg.IntOpt('lockout_minutes', default=15, help='Number of minutes to lockout if triggered.'), cfg.IntOpt('lockout_window', default=15, help='Number of minutes for lockout window.'), cfg.StrOpt('keystone_ec2_url', default='http://localhost:5000/v2.0/ec2tokens', help='URL to get token from ec2 request.'), cfg.BoolOpt('ec2_private_dns_show_ip', default=False, help='Return the IP address as private dns hostname in ' 'describe instances'), cfg.BoolOpt('ec2_strict_validation',
cfg.StrOpt('networks_path', default='$state_path/networks', help='Location to keep network config files'), cfg.StrOpt('public_interface', default='eth0', help='Interface for public IP addresses'), cfg.StrOpt('network_device_mtu', default=None, help='MTU setting for vlan'), cfg.StrOpt('dhcpbridge', default='$bindir/nova-dhcpbridge', help='location of nova-dhcpbridge'), cfg.StrOpt('routing_source_ip', default='$my_ip', help='Public IP of network host'), cfg.IntOpt('dhcp_lease_time', default=120, help='Lifetime of a DHCP lease in seconds'), cfg.StrOpt('dns_server', default=None, help='if set, uses specific dns server for dnsmasq'), cfg.ListOpt('dmz_cidr', default=[], help='A list of dmz range that should be accepted'), cfg.StrOpt('dnsmasq_config_file', default='', help='Override the default dnsmasq settings with this file'), cfg.StrOpt('linuxnet_interface_driver', default='nova.network.linux_net.LinuxBridgeInterfaceDriver', help='Driver used to create ethernet devices.'), cfg.StrOpt('linuxnet_ovs_integration_bridge', default='br-int',