You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/10/07 20:52:40 UTC
git commit: updated refs/heads/master to 4c2e40a
Updated Branches:
refs/heads/master d1a536a4e -> 4c2e40ac3
Added storage_provider_name to storage_pool_view
Signed-off-by: Edison Su <su...@gmail.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4c2e40ac
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4c2e40ac
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4c2e40ac
Branch: refs/heads/master
Commit: 4c2e40ac37c55634f06ccb12a5b0094c033abb26
Parents: d1a536a
Author: Chris Suich <ch...@netapp.com>
Authored: Mon Oct 7 08:38:47 2013 -0400
Committer: Edison Su <su...@gmail.com>
Committed: Mon Oct 7 11:51:32 2013 -0700
----------------------------------------------------------------------
.../cloud/api/query/vo/StoragePoolJoinVO.java | 18 ++++---
setup/db/db/schema-420to430.sql | 54 ++++++++++++++++++++
2 files changed, 65 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4c2e40ac/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
index 69f2204..d98bb3b 100644
--- a/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
+++ b/server/src/com/cloud/api/query/vo/StoragePoolJoinVO.java
@@ -24,17 +24,16 @@ import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;
-import com.cloud.org.Cluster;
-import com.cloud.storage.ScopeType;
-import com.cloud.storage.StoragePoolStatus;
-import com.cloud.storage.Storage.StoragePoolType;
-import com.cloud.utils.db.GenericDao;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
-
import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import com.cloud.org.Cluster;
+import com.cloud.storage.ScopeType;
+import com.cloud.storage.Storage.StoragePoolType;
+import com.cloud.storage.StoragePoolStatus;
+import com.cloud.utils.db.GenericDao;
/**
* Storage Pool DB view.
@@ -137,6 +136,9 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
@Enumerated(value = EnumType.STRING)
private HypervisorType hypervisor;
+ @Column(name = "storage_provider_name")
+ private String storageProviderName;
+
/**
* @return the scope
*/
@@ -378,5 +380,7 @@ public class StoragePoolJoinVO extends BaseViewVO implements InternalIdentity, I
this.jobStatus = jobStatus;
}
-
+ public String getStorageProviderName() {
+ return storageProviderName;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4c2e40ac/setup/db/db/schema-420to430.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-420to430.sql b/setup/db/db/schema-420to430.sql
index 653ff77..a765189 100644
--- a/setup/db/db/schema-420to430.sql
+++ b/setup/db/db/schema-420to430.sql
@@ -281,6 +281,7 @@ CREATE VIEW `cloud`.`template_view` AS
and (resource_tags.resource_type = 'Template' or resource_tags.resource_type='ISO')
where
vm_template.state='Active';
+
DROP VIEW IF EXISTS `cloud`.`volume_view`;
CREATE VIEW `cloud`.`volume_view` AS
select
@@ -392,3 +393,56 @@ CREATE VIEW `cloud`.`volume_view` AS
INSERT 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');
+DROP VIEW IF EXISTS `cloud`.`storage_pool_view`;
+CREATE VIEW `cloud`.`storage_pool_view` AS
+ select
+ storage_pool.id,
+ storage_pool.uuid,
+ storage_pool.name,
+ storage_pool.status,
+ storage_pool.path,
+ storage_pool.pool_type,
+ storage_pool.host_address,
+ storage_pool.created,
+ storage_pool.removed,
+ storage_pool.capacity_bytes,
+ storage_pool.capacity_iops,
+ storage_pool.scope,
+ storage_pool.hypervisor,
+ storage_pool.storage_provider_name,
+ cluster.id cluster_id,
+ cluster.uuid cluster_uuid,
+ cluster.name cluster_name,
+ cluster.cluster_type,
+ data_center.id data_center_id,
+ data_center.uuid data_center_uuid,
+ data_center.name data_center_name,
+ data_center.networktype data_center_type,
+ host_pod_ref.id pod_id,
+ host_pod_ref.uuid pod_uuid,
+ host_pod_ref.name pod_name,
+ storage_pool_details.name tag,
+ op_host_capacity.used_capacity disk_used_capacity,
+ op_host_capacity.reserved_capacity disk_reserved_capacity,
+ async_job.id job_id,
+ async_job.uuid job_uuid,
+ async_job.job_status job_status,
+ async_job.account_id job_account_id
+ from
+ `cloud`.`storage_pool`
+ left join
+ `cloud`.`cluster` ON storage_pool.cluster_id = cluster.id
+ left join
+ `cloud`.`data_center` ON storage_pool.data_center_id = data_center.id
+ left join
+ `cloud`.`host_pod_ref` ON storage_pool.pod_id = host_pod_ref.id
+ left join
+ `cloud`.`storage_pool_details` ON storage_pool_details.pool_id = storage_pool.id
+ and storage_pool_details.value = 'true'
+ left join
+ `cloud`.`op_host_capacity` ON storage_pool.id = op_host_capacity.host_id
+ and op_host_capacity.capacity_type = 3
+ left join
+ `cloud`.`async_job` ON async_job.instance_id = storage_pool.id
+ and async_job.instance_type = 'StoragePool'
+ and async_job.job_status = 0;