示例#1
0
 def run(self):
     for sw in self.environment.switches.values():
         self.prepare_snake_flows(sw.dpid, self.current_packet_size())
         logging.info('Switch under full load adding push/pop rules')
         self.add_flow(
             flows.flow_vlan_push_pop(sw.dpid, sw.snake_end_port,
                                      OFPP_IN_PORT, 'pop'))
         logging.info('Setting header values')
         self.add_flow(
             flows.flow_vlan_push_pop(sw.dpid, sw.snake_start_port,
                                      OFPP_IN_PORT, 'push'))
示例#2
0
    def run(self):
        for sw in self.environment.switches.values():
            self.prepare_snake_flows(sw.dpid, self.current_packet_size())
            timestamp = int(datetime.now().timestamp())
            self.time_metrics[-1].timestamps[timestamp] = "start"
            logging.info('Switch under full load adding push/pop rules')

            self.add_flow(
                flows.flow_vlan_push_pop(sw.dpid, sw.snake_end_port,
                                         OFPP_IN_PORT, 'pop'))
            self.add_flow(
                flows.flow_vlan_push_pop(sw.dpid,
                                         sw.snake_start_port,
                                         OFPP_IN_PORT,
                                         'push',
                                         outer_vid=42))
示例#3
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)