import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.AddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.SubsequentAddressFamily;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
dataContainerChild -> portsBuilder.setOp(NumericTwoByteOperandParser.INSTANCE.create(
(Set<String>) dataContainerChild.getValue())));
final Optional<DataContainerChild<? extends PathArgument, ?>> valueNode = node.getChild(VALUE_NID);
- valueNode.ifPresent(dataContainerChild -> portsBuilder.setValue((Integer) dataContainerChild.getValue()));
+ valueNode.ifPresent(dataContainerChild -> portsBuilder.setValue((Uint16) dataContainerChild.getValue()));
ports.add(portsBuilder.build());
}
node.getChild(OP_NID).ifPresent(dataContainerChild -> destPortsBuilder.setOp(
NumericTwoByteOperandParser.INSTANCE.create((Set<String>) dataContainerChild.getValue())));
node.getChild(VALUE_NID).ifPresent(
- dataContainerChild -> destPortsBuilder.setValue((Integer) dataContainerChild.getValue()));
+ dataContainerChild -> destPortsBuilder.setValue((Uint16) dataContainerChild.getValue()));
destinationPorts.add(destPortsBuilder.build());
}
node.getChild(OP_NID).ifPresent(dataContainerChild -> sourcePortsBuilder.setOp(
NumericTwoByteOperandParser.INSTANCE.create((Set<String>) dataContainerChild.getValue())));
node.getChild(VALUE_NID).ifPresent(
- dataContainerChild -> sourcePortsBuilder.setValue((Integer) dataContainerChild.getValue()));
+ dataContainerChild -> sourcePortsBuilder.setValue((Uint16) dataContainerChild.getValue()));
sourcePorts.add(sourcePortsBuilder.build());
}
node.getChild(OP_NID).ifPresent(dataContainerChild -> typesBuilder.setOp(
NumericOneByteOperandParser.INSTANCE.create((Set<String>) dataContainerChild.getValue())));
final Optional<DataContainerChild<? extends PathArgument, ?>> valueNode = node.getChild(VALUE_NID);
- valueNode.ifPresent(dataContainerChild -> typesBuilder.setValue((Short) dataContainerChild.getValue()));
+ valueNode.ifPresent(dataContainerChild -> typesBuilder.setValue((Uint8) dataContainerChild.getValue()));
types.add(typesBuilder.build());
}
opValue.ifPresent(dataContainerChild -> codesBuilder.setOp(NumericOneByteOperandParser
.INSTANCE.create((Set<String>) dataContainerChild.getValue())));
final Optional<DataContainerChild<? extends PathArgument, ?>> valueNode = node.getChild(VALUE_NID);
- valueNode.ifPresent(dataContainerChild -> codesBuilder.setValue((Short) dataContainerChild.getValue()));
+ valueNode.ifPresent(dataContainerChild -> codesBuilder.setValue((Uint8) dataContainerChild.getValue()));
codes.add(codesBuilder.build());
}
node.getChild(OP_NID).ifPresent(dataContainerChild -> tcpFlagsBuilder
.setOp(BitmaskOperandParser.INSTANCE.create((Set<String>) dataContainerChild.getValue())));
node.getChild(VALUE_NID).ifPresent(
- dataContainerChild -> tcpFlagsBuilder.setValue((Integer) dataContainerChild.getValue()));
+ dataContainerChild -> tcpFlagsBuilder.setValue((Uint16) dataContainerChild.getValue()));
tcpFlags.add(tcpFlagsBuilder.build());
}
node.getChild(OP_NID).ifPresent(dataContainerChild -> packetLengthsBuilder.setOp(
NumericTwoByteOperandParser.INSTANCE.create((Set<String>) dataContainerChild.getValue())));
node.getChild(VALUE_NID).ifPresent(
- dataContainerChild -> packetLengthsBuilder.setValue((Integer) dataContainerChild.getValue()));
+ dataContainerChild -> packetLengthsBuilder.setValue((Uint16) dataContainerChild.getValue()));
packetLengths.add(packetLengthsBuilder.build());
}
node.getChild(OP_NID).ifPresent(dataContainerChild -> dscpsLengthsBuilder.setOp(
NumericOneByteOperandParser.INSTANCE.create((Set<String>) dataContainerChild.getValue())));
node.getChild(VALUE_NID).ifPresent(
- dataContainerChild -> dscpsLengthsBuilder.setValue(new Dscp((Short) dataContainerChild.getValue())));
+ dataContainerChild -> dscpsLengthsBuilder.setValue(new Dscp((Uint8) dataContainerChild.getValue())));
dscpsLengths.add(dscpsLengthsBuilder.build());
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.flowspec.destination.group.ipv4.flowspec.flowspec.type.SourcePrefixCaseBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.flowspec.destination.group.ipv4.flowspec.flowspec.type.protocol.ip._case.ProtocolIps;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.flowspec.destination.group.ipv4.flowspec.flowspec.type.protocol.ip._case.ProtocolIpsBuilder;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
.INSTANCE.create((Set<String>) dataContainerChild.getValue())));
final Optional<DataContainerChild<? extends PathArgument, ?>> valueNode
= node.getChild(AbstractFlowspecNlriParser.VALUE_NID);
- valueNode.ifPresent(dataContainerChild -> ipsBuilder.setValue((Short) dataContainerChild.getValue()));
+ valueNode.ifPresent(dataContainerChild -> ipsBuilder.setValue((Uint8) dataContainerChild.getValue()));
protocolIps.add(ipsBuilder.build());
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.flowspec.destination.group.ipv6.flowspec.flowspec.type.flow.label._case.FlowLabelBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.flowspec.destination.group.ipv6.flowspec.flowspec.type.next.header._case.NextHeaders;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.flowspec.destination.group.ipv6.flowspec.flowspec.type.next.header._case.NextHeadersBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
final Optional<DataContainerChild<? extends PathArgument, ?>> valueNode
= node.getChild(AbstractFlowspecNlriParser.VALUE_NID);
valueNode.ifPresent(
- dataContainerChild -> nextHeadersBuilder.setValue((Short) dataContainerChild.getValue()));
+ dataContainerChild -> nextHeadersBuilder.setValue((Uint8) dataContainerChild.getValue()));
nextHeaders.add(nextHeadersBuilder.build());
}
final Optional<DataContainerChild<? extends PathArgument, ?>> valueNode
= node.getChild(AbstractFlowspecNlriParser.VALUE_NID);
valueNode.ifPresent(
- dataContainerChild -> flowLabelsBuilder.setValue((Long) dataContainerChild.getValue()));
+ dataContainerChild -> flowLabelsBuilder.setValue((Uint32) dataContainerChild.getValue()));
flowLabels.add(flowLabelsBuilder.build());
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.RouteDistinguisher;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.RouteDistinguisherBuilder;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue((short) 100).build()).build())
+ .withValue(Uint8.valueOf(100)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue((short) 200).build()).build())
+ .withValue(Uint8.valueOf(200)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE))
.build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue((short) 240).build()).build())
+ .withValue(Uint8.valueOf(240)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.LESS_THAN_VALUE))
.build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue(100).build()).build())
+ .withValue(Uint16.valueOf(100)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractNumericOperandParser.EQUALS_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue(1024).build()).build())
+ .withValue(Uint16.valueOf(1024)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new DestinationPortCaseBuilder().setDestinationPorts(Lists.newArrayList(
AbstractNumericOperandParser.GREATER_THAN_VALUE,
AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue(8080).build()).build())
+ .withValue(Uint16.valueOf(8080)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new SourcePortCaseBuilder().setSourcePorts(Lists.newArrayList(
AbstractNumericOperandParser.GREATER_THAN_VALUE,
AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue((short) 22).build()).build())
+ .withValue(Uint8.valueOf(22)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new IcmpTypeCaseBuilder().setTypes(Lists.newArrayList(
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.OP_NID)
.withValue(Collections.emptySet()).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue((short) 23).build()).build())
+ .withValue(Uint8.valueOf(23)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new IcmpCodeCaseBuilder().setCodes(Lists.newArrayList(new CodesBuilder()
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE,
AbstractOperandParser.END_OF_LIST_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue(99).build()).build())
+ .withValue(Uint16.valueOf(99)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new TcpFlagsCaseBuilder().setTcpFlags(Lists.newArrayList(new TcpFlagsBuilder()
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE,
AbstractNumericOperandParser.GREATER_THAN_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue(101).build()).build())
+ .withValue(Uint16.valueOf(101)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new PacketLengthCaseBuilder().setPacketLengths(Lists.newArrayList(
AbstractOperandParser.END_OF_LIST_VALUE,
AbstractNumericOperandParser.GREATER_THAN_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv4NlriParser.VALUE_NID)
- .withValue((short) 15).build()).build())
+ .withValue(Uint8.valueOf(15)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new DscpCaseBuilder().setDscps(Lists.newArrayList(new DscpsBuilder().setValue(
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.unreach.nlri.WithdrawnRoutesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.Ipv6AddressFamily;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.RouteDistinguisher;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID)
- .withValue((short) 100).build()).build())
+ .withValue(Uint8.valueOf(100)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID)
- .withValue((short) 200).build()).build())
+ .withValue(Uint8.valueOf(200)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE))
.build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID)
- .withValue((short) 210).build()).build())
+ .withValue(Uint8.valueOf(210)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID)
- .withValue(100L).build()).build())
+ .withValue(Uint32.valueOf(100)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(FLOW_LABEL_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(FlowspecL3vpnIpv6NlriParser.VALUE_NID)
- .withValue(200L).build()).build())
+ .withValue(Uint32.valueOf(200)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.unreach.nlri.WithdrawnRoutesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.Ipv4AddressFamily;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 100).build()).build())
+ .withValue(Uint8.valueOf(100)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 200).build()).build())
+ .withValue(Uint8.valueOf(200)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(PROTOCOL_IP_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE))
.build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 240).build()).build())
+ .withValue(Uint8.valueOf(240)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.LESS_THAN_VALUE))
.build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue(100).build()).build())
+ .withValue(Uint16.valueOf(100)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractNumericOperandParser.EQUALS_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue(1024).build()).build())
+ .withValue(Uint16.valueOf(1024)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new DestinationPortCaseBuilder().setDestinationPorts(Lists.newArrayList(
AbstractNumericOperandParser.GREATER_THAN_VALUE,
AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue(8080).build()).build())
+ .withValue(Uint16.valueOf(8080)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new SourcePortCaseBuilder().setSourcePorts(Lists.newArrayList(
AbstractNumericOperandParser.GREATER_THAN_VALUE,
AbstractNumericOperandParser.LESS_THAN_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 22).build()).build())
+ .withValue(Uint8.valueOf(22)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new IcmpTypeCaseBuilder().setTypes(Lists.newArrayList(new TypesBuilder()
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
.withValue(Collections.emptySet()).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 23).build()).build())
+ .withValue(Uint8.valueOf(23)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new IcmpCodeCaseBuilder().setCodes(Lists.newArrayList(new CodesBuilder()
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE,
AbstractOperandParser.END_OF_LIST_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue(99).build()).build())
+ .withValue(Uint16.valueOf(99)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new TcpFlagsCaseBuilder().setTcpFlags(Lists.newArrayList(new TcpFlagsBuilder()
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE,
AbstractNumericOperandParser.GREATER_THAN_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue(101).build()).build())
+ .withValue(Uint16.valueOf(101)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new PacketLengthCaseBuilder().setPacketLengths(Lists.newArrayList(
AbstractOperandParser.END_OF_LIST_VALUE,
AbstractNumericOperandParser.GREATER_THAN_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 15).build()).build())
+ .withValue(Uint8.valueOf(15)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
expectedFS.setFlowspecType(new DscpCaseBuilder().setDscps(Lists.newArrayList(new DscpsBuilder()
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.reach.nlri.AdvertizedRoutesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.mp.unreach.nlri.WithdrawnRoutesBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.types.rev180329.Ipv6AddressFamily;
+import org.opendaylight.yangtools.yang.common.Uint32;
+import org.opendaylight.yangtools.yang.common.Uint8;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.MapEntryNode;
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 100).build()).build())
+ .withValue(Uint8.valueOf(100)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 200).build()).build())
+ .withValue(Uint8.valueOf(200)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(NEXT_HEADER_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE, AbstractNumericOperandParser.EQUALS_VALUE))
.build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue((short) 210).build()).build())
+ .withValue(Uint8.valueOf(210)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
.withValue(Sets.newHashSet(AbstractOperandParser.END_OF_LIST_VALUE,
AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue(100L).build()).build())
+ .withValue(Uint32.valueOf(100)).build()).build())
.withChild(Builders.unkeyedListEntryBuilder().withNodeIdentifier(FLOW_LABEL_NID)
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.OP_NID)
.withValue(Sets.newHashSet(AbstractOperandParser.AND_BIT_VALUE)).build())
.withChild(Builders.leafBuilder().withNodeIdentifier(AbstractFlowspecNlriParser.VALUE_NID)
- .withValue(200L).build()).build())
+ .withValue(Uint32.valueOf(200)).build()).build())
.build()).build()).build()).build());
final FlowspecBuilder expectedFS = new FlowspecBuilder();
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.linkstate.object.type.link._case.LocalNodeDescriptors;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.linkstate.object.type.link._case.RemoteNodeDescriptors;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint16;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
ifPresentApply(descriptors, IPV6_NEIGHBOR_NID,
value -> linkDescBuilder.setIpv6NeighborAddress(new Ipv6InterfaceIdentifier((String) value)));
ifPresentApply(descriptors, TlvUtil.MULTI_TOPOLOGY_NID,
- value -> linkDescBuilder.setMultiTopologyId(new TopologyIdentifier((Integer) value)));
+ value -> linkDescBuilder.setMultiTopologyId(new TopologyIdentifier((Uint16) value)));
return linkDescBuilder.build();
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.TopologyIdentifier;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.linkstate.object.type.link._case.LinkDescriptors;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint16;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
public final class MultiTopoIdTlvParser implements LinkstateTlvParser<TopologyIdentifier>,
public static TopologyIdentifier serializeModel(final ContainerNode prefixDesc) {
if (prefixDesc.getChild(TlvUtil.MULTI_TOPOLOGY_NID).isPresent()) {
- return new TopologyIdentifier((Integer) prefixDesc.getChild(TlvUtil.MULTI_TOPOLOGY_NID).get().getValue());
+ return new TopologyIdentifier((Uint16) prefixDesc.getChild(TlvUtil.MULTI_TOPOLOGY_NID).get().getValue());
}
return null;
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.TunnelId;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint16;
+import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.ChoiceNode;
public static TeLspCase serializeTeLsp(final ChoiceNode objectType) {
final TeLspCaseBuilder teLsp = new TeLspCaseBuilder();
- teLsp.setLspId(new LspId((Long) objectType.getChild(LSP_ID).get().getValue()));
- teLsp.setTunnelId(new TunnelId((Integer) objectType.getChild(TUNNEL_ID).get().getValue()));
+ teLsp.setLspId(new LspId((Uint32) objectType.getChild(LSP_ID).get().getValue()));
+ teLsp.setTunnelId(new TunnelId((Uint16) objectType.getChild(TUNNEL_ID).get().getValue()));
final ChoiceNode addressFamily = (ChoiceNode) objectType.getChild(ADDRESS_FAMILY).get();
teLsp.setAddressFamily(serializeAddressFamily(addressFamily,
addressFamily.getChild(IPV4_TUNNEL_SENDER_ADDRESS).isPresent()));
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.network.concepts.rev131125.IsoSystemIdentifier;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.LspId;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.TunnelId;
+import org.opendaylight.yangtools.yang.common.Uint16;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.common.Uint64;
import org.opendaylight.yangtools.yang.common.Uint8;
ipv4NeighborAddress.withNodeIdentifier(LinkNlriParser.IPV4_NEIGHBOR_NID);
ipv4NeighborAddress.withValue("197.20.160.40");
- final ImmutableLeafNodeBuilder<Integer> multiTopologyId = new ImmutableLeafNodeBuilder<>();
+ final ImmutableLeafNodeBuilder<Uint16> multiTopologyId = new ImmutableLeafNodeBuilder<>();
multiTopologyId.withNodeIdentifier(TlvUtil.MULTI_TOPOLOGY_NID);
- multiTopologyId.withValue(3);
+ multiTopologyId.withValue(Uint16.valueOf(3));
linkDescriptors.addChild(linkLocalIdentifier.build());
linkDescriptors.addChild(linkRemoteIdentifier.build());
prefixDescriptors.addChild(asNumber.build());
prefixDescriptors.addChild(domainID.build());
- final ImmutableLeafNodeBuilder<Integer> multiTopologyId = new ImmutableLeafNodeBuilder<>();
+ final ImmutableLeafNodeBuilder<Uint16> multiTopologyId = new ImmutableLeafNodeBuilder<>();
multiTopologyId.withNodeIdentifier(TlvUtil.MULTI_TOPOLOGY_NID);
- multiTopologyId.withValue(15);
+ multiTopologyId.withValue(Uint16.valueOf(15));
prefixDescriptors.addChild(multiTopologyId.build());
final DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> objectType = Builders.choiceBuilder();
objectType.withNodeIdentifier(LinkstateNlriParser.OBJECT_TYPE_NID);
- final ImmutableLeafNodeBuilder<Long> lspId = new ImmutableLeafNodeBuilder<>();
+ final ImmutableLeafNodeBuilder<Uint32> lspId = new ImmutableLeafNodeBuilder<>();
lspId.withNodeIdentifier(AbstractTeLspNlriCodec.LSP_ID);
- lspId.withValue(1L);
+ lspId.withValue(Uint32.ONE);
- final ImmutableLeafNodeBuilder<Integer> tunnelId = new ImmutableLeafNodeBuilder<>();
+ final ImmutableLeafNodeBuilder<Uint16> tunnelId = new ImmutableLeafNodeBuilder<>();
tunnelId.withNodeIdentifier(AbstractTeLspNlriCodec.TUNNEL_ID);
- tunnelId.withValue(1);
+ tunnelId.withValue(Uint16.ONE);
final DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> addressFamily = Builders.choiceBuilder();
addressFamily.withNodeIdentifier(AbstractTeLspNlriCodec.ADDRESS_FAMILY);
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.Open;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.open.message.BgpParameters;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.open.message.bgp.parameters.OptionalCapabilities;
+import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.schema.DataContainerNode;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
public static AsNumber extractAS(final DataContainerNode<?> dtc, final NodeIdentifier nid) {
final NormalizedNode<?, ?> as = NormalizedNodes.findNode(dtc, nid).orElse(null);
if (as != null) {
- return new AsNumber((Long) as.getValue());
+ return new AsNumber((Uint32) as.getValue());
}
return null;
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.rib.rev180329.rib.TablesKey;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
import org.opendaylight.yangtools.yang.common.QName;
+import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.ContainerNode;
private PathId extractPathId(final MapEntryNode ipv4Route) {
final Optional<DataContainerChild<? extends PathArgument, ?>> pathId = ipv4Route
.getChild(this.routeKeyPathIdLeaf);
- return pathId.map(dataContainerChild -> new PathId((Long) dataContainerChild.getValue())).orElse(null);
+ return pathId.map(dataContainerChild -> new PathId((Uint32) dataContainerChild.getValue())).orElse(null);
}
public void close() {