X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=pcep%2Fietf-stateful07%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fpcep%2Fietf%2Fstateful07%2FStateful07RSVPErrorSpecTlvParser.java;h=d7f6f0eb44e7a534cd3fef638687c1504eece020;hb=0e1dc9e0f6a570a13d6ac5a5fae329b853336c8c;hp=67708b72a7c7f562f03d56f6d145c5836a5021f0;hpb=8876195762fec76b9651bd1050dd7d71a529dda1;p=bgpcep.git diff --git a/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07RSVPErrorSpecTlvParser.java b/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07RSVPErrorSpecTlvParser.java index 67708b72a7..d7f6f0eb44 100644 --- a/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07RSVPErrorSpecTlvParser.java +++ b/pcep/ietf-stateful07/src/main/java/org/opendaylight/protocol/pcep/ietf/stateful07/Stateful07RSVPErrorSpecTlvParser.java @@ -25,19 +25,19 @@ import org.opendaylight.protocol.util.BitArray; import org.opendaylight.protocol.util.ByteArray; import org.opendaylight.protocol.util.Ipv4Util; import org.opendaylight.protocol.util.Ipv6Util; -import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress; +import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressNoZone; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.iana.rev130816.EnterpriseNumber; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.RsvpErrorSpec; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.RsvpErrorSpecBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.ErrorType; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.error.type.RsvpCase; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.error.type.RsvpCaseBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.error.type.UserCase; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.error.type.UserCaseBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.error.type.rsvp._case.RsvpError; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.error.type.rsvp._case.RsvpErrorBuilder; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.error.type.user._case.UserError; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev131222.rsvp.error.spec.tlv.rsvp.error.spec.error.type.user._case.UserErrorBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.RsvpErrorSpec; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.RsvpErrorSpecBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.ErrorType; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.error.type.RsvpCase; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.error.type.RsvpCaseBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.error.type.UserCase; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.error.type.UserCaseBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.error.type.rsvp._case.RsvpError; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.error.type.rsvp._case.RsvpErrorBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.error.type.user._case.UserError; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.ietf.stateful.rev171025.rsvp.error.spec.tlv.rsvp.error.spec.error.type.user._case.UserErrorBuilder; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.pcep.types.rev131005.Tlv; import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.rsvp.rev150820.ErrorSpec.Flags; @@ -123,9 +123,9 @@ public final class Stateful07RSVPErrorSpecTlvParser implements TlvParser, TlvSer private static RsvpCase parseRsvp(final int classType, final ByteBuf buffer) { final RsvpErrorBuilder builder = new RsvpErrorBuilder(); if (classType == RSVP_IPV4_ERROR_CLASS_TYPE) { - builder.setNode(new IpAddress(Ipv4Util.addressForByteBuf(buffer))); + builder.setNode(new IpAddressNoZone(Ipv4Util.noZoneAddressForByteBuf(buffer))); } else if (classType == RSVP_IPV6_ERROR_CLASS_TYPE) { - builder.setNode(new IpAddress(Ipv6Util.addressForByteBuf(buffer))); + builder.setNode(new IpAddressNoZone(Ipv6Util.noZoneAddressForByteBuf(buffer))); } final BitArray flags = BitArray.valueOf(buffer, FLAGS_SIZE); builder.setFlags(new Flags(flags.get(IN_PLACE), flags.get(NOT_GUILTY))); @@ -140,16 +140,16 @@ public final class Stateful07RSVPErrorSpecTlvParser implements TlvParser, TlvSer final BitArray flags = new BitArray(FLAGS_SIZE); flags.set(IN_PLACE, rsvp.getFlags().isInPlace()); flags.set(NOT_GUILTY, rsvp.getFlags().isNotGuilty()); - final IpAddress node = rsvp.getNode(); + final IpAddressNoZone node = rsvp.getNode(); Preconditions.checkArgument(node != null, "Node is mandatory."); final ByteBuf rsvpObjBuf = Unpooled.buffer(); int type = 0; - if (node.getIpv4Address() != null) { + if (node.getIpv4AddressNoZone() != null) { type = RSVP_IPV4_ERROR_CLASS_TYPE; - writeIpv4Address(node.getIpv4Address(), rsvpObjBuf); + writeIpv4Address(node.getIpv4AddressNoZone(), rsvpObjBuf); } else { type = RSVP_IPV6_ERROR_CLASS_TYPE; - writeIpv6Address(node.getIpv6Address(), rsvpObjBuf); + writeIpv6Address(node.getIpv6AddressNoZone(), rsvpObjBuf); } flags.toByteBuf(rsvpObjBuf); Preconditions.checkArgument(rsvp.getCode() != null, "Code is mandatory.");