use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.nx.ct.state.grouping.NxmNxCtStateBuilder in project openflowplugin by opendaylight.
the class CtStateConvertor method convert.
@Override
public ExtensionAugment<? extends Augmentation<Extension>> convert(MatchEntry input, MatchPath path) {
CtStateCaseValue ctStateCaseValue = (CtStateCaseValue) input.getMatchEntryValue();
NxmNxCtStateBuilder ctStateBuilder = new NxmNxCtStateBuilder();
ctStateBuilder.setCtState(ctStateCaseValue.getCtStateValues().getCtState());
ctStateBuilder.setMask(ctStateCaseValue.getCtStateValues().getMask());
return resolveAugmentation(ctStateBuilder.build(), path, NxmNxCtStateKey.class);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.match.rev140714.nxm.nx.ct.state.grouping.NxmNxCtStateBuilder in project openflowplugin by opendaylight.
the class CtStateConvertorTest method setUp.
@Before
public void setUp() throws Exception {
final NxmNxCtStateBuilder nxmNxCtStateBuilder = new NxmNxCtStateBuilder().setCtState(1L).setMask(2L);
final NxAugMatchNodesNodeTableFlowBuilder nxAugMatchNotifUpdateFlowStatsBuilder = new NxAugMatchNodesNodeTableFlowBuilder();
nxAugMatchNotifUpdateFlowStatsBuilder.setNxmNxCtState(nxmNxCtStateBuilder.build());
final Augmentation<Extension> extensionAugmentation = nxAugMatchNotifUpdateFlowStatsBuilder.build();
when(extension.getAugmentation(Matchers.<Class<Augmentation<Extension>>>any())).thenReturn(extensionAugmentation);
ctStateConvertor = new CtStateConvertor();
}
Aggregations