this.ip = vip.getData().getIp();
}
@Override
public boolean run() throws CloudException, IOException {
VirtualIp vip = ipPools.findVirtualIp(project, ip);
if (vip == null) {
log.warn("Virtual IP not found, giving up: {}", ip);
throw new IllegalStateException();
}
if (!vip.getData().hasInstanceId()) {
log.warn("Virtual IP not attached to machine, giving up: {}", ip);
throw new IllegalStateException();
}
if (vip.getData().getInstanceId() != instanceId) {
log.warn("Virtual IP not attached to same machine, giving up: {}", ip);
throw new IllegalStateException();
}
InstanceData instance = computeServices.findInstance(project.getId(), instanceId);