Fix indentation

Minor cleanup. No code changes

Change-Id: Id0fb9dbe60490c8be8ec7b580a72a8ac73770a12
This commit is contained in:
Akash Gangil 2015-11-02 10:19:19 -08:00
parent 58e4471372
commit 6f7015fe2a
3 changed files with 13 additions and 17 deletions

View File

@ -50,7 +50,7 @@ def nsx_get_static_bindings_by_edge(edge_id):
def neutron_get_static_bindings_by_edge(edge_id):
neutron_db_dhcp_bindings = set()
for binding in nsxv_db.get_dhcp_static_bindings_by_edge(
neutron_db.context.session, edge_id):
neutron_db.context.session, edge_id):
neutron_db_dhcp_bindings.add(
(binding.edge_id, binding.mac_address.lower(),
binding.binding_id.lower()))
@ -66,13 +66,12 @@ def list_missing_dhcp_bindings(resource, event, trigger, **kwargs):
"""
for (edge_id, _) in nsxv_db.get_nsxv_dhcp_bindings_count_per_edge(
neutron_db.context.session):
neutron_db.context.session):
LOG.info(_LI("%s"), "=" * 60)
LOG.info(_LI("For edge: %s"), edge_id)
nsx_dhcp_static_bindings = nsx_get_static_bindings_by_edge(
edge_id)
neutron_dhcp_static_bindings = neutron_get_static_bindings_by_edge(
edge_id)
nsx_dhcp_static_bindings = nsx_get_static_bindings_by_edge(edge_id)
neutron_dhcp_static_bindings = \
neutron_get_static_bindings_by_edge(edge_id)
LOG.info(_LI("# of DHCP bindings in Neutron DB: %s"),
len(neutron_dhcp_static_bindings))
LOG.info(_LI("# of DHCP bindings on NSXv backend: %s"),

View File

@ -40,9 +40,8 @@ def get_nsxv_edges():
def nsx_list_edges(resource, event, trigger, **kwargs):
"""List edges from NSXv backend"""
edges = get_nsxv_edges()
LOG.info(formatters.output_formatter(
constants.EDGES, edges,
['id']))
LOG.info(formatters.output_formatter(constants.EDGES, edges,
['id']))
def get_router_edge_bindings():
@ -54,8 +53,8 @@ def get_router_edge_bindings():
def neutron_list_router_edge_bindings(resource, event, trigger, **kwargs):
"""List NSXv edges from Neutron DB"""
edges = get_router_edge_bindings()
LOG.info(formatters.output_formatter(
constants.EDGES, edges, ['edge_id', 'router_id']))
LOG.info(formatters.output_formatter(constants.EDGES, edges,
['edge_id', 'router_id']))
def get_orphaned_edges():

View File

@ -38,9 +38,8 @@ def get_spoofguard_policies():
def nsx_list_spoofguard_policies(resource, event, trigger, **kwargs):
"""List spoofguard policies from NSXv backend"""
policies = get_spoofguard_policies()
LOG.info(formatters.output_formatter(
constants.SPOOFGUARD_POLICY, policies,
['policyId', 'name']))
LOG.info(formatters.output_formatter(constants.SPOOFGUARD_POLICY, policies,
['policyId', 'name']))
def get_spoofguard_policy_network_mappings():
@ -53,9 +52,8 @@ def get_spoofguard_policy_network_mappings():
def neutron_list_spoofguard_policy_mappings(resource, event, trigger,
**kwargs):
mappings = get_spoofguard_policy_network_mappings()
LOG.info(formatters.output_formatter(
constants.SPOOFGUARD_POLICY, mappings,
['network_id', 'policy_id']))
LOG.info(formatters.output_formatter(constants.SPOOFGUARD_POLICY, mappings,
['network_id', 'policy_id']))
def get_missing_spoofguard_policy_mappings():