Change in ovirt-engine[master]: engine: Remove StorageDomainSharedStatus#Locked
amureini at redhat.com
amureini at redhat.com
Mon Feb 22 16:17:11 UTC 2016
Allon Mureinik has submitted this change and it was merged.
Change subject: engine: Remove StorageDomainSharedStatus#Locked
......................................................................
engine: Remove StorageDomainSharedStatus#Locked
The only place that set's a storage domain's shared status is the
StorageDomainDaoImpl#StorageDomainRowMapper inner class, indicating
it's a calculated field that's only read from the database.
By examining the create_views.sql and create_dwh_views.sql files, it's
evident that the field "storage_domain_shared_status" is always returned
as the result of invoking the
fn_get_storage_domain_shared_status_by_domain_id stored procedure.
By examining create_functions.sql its evident that this function may
only ever return the values 0 (Unattached), 1 (Active), 2 (Inactive) or
3 (Mixed). In other words, there is no flow that could possible return a
shared status of 4 (Locked), and thus any code that refers to it is
clearly dead code that has no real usage.
This patch remove the StorageDomainSharedStatus#Locked enum constant and
any instance in the code base that checks against it, as these
conditions will never evaluate to true.
Change-Id: I574a000b2c57d15bc3c9c45cd50e7aceeb3d9166
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/AttachStorageDomainToPoolCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/domain/RemoveStorageDomainCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/pool/AddStoragePoolWithStoragesCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainValidator.java
M backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/storage/StorageDomainValidatorTest.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/StorageDomainSharedStatus.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageListModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/storage/StorageModel.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/widget/table/column/StorageDomainSharedStatusColumn.java
9 files changed, 8 insertions(+), 45 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Eli Mesika: Looks good to me, but someone else must approve
Allon Mureinik: Verified; Passed CI tests
Idan Shaby: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/53686
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I574a000b2c57d15bc3c9c45cd50e7aceeb3d9166
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list