Move ipv4/ipv6 ByteBuf utilities to Ipv{4,6}Util
[bgpcep.git] / pcep / ietf-stateful07 / src / main / java / org / opendaylight / protocol / pcep / ietf / stateful07 / Stateful07LSPIdentifierIpv4TlvParser.java
index 04a177b1aa0ad3b1922534b85d63b7b6649a7a91..53eb5691dda3a0f79cf38784752ae8bb39a44e09 100644 (file)
@@ -8,7 +8,6 @@
 package org.opendaylight.protocol.pcep.ietf.stateful07;
 
 import static com.google.common.base.Preconditions.checkArgument;
-import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeIpv4Address;
 
 import io.netty.buffer.ByteBuf;
 import io.netty.buffer.Unpooled;
@@ -72,16 +71,16 @@ public final class Stateful07LSPIdentifierIpv4TlvParser implements TlvParser, Tl
         }
         final Ipv4 ipv4 = ((Ipv4Case) afi).getIpv4();
         checkArgument(ipv4.getIpv4TunnelSenderAddress() != null, "Ipv4TunnelSenderAddress is mandatory.");
-        writeIpv4Address(ipv4.getIpv4TunnelSenderAddress(), body);
+        Ipv4Util.writeIpv4Address(ipv4.getIpv4TunnelSenderAddress(), body);
         checkArgument(lsp.getLspId() != null, "LspId is mandatory.");
         body.writeShort(lsp.getLspId().getValue().shortValue());
         final TunnelId tunnelId = lsp.getTunnelId();
         checkArgument(tunnelId != null, "TunnelId is mandatory.");
         ByteBufUtils.write(body, tunnelId.getValue());
         checkArgument(ipv4.getIpv4ExtendedTunnelId() != null, "Ipv4ExtendedTunnelId is mandatory.");
-        writeIpv4Address(ipv4.getIpv4ExtendedTunnelId(), body);
+        Ipv4Util.writeIpv4Address(ipv4.getIpv4ExtendedTunnelId(), body);
         checkArgument(ipv4.getIpv4TunnelEndpointAddress() != null, "Ipv4TunnelEndpointAddress is mandatory.");
-        writeIpv4Address(ipv4.getIpv4TunnelEndpointAddress(), body);
+        Ipv4Util.writeIpv4Address(ipv4.getIpv4TunnelEndpointAddress(), body);
         TlvUtil.formatTlv(TYPE, body, buffer);
     }
 }