Allon Mureinik has posted comments on this change. Change subject: core: Limitation addition for downgrading DC's compatible version. ......................................................................
Patch Set 1: (5 comments) Genrally looks good! See minor comment inline. http://gerrit.ovirt.org/#/c/35790/1//COMMIT_MSG Commit Message: Line 5: CommitDate: 2014-12-02 13:53:00 +0200 Line 6: Line 7: core: Limitation addition for downgrading DC's compatible version. Line 8: Line 9: Downgrading a DC's compatible version can cause in some cases a s/compatible/compatibility/ Line 10: downgrade of the attached storage domains' format which is not Line 11: supported. hence a limitation was added in this command's CDA. Line 12: Line 13: Change-Id: Ib97488c705a32fe73b390ef226b1ad19a3784b76 Line 7: core: Limitation addition for downgrading DC's compatible version. Line 8: Line 9: Downgrading a DC's compatible version can cause in some cases a Line 10: downgrade of the attached storage domains' format which is not Line 11: supported. hence a limitation was added in this command's CDA. c/hence/Hence/ Line 12: Line 13: Change-Id: Ib97488c705a32fe73b390ef226b1ad19a3784b76 Line 14: Bug-Url: https://bugzilla.redhat.com/1121556 http://gerrit.ovirt.org/#/c/35790/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/UpdateStoragePoolCommand.java: Line 220: return validate(validator.isNotLocalfsWithDefaultCluster()); Line 221: } Line 222: Line 223: private boolean isDowngradeChangesFormats(List<StorageDomainStatic> poolDomains) { Line 224: List<Object> problematicDomains = new LinkedList<>(); Should be a List<String>, no? Line 225: for (StorageDomainStatic domainStatic : poolDomains) { Line 226: // fail if the preferred storage format of each domain is earlier than the format it has. Line 227: if (VersionStorageFormatUtil.getPreferredForVersion(getStoragePool().getcompatibility_version(), Line 228: domainStatic.getStorageType()).compareTo( domainStatic.getStorageFormat()) < 0 ) { Line 223: private boolean isDowngradeChangesFormats(List<StorageDomainStatic> poolDomains) { Line 224: List<Object> problematicDomains = new LinkedList<>(); Line 225: for (StorageDomainStatic domainStatic : poolDomains) { Line 226: // fail if the preferred storage format of each domain is earlier than the format it has. Line 227: if (VersionStorageFormatUtil.getPreferredForVersion(getStoragePool().getcompatibility_version(), I'd extract getStoragePool().getcompatibility_version() to a local variable - seems more readable to me. Line 228: domainStatic.getStorageType()).compareTo( domainStatic.getStorageFormat()) < 0 ) { Line 229: problematicDomains.add(domainStatic.getStorageName()); Line 230: } Line 231: } Line 224: List<Object> problematicDomains = new LinkedList<>(); Line 225: for (StorageDomainStatic domainStatic : poolDomains) { Line 226: // fail if the preferred storage format of each domain is earlier than the format it has. Line 227: if (VersionStorageFormatUtil.getPreferredForVersion(getStoragePool().getcompatibility_version(), Line 228: domainStatic.getStorageType()).compareTo( domainStatic.getStorageFormat()) < 0 ) { redundant whitespace before domainStatic. Line 229: problematicDomains.add(domainStatic.getStorageName()); Line 230: } Line 231: } Line 232: if (!problematicDomains.isEmpty()) { -- To view, visit http://gerrit.ovirt.org/35790 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ib97488c705a32fe73b390ef226b1ad19a3784b76 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Amit Aviram <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Amit Aviram <[email protected]> Gerrit-Reviewer: Daniel Erez <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Maor Lipchuk <[email protected]> Gerrit-Reviewer: Tal Nisan <[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
