diff --git a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java index 02d5c44a93a..a03c2d8d751 100644 --- a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java +++ b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java @@ -93,6 +93,10 @@ public class StoragePoolResponse extends BaseResponse { @Param(description = "IOPS CloudStack can provision from this storage pool") private Long capacityIops; + @SerializedName("allocatediops") + @Param(description = "total min IOPS currently in use by volumes") + private Long allocatedIops; + @SerializedName("tags") @Param(description = "the tags for the storage pool") private String tags; @@ -288,6 +292,10 @@ public class StoragePoolResponse extends BaseResponse { this.capacityIops = capacityIops; } + public void setAllocatedIops(Long allocatedIops) { + this.allocatedIops = allocatedIops; + } + public String getTags() { return tags; } diff --git a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java index 37fdaefefcf..b8b312bd267 100644 --- a/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/StoragePoolJoinDaoImpl.java @@ -19,6 +19,7 @@ package com.cloud.api.query.dao; import com.cloud.api.ApiDBUtils; import com.cloud.api.query.vo.StoragePoolJoinVO; import com.cloud.capacity.CapacityManager; +import com.cloud.storage.DataStoreRole; import com.cloud.storage.StoragePool; import com.cloud.storage.StorageStats; import com.cloud.utils.StringUtils; @@ -26,7 +27,11 @@ import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; import org.apache.cloudstack.api.response.StoragePoolResponse; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; @@ -41,6 +46,12 @@ public class StoragePoolJoinDaoImpl extends GenericDaoBase spSearch; private final SearchBuilder spIdSearch; @@ -60,6 +71,7 @@ public class StoragePoolJoinDaoImpl extends GenericDaoBase