use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.ReleaseIdInputBuilder in project netvirt by opendaylight.
the class DhcpAllocationPoolManager method releaseIdAllocation.
private void releaseIdAllocation(String groupIdKey, String idKey) {
ReleaseIdInput getIdInput = new ReleaseIdInputBuilder().setPoolName(groupIdKey).setIdKey(idKey).build();
JdkFutures.addErrorLogging(idManager.releaseId(getIdInput), LOG, "Release Id");
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.ReleaseIdInputBuilder in project netvirt by opendaylight.
the class NaptManager method removePortFromPool.
void removePortFromPool(String internalIpPort, String externalIp) {
LOG.debug("removePortFromPool : method called");
ReleaseIdInput idInput = new ReleaseIdInputBuilder().setPoolName(externalIp).setIdKey(internalIpPort).build();
try {
Future<RpcResult<Void>> result = idManager.releaseId(idInput);
RpcResult<Void> rpcResult = result.get();
if (!rpcResult.isSuccessful()) {
LOG.error("removePortFromPool : idmanager failed to remove port from pool {}", rpcResult.getErrors());
}
LOG.debug("removePortFromPool : Removed port from pool for InternalIpPort {} with externalIp {}", internalIpPort, externalIp);
} catch (InterruptedException | ExecutionException e) {
LOG.error("removePortFromPool : idmanager failed when removing entry in pool with key {} with Exception", internalIpPort, e);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.ReleaseIdInputBuilder in project netvirt by opendaylight.
the class FibUtil method releaseId.
void releaseId(String poolName, String idKey) {
ReleaseIdInput idInput = new ReleaseIdInputBuilder().setPoolName(poolName).setIdKey(idKey).build();
try {
Future<RpcResult<Void>> result = idManager.releaseId(idInput);
RpcResult<Void> rpcResult = result.get();
if (!rpcResult.isSuccessful()) {
LOG.error("RPC Call to Get Unique Id for key {} returned with Errors {}", idKey, rpcResult.getErrors());
}
} catch (InterruptedException | ExecutionException e) {
LOG.warn("Exception when getting Unique Id for key {}", idKey, e);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.ReleaseIdInputBuilder in project netvirt by opendaylight.
the class NexthopManager method removeNextHopPointer.
protected void removeNextHopPointer(String nexthopKey) {
ReleaseIdInput idInput = new ReleaseIdInputBuilder().setPoolName(NEXTHOP_ID_POOL_NAME).setIdKey(nexthopKey).build();
try {
Future<RpcResult<Void>> result = idManager.releaseId(idInput);
RpcResult<Void> rpcResult = result.get();
if (!rpcResult.isSuccessful()) {
LOG.error("RPC Call to Get Unique Id for nexthopKey {} returned with Errors {}", nexthopKey, rpcResult.getErrors());
}
} catch (InterruptedException | ExecutionException e) {
LOG.warn("Exception when getting Unique Id for key {}", nexthopKey, e);
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.ReleaseIdInputBuilder in project netvirt by opendaylight.
the class NeutronvpnUtils method releaseRDId.
protected void releaseRDId(String poolName, String idKey) {
ReleaseIdInput idInput = new ReleaseIdInputBuilder().setPoolName(poolName).setIdKey(idKey).build();
try {
Future<RpcResult<Void>> result = idManager.releaseId(idInput);
RpcResult<Void> rpcResult = result.get();
if (!rpcResult.isSuccessful()) {
LOG.error("RPC Call to Get Unique Id returned with errors for poolname {} and ID Key {}: {}", poolName, idKey, rpcResult.getErrors());
} else {
LOG.info("ID {} for RD released successfully", idKey);
}
} catch (InterruptedException | ExecutionException e) {
LOG.error("Exception when trying to release ID for poolname {} and ID Key {}", poolName, idKey, e);
}
}
Aggregations