admin utility enabled nsx-update for security groups (V and T)

Provide ability to update security groups on NSX

Change-Id: Ia16dfcd5618a3584bc9d0acfbf8a0de155997e58
This commit is contained in:
Gary Kotton 2018-02-12 08:17:00 -08:00
parent 1735720753
commit 5ffb1de1e6
3 changed files with 10 additions and 2 deletions

View File

@ -219,7 +219,7 @@ Security Groups, Firewall and Spoofguard
nsxadmin --resource security-groups --operation list
nsxadmin -r nsx-security-groups -o {list, list-missmatches}
nsxadmin -r firewall-sections -o {list, list-missmatches}
nsxadmin -r firewall-sections -o {list, list-missmatches, nsx-update}
- Spoofguard support::

View File

@ -95,7 +95,7 @@ class NeutronSecurityGroupDB(
return False
def delete_security_group_section_mapping(self, sg_id):
with self.db_api.context_manager.writer.using(self.context):
with db_api.context_manager.writer.using(self.context):
fw_mapping = self.context.session.query(
nsxv_models.NsxvSecurityGroupSectionMapping).filter_by(
neutron_id=sg_id).one_or_none()
@ -433,6 +433,10 @@ registry.subscribe(reorder_firewall_sections,
constants.FIREWALL_SECTIONS,
shell.Operations.NSX_REORDER.value)
registry.subscribe(fix_security_groups,
constants.FIREWALL_SECTIONS,
shell.Operations.NSX_UPDATE.value)
registry.subscribe(firewall_update_cluster_default_fw_section,
constants.FIREWALL_SECTIONS,
shell.Operations.NSX_UPDATE.value)

View File

@ -300,3 +300,7 @@ def migrate_nsgroups_to_dynamic_criteria(resource, event, trigger, **kwargs):
registry.subscribe(migrate_nsgroups_to_dynamic_criteria,
constants.FIREWALL_NSX_GROUPS,
shell.Operations.MIGRATE_TO_DYNAMIC_CRITERIA.value)
registry.subscribe(fix_security_groups,
constants.FIREWALL_SECTIONS,
shell.Operations.NSX_UPDATE.value)