Vered Volansky has posted comments on this change. Change subject: core: Prevent Export domains on block storage ......................................................................
Patch Set 6: (3 comments) http://gerrit.ovirt.org/#/c/36393/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/AddStorageDomainCommand.java: Line 156: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_NAME_ALREADY_EXIST); Line 157: } Line 158: if (getStorageDomain().getStorageDomainType() == StorageDomainType.ISO Line 159: && !getStorageDomain().getStorageType().isFileDomain()) { Line 160: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); Use the new message here as well? Line 161: } Line 162: if (getStorageDomain().getStorageDomainType() == StorageDomainType.ImportExport Line 163: && (getStorageDomain().getStorageType() == StorageType.LOCALFS || getStorageDomain().getStorageType().isBlockDomain())) { Line 164: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DOMAIN_TYPE_CAN_BE_CREATED_ONLY_ON_SPECIFIC_STORAGE_DOMAINS, Line 162: if (getStorageDomain().getStorageDomainType() == StorageDomainType.ImportExport Line 163: && (getStorageDomain().getStorageType() == StorageType.LOCALFS || getStorageDomain().getStorageType().isBlockDomain())) { Line 164: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_DOMAIN_TYPE_CAN_BE_CREATED_ONLY_ON_SPECIFIC_STORAGE_DOMAINS, Line 165: String.format("$domainType %1$s", "Export"), Line 166: String.format("$storageTypes %1$s", "shared file")); > let's have those as constants in StorageConstants, will be easier to find t s/shared file/Shared File Line 167: } Line 168: if (getStorageDomain().getStorageDomainType() == StorageDomainType.Master) { Line 169: return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL); Line 170: } http://gerrit.ovirt.org/#/c/36393/6/backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties: Line 556: EN_EVENT_DOWN_SUBJECT_TEXT=Issue Solved Notification. Line 557: EN_ALREADY_SUBSCRIBED=User is already subscribed to this event with the same Notification method. Line 558: EN_NOT_SUBSCRIBED=Cannot ${action} ${type}.User is not subscribed to this event with the given Notification method. Line 559: ACTION_TYPE_FAILED_STORAGE_DOMAIN_TYPE_ILLEGAL=Cannot ${action} ${type}. Storage Domain type not specified. Line 560: ACTION_TYPE_FAILED_DOMAIN_TYPE_CAN_BE_CREATED_ONLY_ON_SPECIFIC_STORAGE_DOMAINS=Cannot ${action} ${type}. ${domainType} domain can only be created on ${storageTypes} domains. > the message is incorrect What's incorrect? Domain Type is currently either export domain or iso, in the two usages in the code, so no need for "the Following". In the iso event - it can only be created on a file domain, so again. no need for the following. Since there are two different usages for this message I would suggest two different messages. Line 561: ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL=Cannot ${action} ${type}. Storage Domain format ${storageFormat} is illegal. Line 562: ACTION_TYPE_FAILED_STORAGE_DOMAIN_FORMAT_ILLEGAL_HOST=Cannot ${action} ${type}. Storage format ${storageFormat} is not supported on the selected host version. Line 563: ERROR_CANNOT_EXTEND_NON_DATA_DOMAIN=Cannot extend Storage Domain. Extend operation is supported only on Data Storage Domain. Line 564: ERROR_CANNOT_EXTEND_CONNECTION_FAILED=Cannot extend Storage Domain. Storage device ${lun} is unreachable on ${hostName}. -- To view, visit http://gerrit.ovirt.org/36393 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I80f68c866e583152b80780554f5529eb720e0759 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Amit Aviram <aavi...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Vered Volansky <vvola...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches