use of com.cloud.framework.security.keystore.KeystoreVO in project cosmic by MissionCriticalCloud.
the class ConsoleProxyManagerImpl method assignProxy.
@Override
public ConsoleProxyInfo assignProxy(final long dataCenterId, final long vmId) {
final ConsoleProxyVO proxy = doAssignProxy(dataCenterId, vmId);
if (proxy == null) {
return null;
}
if (proxy.getPublicIpAddress() == null) {
logger.warn("Assigned console proxy does not have a valid public IP address");
return null;
}
final KeystoreVO ksVo = _ksDao.findByName(ConsoleProxyManager.CERTIFICATE_NAME);
if (proxy.isSslEnabled() && ksVo == null) {
logger.warn("SSL enabled for console proxy but no server certificate found in database");
}
if (_staticPublicIp == null) {
return new ConsoleProxyInfo(proxy.isSslEnabled(), proxy.getPublicIpAddress(), _consoleProxyPort, proxy.getPort(), _consoleProxyUrlDomain);
} else {
return new ConsoleProxyInfo(proxy.isSslEnabled(), _staticPublicIp, _consoleProxyPort, _staticPort, _consoleProxyUrlDomain);
}
}
Aggregations