diff --git a/vmware_nsx/extensions/dns_search_domain.py b/vmware_nsx/extensions/dns_search_domain.py index 090a999812..0ef741a575 100644 --- a/vmware_nsx/extensions/dns_search_domain.py +++ b/vmware_nsx/extensions/dns_search_domain.py @@ -64,7 +64,7 @@ def _validate_dns_search_domain(data, max_len=attributes.NAME_MAX_LEN): return msg -validators.validators['type:dns_search_domain'] = (_validate_dns_search_domain) +validators.add_validator('dns_search_domain', _validate_dns_search_domain) DNS_SEARCH_DOMAIN = 'dns_search_domain' diff --git a/vmware_nsx/extensions/networkgw.py b/vmware_nsx/extensions/networkgw.py index 01f42db741..e5b2e0a4c0 100644 --- a/vmware_nsx/extensions/networkgw.py +++ b/vmware_nsx/extensions/networkgw.py @@ -151,8 +151,8 @@ nw_gw_quota_opts = [ cfg.CONF.register_opts(nw_gw_quota_opts, 'QUOTAS') -validators.validators['type:device_list'] = _validate_device_list -validators.validators['type:connector_type'] = _validate_connector_type +validators.add_validator('device_list', _validate_device_list) +validators.add_validator('connector_type', _validate_connector_type) class Networkgw(extensions.ExtensionDescriptor): diff --git a/vmware_nsx/plugins/nsx_v3/plugin.py b/vmware_nsx/plugins/nsx_v3/plugin.py index 449bc894ff..92af31630d 100644 --- a/vmware_nsx/plugins/nsx_v3/plugin.py +++ b/vmware_nsx/plugins/nsx_v3/plugin.py @@ -2623,7 +2623,7 @@ class NsxV3Plugin(agentschedulers_db.AZDhcpAgentSchedulerDbMixin, if cfg.CONF.api_replay_mode: def _pass(data, _dummy=None): pass - ext_sg.validators.validators['type:name_not_default'] = _pass + validators.add_validator('name_not_default', _pass) def get_security_groups(self, context, filters=None, fields=None, sorts=None, limit=None,