Merge "Admin Utility: Fix output for missing edges and spoofguard policy"
This commit is contained in:
commit
4456fab4f0
@ -76,8 +76,14 @@ def nsx_list_orphaned_edges(resource, event, trigger, **kwargs):
|
||||
Orphaned edges are NSXv edges that exist on NSXv backend but
|
||||
don't have a corresponding binding in Neutron DB
|
||||
"""
|
||||
LOG.info(_LI("NSXv edges present on NSXv backend but not present "
|
||||
"in Neutron DB"))
|
||||
orphaned_edges = get_orphaned_edges()
|
||||
LOG.info(orphaned_edges)
|
||||
if not orphaned_edges:
|
||||
LOG.info(_LI("\nNo orphaned edges found."
|
||||
"\nNeutron DB and NSXv backend are in sync\n"))
|
||||
else:
|
||||
LOG.info(orphaned_edges)
|
||||
|
||||
|
||||
@admin_utils.output_header
|
||||
|
@ -78,9 +78,14 @@ def nsx_list_missing_spoofguard_policies(resource, event, trigger,
|
||||
Spoofguard policies that have a binding in Neutron Db but there is
|
||||
no policy on NSXv backend to back it.
|
||||
"""
|
||||
LOG.info(_LI("Spoofguard policies in Neutron Db but on present on NSXv"))
|
||||
LOG.info(_LI("Spoofguard policies in Neutron Db but not present on NSXv"))
|
||||
missing_policies = get_missing_spoofguard_policy_mappings()
|
||||
LOG.info(missing_policies)
|
||||
if not missing_policies:
|
||||
LOG.info(_LI("\nNo missing spoofguard policies found."
|
||||
"\nNeutron DB and NSXv backend are in sync\n"))
|
||||
else:
|
||||
LOG.info(formatters.output_formatter(
|
||||
constants.SPOOFGUARD_POLICY, missing_policies, ['policy_id']))
|
||||
|
||||
|
||||
registry.subscribe(neutron_list_spoofguard_policy_mappings,
|
||||
|
Loading…
Reference in New Issue
Block a user