2 * Copyright (c) 2016, 2017 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowjava.nx;
10 import org.junit.Before;
11 import org.junit.Test;
12 import org.junit.runner.RunWith;
13 import org.mockito.Matchers;
14 import org.mockito.Mock;
15 import org.mockito.Mockito;
16 import org.mockito.runners.MockitoJUnitRunner;
17 import org.opendaylight.openflowjava.nx.api.NiciraActionDeserializerKey;
18 import org.opendaylight.openflowjava.nx.api.NiciraActionSerializerKey;
19 import org.opendaylight.openflowjava.nx.api.NiciraConstants;
20 import org.opendaylight.openflowjava.nx.api.NiciraExtensionCodecRegistrator;
21 import org.opendaylight.openflowjava.nx.codec.action.DecNshTtlCodec;
22 import org.opendaylight.openflowjava.nx.codec.action.DecapCodec;
23 import org.opendaylight.openflowjava.nx.codec.action.EncapCodec;
24 import org.opendaylight.openflowjava.nx.codec.action.MultipathCodec;
25 import org.opendaylight.openflowjava.nx.codec.action.OutputReg2Codec;
26 import org.opendaylight.openflowjava.nx.codec.action.OutputRegCodec;
27 import org.opendaylight.openflowjava.nx.codec.action.RegLoad2Codec;
28 import org.opendaylight.openflowjava.nx.codec.action.RegLoadCodec;
29 import org.opendaylight.openflowjava.nx.codec.action.RegMoveCodec;
30 import org.opendaylight.openflowjava.nx.codec.action.ResubmitCodec;
31 import org.opendaylight.openflowjava.nx.codec.match.ArpOpCodec;
32 import org.opendaylight.openflowjava.nx.codec.match.ArpShaCodec;
33 import org.opendaylight.openflowjava.nx.codec.match.ArpSpaCodec;
34 import org.opendaylight.openflowjava.nx.codec.match.ArpThaCodec;
35 import org.opendaylight.openflowjava.nx.codec.match.ArpTpaCodec;
36 import org.opendaylight.openflowjava.nx.codec.match.CtMarkCodec;
37 import org.opendaylight.openflowjava.nx.codec.match.CtStateCodec;
38 import org.opendaylight.openflowjava.nx.codec.match.CtTpDstCodec;
39 import org.opendaylight.openflowjava.nx.codec.match.CtTpSrcCodec;
40 import org.opendaylight.openflowjava.nx.codec.match.CtZoneCodec;
41 import org.opendaylight.openflowjava.nx.codec.match.EthDstCodec;
42 import org.opendaylight.openflowjava.nx.codec.match.EthSrcCodec;
43 import org.opendaylight.openflowjava.nx.codec.match.EthTypeCodec;
44 import org.opendaylight.openflowjava.nx.codec.match.NshFlagsCodec;
45 import org.opendaylight.openflowjava.nx.codec.match.NshMdtypeCodec;
46 import org.opendaylight.openflowjava.nx.codec.match.NshNpCodec;
47 import org.opendaylight.openflowjava.nx.codec.match.NshTtlCodec;
48 import org.opendaylight.openflowjava.nx.codec.match.Nshc1Codec;
49 import org.opendaylight.openflowjava.nx.codec.match.Nshc2Codec;
50 import org.opendaylight.openflowjava.nx.codec.match.Nshc3Codec;
51 import org.opendaylight.openflowjava.nx.codec.match.Nshc4Codec;
52 import org.opendaylight.openflowjava.nx.codec.match.NsiCodec;
53 import org.opendaylight.openflowjava.nx.codec.match.NspCodec;
54 import org.opendaylight.openflowjava.nx.codec.match.PktMarkCodec;
55 import org.opendaylight.openflowjava.nx.codec.match.Reg0Codec;
56 import org.opendaylight.openflowjava.nx.codec.match.Reg1Codec;
57 import org.opendaylight.openflowjava.nx.codec.match.Reg2Codec;
58 import org.opendaylight.openflowjava.nx.codec.match.Reg3Codec;
59 import org.opendaylight.openflowjava.nx.codec.match.Reg4Codec;
60 import org.opendaylight.openflowjava.nx.codec.match.Reg5Codec;
61 import org.opendaylight.openflowjava.nx.codec.match.Reg6Codec;
62 import org.opendaylight.openflowjava.nx.codec.match.Reg7Codec;
63 import org.opendaylight.openflowjava.nx.codec.match.TcpDstCodec;
64 import org.opendaylight.openflowjava.nx.codec.match.TcpSrcCodec;
65 import org.opendaylight.openflowjava.nx.codec.match.TunIdCodec;
66 import org.opendaylight.openflowjava.nx.codec.match.TunIpv4DstCodec;
67 import org.opendaylight.openflowjava.nx.codec.match.TunIpv4SrcCodec;
68 import org.opendaylight.openflowjava.nx.codec.match.UdpDstCodec;
69 import org.opendaylight.openflowjava.nx.codec.match.UdpSrcCodec;
70 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntryDeserializerKey;
71 import org.opendaylight.openflowjava.protocol.api.keys.MatchEntrySerializerKey;
72 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
73 import org.opendaylight.openflowjava.protocol.api.util.OxmMatchConstants;
74 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.ExperimenterClass;
75 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm0Class;
76 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Nxm1Class;
77 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionConntrack;
78 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionDecNshTtl;
79 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionDecap;
80 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionEncap;
81 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionMultipath;
82 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionOutputReg;
83 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionOutputReg2;
84 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionRegLoad;
85 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionRegLoad2;
86 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionRegMove;
87 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.action.rev140421.action.container.action.choice.ActionResubmit;
88 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxArpSha;
89 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxArpTha;
90 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtMark;
91 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtState;
92 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtTpDst;
93 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtTpSrc;
94 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxCtZone;
95 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshFlags;
96 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshMdtype;
97 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshNp;
98 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshTtl;
99 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshc1;
100 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshc2;
101 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshc3;
102 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNshc4;
103 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNsi;
104 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxNsp;
105 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxPktMark;
106 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg0;
107 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg1;
108 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg2;
109 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg3;
110 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg4;
111 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg5;
112 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6;
113 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg7;
114 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxTunId;
115 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxTunIpv4Dst;
116 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxTunIpv4Src;
117 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfArpOp;
118 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfArpSpa;
119 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfArpTpa;
120 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfEthDst;
121 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfEthSrc;
122 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfEthType;
123 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfTcpDst;
124 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfTcpSrc;
125 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfUdpDst;
126 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmOfUdpSrc;
128 @RunWith(MockitoJUnitRunner.class)
129 public class NiciraExtensionsRegistratorTest {
131 NiciraExtensionsRegistrator niciraExtensionsRegistrator;
134 NiciraExtensionCodecRegistrator registrator;
137 public void setUp() {
138 niciraExtensionsRegistrator = new NiciraExtensionsRegistrator(registrator);
142 public void registerNiciraExtensionsTest() {
143 Mockito.verify(registrator).registerActionDeserializer(
144 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 7)),
145 Matchers.any(RegLoadCodec.class));
146 Mockito.verify(registrator).registerActionSerializer(
147 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegLoad.class)),
148 Matchers.any(RegLoadCodec.class));
149 Mockito.verify(registrator).registerActionDeserializer(
150 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 33)),
151 Matchers.any(RegLoad2Codec.class));
152 Mockito.verify(registrator).registerActionSerializer(
153 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegLoad2.class)),
154 Matchers.any(RegLoad2Codec.class));
155 Mockito.verify(registrator).registerActionDeserializer(
156 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 6)),
157 Matchers.any(RegMoveCodec.class));
158 Mockito.verify(registrator).registerActionSerializer(
159 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegMove.class)),
160 Matchers.any(RegMoveCodec.class));
161 Mockito.verify(registrator).registerActionDeserializer(
162 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 15)),
163 Matchers.any(OutputRegCodec.class));
164 Mockito.verify(registrator).registerActionSerializer(
165 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionOutputReg.class)),
166 Matchers.any(OutputRegCodec.class));
167 Mockito.verify(registrator).registerActionDeserializer(
168 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 32)),
169 Matchers.any(OutputReg2Codec.class));
170 Mockito.verify(registrator).registerActionSerializer(
171 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionOutputReg2.class)),
172 Matchers.any(OutputReg2Codec.class));
173 Mockito.verify(registrator).registerActionSerializer(
174 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionResubmit.class)),
175 Matchers.any(ResubmitCodec.class));
176 Mockito.verify(registrator).registerActionDeserializer(
177 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 1)),
178 Matchers.any(ResubmitCodec.class));
179 Mockito.verify(registrator).registerActionDeserializer(
180 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 14)),
181 Matchers.any(ResubmitCodec.class));
182 Mockito.verify(registrator).registerActionSerializer(
183 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionMultipath.class)),
184 Matchers.any(MultipathCodec.class));
185 Mockito.verify(registrator).registerActionDeserializer(
186 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 10)),
187 Matchers.any(MultipathCodec.class));
188 Mockito.verify(registrator).registerActionDeserializer(
189 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 46)),
190 Matchers.any(EncapCodec.class));
191 Mockito.verify(registrator).registerActionSerializer(
192 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionEncap.class)),
193 Matchers.any(EncapCodec.class));
194 Mockito.verify(registrator).registerActionDeserializer(
195 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 47)),
196 Matchers.any(DecapCodec.class));
197 Mockito.verify(registrator).registerActionSerializer(
198 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionDecap.class)),
199 Matchers.any(DecapCodec.class));
200 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
201 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg0.class)),
202 Matchers.any(Reg0Codec.class));
203 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
204 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 0)),
205 Matchers.any(Reg0Codec.class));
206 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
207 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg1.class)),
208 Matchers.any(Reg1Codec.class));
209 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
210 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 1)),
211 Matchers.any(Reg1Codec.class));
212 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
213 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg2.class)),
214 Matchers.any(Reg2Codec.class));
215 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
216 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 2)),
217 Matchers.any(Reg2Codec.class));
218 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
219 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg3.class)),
220 Matchers.any(Reg3Codec.class));
221 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
222 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 3)),
223 Matchers.any(Reg3Codec.class));
224 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
225 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg4.class)),
226 Matchers.any(Reg4Codec.class));
227 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
228 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 4)),
229 Matchers.any(Reg4Codec.class));
230 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
231 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg5.class)),
232 Matchers.any(Reg5Codec.class));
233 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
234 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 5)),
235 Matchers.any(Reg5Codec.class));
236 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
237 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg6.class)),
238 Matchers.any(Reg6Codec.class));
239 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
240 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 6)),
241 Matchers.any(Reg6Codec.class));
242 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
243 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg7.class)),
244 Matchers.any(Reg7Codec.class));
245 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
246 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 7)),
247 Matchers.any(Reg7Codec.class));
248 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
249 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunId.class)),
250 Matchers.any(TunIdCodec.class));
251 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
252 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 16)),
253 Matchers.any(TunIdCodec.class));
254 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
255 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpOp.class)),
256 Matchers.any(ArpOpCodec.class));
257 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
258 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 15)),
259 Matchers.any(ArpOpCodec.class));
260 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
261 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxArpSha.class)),
262 Matchers.any(ArpShaCodec.class));
263 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
264 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 17)),
265 Matchers.any(ArpShaCodec.class));
266 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
267 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpSpa.class)),
268 Matchers.any(ArpSpaCodec.class));
269 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
270 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 16)),
271 Matchers.any(ArpSpaCodec.class));
272 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
273 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxArpTha.class)),
274 Matchers.any(ArpThaCodec.class));
275 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
276 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 18)),
277 Matchers.any(ArpThaCodec.class));
278 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
279 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpTpa.class)),
280 Matchers.any(ArpTpaCodec.class));
281 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
282 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 17)),
283 Matchers.any(ArpTpaCodec.class));
284 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
285 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthDst.class)),
286 Matchers.any(EthDstCodec.class));
287 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
288 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 1)),
289 Matchers.any(EthDstCodec.class));
290 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
291 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthSrc.class)),
292 Matchers.any(EthSrcCodec.class));
293 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
294 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 2)),
295 Matchers.any(EthSrcCodec.class));
296 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers.eq(
297 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthType.class)),
298 Matchers.any(EthTypeCodec.class));
299 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
300 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 3)),
301 Matchers.any(EthTypeCodec.class));
302 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers.eq(
303 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunIpv4Dst.class)),
304 Matchers.any(TunIpv4DstCodec.class));
305 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
306 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 32)),
307 Matchers.any(TunIpv4DstCodec.class));
308 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers.eq(
309 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunIpv4Src.class)),
310 Matchers.any(TunIpv4SrcCodec.class));
311 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
312 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 31)),
313 Matchers.any(TunIpv4SrcCodec.class));
314 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
315 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfTcpSrc.class)),
316 Matchers.any(TcpSrcCodec.class));
317 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
318 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 9)),
319 Matchers.any(TcpSrcCodec.class));
320 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
321 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfTcpDst.class)),
322 Matchers.any(TcpDstCodec.class));
323 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
324 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 10)),
325 Matchers.any(TcpDstCodec.class));
326 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
327 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfUdpSrc.class)),
328 Matchers.any(UdpSrcCodec.class));
329 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
330 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 11)),
331 Matchers.any(UdpSrcCodec.class));
332 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
333 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfUdpDst.class)),
334 Matchers.any(UdpDstCodec.class));
335 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
336 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 12)),
337 Matchers.any(UdpDstCodec.class));
338 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers.eq(
339 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtState.class)),
340 Matchers.any(CtStateCodec.class));
341 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
342 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 105)),
343 Matchers.any(CtStateCodec.class));
344 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
345 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtZone.class)),
346 Matchers.any(CtZoneCodec.class));
347 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
348 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 106)),
349 Matchers.any(CtZoneCodec.class));
350 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
351 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtMark.class)),
352 Matchers.any(CtMarkCodec.class));
353 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
354 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 107)),
355 Matchers.any(CtMarkCodec.class));
356 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
357 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
358 NxmNxCtTpSrc.class)), Matchers.any(CtTpSrcCodec.class));
359 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
360 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
361 OxmMatchConstants.NXM_1_CLASS, 124)), Matchers.any(CtTpSrcCodec.class));
362 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
363 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
364 NxmNxCtTpDst.class)), Matchers.any(CtTpDstCodec.class));
365 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
366 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
367 OxmMatchConstants.NXM_1_CLASS, 125)), Matchers.any(CtTpDstCodec.class));
368 Mockito.verify(registrator).registerMatchEntrySerializer(Matchers
369 .eq(new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class,
370 NxmNxPktMark.class)), Matchers.any(PktMarkCodec.class));
371 Mockito.verify(registrator).registerMatchEntryDeserializer(Matchers
372 .eq(new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID,
373 OxmMatchConstants.NXM_1_CLASS, 33)), Matchers.any(PktMarkCodec.class));
374 Mockito.verify(registrator).registerActionDeserializer(
375 Matchers.eq(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 48)),
376 Matchers.any(DecNshTtlCodec.class));
377 Mockito.verify(registrator).registerActionSerializer(
378 Matchers.eq(new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionDecNshTtl.class)),
379 Matchers.any(DecNshTtlCodec.class));
382 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshFlags> nshFlagsSerializerKey = new MatchEntrySerializerKey<>(
383 EncodeConstants.OF13_VERSION_ID,
384 ExperimenterClass.class,
385 NxmNxNshFlags.class);
386 nshFlagsSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
387 Mockito.verify(registrator).registerMatchEntrySerializer(
388 Matchers.eq(nshFlagsSerializerKey),
389 Matchers.any(NshFlagsCodec.class));
390 MatchEntryDeserializerKey nshFlagsDeserializerKey = new MatchEntryDeserializerKey(
391 EncodeConstants.OF13_VERSION_ID,
392 OxmMatchConstants.EXPERIMENTER_CLASS,
394 nshFlagsDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
395 Mockito.verify(registrator).registerMatchEntryDeserializer(
396 Matchers.eq(nshFlagsDeserializerKey),
397 Matchers.any(NshFlagsCodec.class));
398 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshMdtype> mdtypeSerializerKey = new MatchEntrySerializerKey<>(
399 EncodeConstants.OF13_VERSION_ID,
400 ExperimenterClass.class,
401 NxmNxNshMdtype.class);
402 mdtypeSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
403 Mockito.verify(registrator).registerMatchEntrySerializer(
404 Matchers.eq(mdtypeSerializerKey),
405 Matchers.any(NshMdtypeCodec.class));
406 MatchEntryDeserializerKey mdtypeDeserializerKey = new MatchEntryDeserializerKey(
407 EncodeConstants.OF13_VERSION_ID,
408 OxmMatchConstants.EXPERIMENTER_CLASS,
410 mdtypeDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
411 Mockito.verify(registrator).registerMatchEntryDeserializer(
412 Matchers.eq(mdtypeDeserializerKey),
413 Matchers.any(NshMdtypeCodec.class));
414 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshNp> nshNpSerializerKey = new MatchEntrySerializerKey<>(
415 EncodeConstants.OF13_VERSION_ID,
416 ExperimenterClass.class,
418 nshNpSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
419 Mockito.verify(registrator).registerMatchEntrySerializer(
420 Matchers.eq(nshNpSerializerKey),
421 Matchers.any(NshNpCodec.class));
422 MatchEntryDeserializerKey nshNpDeserializerKey = new MatchEntryDeserializerKey(
423 EncodeConstants.OF13_VERSION_ID,
424 OxmMatchConstants.EXPERIMENTER_CLASS,
426 nshNpDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
427 Mockito.verify(registrator).registerMatchEntryDeserializer(
428 Matchers.eq(nshNpDeserializerKey),
429 Matchers.any(NshNpCodec.class));
430 MatchEntrySerializerKey<ExperimenterClass, NxmNxNsp> nspSerializerKey = new MatchEntrySerializerKey<>(
431 EncodeConstants.OF13_VERSION_ID,
432 ExperimenterClass.class,
434 nspSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
435 Mockito.verify(registrator).registerMatchEntrySerializer(
436 Matchers.eq(nspSerializerKey),
437 Matchers.any(NspCodec.class));
438 MatchEntryDeserializerKey nspDeserializerKey = new MatchEntryDeserializerKey(
439 EncodeConstants.OF13_VERSION_ID,
440 OxmMatchConstants.EXPERIMENTER_CLASS,
442 nspDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
443 Mockito.verify(registrator).registerMatchEntryDeserializer(
444 Matchers.eq(nspDeserializerKey),
445 Matchers.any(NspCodec.class));
446 MatchEntrySerializerKey<ExperimenterClass, NxmNxNsi> nsiSerializerKey = new MatchEntrySerializerKey<>(
447 EncodeConstants.OF13_VERSION_ID,
448 ExperimenterClass.class,
450 nsiSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
451 Mockito.verify(registrator).registerMatchEntrySerializer(
452 Matchers.eq(nsiSerializerKey),
453 Matchers.any(NsiCodec.class));
454 MatchEntryDeserializerKey nsiDeserializerKey = new MatchEntryDeserializerKey(
455 EncodeConstants.OF13_VERSION_ID,
456 OxmMatchConstants.EXPERIMENTER_CLASS,
458 nsiDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
459 Mockito.verify(registrator).registerMatchEntryDeserializer(
460 Matchers.eq(nsiDeserializerKey),
461 Matchers.any(NsiCodec.class));
462 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc1> nshc1SerializerKey = new MatchEntrySerializerKey<>(
463 EncodeConstants.OF13_VERSION_ID,
464 ExperimenterClass.class,
466 nshc1SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
467 Mockito.verify(registrator).registerMatchEntrySerializer(
468 Matchers.eq(nshc1SerializerKey),
469 Matchers.any(Nshc1Codec.class));
470 MatchEntryDeserializerKey nshc1DeserializerKey = new MatchEntryDeserializerKey(
471 EncodeConstants.OF13_VERSION_ID,
472 OxmMatchConstants.EXPERIMENTER_CLASS,
474 nshc1DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
475 Mockito.verify(registrator).registerMatchEntryDeserializer(
476 Matchers.eq(nshc1DeserializerKey),
477 Matchers.any(Nshc1Codec.class));
478 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc2> nshc2SerializerKey = new MatchEntrySerializerKey<>(
479 EncodeConstants.OF13_VERSION_ID,
480 ExperimenterClass.class,
482 nshc2SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
483 Mockito.verify(registrator).registerMatchEntrySerializer(
484 Matchers.eq(nshc2SerializerKey),
485 Matchers.any(Nshc2Codec.class));
486 MatchEntryDeserializerKey nshc2DeserializerKey = new MatchEntryDeserializerKey(
487 EncodeConstants.OF13_VERSION_ID,
488 OxmMatchConstants.EXPERIMENTER_CLASS,
490 nshc2DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
491 Mockito.verify(registrator).registerMatchEntryDeserializer(
492 Matchers.eq(nshc2DeserializerKey),
493 Matchers.any(Nshc2Codec.class));
494 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc3> nshc3SerializerKey = new MatchEntrySerializerKey<>(
495 EncodeConstants.OF13_VERSION_ID,
496 ExperimenterClass.class,
498 nshc3SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
499 Mockito.verify(registrator).registerMatchEntrySerializer(
500 Matchers.eq(nshc3SerializerKey),
501 Matchers.any(Nshc3Codec.class));
502 MatchEntryDeserializerKey nshc3DeserializerKey = new MatchEntryDeserializerKey(
503 EncodeConstants.OF13_VERSION_ID,
504 OxmMatchConstants.EXPERIMENTER_CLASS,
506 nshc3DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
507 Mockito.verify(registrator).registerMatchEntryDeserializer(
508 Matchers.eq(nshc3DeserializerKey),
509 Matchers.any(Nshc3Codec.class));
510 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc4> nshc4SerializerKey = new MatchEntrySerializerKey<>(
511 EncodeConstants.OF13_VERSION_ID,
512 ExperimenterClass.class,
514 nshc4SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
515 Mockito.verify(registrator).registerMatchEntrySerializer(
516 Matchers.eq(nshc4SerializerKey),
517 Matchers.any(Nshc4Codec.class));
518 MatchEntryDeserializerKey nshc4DeserializerKey = new MatchEntryDeserializerKey(
519 EncodeConstants.OF13_VERSION_ID,
520 OxmMatchConstants.EXPERIMENTER_CLASS,
522 nshc4DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
523 Mockito.verify(registrator).registerMatchEntryDeserializer(
524 Matchers.eq(nshc4DeserializerKey),
525 Matchers.any(Nshc4Codec.class));
526 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshTtl> nshTtlSerializerKey = new MatchEntrySerializerKey<>(
527 EncodeConstants.OF13_VERSION_ID,
528 ExperimenterClass.class,
530 nshTtlSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
531 Mockito.verify(registrator).registerMatchEntrySerializer(
532 Matchers.eq(nshTtlSerializerKey),
533 Matchers.any(NshTtlCodec.class));
534 MatchEntryDeserializerKey nshTtlDeserializerKey = new MatchEntryDeserializerKey(
535 EncodeConstants.OF13_VERSION_ID,
536 OxmMatchConstants.EXPERIMENTER_CLASS,
538 nshTtlDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
539 Mockito.verify(registrator).registerMatchEntryDeserializer(
540 Matchers.eq(nshTtlDeserializerKey),
541 Matchers.any(NshTtlCodec.class));
545 public void unregisterExtensionsTest() throws Exception {
546 niciraExtensionsRegistrator.close();
548 Mockito.verify(registrator)
549 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 7));
550 Mockito.verify(registrator).unregisterActionSerializer(
551 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegLoad.class));
552 Mockito.verify(registrator)
553 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 33));
554 Mockito.verify(registrator).unregisterActionSerializer(
555 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegLoad2.class));
556 Mockito.verify(registrator)
557 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 6));
558 Mockito.verify(registrator).unregisterActionSerializer(
559 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionRegMove.class));
560 Mockito.verify(registrator)
561 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 15));
562 Mockito.verify(registrator).unregisterActionSerializer(
563 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionOutputReg.class));
564 Mockito.verify(registrator)
565 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 32));
566 Mockito.verify(registrator).unregisterActionSerializer(
567 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionOutputReg2.class));
568 Mockito.verify(registrator)
569 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 1));
570 Mockito.verify(registrator)
571 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 14));
572 Mockito.verify(registrator).unregisterActionSerializer(
573 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionResubmit.class));
574 Mockito.verify(registrator)
575 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 10));
576 Mockito.verify(registrator).unregisterActionSerializer(
577 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionMultipath.class));
578 Mockito.verify(registrator).unregisterActionSerializer(
579 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionConntrack.class));
580 Mockito.verify(registrator)
581 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 46));
582 Mockito.verify(registrator).unregisterActionSerializer(
583 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionEncap.class));
584 Mockito.verify(registrator)
585 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 47));
586 Mockito.verify(registrator).unregisterActionSerializer(
587 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionDecap.class));
588 Mockito.verify(registrator)
589 .unregisterActionDeserializer(new NiciraActionDeserializerKey(EncodeConstants.OF13_VERSION_ID, 48));
590 Mockito.verify(registrator).unregisterActionSerializer(
591 new NiciraActionSerializerKey(EncodeConstants.OF13_VERSION_ID, ActionDecNshTtl.class));
592 Mockito.verify(registrator).unregisterMatchEntrySerializer(
593 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg0.class));
594 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
595 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 0));
596 Mockito.verify(registrator).unregisterMatchEntrySerializer(
597 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg1.class));
598 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
599 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 1));
600 Mockito.verify(registrator).unregisterMatchEntrySerializer(
601 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg2.class));
602 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
603 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 2));
604 Mockito.verify(registrator).unregisterMatchEntrySerializer(
605 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg3.class));
606 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
607 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 3));
608 Mockito.verify(registrator).unregisterMatchEntrySerializer(
609 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg4.class));
610 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
611 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 4));
612 Mockito.verify(registrator).unregisterMatchEntrySerializer(
613 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg5.class));
614 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
615 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 5));
616 Mockito.verify(registrator).unregisterMatchEntrySerializer(
617 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg6.class));
618 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
619 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 6));
620 Mockito.verify(registrator).unregisterMatchEntrySerializer(
621 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxReg7.class));
622 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
623 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 7));
624 Mockito.verify(registrator).unregisterMatchEntrySerializer(
625 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunId.class));
626 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
627 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 16));
628 Mockito.verify(registrator).unregisterMatchEntrySerializer(
629 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpOp.class));
630 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
631 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 15));
632 Mockito.verify(registrator).unregisterMatchEntrySerializer(
633 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxArpSha.class));
634 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
635 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 17));
636 Mockito.verify(registrator).unregisterMatchEntrySerializer(
637 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpSpa.class));
638 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
639 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 16));
640 Mockito.verify(registrator).unregisterMatchEntrySerializer(
641 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxArpTha.class));
642 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
643 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 18));
644 Mockito.verify(registrator).unregisterMatchEntrySerializer(
645 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfArpTpa.class));
646 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
647 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 17));
648 Mockito.verify(registrator).unregisterMatchEntrySerializer(
649 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthDst.class));
650 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
651 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 1));
652 Mockito.verify(registrator).unregisterMatchEntrySerializer(
653 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthSrc.class));
654 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
655 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 2));
656 Mockito.verify(registrator).unregisterMatchEntrySerializer(
657 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfEthType.class));
658 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
659 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 3));
660 Mockito.verify(registrator).unregisterMatchEntrySerializer(
661 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunIpv4Dst.class));
662 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
663 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 32));
664 Mockito.verify(registrator).unregisterMatchEntrySerializer(
665 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxTunIpv4Src.class));
666 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
667 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 31));
668 Mockito.verify(registrator).unregisterMatchEntrySerializer(
669 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfTcpSrc.class));
670 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
671 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 9));
672 Mockito.verify(registrator).unregisterMatchEntrySerializer(
673 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfTcpDst.class));
674 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
675 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 10));
676 Mockito.verify(registrator).unregisterMatchEntrySerializer(
677 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfUdpSrc.class));
678 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
679 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 11));
680 Mockito.verify(registrator).unregisterMatchEntrySerializer(
681 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm0Class.class, NxmOfUdpDst.class));
682 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
683 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_0_CLASS, 12));
684 Mockito.verify(registrator).unregisterMatchEntrySerializer(
685 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtState.class));
686 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
687 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 105));
688 Mockito.verify(registrator).unregisterMatchEntrySerializer(
689 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtZone.class));
690 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
691 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 106));
692 Mockito.verify(registrator).unregisterMatchEntrySerializer(
693 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtMark.class));
694 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
695 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 107));
696 Mockito.verify(registrator).unregisterMatchEntrySerializer(
697 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtTpSrc.class));
698 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
699 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 124));
700 Mockito.verify(registrator).unregisterMatchEntrySerializer(
701 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxCtTpDst.class));
702 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
703 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 125));
704 Mockito.verify(registrator).unregisterMatchEntrySerializer(
705 new MatchEntrySerializerKey<>(EncodeConstants.OF13_VERSION_ID, Nxm1Class.class, NxmNxPktMark.class));
706 Mockito.verify(registrator).unregisterMatchEntryDeserializer(
707 new MatchEntryDeserializerKey(EncodeConstants.OF13_VERSION_ID, OxmMatchConstants.NXM_1_CLASS, 33));
710 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshFlags> nshFlagsSerializerKey = new MatchEntrySerializerKey<>(
711 EncodeConstants.OF13_VERSION_ID,
712 ExperimenterClass.class,
713 NxmNxNshFlags.class);
714 nshFlagsSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
715 Mockito.verify(registrator).unregisterMatchEntrySerializer(nshFlagsSerializerKey);
716 MatchEntryDeserializerKey nshFlagsDeserializerKey = new MatchEntryDeserializerKey(
717 EncodeConstants.OF13_VERSION_ID,
718 OxmMatchConstants.EXPERIMENTER_CLASS,
720 nshFlagsDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
721 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nshFlagsDeserializerKey);
722 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshMdtype> mdtypeSerializerKey = new MatchEntrySerializerKey<>(
723 EncodeConstants.OF13_VERSION_ID,
724 ExperimenterClass.class,
725 NxmNxNshMdtype.class);
726 mdtypeSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
727 Mockito.verify(registrator).unregisterMatchEntrySerializer(mdtypeSerializerKey);
728 MatchEntryDeserializerKey mdtypeDeserializerKey = new MatchEntryDeserializerKey(
729 EncodeConstants.OF13_VERSION_ID,
730 OxmMatchConstants.EXPERIMENTER_CLASS,
732 mdtypeDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
733 Mockito.verify(registrator).unregisterMatchEntryDeserializer(mdtypeDeserializerKey);
734 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshNp> nshNpSerializerKey = new MatchEntrySerializerKey<>(
735 EncodeConstants.OF13_VERSION_ID,
736 ExperimenterClass.class,
738 nshNpSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
739 Mockito.verify(registrator).unregisterMatchEntrySerializer(nshNpSerializerKey);
740 MatchEntryDeserializerKey nshNpDeserializerKey = new MatchEntryDeserializerKey(
741 EncodeConstants.OF13_VERSION_ID,
742 OxmMatchConstants.EXPERIMENTER_CLASS,
744 nshNpDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
745 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nshNpDeserializerKey);
746 MatchEntrySerializerKey<ExperimenterClass, NxmNxNsp> nspSerializerKey = new MatchEntrySerializerKey<>(
747 EncodeConstants.OF13_VERSION_ID,
748 ExperimenterClass.class,
750 nspSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
751 Mockito.verify(registrator).unregisterMatchEntrySerializer(nspSerializerKey);
752 MatchEntryDeserializerKey nspDeserializerKey = new MatchEntryDeserializerKey(
753 EncodeConstants.OF13_VERSION_ID,
754 OxmMatchConstants.EXPERIMENTER_CLASS,
756 nspDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
757 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nspDeserializerKey);
758 MatchEntrySerializerKey<ExperimenterClass, NxmNxNsi> nsiSerializerKey = new MatchEntrySerializerKey<>(
759 EncodeConstants.OF13_VERSION_ID,
760 ExperimenterClass.class,
762 nsiSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
763 Mockito.verify(registrator).unregisterMatchEntrySerializer(nsiSerializerKey);
764 MatchEntryDeserializerKey nsiDeserializerKey = new MatchEntryDeserializerKey(
765 EncodeConstants.OF13_VERSION_ID,
766 OxmMatchConstants.EXPERIMENTER_CLASS,
768 nsiDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
769 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nsiDeserializerKey);
770 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc1> nshc1SerializerKey = new MatchEntrySerializerKey<>(
771 EncodeConstants.OF13_VERSION_ID,
772 ExperimenterClass.class,
774 nshc1SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
775 Mockito.verify(registrator).unregisterMatchEntrySerializer(nshc1SerializerKey);
776 MatchEntryDeserializerKey nshc1DeserializerKey = new MatchEntryDeserializerKey(
777 EncodeConstants.OF13_VERSION_ID,
778 OxmMatchConstants.EXPERIMENTER_CLASS,
780 nshc1DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
781 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nshc1DeserializerKey);
782 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc2> nshc2SerializerKey = new MatchEntrySerializerKey<>(
783 EncodeConstants.OF13_VERSION_ID,
784 ExperimenterClass.class,
786 nshc2SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
787 Mockito.verify(registrator).unregisterMatchEntrySerializer(nshc2SerializerKey);
788 MatchEntryDeserializerKey nshc2DeserializerKey = new MatchEntryDeserializerKey(
789 EncodeConstants.OF13_VERSION_ID,
790 OxmMatchConstants.EXPERIMENTER_CLASS,
792 nshc2DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
793 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nshc2DeserializerKey);
794 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc3> nshc3SerializerKey = new MatchEntrySerializerKey<>(
795 EncodeConstants.OF13_VERSION_ID,
796 ExperimenterClass.class,
798 nshc3SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
799 Mockito.verify(registrator).unregisterMatchEntrySerializer(nshc3SerializerKey);
800 MatchEntryDeserializerKey nshc3DeserializerKey = new MatchEntryDeserializerKey(
801 EncodeConstants.OF13_VERSION_ID,
802 OxmMatchConstants.EXPERIMENTER_CLASS,
804 nshc3DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
805 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nshc3DeserializerKey);
806 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshc4> nshc4SerializerKey = new MatchEntrySerializerKey<>(
807 EncodeConstants.OF13_VERSION_ID,
808 ExperimenterClass.class,
810 nshc4SerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
811 Mockito.verify(registrator).unregisterMatchEntrySerializer(nshc1SerializerKey);
812 MatchEntryDeserializerKey nshc4DeserializerKey = new MatchEntryDeserializerKey(
813 EncodeConstants.OF13_VERSION_ID,
814 OxmMatchConstants.EXPERIMENTER_CLASS,
816 nshc4DeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
817 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nshc4DeserializerKey);
818 MatchEntrySerializerKey<ExperimenterClass, NxmNxNshTtl> nshTtlSerializerKey = new MatchEntrySerializerKey<>(
819 EncodeConstants.OF13_VERSION_ID,
820 ExperimenterClass.class,
822 nshTtlSerializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
823 Mockito.verify(registrator).unregisterMatchEntrySerializer(nshTtlSerializerKey);
824 MatchEntryDeserializerKey nshTtlDeserializerKey = new MatchEntryDeserializerKey(
825 EncodeConstants.OF13_VERSION_ID,
826 OxmMatchConstants.EXPERIMENTER_CLASS,
828 nshTtlDeserializerKey.setExperimenterId(NiciraConstants.NX_NSH_VENDOR_ID);
829 Mockito.verify(registrator).unregisterMatchEntryDeserializer(nshTtlDeserializerKey);