sw test tool: Remove unused codes
Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
This commit is contained in:
parent
f7ca84d4ce
commit
5e60f0250c
@ -1048,23 +1048,20 @@ class OpenFlowSw(object):
|
|||||||
self.dp.send_msg(msg)
|
self.dp.send_msg(msg)
|
||||||
return msg.xid
|
return msg.xid
|
||||||
|
|
||||||
def add_flow(self, flow_mod=None, in_port=None, out_port=None):
|
def add_flow(self, in_port=None, out_port=None):
|
||||||
""" Add flow. """
|
""" Add flow. """
|
||||||
ofp = self.dp.ofproto
|
ofp = self.dp.ofproto
|
||||||
parser = self.dp.ofproto_parser
|
parser = self.dp.ofproto_parser
|
||||||
|
|
||||||
if flow_mod:
|
match = parser.OFPMatch(in_port=in_port)
|
||||||
mod = flow_mod
|
max_len = (0 if out_port != ofp.OFPP_CONTROLLER
|
||||||
else:
|
else ofp.OFPCML_MAX)
|
||||||
match = parser.OFPMatch(in_port=in_port)
|
actions = [parser.OFPActionOutput(out_port, max_len)]
|
||||||
max_len = (0 if out_port != ofp.OFPP_CONTROLLER
|
inst = [parser.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS,
|
||||||
else ofp.OFPCML_MAX)
|
actions)]
|
||||||
actions = [parser.OFPActionOutput(out_port, max_len)]
|
mod = parser.OFPFlowMod(self.dp, cookie=0,
|
||||||
inst = [parser.OFPInstructionActions(ofp.OFPIT_APPLY_ACTIONS,
|
command=ofp.OFPFC_ADD,
|
||||||
actions)]
|
match=match, instructions=inst)
|
||||||
mod = parser.OFPFlowMod(self.dp, cookie=0,
|
|
||||||
command=ofp.OFPFC_ADD,
|
|
||||||
match=match, instructions=inst)
|
|
||||||
return self._send_msg(mod)
|
return self._send_msg(mod)
|
||||||
|
|
||||||
def send_barrier_request(self):
|
def send_barrier_request(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user