@@ -281,6 +281,7 @@ CREATE VIEW `cloud`.`template_view` AS
281281 and (resource_tags .resource_type = ' Template' or resource_tags .resource_type = ' ISO' )
282282 where
283283 vm_template .state = ' Active' ;
284+
284285DROP VIEW IF EXISTS ` cloud` .` volume_view` ;
285286CREATE VIEW `cloud `.` volume_view` AS
286287 select
@@ -392,3 +393,56 @@ CREATE VIEW `cloud`.`volume_view` AS
392393
393394INSERT IGNORE INTO ` cloud` .` configuration` (category, instance, component, name, value, description, default_value) VALUES (' Advanced' , ' DEFAULT' , ' management-server' , ' s3.multipart.enabled' , ' true' , ' enable s3 multipart upload' , ' true' );
394395
396+ DROP VIEW IF EXISTS ` cloud` .` storage_pool_view` ;
397+ CREATE VIEW `cloud `.` storage_pool_view` AS
398+ select
399+ storage_pool .id ,
400+ storage_pool .uuid ,
401+ storage_pool .name ,
402+ storage_pool .status ,
403+ storage_pool .path ,
404+ storage_pool .pool_type ,
405+ storage_pool .host_address ,
406+ storage_pool .created ,
407+ storage_pool .removed ,
408+ storage_pool .capacity_bytes ,
409+ storage_pool .capacity_iops ,
410+ storage_pool .scope ,
411+ storage_pool .hypervisor ,
412+ storage_pool .storage_provider_name ,
413+ cluster .id cluster_id,
414+ cluster .uuid cluster_uuid,
415+ cluster .name cluster_name,
416+ cluster .cluster_type ,
417+ data_center .id data_center_id,
418+ data_center .uuid data_center_uuid,
419+ data_center .name data_center_name,
420+ data_center .networktype data_center_type,
421+ host_pod_ref .id pod_id,
422+ host_pod_ref .uuid pod_uuid,
423+ host_pod_ref .name pod_name,
424+ storage_pool_details .name tag,
425+ op_host_capacity .used_capacity disk_used_capacity,
426+ op_host_capacity .reserved_capacity disk_reserved_capacity,
427+ async_job .id job_id,
428+ async_job .uuid job_uuid,
429+ async_job .job_status job_status,
430+ async_job .account_id job_account_id
431+ from
432+ ` cloud` .` storage_pool`
433+ left join
434+ ` cloud` .` cluster` ON storage_pool .cluster_id = cluster .id
435+ left join
436+ ` cloud` .` data_center` ON storage_pool .data_center_id = data_center .id
437+ left join
438+ ` cloud` .` host_pod_ref` ON storage_pool .pod_id = host_pod_ref .id
439+ left join
440+ ` cloud` .` storage_pool_details` ON storage_pool_details .pool_id = storage_pool .id
441+ and storage_pool_details .value = ' true'
442+ left join
443+ ` cloud` .` op_host_capacity` ON storage_pool .id = op_host_capacity .host_id
444+ and op_host_capacity .capacity_type = 3
445+ left join
446+ ` cloud` .` async_job` ON async_job .instance_id = storage_pool .id
447+ and async_job .instance_type = ' StoragePool'
448+ and async_job .job_status = 0 ;
0 commit comments