diff --git a/vmware_nsx/common/config.py b/vmware_nsx/common/config.py index 478e289757..fe38cb3bdc 100644 --- a/vmware_nsx/common/config.py +++ b/vmware_nsx/common/config.py @@ -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 diff --git a/vmware_nsx/plugins/dvs/plugin.py b/vmware_nsx/plugins/dvs/plugin.py index 2004006340..0815c7de95 100644 --- a/vmware_nsx/plugins/dvs/plugin.py +++ b/vmware_nsx/plugins/dvs/plugin.py @@ -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]) diff --git a/vmware_nsx/plugins/nsx_mh/plugin.py b/vmware_nsx/plugins/nsx_mh/plugin.py index 6f679506b7..7331253ef7 100644 --- a/vmware_nsx/plugins/nsx_mh/plugin.py +++ b/vmware_nsx/plugins/nsx_mh/plugin.py @@ -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