V2T migration: do not create SG on NSX during api-replay
Change-Id: Id9aa2363169fa46ceeeaa5f2d069d647ae673144
This commit is contained in:
parent
ad6fd2d11b
commit
ce99ca0fad
|
@ -3844,6 +3844,10 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
||||||
if cfg.CONF.api_replay_mode:
|
if cfg.CONF.api_replay_mode:
|
||||||
self._handle_api_replay_default_sg(context, secgroup_db)
|
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:
|
try:
|
||||||
# create all the rule entries
|
# create all the rule entries
|
||||||
sg_rules = secgroup_db['security_group_rules']
|
sg_rules = secgroup_db['security_group_rules']
|
||||||
|
@ -3965,6 +3969,10 @@ class NsxPolicyPlugin(nsx_plugin_common.NsxPluginV3Base):
|
||||||
self._process_security_group_rule_properties(
|
self._process_security_group_rule_properties(
|
||||||
context, rules_db[i], r['security_group_rule'])
|
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)
|
is_provider_sg = sg.get(provider_sg.PROVIDER)
|
||||||
secgroup_logging = self._is_security_group_logged(context, sg_id)
|
secgroup_logging = self._is_security_group_logged(context, sg_id)
|
||||||
category = (NSX_P_PROVIDER_SECTION_CATEGORY if is_provider_sg
|
category = (NSX_P_PROVIDER_SECTION_CATEGORY if is_provider_sg
|
||||||
|
|
Loading…
Reference in New Issue