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:
Harikrishna Patnala 2014-01-30 17:14:27 +05:30 committed by Rajani Karuturi
parent ffbcd29103
commit 5d389b1a71
2 changed files with 5 additions and 2 deletions

View File

@ -136,12 +136,14 @@ public class ConfigDepotImpl implements ConfigDepot, ConfigDepotAdmin {
}
_configDao.persist(vo);
} else {
if (vo.isDynamic() != key.isDynamic() || !ObjectUtils.equals(vo.getDescription(), key.description()) || !ObjectUtils.equals(vo.getDefaultValue(), key.defaultValue())
|| !ObjectUtils.equals(vo.getScope(), key.scope().toString())) {
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.getComponent(), componentName)) {
vo.setDynamic(key.isDynamic());
vo.setDescription(key.description());
vo.setDefaultValue(key.defaultValue());
vo.setScope(key.scope().toString());
vo.setComponent(componentName);
vo.setUpdated(date);
_configDao.persist(vo);
}

View File

@ -206,6 +206,7 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
value = ("Hidden".equals(category) || "Secure".equals(category)) ? DBEncryptionUtil.encrypt(value) : value;
String description = c.getDescription();
ConfigurationVO configVO = new ConfigurationVO(category, instance, component, name, value, description);
configVO.setDefaultValue(value);
_configDao.persist(configVO);
}
}