use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved in project openflowplugin by opendaylight.
the class FlowNotificationSupplierImpl method deleteNotification.
@Override
public FlowRemoved deleteNotification(final InstanceIdentifier<Flow> path) {
Preconditions.checkArgument(path != null);
final FlowRemovedBuilder builder = new FlowRemovedBuilder();
builder.setFlowRef(new FlowRef(path));
builder.setNode(createNodeRef(path));
return builder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved in project openflowplugin by opendaylight.
the class FlowRemovedTranslator method translateMatch.
protected MatchBuilder translateMatch(FlowRemoved flowRemoved, DeviceInfo deviceInfo) {
final VersionDatapathIdConvertorData datapathIdConvertorData = new VersionDatapathIdConvertorData(deviceInfo.getVersion());
datapathIdConvertorData.setDatapathId(deviceInfo.getDatapathId());
final Optional<MatchBuilder> matchBuilderOptional = getConvertorExecutor().convert(flowRemoved.getMatch(), datapathIdConvertorData);
return matchBuilderOptional.orElse(new MatchBuilder());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved in project openflowplugin by opendaylight.
the class FlowRemovedTranslatorTest method testTranslateV10.
@Test
public void testTranslateV10() throws Exception {
org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FlowRemoved flowRemovedMessage = buildMessage(true);
final FlowRemoved flowRemoved = translatorV10.translate(flowRemovedMessage, deviceInfo, null);
assertEquals(flowRemovedMessage.getCookie(), flowRemoved.getCookie().getValue());
assertEquals(flowRemovedMessage.getPriority(), flowRemoved.getPriority());
assertEquals((short) 0, flowRemoved.getTableId().shortValue());
}
Aggregations