Beispiel #1
0
 def _output_non_output_actions(flood_acts):
     output_ports = set()
     all_nonoutput_actions = set()
     deduped_acts = []
     # avoid dedupe_ofmsgs() here, as it's expensive - most of the time we are comparing
     # port numbers as integers which is much cheaper.
     for act in flood_acts:
         if valve_of.is_output(act):
             if act.port in output_ports:
                 continue
             output_ports.add(act.port)
         else:
             str_act = str(act)
             if str_act in all_nonoutput_actions:
                 continue
             all_nonoutput_actions.add(str_act)
         deduped_acts.append(act)
     nonoutput_actions = all_nonoutput_actions - set([str(valve_of.pop_vlan())])
     return (deduped_acts, output_ports, nonoutput_actions)
Beispiel #2
0
 def _output_non_output_actions(flood_acts):
     output_ports = set()
     all_nonoutput_actions = set()
     deduped_acts = []
     # avoid dedupe_ofmsgs() here, as it's expensive - most of the time we are comparing
     # port numbers as integers which is much cheaper.
     for act in flood_acts:
         if valve_of.is_output(act):
             if act.port in output_ports:
                 continue
             output_ports.add(act.port)
         else:
             str_act = str(act)
             if str_act in all_nonoutput_actions:
                 continue
             all_nonoutput_actions.add(str_act)
         deduped_acts.append(act)
     nonoutput_actions = all_nonoutput_actions - set([str(valve_of.pop_vlan())])
     return (deduped_acts, output_ports, nonoutput_actions)
Beispiel #3
0
 def _output_ports_from_actions(flood_acts):
     return {act.port for act in flood_acts if valve_of.is_output(act)}
Beispiel #4
0
 def _output_ports_from_actions(flood_acts):
     return {act.port for act in flood_acts if valve_of.is_output(act)}