@Test public void testDecodeDeleteIPv6() throws Exception { DeleteIpv6Attribute ipv4Attribute = (DeleteIpv6Attribute) LegacyAttributeFactory.decodeDeleteIPv6(AttributeType.DelIpv6, 25, new byte[] {0, 0, 0, 2, 0, 0, 0, 25, 32, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, -128}); assertEquals(IpPrefixBuilder.getDefaultInstance("2002:0:0:0:0:0:0:2/128"), ipv4Attribute.getDeleteIpv6Attributes().getIpPrefix()); }
public static AttributeOptionalFields decodeDeleteIPv6(AttributeType operationCode, int length, byte[] value) throws UnknownHostException, AddressLengthException, UnknownPrefixException { MappingRecord mappingRecord = org.opendaylight.sxp.core.messaging.legacy.MappingRecord.decodeAddress(operationCode, length, value); DeleteIpv6AttributeBuilder _attributeBuilder = new DeleteIpv6AttributeBuilder(); DeleteIpv6AttributesBuilder _attributesBuilder = new DeleteIpv6AttributesBuilder(); _attributesBuilder.setIpPrefix(mappingRecord.getAddress()); _attributeBuilder.setDeleteIpv6Attributes(_attributesBuilder.build()); return _attributeBuilder.build(); }
LegacyAttributeFactory { public static AttributeOptionalFields decodeDeleteIPv6(AttributeType operationCode, int length, byte[] value) throws UnknownHostException, AddressLengthException, UnknownPrefixException { MappingRecord mappingRecord = org.opendaylight.sxp.core.messaging.legacy.MappingRecord.decodeAddress(operationCode, length, value); DeleteIpv6AttributeBuilder _attributeBuilder = new DeleteIpv6AttributeBuilder(); DeleteIpv6AttributesBuilder _attributesBuilder = new DeleteIpv6AttributesBuilder(); _attributesBuilder.setIpPrefix(mappingRecord.getAddress()); _attributeBuilder.setDeleteIpv6Attributes(_attributesBuilder.build()); return _attributeBuilder.build(); } }
LegacyAttributeFactory { public static AttributeOptionalFields decodeDeleteIPv6(AttributeType operationCode, int length, byte[] value) throws UnknownHostException, AddressLengthException, UnknownPrefixException { MappingRecord mappingRecord = org.opendaylight.sxp.core.messaging.legacy.MappingRecord.decodeAddress(operationCode, length, value); DeleteIpv6AttributeBuilder _attributeBuilder = new DeleteIpv6AttributeBuilder(); DeleteIpv6AttributesBuilder _attributesBuilder = new DeleteIpv6AttributesBuilder(); _attributesBuilder.setIpPrefix(mappingRecord.getAddress()); _attributeBuilder.setDeleteIpv6Attributes(_attributesBuilder.build()); return _attributeBuilder.build(); }  }
LegacyAttributeFactory { public static AttributeOptionalFields decodeDeleteIPv6(AttributeType operationCode, int length, byte[] value) throws UnknownHostException, AddressLengthException, UnknownPrefixException { MappingRecord mappingRecord = org.opendaylight.sxp.core.messaging.legacy.MappingRecord.decodeAddress(operationCode, length, value); DeleteIpv6AttributeBuilder _attributeBuilder = new DeleteIpv6AttributeBuilder(); DeleteIpv6AttributesBuilder _attributesBuilder = new DeleteIpv6AttributesBuilder(); _attributesBuilder.setIpPrefix(mappingRecord.getAddress()); _attributeBuilder.setDeleteIpv6Attributes(_attributesBuilder.build()); return _attributeBuilder.build(); }  static MappingRecord createAddIpv4(Sgt sgt, IpPrefix prefix); static MappingRecord createAddIpv6(Sgt sgt, IpPrefix prefix); static MappingRecord createDeleteIpv4(IpPrefix prefix); static MappingRecord createDeleteIpv6(IpPrefix prefix); static AttributeOptionalFields decodeAddIPv4(AttributeType operationCode, int length, byte[] value); static AttributeOptionalFields decodeAddIPv6(AttributeType operationCode, int length, byte[] value); static AttributeOptionalFields decodeDeleteIPv4(AttributeType operationCode, int length, byte[] value); static AttributeOptionalFields decodeDeleteIPv6(AttributeType operationCode, int length, byte[] value); }
LegacyAttributeFactory { public static AttributeOptionalFields decodeDeleteIPv6(AttributeType operationCode, int length, byte[] value) throws UnknownHostException, AddressLengthException, UnknownPrefixException { MappingRecord mappingRecord = org.opendaylight.sxp.core.messaging.legacy.MappingRecord.decodeAddress(operationCode, length, value); DeleteIpv6AttributeBuilder _attributeBuilder = new DeleteIpv6AttributeBuilder(); DeleteIpv6AttributesBuilder _attributesBuilder = new DeleteIpv6AttributesBuilder(); _attributesBuilder.setIpPrefix(mappingRecord.getAddress()); _attributeBuilder.setDeleteIpv6Attributes(_attributesBuilder.build()); return _attributeBuilder.build(); }  static MappingRecord createAddIpv4(Sgt sgt, IpPrefix prefix); static MappingRecord createAddIpv6(Sgt sgt, IpPrefix prefix); static MappingRecord createDeleteIpv4(IpPrefix prefix); static MappingRecord createDeleteIpv6(IpPrefix prefix); static AttributeOptionalFields decodeAddIPv4(AttributeType operationCode, int length, byte[] value); static AttributeOptionalFields decodeAddIPv6(AttributeType operationCode, int length, byte[] value); static AttributeOptionalFields decodeDeleteIPv4(AttributeType operationCode, int length, byte[] value); static AttributeOptionalFields decodeDeleteIPv6(AttributeType operationCode, int length, byte[] value);  }