List<CloudStackIpAddress> cloudIps = getApi().listPublicIpAddresses(null, null, null, null, null, request.getPublicIp(), null, null, null);
if (cloudIps == null)
throw new Exception("Specified ipAddress doesn't exist");
CloudStackIpAddress cloudIp = cloudIps.get(0);
CloudStackInfoResponse resp = getApi().disableStaticNat(cloudIp.getId());
if (resp != null) {
return resp.getSuccess();
}
} catch(Exception e) {
logger.error( "EC2 DisassociateAddress - ", e);
handleException(e);
}