Martin Mucha has posted comments on this change. Change subject: tools: support for deprecating config values. ......................................................................
Patch Set 1: (4 comments) answers. http://gerrit.ovirt.org/#/c/29295/1/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKey.java File backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKey.java: Line 17: private String description; Line 18: private String alternateKey; Line 19: private String keyName; Line 20: private String value; Line 21: private final boolean isDeprecated; > s/isDeprecated/deprecated Done Line 22: private boolean reloadable; Line 23: private List<String> validValues; Line 24: private static final List<String> EMPTY_LIST = new ArrayList<String>(0); Line 25: private String version; http://gerrit.ovirt.org/#/c/29295/1/backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java File backend/manager/tools/src/main/java/org/ovirt/engine/core/config/entity/ConfigKeyFactory.java: Line 80: } Line 81: Line 82: final List list = keysConfig.getList(pathToDeprecatedAttribute); Line 83: if (list.size() != 1) { Line 84: throw new IllegalArgumentException("Configuration error"); > wouldn't you like to include the key ? Done Line 85: } Line 86: Line 87: try { Line 88: return Boolean.parseBoolean((String) list.iterator().next()); Line 86: Line 87: try { Line 88: return Boolean.parseBoolean((String) list.iterator().next()); Line 89: } catch (ClassCastException e) { Line 90: throw new IllegalArgumentException("Configuration error"); > same as above + include the problematic value Done Line 91: } Line 92: } Line 93: Line 94: public ConfigKey generateBlankConfigKey(String keyName, String keyType) { http://gerrit.ovirt.org/#/c/29295/1/packaging/etc/engine-config/engine-config.properties File packaging/etc/engine-config/engine-config.properties: Line 61: LowUtilizationForPowerSave.type=Integer Line 62: MacPoolRanges.description="MAC Addresses Pool Ranges (e.g. AA:AA:AA:AA:AA:AA-BB:BB:BB:BB:BB:BB,...")" Line 63: MacPoolRanges.type=MacAddressPoolRanges Line 64: MacPoolRanges.deprecated=true Line 65: MaxMacsCountInPool.description="Maximum MAC Addresses count in Pool" > please extract this file's changes into a separate patch, to decouple the i Done Line 66: MaxMacsCountInPool.type=Integer Line 67: MaxMacsCountInPool.deprecated=true Line 68: MaxNumberOfHostsInStoragePool.description="Max number of hosts in Storage Pool" Line 69: MaxNumberOfHostsInStoragePool.type=Integer -- To view, visit http://gerrit.ovirt.org/29295 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I636f7fe2530acfe00d8f0487001ddc781d1745a0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <[email protected]> Gerrit-Reviewer: Martin Mucha <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Oved Ourfali <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
