sw test tool: pylint

W:546,14: Access to a protected member _send_msg of a client class (protected-access)

Signed-off-by: Yuichi Ito <ito.yuichi0@gmail.com>
This commit is contained in:
Yuichi Ito 2014-05-08 14:04:02 +09:00 committed by FUJITA Tomonori
parent 5e60f0250c
commit bee4846bc2

View File

@ -543,7 +543,7 @@ class OfTester(app_manager.RyuApp):
self.target_sw.del_test_meter()
def _test_msg_install(self, datapath, message):
xid = datapath._send_msg(message)
xid = datapath.send_msg(message)
self.send_msg_xids.append(xid)
xid = datapath.send_barrier_request()
@ -1040,7 +1040,7 @@ class OpenFlowSw(object):
self.dp = dp
self.logger = logger
def _send_msg(self, msg):
def send_msg(self, msg):
if isinstance(self.dp, DummyDatapath):
raise TestError(STATE_DISCONNECTED)
msg.xid = None
@ -1062,13 +1062,13 @@ class OpenFlowSw(object):
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):
""" send a BARRIER_REQUEST message."""
parser = self.dp.ofproto_parser
req = parser.OFPBarrierRequest(self.dp)
return self._send_msg(req)
return self.send_msg(req)
def send_port_stats(self):
""" Get port stats."""
@ -1076,7 +1076,7 @@ class OpenFlowSw(object):
parser = self.dp.ofproto_parser
flags = 0
req = parser.OFPPortStatsRequest(self.dp, flags, ofp.OFPP_ANY)
return self._send_msg(req)
return self.send_msg(req)
def send_flow_stats(self):
""" Get all flow. """
@ -1085,7 +1085,7 @@ class OpenFlowSw(object):
req = parser.OFPFlowStatsRequest(self.dp, 0, ofp.OFPTT_ALL,
ofp.OFPP_ANY, ofp.OFPG_ANY,
0, 0, parser.OFPMatch())
return self._send_msg(req)
return self.send_msg(req)
class TargetSw(OpenFlowSw):
@ -1101,7 +1101,7 @@ class TargetSw(OpenFlowSw):
command=ofp.OFPFC_DELETE,
out_port=ofp.OFPP_ANY,
out_group=ofp.OFPG_ANY)
return self._send_msg(mod)
return self.send_msg(mod)
def del_test_meter(self):
""" Delete all meter entries. """
@ -1111,19 +1111,19 @@ class TargetSw(OpenFlowSw):
command=ofp.OFPMC_DELETE,
flags=0,
meter_id=ofp.OFPM_ALL)
return self._send_msg(mod)
return self.send_msg(mod)
def send_meter_config_stats(self):
""" Get all meter. """
parser = self.dp.ofproto_parser
stats = parser.OFPMeterConfigStatsRequest(self.dp)
return self._send_msg(stats)
return self.send_msg(stats)
def send_table_stats(self):
""" Get table stats. """
parser = self.dp.ofproto_parser
req = parser.OFPTableStatsRequest(self.dp, 0)
return self._send_msg(req)
return self.send_msg(req)
class TesterSw(OpenFlowSw):
@ -1141,7 +1141,7 @@ class TesterSw(OpenFlowSw):
command=ofp.OFPFC_DELETE,
out_port=ofp.OFPP_ANY,
out_group=ofp.OFPG_ANY)
return self._send_msg(mod)
return self.send_msg(mod)
def send_packet_out(self, data):
""" send a PacketOut message."""
@ -1151,7 +1151,7 @@ class TesterSw(OpenFlowSw):
out = parser.OFPPacketOut(
datapath=self.dp, buffer_id=ofp.OFP_NO_BUFFER,
data=data, in_port=ofp.OFPP_CONTROLLER, actions=actions)
return self._send_msg(out)
return self.send_msg(out)
class TestPatterns(dict):