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