V2T migration: do not create SG on NSX during api-replay

Change-Id: Id9aa2363169fa46ceeeaa5f2d069d647ae673144
This commit is contained in:
asarfaty 2020-10-04 10:11:56 +02:00 committed by Adit Sarfaty
parent ad6fd2d11b
commit ce99ca0fad
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