def _is_firewall_required(vif):
 if vif.is_neutron_filtering_enabled():
  return False
 if (CONF.firewall_driver != 'nova.virt.firewall.NoopFirewallDriver'):
  return True
 return False

def _is_firewall_required ( vif ) : if vif . is_neutron_filtering_enabled ( ) : return False if ( CONF . firewall_driver != 'nova.virt.firewall.NoopFirewallDriver' ) : return True return False
check if local firewall is required .