コード例 #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_vxlan rules')
         for flow in pipeline_flows.flow_egress_vxlan(sw.dpid,
                                                      sw.snake_start_port,
                                                      OFPP_IN_PORT,
                                                      outer_vid=46,
                                                      inner_vid=47,
                                                      priority=2000):
             self.add_flow(flow)
         self.add_flow(
             basic_flows.flow_vlan_push_pop(sw.dpid,
                                            sw.snake_start_port,
                                            OFPP_IN_PORT,
                                            'push',
                                            outer_vid=46,
                                            inner_vid=47,
                                            priority=1500,
                                            table_id=4))
         for flow in pipeline_flows.flows_connected_devices_with_vxlan(
                 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)
         logging.info(
             'Switch under full load adding ingress_egress_vxlan rules')
         for flow in pipeline_flows.flow_egress_vxlan(
                 sw.dpid, sw.snake_start_port, OFPP_IN_PORT, outer_vid=46,
                 inner_vid=None, priority=2000):
             self.add_flow(flow)
         for flow in pipeline_flows.flow_ingress_vxlan(
                 sw.dpid, sw.snake_end_port, OFPP_IN_PORT, outer_vid=46,
                 inner_vid=None, priority=2000):
             self.add_flow(flow)