Beispiel #1
0
 def valve_flowmod(self,
                   table_id,
                   match=None,
                   priority=None,
                   inst=None,
                   command=ofp.OFPFC_ADD,
                   out_port=0,
                   out_group=0,
                   hard_timeout=0,
                   idle_timeout=0):
     """Helper function to construct a flow mod message with cookie."""
     if match is None:
         match = self.valve_in_match(table_id)
     if priority is None:
         priority = self.dp.lowest_priority
     if inst is None:
         inst = []
     return valve_of.flowmod(self.dp.cookie, command, table_id, priority,
                             out_port, out_group, match, inst, hard_timeout,
                             idle_timeout)
Beispiel #2
0
 def valve_flowmod(self, table_id, match=None, priority=None,
                   inst=None, command=ofp.OFPFC_ADD, out_port=0,
                   out_group=0, hard_timeout=0, idle_timeout=0):
     """Helper function to construct a flow mod message with cookie."""
     if match is None:
         match = self.valve_in_match(table_id)
     if priority is None:
         priority = self.dp.lowest_priority
     if inst is None:
         inst = []
     return valve_of.flowmod(
         self.dp.cookie,
         command,
         table_id,
         priority,
         out_port,
         out_group,
         match,
         inst,
         hard_timeout,
         idle_timeout)
Beispiel #3
0
 def flowmod(self,
             match=None,
             priority=None,
             inst=None,
             command=ofp.OFPFC_ADD,
             out_port=0,
             out_group=0,
             hard_timeout=0,
             idle_timeout=0):
     """Helper function to construct a flow mod message with cookie."""
     if match is None:
         match = self.match()
     if priority is None:
         priority = 0  # self.dp.lowest_priority
     if inst is None:
         inst = []
     flags = 0
     if self.notify_flow_removed:
         flags = ofp.OFPFF_SEND_FLOW_REM
     return valve_of.flowmod(self.flow_cookie, command, self.table_id,
                             priority, out_port, out_group, match, inst,
                             hard_timeout, idle_timeout, flags)