Search in sources :

Example 1 with RemoveVpnLabelOutputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelOutputBuilder in project netvirt by opendaylight.

the class VpnRpcServiceImpl method removeVpnLabel.

/**
 * Remove label for the given ip prefix from the associated VPN.
 */
@Override
public ListenableFuture<RpcResult<RemoveVpnLabelOutput>> removeVpnLabel(RemoveVpnLabelInput input) {
    String vpnName = input.getVpnName();
    String ipPrefix = input.getIpPrefix();
    String rd = vpnUtil.getVpnRd(vpnName);
    vpnUtil.releaseId(VpnConstants.VPN_IDPOOL_NAME, VpnUtil.getNextHopLabelKey(rd != null ? rd : vpnName, ipPrefix));
    return RpcResultBuilder.success(new RemoveVpnLabelOutputBuilder().build()).buildFuture();
}
Also used : RemoveVpnLabelOutputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelOutputBuilder)

Aggregations

RemoveVpnLabelOutputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.vpn.rpc.rev160201.RemoveVpnLabelOutputBuilder)1