use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.lockmanager.rev160413.UnlockOutput in project netvirt by opendaylight.
the class VpnUtil method unlockSubnet.
// We store the cause, which is what we really care about
@SuppressWarnings("checkstyle:AvoidHidingCauseException")
public void unlockSubnet(String subnetId) {
UnlockInput input = new UnlockInputBuilder().setLockName(subnetId).build();
Future<RpcResult<UnlockOutput>> result = lockManager.unlock(input);
try {
if (result != null && result.get().isSuccessful()) {
LOG.debug("unlockSubnet: Unlocked {}", subnetId);
} else {
LOG.debug("unlockSubnet: Unable to unlock subnet {}", subnetId);
}
} catch (InterruptedException | ExecutionException e) {
LOG.error("unlockSubnet: Unable to unlock subnet {}", subnetId);
throw new RuntimeException(String.format("Unable to unlock subnetId %s", subnetId), e.getCause());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.lockmanager.rev160413.UnlockOutput in project netvirt by opendaylight.
the class FibUtil method unlockCluster.
public static void unlockCluster(LockManagerService lockManager, String lockName) {
UnlockInput input = new UnlockInputBuilder().setLockName(lockName).build();
Future<RpcResult<UnlockOutput>> result = lockManager.unlock(input);
try {
if (result != null && result.get().isSuccessful()) {
LOG.debug("unlockCluster: Unlocked {}", lockName);
} else {
LOG.error("unlockCluster: Unable to release lock for {}", lockName);
}
} catch (InterruptedException | ExecutionException e) {
LOG.error("unlockCluster: Unable to unlock {}", lockName, e);
}
}
Aggregations