Merge "config options: centralize xenserver vmops opts"

This commit is contained in:
Jenkins 2016-04-06 14:14:46 +00:00 committed by Gerrit Code Review
commit af6403365b
3 changed files with 14 additions and 16 deletions

View File

@ -338,12 +338,25 @@ xenapi_opts = [
'(ex. /dev/xvdb -> /dev/sdb)'),
]
xenapi_vmops_opts = [
cfg.IntOpt('running_timeout',
default=60,
help='Number of seconds to wait for instance '
'to go to running state'),
cfg.StrOpt('vif_driver',
default='nova.virt.xenapi.vif.XenAPIBridgeDriver',
help='The XenAPI VIF driver using XenServer Network APIs.'),
cfg.StrOpt('image_upload_handler',
default='nova.virt.xenapi.image.glance.GlanceStore',
help='Dom0 plugin driver used to handle image uploads.'),
]
ALL_XENSERVER_OPTS = (xenapi_agent_opts +
xenapi_session_opts +
xenapi_torrent_opts +
xenapi_vm_utils_opts +
xenapi_opts)
xenapi_opts +
xenapi_vmops_opts)
def register_opts(conf):

View File

@ -63,7 +63,6 @@ def list_opts():
itertools.chain(
[nova.virt.xenapi.vif.xenapi_ovs_integration_bridge_opt],
nova.virt.xenapi.pool.xenapi_pool_opts,
nova.virt.xenapi.vmops.xenapi_vmops_opts,
nova.virt.xenapi.volume_utils.xenapi_volume_utils_opts,
)),
]

View File

@ -25,7 +25,6 @@ import zlib
import eventlet
from eventlet import greenthread
import netaddr
from oslo_config import cfg
from oslo_log import log as logging
from oslo_serialization import jsonutils
from oslo_utils import excutils
@ -63,21 +62,8 @@ from nova.virt.xenapi import volumeops
LOG = logging.getLogger(__name__)
xenapi_vmops_opts = [
cfg.IntOpt('running_timeout',
default=60,
help='Number of seconds to wait for instance '
'to go to running state'),
cfg.StrOpt('vif_driver',
default='nova.virt.xenapi.vif.XenAPIBridgeDriver',
help='The XenAPI VIF driver using XenServer Network APIs.'),
cfg.StrOpt('image_upload_handler',
default='nova.virt.xenapi.image.glance.GlanceStore',
help='Dom0 plugin driver used to handle image uploads.'),
]
CONF = nova.conf.CONF
CONF.register_opts(xenapi_vmops_opts, 'xenserver')
CONF.import_opt('host', 'nova.netconf')
DEFAULT_FIREWALL_DRIVER = "%s.%s" % (