Asaf Shakarchi has uploaded a new change for review. Change subject: core: Include 'unattached' domains in domains for search view ......................................................................
core: Include 'unattached' domains in domains for search view Join unattached domains in the 'storage_domains_for_search' view, In case domain is unattached (has no status), set status to 2 (unattached, see StorageDomainStatus). Change-Id: I3faa0d0504520513ce0c565b2476779d0362edfb Bug-Url: https://bugzilla.redhat.com/852100 Signed-off-by: Asaf Shakarchi <[email protected]> --- M backend/manager/dbscripts/create_views.sql 1 file changed, 5 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/15/8315/1 diff --git a/backend/manager/dbscripts/create_views.sql b/backend/manager/dbscripts/create_views.sql index 56ea495..b3f7507 100644 --- a/backend/manager/dbscripts/create_views.sql +++ b/backend/manager/dbscripts/create_views.sql @@ -291,7 +291,10 @@ storage_domain_static.storage_type as storage_type, storage_domain_static.storage_domain_type as storage_domain_type, storage_domain_static.storage_domain_format_type as storage_domain_format_type, storage_domain_static.last_time_used_as_master as last_time_used_as_master, - CASE WHEN status_table.is_multi_domain THEN NULL ELSE status_table.status END as status, + CASE + WHEN status_table.is_multi_domain THEN NULL + WHEN status_table.status IS NULL THEN 2 -- in case domain is unattached + ELSE status_table.status END as status, null as owner, null as storage_pool_id, null as storage_pool_name, storage_domain_dynamic.available_disk_size as available_disk_size, storage_domain_dynamic.used_disk_size as used_disk_size, @@ -302,7 +305,7 @@ storage_domain_static INNER JOIN storage_domain_dynamic ON storage_domain_static.id = storage_domain_dynamic.id -INNER JOIN +LEFT OUTER JOIN (SELECT storage_id, count(storage_id) > 1 as is_multi_domain, max(status) AS status FROM storage_pool_iso_map GROUP BY storage_id) AS status_table ON storage_domain_static.id=status_table.storage_id; -- To view, visit http://gerrit.ovirt.org/8315 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3faa0d0504520513ce0c565b2476779d0362edfb Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Asaf Shakarchi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
