Merge "Use config choices for replication_mode option"

This commit is contained in:
Jenkins 2015-11-23 14:30:25 +00:00 committed by Gerrit Code Review
commit 5fef099084
3 changed files with 1 additions and 10 deletions

View File

@ -74,6 +74,7 @@ base_opts = [
deprecated_group='NVP',
help=_("The mode used to implement DHCP/metadata services.")),
cfg.StrOpt('replication_mode', default=ReplicationModes.SERVICE,
choices=(ReplicationModes.SERVICE, ReplicationModes.SOURCE),
help=_("The default option leverages service nodes to perform"
" packet replication though one could set to this to "
"'source' to perform replication locally. This is useful"
@ -345,14 +346,6 @@ cfg.CONF.register_opts(base_opts, group="NSX")
cfg.CONF.register_opts(sync_opts, group="NSX_SYNC")
def validate_config_options():
if cfg.CONF.NSX.replication_mode not in (ReplicationModes.SERVICE,
ReplicationModes.SOURCE):
error = (_("Invalid replication_mode: %s") %
cfg.CONF.NSX.replication_mode)
raise nsx_exc.NsxPluginException(err_msg=error)
def validate_nsxv_config_options():
if (cfg.CONF.nsxv.manager_uri is None or
cfg.CONF.nsxv.user is None or

View File

@ -78,7 +78,6 @@ class NsxDvsV2(addr_pair_db.AllowedAddressPairsMixin,
def __init__(self):
super(NsxDvsV2, self).__init__()
config.validate_config_options()
LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled())
neutron_extensions.append_api_extensions_path(
[vmware_nsx.NSX_EXT_PATH])

View File

@ -134,7 +134,6 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
def __init__(self):
super(NsxPluginV2, self).__init__()
config.validate_config_options()
# TODO(salv-orlando): Replace These dicts with
# collections.defaultdict for better handling of default values
# Routines for managing logical ports in NSX