コード例 #1
0
 def run(self):
     for sw in self.environment.switches.values():
         self.prepare_snake_flows(sw.dpid,
                                  self.current_packet_size(),
                                  outer_vlan=46,
                                  inner_vlan=47)
         timestamp = int(datetime.now().timestamp())
         self.time_metrics[-1].timestamps[timestamp] = "start"
         logging.info(
             'Switch under full load adding connected_devices_vlan rules')
         for flow in pipeline_flows.flow_egress_vlan(sw.dpid,
                                                     sw.snake_start_port,
                                                     OFPP_IN_PORT,
                                                     outer_vid=46,
                                                     inner_vid=47,
                                                     priority=2000):
             self.add_flow(flow)
         for flow in pipeline_flows.flows_connected_devices_with_vlan(
                 sw.dpid,
                 sw.snake_end_port,
                 OFPP_IN_PORT,
                 outer_vid=46,
                 inner_vid=47,
                 priority=2000):
             self.add_flow(flow)
コード例 #2
0
 def run(self):
     for sw in self.environment.switches.values():
         self.prepare_snake_flows(sw.dpid, self.current_packet_size(),
                                  outer_vlan=46, inner_vlan=47)
         logging.info(
             'Switch under full load adding ingress_egress_qnq_vlan rules')
         for flow in pipeline_flows.flow_egress_vlan(
                 sw.dpid, sw.snake_start_port, OFPP_IN_PORT, outer_vid=46,
                 inner_vid=47, priority=2000):
             self.add_flow(flow)
         for flow in pipeline_flows.flow_ingress_vlan(
                 sw.dpid, sw.snake_end_port, OFPP_IN_PORT, outer_vid=46,
                 inner_vid=47, priority=2000):
             self.add_flow(flow)