loxi-prep: change vendor tests to use action classes from pyloxi
diff --git a/tests/nicira_dec_ttl.py b/tests/nicira_dec_ttl.py
index 32d3501..a35d97a 100644
--- a/tests/nicira_dec_ttl.py
+++ b/tests/nicira_dec_ttl.py
@@ -7,20 +7,6 @@
from oftest.testutils import *
-class action_nx_dec_ttl(ofp.action.vendor):
- def __init__(self):
- ofp.action.vendor.__init__(self)
- self.vendor = 0x00002320
-
- def pack(self):
- return ofp.action.vendor.pack(self) + struct.pack("!HHL", 18, 0x0, 0x0)
-
- def __len__(self):
- return 16
-
- def show(self, prefix=''):
- return prefix + 'dec_ttl: ' + '\n' + ofp.action.vendor.show(self)
-
@nonstandard
class TtlDecrement(base_tests.SimpleDataPlane):
def runTest(self):
@@ -35,17 +21,17 @@
flow_match_test(self, config["port_map"],
pkt=simple_tcp_packet(pktlen=100, ip_ttl=2),
exp_pkt=simple_tcp_packet(pktlen=100, ip_ttl=1),
- action_list=[action_nx_dec_ttl()])
+ action_list=[ofp.action.nicira_dec_ttl()])
outpkt = simple_tcp_packet(pktlen=100, ip_ttl=3)
msg = ofp.message.packet_out(in_port=ofp.OFPP_NONE,
data=str(outpkt),
actions=[
- action_nx_dec_ttl(),
+ ofp.action.nicira_dec_ttl(),
ofp.action.output(port=portA),
- action_nx_dec_ttl(),
+ ofp.action.nicira_dec_ttl(),
ofp.action.output(port=portB),
- action_nx_dec_ttl(),
+ ofp.action.nicira_dec_ttl(),
ofp.action.output(port=portC)])
self.controller.message_send(msg)