use of org.openkilda.floodlight.utils.metadata.RoutingMetadata.RoutingMetadataBuilder in project open-kilda by telstra.
the class IngressServer42FlowInstallCommandTest method assertMetadata.
private void assertMetadata(OFFlowMod mod, int expectedOuterVlan, int expectedPort) {
RoutingMetadataBuilder metadataBuilder = RoutingMetadata32.builder().inputPort(expectedPort);
if (expectedOuterVlan != 0) {
metadataBuilder.outerVlanId(expectedOuterVlan);
}
RoutingMetadata metadata = metadataBuilder.build(FEATURES);
assertEquals(metadata.getValue(), mod.getMatch().getMasked(MatchField.METADATA).getValue().getValue());
assertEquals(metadata.getMask(), mod.getMatch().getMasked(MatchField.METADATA).getMask().getValue());
}
use of org.openkilda.floodlight.utils.metadata.RoutingMetadata.RoutingMetadataBuilder in project open-kilda by telstra.
the class IngressFlowLoopSegmentInstallCommandTest method assertMetadata.
private void assertMetadata(Match match, int expectedOuterVlan) {
RoutingMetadataBuilder metadataBuilder = RoutingMetadata32.builder();
metadataBuilder.outerVlanId(expectedOuterVlan);
RoutingMetadata metadata = metadataBuilder.build(FEATURES);
assertEquals(metadata.getValue(), match.getMasked(MatchField.METADATA).getValue().getValue());
assertEquals(metadata.getMask(), match.getMasked(MatchField.METADATA).getMask().getValue());
}
Aggregations