public static void addNxTunIdMatch(MatchBuilder match, int tunId) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxTunId(new NxmNxTunIdBuilder().setValue(BigInteger.valueOf(tunId)).build()).build(); GeneralAugMatchNodesNodeTableFlow m = addExtensionKeyAugmentationMatcher(NxmNxTunIdKey.class, am, match); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m);
public static MatchBuilder addNxTunIdMatch(MatchBuilder matchBuilder, int tunId) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxTunId(new NxmNxTunIdBuilder() .setValue(BigInteger.valueOf(tunId)) .build()) .build(); GeneralAugMatchNodesNodeTableFlow m = new GeneralAugMatchNodesNodeTableFlowBuilder() .setExtensionList(ImmutableList.of(new ExtensionListBuilder() .setExtensionKey(NxmNxTunIdKey.class) .setExtension(new ExtensionBuilder() .addAugmentation(NxAugMatchNodesNodeTableFlow.class, am) .build()) .build())) .build(); matchBuilder.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); return matchBuilder; }
public static void addNxNshc2RegMatch(MatchBuilder match, Long value) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxNshc2(new NxmNxNshc2Builder().setValue(value).build()).build(); GeneralAugMatchNodesNodeTableFlow m = addExtensionKeyAugmentationMatcher(NxmNxNshc2Key.class, am, match); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
public static void addNxNspMatch(MatchBuilder match, Long nsp) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxNsp(new NxmNxNspBuilder().setValue(nsp).build()).build(); GeneralAugMatchNodesNodeTableFlow m = addExtensionKeyAugmentationMatcher(NxmNxNspKey.class, am, match); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
public static MatchBuilder addCtZone(MatchBuilder matchBuilder,int ct_zone) { NxmNxCtZoneBuilder ctZoneBuilder = new NxmNxCtZoneBuilder(); ctZoneBuilder.setCtZone(ct_zone); NxAugMatchNodesNodeTableFlow nxAugMatch = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxCtZone(ctZoneBuilder.build()) .build(); GeneralAugMatchNodesNodeTableFlow genAugMatch = new GeneralAugMatchNodesNodeTableFlowBuilder() .setExtensionList(ImmutableList.of(new ExtensionListBuilder().setExtensionKey(NxmNxCtZoneKey.class) .setExtension(new ExtensionBuilder() .addAugmentation(NxAugMatchNodesNodeTableFlow.class, nxAugMatch) .build()).build())).build(); matchBuilder.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, genAugMatch); return matchBuilder; }
.setExtensionList(extensions) .build(); matchBuilder.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); return matchBuilder;
public static void addNxNshc3RegMatch(MatchBuilder match, Long value) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxNshc3(new NxmNxNshc3Builder().setValue(value).build()).build(); GeneralAugMatchNodesNodeTableFlow m = addExtensionKeyAugmentationMatcher(NxmNxNshc3Key.class, am, match); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
public static void addNxNshc1RegMatch(MatchBuilder match, Long value) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxNshc1(new NxmNxNshc1Builder().setValue(value).build()).build(); GeneralAugMatchNodesNodeTableFlow m = addExtensionKeyAugmentationMatcher(NxmNxNshc1Key.class, am, match); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
public static void addNxNshc4RegMatch(MatchBuilder match, Long value) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxNshc4(new NxmNxNshc4Builder().setValue(value).build()).build(); GeneralAugMatchNodesNodeTableFlow m = addExtensionKeyAugmentationMatcher(NxmNxNshc4Key.class, am, match); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
public static void addNxTunIpv4DstMatch(MatchBuilder match, Ipv4Address ipv4Address) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxTunIpv4Dst(new NxmNxTunIpv4DstBuilder().setIpv4Address(ipv4Address).build()).build(); GeneralAugMatchNodesNodeTableFlow m = addExtensionKeyAugmentationMatcher(NxmNxTunIpv4DstKey.class, am, match); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
public static void addNxNsiMatch(MatchBuilder match, short nsi) { NxAugMatchNodesNodeTableFlow am = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxNsi(new NxmNxNsiBuilder().setNsi(nsi).build()).build(); GeneralAugMatchNodesNodeTableFlow m = addExtensionKeyAugmentationMatcher(NxmNxNsiKey.class, am, match); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
public static MatchBuilder addCtState(MatchBuilder matchBuilder,int ct_state, int mask) { NxmNxCtStateBuilder ctStateBuilder = new NxmNxCtStateBuilder(); ctStateBuilder.setCtState((long)ct_state); ctStateBuilder.setMask((long)mask); NxAugMatchNodesNodeTableFlow nxAugMatch = new NxAugMatchNodesNodeTableFlowBuilder() .setNxmNxCtState(ctStateBuilder.build()) .build(); GeneralAugMatchNodesNodeTableFlow genAugMatch = new GeneralAugMatchNodesNodeTableFlowBuilder() .setExtensionList(ImmutableList.of(new ExtensionListBuilder().setExtensionKey(NxmNxCtStateKey.class) .setExtension(new ExtensionBuilder() .addAugmentation(NxAugMatchNodesNodeTableFlow.class, nxAugMatch) .build()).build())).build(); matchBuilder.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, genAugMatch); return matchBuilder; }
private static void addExtension (MatchBuilder match, Class<? extends ExtensionKey> extensionKey, NxAugMatchNodesNodeTableFlow am) { GeneralAugMatchNodesNodeTableFlow existingAugmentations = match.getAugmentation(GeneralAugMatchNodesNodeTableFlow.class); List<ExtensionList> extensions = null; if (existingAugmentations != null ) { extensions = existingAugmentations.getExtensionList(); } if (extensions == null) { extensions = Lists.newArrayList(); } extensions.add(new ExtensionListBuilder() .setExtensionKey(extensionKey) .setExtension(new ExtensionBuilder() .addAugmentation(NxAugMatchNodesNodeTableFlow.class, am) .build()) .build()); GeneralAugMatchNodesNodeTableFlow m = new GeneralAugMatchNodesNodeTableFlowBuilder() .setExtensionList(extensions) .build(); match.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
private static void addExtension(MatchBuilder matchBuilder, Class<? extends ExtensionKey> extensionKey, NxAugMatchNodesNodeTableFlow am) { GeneralAugMatchNodesNodeTableFlow existingAugmentations = matchBuilder.getAugmentation(GeneralAugMatchNodesNodeTableFlow.class); List<ExtensionList> extensions = null; if (existingAugmentations != null ) { extensions = existingAugmentations.getExtensionList(); } if (extensions == null) { extensions = Lists.newArrayList(); } extensions.add(new ExtensionListBuilder() .setExtensionKey(extensionKey) .setExtension(new ExtensionBuilder() .addAugmentation(NxAugMatchNodesNodeTableFlow.class, am) .build()) .build()); GeneralAugMatchNodesNodeTableFlow m = new GeneralAugMatchNodesNodeTableFlowBuilder() .setExtensionList(extensions) .build(); matchBuilder.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, m); }
matchBuilder.addAugmentation(matchExtensionWrap.getAugmentationClass(), matchExtensionWrap.getAugmentationObject());
matchBuilder.addAugmentation(GeneralAugMatchNodesNodeTableFlow.class, genAugMatch); return matchBuilder;