Merge "V2T migration: do not create SG on NSX during api-replay" into stable/train

This commit is contained in:
Zuul 2020-10-06 09:12:07 +00:00 committed by Gerrit Code Review
commit 1bf530cb5f
1 changed files with 8 additions and 0 deletions

View File

@ -3844,6 +3844,10 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
if cfg.CONF.api_replay_mode:
self._handle_api_replay_default_sg(context, secgroup_db)
if cfg.CONF.api_replay_mode:
# Do not create backend resources for SG with api_replay
return secgroup_db
try:
# create all the rule entries
sg_rules = secgroup_db['security_group_rules']
@ -3965,6 +3969,10 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
self._process_security_group_rule_properties(
context, rules_db[i], r['security_group_rule'])
if cfg.CONF.api_replay_mode:
# Do not create backend resources for SG with api_replay
return rules_db
is_provider_sg = sg.get(provider_sg.PROVIDER)
secgroup_logging = self._is_security_group_logged(context, sg_id)
category = (NSX_P_PROVIDER_SECTION_CATEGORY if is_provider_sg