use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class MatchConvertor method toOfIcmpv6Type.
private static MatchEntry toOfIcmpv6Type(final Short icmpv6Type) {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setOxmMatchField(Icmpv6Type.class);
Icmpv6TypeCaseBuilder icmpv6TypeCaseBuilder = new Icmpv6TypeCaseBuilder();
Icmpv6TypeBuilder icmpv6TypeBuilder = new Icmpv6TypeBuilder();
icmpv6TypeBuilder.setIcmpv6Type(icmpv6Type);
icmpv6TypeCaseBuilder.setIcmpv6Type(icmpv6TypeBuilder.build());
matchEntryBuilder.setMatchEntryValue(icmpv6TypeCaseBuilder.build());
return matchEntryBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class MatchConvertor method toOfIcmpv4Type.
private static MatchEntry toOfIcmpv4Type(final Short icmpv4Type) {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setOxmMatchField(Icmpv4Type.class);
Icmpv4TypeCaseBuilder icmpv4TypeCaseBuilder = new Icmpv4TypeCaseBuilder();
Icmpv4TypeBuilder icmpv4TypeBuilder = new Icmpv4TypeBuilder();
icmpv4TypeBuilder.setIcmpv4Type(icmpv4Type);
icmpv4TypeCaseBuilder.setIcmpv4Type(icmpv4TypeBuilder.build());
matchEntryBuilder.setMatchEntryValue(icmpv4TypeCaseBuilder.build());
return matchEntryBuilder.build();
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class MatchConvertor method inPhyPortMatch.
private static void inPhyPortMatch(final List<MatchEntry> matchEntryList, NodeConnectorId inPhyPort) {
if (inPhyPort == null) {
return;
}
// TODO: currently this matchconverter is mapped to OF1.3 in MatchInjector. Will need to revisit during 1.4+
final long portNumber = InventoryDataServiceUtil.portNumberfromNodeConnectorId(OpenflowVersion.OF13, inPhyPort);
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setOxmMatchField(InPhyPort.class);
InPhyPortCaseBuilder caseBuilder = new InPhyPortCaseBuilder();
InPhyPortBuilder portBuilder = new InPhyPortBuilder();
portBuilder.setPortNumber(new PortNumber(portNumber));
caseBuilder.setInPhyPort(portBuilder.build());
matchEntryBuilder.setMatchEntryValue(caseBuilder.build());
matchEntryList.add(matchEntryBuilder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class MatchConvertor method inPortMatch.
private static void inPortMatch(final List<MatchEntry> matchEntryList, NodeConnectorId inPort) {
if (inPort == null) {
return;
}
// TODO: currently this matchconverter is mapped to OF1.3 in MatchInjector. Will need to revisit during 1.4+
final long portNumber = InventoryDataServiceUtil.portNumberfromNodeConnectorId(OpenflowVersion.OF13, inPort);
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setOxmMatchField(InPort.class);
InPortCaseBuilder caseBuilder = new InPortCaseBuilder();
InPortBuilder portBuilder = new InPortBuilder();
portBuilder.setPortNumber(new PortNumber(portNumber));
caseBuilder.setInPort(portBuilder.build());
matchEntryBuilder.setMatchEntryValue(caseBuilder.build());
matchEntryList.add(matchEntryBuilder.build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder in project openflowplugin by opendaylight.
the class MatchConvertor method toOfIpProto.
private static MatchEntry toOfIpProto(final Short ipProtocol) {
MatchEntryBuilder matchEntryBuilder = new MatchEntryBuilder();
matchEntryBuilder.setOxmClass(OpenflowBasicClass.class);
matchEntryBuilder.setHasMask(false);
matchEntryBuilder.setOxmMatchField(IpProto.class);
IpProtoCaseBuilder ipProtoCaseBuilder = new IpProtoCaseBuilder();
IpProtoBuilder ipProtoBuilder = new IpProtoBuilder();
ipProtoBuilder.setProtocolNumber(ipProtocol);
ipProtoCaseBuilder.setIpProto(ipProtoBuilder.build());
matchEntryBuilder.setMatchEntryValue(ipProtoCaseBuilder.build());
return matchEntryBuilder.build();
}
Aggregations