mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-5992: default values of configuraiton parameters in configuration table are set NULL on fresh setup Some configuration parameters have Component names different from fresh and upgrade setup
Signed-off-by: Rajani Karuturi <rajanikaruturi@gmail.com>
This commit is contained in:
parent
ffbcd29103
commit
5d389b1a71
@ -136,12 +136,14 @@ public class ConfigDepotImpl implements ConfigDepot, ConfigDepotAdmin {
|
|||||||
}
|
}
|
||||||
_configDao.persist(vo);
|
_configDao.persist(vo);
|
||||||
} else {
|
} else {
|
||||||
if (vo.isDynamic() != key.isDynamic() || !ObjectUtils.equals(vo.getDescription(), key.description()) || !ObjectUtils.equals(vo.getDefaultValue(), key.defaultValue())
|
if (vo.isDynamic() != key.isDynamic() || !ObjectUtils.equals(vo.getDescription(), key.description()) || !ObjectUtils.equals(vo.getDefaultValue(), key.defaultValue()) ||
|
||||||
|| !ObjectUtils.equals(vo.getScope(), key.scope().toString())) {
|
!ObjectUtils.equals(vo.getScope(), key.scope().toString()) ||
|
||||||
|
!ObjectUtils.equals(vo.getComponent(), componentName)) {
|
||||||
vo.setDynamic(key.isDynamic());
|
vo.setDynamic(key.isDynamic());
|
||||||
vo.setDescription(key.description());
|
vo.setDescription(key.description());
|
||||||
vo.setDefaultValue(key.defaultValue());
|
vo.setDefaultValue(key.defaultValue());
|
||||||
vo.setScope(key.scope().toString());
|
vo.setScope(key.scope().toString());
|
||||||
|
vo.setComponent(componentName);
|
||||||
vo.setUpdated(date);
|
vo.setUpdated(date);
|
||||||
_configDao.persist(vo);
|
_configDao.persist(vo);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -206,6 +206,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
|
|||||||
value = ("Hidden".equals(category) || "Secure".equals(category)) ? DBEncryptionUtil.encrypt(value) : value;
|
value = ("Hidden".equals(category) || "Secure".equals(category)) ? DBEncryptionUtil.encrypt(value) : value;
|
||||||
String description = c.getDescription();
|
String description = c.getDescription();
|
||||||
ConfigurationVO configVO = new ConfigurationVO(category, instance, component, name, value, description);
|
ConfigurationVO configVO = new ConfigurationVO(category, instance, component, name, value, description);
|
||||||
|
configVO.setDefaultValue(value);
|
||||||
_configDao.persist(configVO);
|
_configDao.persist(configVO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user