mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2940: Allowing Replacement of realhostip.com with a customized domain for SSVM
(cherry picked from commit e23b10319f)
Conflicts:
plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
server/src/com/cloud/storage/upload/UploadMonitorImpl.java
This commit is contained in:
parent
e0fbc3f147
commit
9be402cb06
|
|
@ -89,12 +89,17 @@ public class CloudStackImageStoreDriverImpl extends BaseImageStoreDriverImpl {
|
|||
String scheme = "http";
|
||||
boolean _sslCopy = false;
|
||||
String sslCfg = _configDao.getValue(Config.SecStorageEncryptCopy.toString());
|
||||
String _ssvmUrlDomain = _configDao.getValue("secstorage.ssl.cert.domain");
|
||||
if (sslCfg != null) {
|
||||
_sslCopy = Boolean.parseBoolean(sslCfg);
|
||||
}
|
||||
if (_sslCopy) {
|
||||
hostname = ipAddress.replace(".", "-");
|
||||
hostname = hostname + ".realhostip.com";
|
||||
if(_ssvmUrlDomain != null && _ssvmUrlDomain.length() > 0){
|
||||
hostname = hostname + "." + _ssvmUrlDomain;
|
||||
} else {
|
||||
hostname = hostname + ".realhostip.com";
|
||||
}
|
||||
scheme = "https";
|
||||
}
|
||||
return scheme + "://" + hostname + "/userdata/" + uuid;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ public class DownloadMonitorImpl extends ManagerBase implements DownloadMonitor
|
|||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) {
|
||||
final Map<String, String> configs = _configDao.getConfiguration("ManagementServer", params);
|
||||
final Map<String, String> configs = _configDao.getConfiguration("management-server", params);
|
||||
_sslCopy = Boolean.parseBoolean(configs.get("secstorage.encrypt.copy"));
|
||||
_proxy = configs.get(Config.SecStorageProxy.key());
|
||||
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ public class UploadMonitorImpl extends ManagerBase implements UploadMonitor {
|
|||
|
||||
@Override
|
||||
public boolean configure(String name, Map<String, Object> params) throws ConfigurationException {
|
||||
final Map<String, String> configs = _configDao.getConfiguration("ManagementServer", params);
|
||||
final Map<String, String> configs = _configDao.getConfiguration("management-server", params);
|
||||
_sslCopy = Boolean.parseBoolean(configs.get("secstorage.encrypt.copy"));
|
||||
|
||||
String cert = configs.get("secstorage.secure.copy.cert");
|
||||
|
|
|
|||
Loading…
Reference in New Issue