diff --git a/tools/python_nsxadmin/admin/plugins/nsxv/resources/edges.py b/tools/python_nsxadmin/admin/plugins/nsxv/resources/edges.py index ae2db77822..0e0910bfbe 100644 --- a/tools/python_nsxadmin/admin/plugins/nsxv/resources/edges.py +++ b/tools/python_nsxadmin/admin/plugins/nsxv/resources/edges.py @@ -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 diff --git a/tools/python_nsxadmin/admin/plugins/nsxv/resources/spoofguard_policy.py b/tools/python_nsxadmin/admin/plugins/nsxv/resources/spoofguard_policy.py index c70f642d5a..ba23a6d56a 100644 --- a/tools/python_nsxadmin/admin/plugins/nsxv/resources/spoofguard_policy.py +++ b/tools/python_nsxadmin/admin/plugins/nsxv/resources/spoofguard_policy.py @@ -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,