cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [08/50] [abbrv] git commit: updated refs/heads/vmsync to f737019
Date Mon, 01 Jul 2013 21:24:52 GMT
SolidFire plug-in and related changes

SolidFire plug-in

SolidFire plug-in related


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/99227f7b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/99227f7b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/99227f7b

Branch: refs/heads/vmsync
Commit: 99227f7b3e824caeb89035982793ad510e460249
Parents: 02ab2eb
Author: Mike Tutkowski <mike.tutkowski@solidfire.com>
Authored: Fri Jun 28 14:05:12 2013 -0600
Committer: Mike Tutkowski <mike.tutkowski@solidfire.com>
Committed: Fri Jun 28 16:59:21 2013 -0600

----------------------------------------------------------------------
 api/src/com/cloud/agent/api/to/DiskTO.java      |  12 +-
 api/src/com/cloud/offering/DiskOffering.java    |  16 +-
 api/src/com/cloud/storage/StoragePool.java      |   2 +
 api/src/com/cloud/storage/Volume.java           |   6 +
 .../org/apache/cloudstack/api/ApiConstants.java |   6 +
 .../admin/offering/CreateDiskOfferingCmd.java   |  27 +-
 .../admin/storage/CreateStoragePoolCmd.java     |  24 +
 .../command/user/volume/CreateVolumeCmd.java    |  14 +
 .../api/response/DiskOfferingResponse.java      |  33 +
 .../api/response/StoragePoolResponse.java       |  11 +
 .../cloudstack/api/response/VolumeResponse.java |  16 +
 .../classes/resources/messages.properties       |   7 +-
 client/pom.xml                                  |   5 +
 client/tomcatconf/applicationContext.xml.in     |   1 +
 .../com/cloud/agent/api/AttachVolumeAnswer.java |  16 +-
 .../cloud/agent/api/AttachVolumeCommand.java    | 114 ++-
 .../api/agent/test/AttachVolumeAnswerTest.java  |   6 +-
 .../api/agent/test/AttachVolumeCommandTest.java |  10 +-
 .../agent/test/BackupSnapshotCommandTest.java   |   5 +
 .../api/agent/test/CheckNetworkAnswerTest.java  |   5 +
 .../api/agent/test/SnapshotCommandTest.java     |   4 +
 .../engine/subsystem/api/storage/ChapInfo.java  |  26 +
 .../subsystem/api/storage/DataStoreDriver.java  |  14 +-
 .../api/storage/PrimaryDataStoreDriver.java     |   6 +-
 .../api/storage/PrimaryDataStoreParameters.java |  50 +
 .../subsystem/api/storage/VolumeService.java    |   2 +
 .../storage/command/AttachCommand.java          |  71 ++
 .../storage/command/DettachCommand.java         |  17 +
 .../storage/datastore/db/StoragePoolVO.java     |  26 +-
 .../src/com/cloud/storage/DiskOfferingVO.java   |  46 +-
 .../schema/src/com/cloud/storage/VolumeVO.java  |  57 +-
 .../src/com/cloud/storage/dao/VolumeDao.java    |   2 +
 .../com/cloud/storage/dao/VolumeDaoImpl.java    |  13 +
 .../storage/image/TemplateServiceImpl.java      |   4 +-
 .../storage/image/store/ImageStoreImpl.java     |   2 +-
 .../storage/allocator/StorageAllocatorTest.java |   3 +-
 .../cloudstack/storage/test/SnapshotTest.java   |   2 +-
 .../cloudstack/storage/test/VolumeTest.java     |   2 +-
 .../storage/test/VolumeTestVmware.java          |   2 +-
 .../storage/test/volumeServiceTest.java         |   2 +-
 .../storage/snapshot/SnapshotServiceImpl.java   |   2 +-
 .../allocator/ZoneWideStoragePoolAllocator.java |  36 +-
 .../datastore/DataObjectManagerImpl.java        |   4 +-
 .../datastore/PrimaryDataStoreEntityImpl.java   |   6 +
 .../storage/image/BaseImageStoreDriverImpl.java |   4 +-
 .../datastore/PrimaryDataStoreHelper.java       |   5 +
 .../storage/datastore/PrimaryDataStoreImpl.java |   5 +
 .../cloudstack/storage/volume/VolumeObject.java |  15 +
 .../storage/volume/VolumeServiceImpl.java       |  19 +-
 .../kvm/resource/LibvirtComputingResource.java  |   2 +-
 .../agent/manager/MockStorageManagerImpl.java   |   2 +-
 .../vmware/resource/VmwareResource.java         | 274 +++++-
 .../xen/resource/CitrixResourceBase.java        | 143 ++-
 .../xen/resource/XenServerStorageProcessor.java |  18 +-
 .../CloudStackPrimaryDataStoreDriverImpl.java   |   9 +-
 .../SamplePrimaryDataStoreDriverImpl.java       |   9 +-
 plugins/storage/volume/solidfire/pom.xml        |   7 +-
 .../driver/SolidfirePrimaryDataStoreDriver.java | 480 +++++++++-
 .../SolidFirePrimaryDataStoreLifeCycle.java     | 274 ++++++
 .../SolidfirePrimaryDataStoreProvider.java      |  81 +-
 .../storage/datastore/util/SolidFireUtil.java   | 901 +++++++++++++++++++
 .../api/query/dao/DiskOfferingJoinDaoImpl.java  |   3 +
 .../api/query/dao/StoragePoolJoinDaoImpl.java   |   2 +
 .../cloud/api/query/dao/VolumeJoinDaoImpl.java  |   3 +
 .../cloud/api/query/vo/DiskOfferingJoinVO.java  |  33 +
 .../cloud/api/query/vo/StoragePoolJoinVO.java   |  13 +-
 .../com/cloud/api/query/vo/VolumeJoinVO.java    |  21 +-
 .../configuration/ConfigurationManager.java     |   8 +-
 .../configuration/ConfigurationManagerImpl.java |  53 +-
 .../cloud/server/ConfigurationServerImpl.java   |   2 +-
 .../src/com/cloud/storage/StorageManager.java   |   9 +-
 .../com/cloud/storage/StorageManagerImpl.java   |  44 +-
 server/src/com/cloud/storage/VolumeManager.java |   1 -
 .../com/cloud/storage/VolumeManagerImpl.java    | 139 ++-
 .../com/cloud/template/TemplateManagerImpl.java |   2 +-
 server/src/com/cloud/test/DatabaseConfig.java   |   2 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java  |   4 +-
 .../cloud/vpc/MockConfigurationManagerImpl.java |   5 +-
 setup/db/db/schema-410to420.sql                 |  22 +
 tools/marvin/marvin/cloudstackConnection.py     |   2 +-
 ui/dictionary.jsp                               |   5 +
 ui/scripts/configuration.js                     | 179 +++-
 ui/scripts/docs.js                              |  16 +
 ui/scripts/sharedFunctions.js                   |   4 +-
 ui/scripts/storage.js                           |  56 +-
 ui/scripts/system.js                            |  19 +-
 utils/src/com/cloud/utils/StringUtils.java      |   8 +
 .../vmware/mo/HostDatastoreSystemMO.java        |  20 +-
 .../com/cloud/hypervisor/vmware/mo/HostMO.java  |  15 +-
 .../vmware/mo/HostStorageSystemMO.java          |  51 ++
 90 files changed, 3432 insertions(+), 292 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/com/cloud/agent/api/to/DiskTO.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/agent/api/to/DiskTO.java b/api/src/com/cloud/agent/api/to/DiskTO.java
index 7b32f00..556ccd4 100644
--- a/api/src/com/cloud/agent/api/to/DiskTO.java
+++ b/api/src/com/cloud/agent/api/to/DiskTO.java
@@ -23,14 +23,16 @@ import com.cloud.storage.Volume;
 public class DiskTO {
     private DataTO data;
     private Long diskSeq;
+    private String vdiUuid;
     private Volume.Type type;
     public DiskTO() {
         
     }
     
-    public DiskTO(DataTO data, Long diskSeq, Volume.Type type) {
+    public DiskTO(DataTO data, Long diskSeq, String vdiUuid, Volume.Type type) {
         this.data = data;
         this.diskSeq = diskSeq;
+        this.vdiUuid = vdiUuid;
         this.type = type;
     }
 
@@ -50,6 +52,14 @@ public class DiskTO {
         this.diskSeq = diskSeq;
     }
 
+    public String getVdiUuid() {
+        return vdiUuid;
+    }
+
+    public void setVdiUuid(String vdiUuid) {
+        this.vdiUuid = vdiUuid;
+    }
+
     public Volume.Type getType() {
         return type;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/com/cloud/offering/DiskOffering.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/offering/DiskOffering.java b/api/src/com/cloud/offering/DiskOffering.java
index ae4528c..9c196e0 100644
--- a/api/src/com/cloud/offering/DiskOffering.java
+++ b/api/src/com/cloud/offering/DiskOffering.java
@@ -47,12 +47,24 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
 
     Date getCreated();
 
-    long getDiskSize();
-
     boolean isCustomized();
 
     void setDiskSize(long diskSize);
 
+    long getDiskSize();
+
+    void setCustomizedIops(Boolean customizedIops);
+
+    Boolean isCustomizedIops();
+
+    void setMinIops(Long minIops);
+
+    Long getMinIops();
+
+    void setMaxIops(Long maxIops);
+
+    Long getMaxIops();
+
     void setBytesReadRate(Long bytesReadRate);
 
     Long getBytesReadRate();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/com/cloud/storage/StoragePool.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/storage/StoragePool.java b/api/src/com/cloud/storage/StoragePool.java
index 8f8b864..6e9af12 100644
--- a/api/src/com/cloud/storage/StoragePool.java
+++ b/api/src/com/cloud/storage/StoragePool.java
@@ -60,6 +60,8 @@ public interface StoragePool extends Identity, InternalIdentity {
      */
     long getUsedBytes();
 
+    Long getCapacityIops();
+
     Long getClusterId();
 
     /**

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/com/cloud/storage/Volume.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/storage/Volume.java b/api/src/com/cloud/storage/Volume.java
index f5ed4e2..342dfd3 100755
--- a/api/src/com/cloud/storage/Volume.java
+++ b/api/src/com/cloud/storage/Volume.java
@@ -122,6 +122,12 @@ public interface Volume extends ControlledEntity, Identity, InternalIdentity, Ba
      */
     Long getSize();
 
+    Long getMinIops();
+
+    Long getMaxIops();
+
+    String get_iScsiName();
+
     /**
      * @return the vm instance id
      */

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 809e023..dd876f7 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -51,6 +51,9 @@ public class ApiConstants {
     public static final String CPU_OVERCOMMIT_RATIO="cpuovercommitratio";
     public static final String CREATED = "created";
     public static final String CUSTOMIZED = "customized";
+    public static final String CUSTOMIZED_IOPS = "customizediops";
+    public static final String MIN_IOPS = "miniops";
+    public static final String MAX_IOPS = "maxiops";
     public static final String DESCRIPTION = "description";
     public static final String DESTINATION_ZONE_ID = "destzoneid";
     public static final String DETAILS = "details";
@@ -326,6 +329,9 @@ public class ApiConstants {
     public static final String SERVICE_CAPABILITY_LIST = "servicecapabilitylist";
     public static final String CAN_CHOOSE_SERVICE_CAPABILITY = "canchooseservicecapability";
     public static final String PROVIDER = "provider";
+    public static final String MANAGED = "managed";
+    public static final String CAPACITY_BYTES = "capacitybytes";
+    public static final String CAPACITY_IOPS = "capacityiops";
     public static final String NETWORK_SPEED = "networkspeed";
     public static final String BROADCAST_DOMAIN_RANGE = "broadcastdomainrange";
     public static final String ISOLATION_METHODS = "isolationmethods";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
index a2c5f77..4741591 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java
@@ -52,7 +52,7 @@ public class CreateDiskOfferingCmd extends BaseCmd {
     @Parameter(name=ApiConstants.TAGS, type=CommandType.STRING, description="tags for the disk offering", length=4096)
     private String tags;
 
-    @Parameter(name=ApiConstants.CUSTOMIZED, type=CommandType.BOOLEAN, description="whether disk offering is custom or not")
+    @Parameter(name=ApiConstants.CUSTOMIZED, type=CommandType.BOOLEAN, description="whether disk offering size is custom or not")
     private Boolean customized;
 
     @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
@@ -62,6 +62,9 @@ public class CreateDiskOfferingCmd extends BaseCmd {
     @Parameter(name=ApiConstants.STORAGE_TYPE, type=CommandType.STRING, description="the storage type of the disk offering. Values are local and shared.")
     private String storageType = ServiceOffering.StorageType.shared.toString();
 
+    @Parameter(name=ApiConstants.DISPLAY_OFFERING, type=CommandType.BOOLEAN, description="an optional field, whether to display the offering to the end user or not.")
+    private Boolean displayOffering;
+
     @Parameter(name=ApiConstants.BYTES_READ_RATE, type=CommandType.LONG, required=false, description="bytes read rate of the disk offering")
     private Long bytesReadRate;
 
@@ -74,8 +77,14 @@ public class CreateDiskOfferingCmd extends BaseCmd {
     @Parameter(name=ApiConstants.IOPS_WRITE_RATE, type=CommandType.LONG, required=false, description="io requests write rate of the disk offering")
     private Long iopsWriteRate;
 
-    @Parameter(name=ApiConstants.DISPLAY_OFFERING, type=CommandType.BOOLEAN, description="an optional field, whether to display the offering to the end user or not.")
-    private Boolean displayOffering;
+    @Parameter(name=ApiConstants.CUSTOMIZED_IOPS, type=CommandType.BOOLEAN, required=false, description="whether disk offering iops is custom or not")
+    private Boolean customizedIops;
+
+    @Parameter(name=ApiConstants.MIN_IOPS, type=CommandType.LONG, required=false, description="min iops of the disk offering")
+    private Long minIops;
+
+    @Parameter(name=ApiConstants.MAX_IOPS, type=CommandType.LONG, required=false, description="max iops of the disk offering")
+    private Long maxIops;
 
 /////////////////////////////////////////////////////
     /////////////////// Accessors ///////////////////////
@@ -101,6 +110,18 @@ public class CreateDiskOfferingCmd extends BaseCmd {
         return customized;
     }
 
+    public Boolean isCustomizedIops() {
+        return customizedIops;
+    }
+
+    public Long getMinIops() {
+        return minIops;
+    }
+
+    public Long getMaxIops() {
+        return maxIops;
+    }
+
     public Long getDomainId(){
         return domainId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java
index 74eb2b9..f5750b9 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java
@@ -80,6 +80,18 @@ public class CreateStoragePoolCmd extends BaseCmd {
             required=false, description="the scope of the storage: cluster or zone")
     private String scope;
 
+    @Parameter(name=ApiConstants.MANAGED, type=CommandType.BOOLEAN,
+            required=false, description="whether the storage should be managed by CloudStack")
+    private Boolean managed;
+
+    @Parameter(name=ApiConstants.CAPACITY_IOPS, type=CommandType.LONG,
+            required=false, description="IOPS CloudStack can provision from this storage pool")
+    private Long capacityIops;
+
+    @Parameter(name=ApiConstants.CAPACITY_BYTES, type=CommandType.LONG,
+            required=false, description="bytes CloudStack can provision from this storage pool")
+    private Long capacityBytes;
+
     @Parameter(name=ApiConstants.HYPERVISOR, type=CommandType.STRING, required=false,
             description="hypervisor type of the hosts in zone that will be attached to this storage pool. KVM, VMware supported as of now.")
     private String hypervisor;
@@ -124,6 +136,18 @@ public class CreateStoragePoolCmd extends BaseCmd {
         return this.scope;
     }
 
+    public Boolean isManaged() {
+    	return managed;
+    }
+
+    public Long getCapacityIops() {
+        return capacityIops;
+    }
+
+    public Long getCapacityBytes() {
+        return capacityBytes;
+    }
+
     public String getHypervisor() {
         return hypervisor;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
index 6f0bf3a..f293a03 100644
--- a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java
@@ -68,6 +68,12 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
     @Parameter(name=ApiConstants.SIZE, type=CommandType.LONG, description="Arbitrary volume size")
     private Long size;
 
+    @Parameter(name=ApiConstants.MIN_IOPS, type=CommandType.LONG, description="min iops")
+    private Long minIops;
+
+    @Parameter(name=ApiConstants.MAX_IOPS, type=CommandType.LONG, description="max iops")
+    private Long maxIops;
+
     @Parameter(name=ApiConstants.SNAPSHOT_ID, type=CommandType.UUID, entityType=SnapshotResponse.class,
             description="the snapshot ID for the disk volume. Either diskOfferingId or snapshotId must be passed in.")
     private Long snapshotId;
@@ -104,6 +110,14 @@ public class CreateVolumeCmd extends BaseAsyncCreateCmd {
         return size;
     }
 
+    public Long getMinIops() {
+        return minIops;
+    }
+
+    public Long getMaxIops() {
+        return maxIops;
+    }
+
     public Long getSnapshotId() {
         return snapshotId;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
index 35cf21a..4291d85 100644
--- a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java
@@ -52,6 +52,15 @@ public class DiskOfferingResponse extends BaseResponse {
     @SerializedName("iscustomized") @Param(description="true if disk offering uses custom size, false otherwise")
     private Boolean customized;
 
+    @SerializedName("iscustomizediops") @Param(description="true if disk offering uses custom iops, false otherwise")
+    private Boolean customizedIops;
+
+    @SerializedName(ApiConstants.MIN_IOPS) @Param(description="the min iops of the disk offering")
+    private Long minIops;
+
+    @SerializedName(ApiConstants.MAX_IOPS) @Param(description="the max iops of the disk offering")
+    private Long maxIops;
+
     @SerializedName(ApiConstants.TAGS) @Param(description="the tags for the disk offering")
     private String tags;
 
@@ -154,6 +163,30 @@ public class DiskOfferingResponse extends BaseResponse {
         this.customized = customized;
     }
 
+    public Boolean isCustomizedIops() {
+        return customizedIops;
+    }
+
+    public void setCustomizedIops(Boolean customizedIops) {
+        this.customizedIops = customizedIops;
+    }
+
+    public Long getMinIops() {
+        return minIops;
+    }
+
+    public void setMinIops(Long minIops) {
+        this.minIops = minIops;
+    }
+
+    public Long getMaxIops() {
+        return maxIops;
+    }
+
+    public void setMaxIops(Long maxIops) {
+        this.maxIops = maxIops;
+    }
+
     public String getStorageType() {
         return storageType;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
index 0050000..7321d98 100644
--- a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java
@@ -74,6 +74,9 @@ public class StoragePoolResponse extends BaseResponse {
     @SerializedName("disksizeused") @Param(description="the host's currently used disk size")
     private Long diskSizeUsed;
 
+    @SerializedName("capacityiops") @Param(description="IOPS CloudStack can provision from this storage pool")
+    private Long capacityIops;
+
     @SerializedName("tags") @Param(description="the tags for the storage pool")
     private String tags;
 
@@ -237,6 +240,14 @@ public class StoragePoolResponse extends BaseResponse {
         this.diskSizeUsed = diskSizeUsed;
     }
 
+    public Long getCapacityIops() {
+        return capacityIops;
+    }
+
+    public void setCapacityIops(Long capacityIops) {
+        this.capacityIops = capacityIops;
+    }
+
     public String getTags() {
         return tags;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
index b643de1..338fcaa 100644
--- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java
@@ -76,6 +76,14 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
     @Param(description = "size of the disk volume")
     private Long size;
 
+    @SerializedName(ApiConstants.MIN_IOPS)
+    @Param(description = "min iops of the disk volume")
+    private Long minIops;
+
+    @SerializedName(ApiConstants.MAX_IOPS)
+    @Param(description = "max iops of the disk volume")
+    private Long maxIops;
+
     @SerializedName(ApiConstants.CREATED)
     @Param(description = "the date the disk volume was created")
     private Date created;
@@ -241,6 +249,14 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity
         this.size = size;
     }
 
+    public void setMinIops(Long minIops) {
+        this.minIops = minIops;
+    }
+
+    public void setMaxIops(Long maxIops) {
+        this.maxIops = maxIops;
+    }
+
     public void setCreated(Date created) {
         this.created = created;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/client/WEB-INF/classes/resources/messages.properties
----------------------------------------------------------------------
diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties
index ad8d29d..b1a09b1 100644
--- a/client/WEB-INF/classes/resources/messages.properties
+++ b/client/WEB-INF/classes/resources/messages.properties
@@ -14,6 +14,10 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+label.custom.disk.iops=Custom IOPS
+label.disk.iops.min=Min IOPS
+label.disk.iops.max=Max IOPS
+label.disk.iops.total=IOPS Total
 label.view.secondary.ips=View secondary IPs
 message.acquire.ip.nic=Please confirm that you would like to acquire a new secondary IP for this NIC.<br/>NOTE: You need to manually configure the newly-acquired secondary IP inside the virtual machine.
 message.select.affinity.groups=Please select any affinity groups you want this VM to belong to:
@@ -395,7 +399,7 @@ label.code=Code
 label.community=Community
 label.compute.and.storage=Compute and Storage
 label.compute.offering=Compute offering
-label.compute.offerings=Compute offerings
+label.compute.offerings=Compute Offerings
 label.compute=Compute
 label.configuration=Configuration
 label.configure.network.ACLs=Configure Network ACLs
@@ -1046,6 +1050,7 @@ label.stopped.vms=Stopped VMs
 label.storage.tags=Storage Tags
 label.storage.traffic=Storage Traffic
 label.storage.type=Storage Type
+label.qos.type=QoS Type
 label.storage=Storage
 label.subdomain.access=Subdomain Access
 label.submit=Submit

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index b8182c2..d1eeb3b 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -22,6 +22,11 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-plugin-storage-volume-solidfire</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
       <artifactId>cloud-server</artifactId>
       <version>${project.version}</version>
     </dependency>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index 82ce9e9..7052fd7 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -806,6 +806,7 @@
   <bean id="cloudStackImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.CloudStackImageStoreProviderImpl" />
   <bean id="s3ImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.S3ImageStoreProviderImpl" />
   <bean id="swiftImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl" />  
+  <bean id="solidFireDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.SolidfirePrimaryDataStoreProvider" />
   <bean id="ApplicationLoadBalancerService" class="org.apache.cloudstack.network.lb.ApplicationLoadBalancerManagerImpl" />
   <bean id="InternalLoadBalancerVMManager" class="org.apache.cloudstack.network.lb.InternalLoadBalancerVMManagerImpl" />
   <bean id="StorageCacheReplacementAlgorithm" class="org.apache.cloudstack.storage.cache.manager.StorageCacheReplacementAlgorithmLRU" />

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/core/src/com/cloud/agent/api/AttachVolumeAnswer.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/AttachVolumeAnswer.java b/core/src/com/cloud/agent/api/AttachVolumeAnswer.java
index b377b7c..6b965b0 100644
--- a/core/src/com/cloud/agent/api/AttachVolumeAnswer.java
+++ b/core/src/com/cloud/agent/api/AttachVolumeAnswer.java
@@ -19,35 +19,33 @@ package com.cloud.agent.api;
 
 public class AttachVolumeAnswer extends Answer {
     private Long deviceId;
+    private String vdiUuid;
     private String chainInfo;
 
-    protected AttachVolumeAnswer() {
-
-    }
-
     public AttachVolumeAnswer(AttachVolumeCommand cmd, String result) {
         super(cmd, false, result);
         this.deviceId = null;
     }
 
-    public AttachVolumeAnswer(AttachVolumeCommand cmd, Long deviceId) {
+    public AttachVolumeAnswer(AttachVolumeCommand cmd, Long deviceId, String vdiUuid) {
         super(cmd);
         this.deviceId = deviceId;
+        this.vdiUuid = vdiUuid;
     }
 
-
     public AttachVolumeAnswer(AttachVolumeCommand cmd) {
         super(cmd);
         this.deviceId = null;
     }
 
-    /**
-     * @return the deviceId
-     */
     public Long getDeviceId() {
         return deviceId;
     }
 
+    public String getVdiUuid() {
+    	return vdiUuid;
+    }
+    
     public void setChainInfo(String chainInfo) {
     	this.chainInfo = chainInfo;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/core/src/com/cloud/agent/api/AttachVolumeCommand.java
----------------------------------------------------------------------
diff --git a/core/src/com/cloud/agent/api/AttachVolumeCommand.java b/core/src/com/cloud/agent/api/AttachVolumeCommand.java
index 2658262..2eb503a 100644
--- a/core/src/com/cloud/agent/api/AttachVolumeCommand.java
+++ b/core/src/com/cloud/agent/api/AttachVolumeCommand.java
@@ -19,29 +19,37 @@ package com.cloud.agent.api;
 import com.cloud.storage.Storage.StoragePoolType;
 
 public class AttachVolumeCommand extends Command {
-
-	boolean attach;
-	String vmName;
-	StoragePoolType pooltype;
-	String poolUuid;
-	String volumeFolder;
-	String volumePath;
-	String volumeName;
-	Long deviceId;
-	String chainInfo;
-    Long bytesReadRate;
-    Long bytesWriteRate;
-    Long iopsReadRate;
-    Long iopsWriteRate;
+	private boolean attach;
+	private boolean _managed;
+	private String vmName;
+	private StoragePoolType pooltype;
+	private String volumePath;
+	private String volumeName;
+	private Long deviceId;
+	private String chainInfo;
+	private String poolUuid;
+	private String _storageHost;
+	private int _storagePort;
+	private String _iScsiName;
+	private String _chapInitiatorUsername;
+	private String _chapInitiatorPassword;
+	private String _chapTargetUsername;
+	private String _chapTargetPassword;
+	private Long bytesReadRate;
+	private Long bytesWriteRate;
+	private Long iopsReadRate;
+	private Long iopsWriteRate;
 
 	protected AttachVolumeCommand() {
 	}
 
-	public AttachVolumeCommand(boolean attach, String vmName, StoragePoolType pooltype, String volumeFolder, String volumePath, String volumeName, Long deviceId, String chainInfo) {
+    public AttachVolumeCommand(boolean attach, boolean managed, String vmName,
+            StoragePoolType pooltype, String volumePath, String volumeName,
+            Long deviceId, String chainInfo) {
 		this.attach = attach;
+		this._managed = managed;
 		this.vmName = vmName;
 		this.pooltype = pooltype;
-		this.volumeFolder = volumeFolder;
 		this.volumePath = volumePath;
 		this.volumeName = volumeName;
 		this.deviceId = deviceId;
@@ -54,7 +62,7 @@ public class AttachVolumeCommand extends Command {
     }
 
 	public boolean getAttach() {
-		return attach;
+	    return attach;
 	}
 
 	public String getVmName() {
@@ -69,16 +77,12 @@ public class AttachVolumeCommand extends Command {
         this.pooltype = pooltype;
     }
 
-    public String getVolumeFolder() {
-		return volumeFolder;
-	}
-
 	public String getVolumePath() {
 		return volumePath;
 	}
 
 	public String getVolumeName() {
-		return volumeName;
+	    return volumeName;
 	}
 
     public Long getDeviceId() {
@@ -90,17 +94,77 @@ public class AttachVolumeCommand extends Command {
     }
 
     public String getPoolUuid() {
-    	return poolUuid;
+        return poolUuid;
     }
 
     public void setPoolUuid(String poolUuid) {
-    	this.poolUuid = poolUuid;
+        this.poolUuid = poolUuid;
     }
 
     public String getChainInfo() {
-    	return chainInfo;
+        return chainInfo;
+    }
+
+    public void setStorageHost(String storageHost) {
+        _storageHost = storageHost;
     }
 
+	public String getStorageHost() {
+	    return _storageHost;
+	}
+
+	public void setStoragePort(int storagePort) {
+	    _storagePort = storagePort;
+	}
+
+	public int getStoragePort() {
+	    return _storagePort;
+	}
+
+	public boolean isManaged() {
+        return _managed;
+    }
+
+	public void set_iScsiName(String iScsiName) {
+	    this._iScsiName = iScsiName;
+	}
+
+	public String get_iScsiName() {
+	    return _iScsiName;
+	}
+
+	public void setChapInitiatorUsername(String chapInitiatorUsername) {
+	    _chapInitiatorUsername = chapInitiatorUsername;
+	}
+
+	public String getChapInitiatorUsername() {
+	    return _chapInitiatorUsername;
+	}
+
+	public void setChapInitiatorPassword(String chapInitiatorPassword) {
+	    _chapInitiatorPassword = chapInitiatorPassword;
+	}
+
+	public String getChapInitiatorPassword() {
+	    return _chapInitiatorPassword;
+	}
+
+	public void setChapTargetUsername(String chapTargetUsername) {
+	    _chapTargetUsername = chapTargetUsername;
+	}
+
+	public String getChapTargetUsername() {
+	    return _chapTargetUsername;
+	}
+
+	public void setChapTargetPassword(String chapTargetPassword) {
+	    _chapTargetPassword = chapTargetPassword;
+	}
+
+	public String getChapTargetPassword() {
+	    return _chapTargetPassword;
+	}
+
     public void setBytesReadRate(Long bytesReadRate) {
         this.bytesReadRate = bytesReadRate;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeAnswerTest.java
----------------------------------------------------------------------
diff --git a/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeAnswerTest.java b/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeAnswerTest.java
index 251a6cb..9e43d9f 100644
--- a/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeAnswerTest.java
+++ b/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeAnswerTest.java
@@ -26,14 +26,14 @@ import com.cloud.agent.api.AttachVolumeCommand;
 import com.cloud.storage.Storage.StoragePoolType;
 
 public class AttachVolumeAnswerTest {
-    AttachVolumeCommand avc = new AttachVolumeCommand(true, "vmname",
-            StoragePoolType.Filesystem, "vFolder", "vPath", "vName",
+    AttachVolumeCommand avc = new AttachVolumeCommand(true, false, "vmname",
+            StoragePoolType.Filesystem, "vPath", "vName",
             123456789L, "chainInfo");
     AttachVolumeAnswer ava1 = new AttachVolumeAnswer(avc);
     String results = "";
     AttachVolumeAnswer ava2 = new AttachVolumeAnswer(avc, results);
     Long deviceId = 10L;
-    AttachVolumeAnswer ava3 = new AttachVolumeAnswer(avc, deviceId);
+    AttachVolumeAnswer ava3 = new AttachVolumeAnswer(avc, deviceId, "");
 
     @Test
     public void testGetDeviceId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeCommandTest.java
----------------------------------------------------------------------
diff --git a/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeCommandTest.java b/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeCommandTest.java
index 1ec416a..6f413c0 100644
--- a/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeCommandTest.java
+++ b/core/test/org/apache/cloudstack/api/agent/test/AttachVolumeCommandTest.java
@@ -25,8 +25,8 @@ import com.cloud.agent.api.AttachVolumeCommand;
 import com.cloud.storage.Storage.StoragePoolType;
 
 public class AttachVolumeCommandTest {
-    AttachVolumeCommand avc = new AttachVolumeCommand(true, "vmname",
-            StoragePoolType.Filesystem, "vFolder", "vPath", "vName",
+    AttachVolumeCommand avc = new AttachVolumeCommand(true, false, "vmname",
+            StoragePoolType.Filesystem, "vPath", "vName",
             123456789L, "chainInfo");
 
     @Test
@@ -66,12 +66,6 @@ public class AttachVolumeCommandTest {
     }
 
     @Test
-    public void testGetVolumeFolder() {
-        String vFolder = avc.getVolumeFolder();
-        assertTrue(vFolder.equals("vFolder"));
-    }
-
-    @Test
     public void testGetVolumePath() {
         String vPath = avc.getVolumePath();
         assertTrue(vPath.equals("vPath"));

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java
----------------------------------------------------------------------
diff --git a/core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java b/core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java
index 9890593..0fee8c6 100644
--- a/core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java
+++ b/core/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java
@@ -88,6 +88,11 @@ public class BackupSnapshotCommandTest {
         };
 
         @Override
+        public Long getCapacityIops() {
+            return 0L;
+        }
+
+        @Override
         public Long getClusterId() {
             return 0L;
         };

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/core/test/org/apache/cloudstack/api/agent/test/CheckNetworkAnswerTest.java
----------------------------------------------------------------------
diff --git a/core/test/org/apache/cloudstack/api/agent/test/CheckNetworkAnswerTest.java b/core/test/org/apache/cloudstack/api/agent/test/CheckNetworkAnswerTest.java
index 4db6557..b834a26 100644
--- a/core/test/org/apache/cloudstack/api/agent/test/CheckNetworkAnswerTest.java
+++ b/core/test/org/apache/cloudstack/api/agent/test/CheckNetworkAnswerTest.java
@@ -126,6 +126,11 @@ public class CheckNetworkAnswerTest {
             };
 
             @Override
+            public Long getCapacityIops() {
+                return 0L;
+            };
+
+            @Override
             public Long getClusterId() {
                 return 0L;
             };

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java
----------------------------------------------------------------------
diff --git a/core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java b/core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java
index 3076d45..35bdfc8 100644
--- a/core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java
+++ b/core/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java
@@ -78,6 +78,10 @@ public class SnapshotCommandTest {
             return 0L;
         };
 
+        public Long getCapacityIops() {
+            return 0L;
+        };
+
         public Long getClusterId() {
             return 0L;
         };

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ChapInfo.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ChapInfo.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ChapInfo.java
new file mode 100644
index 0000000..97c9ecb
--- /dev/null
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ChapInfo.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cloudstack.engine.subsystem.api.storage;
+
+public interface ChapInfo {
+    String getInitiatorUsername();
+    String getInitiatorSecret();
+    String getTargetUsername();
+    String getTargetSecret();
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java
index 1cb6e15..127b858 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java
@@ -24,17 +24,11 @@ import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.storage.command.CommandResult;
 
 public interface DataStoreDriver {
-    void createAsync(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback);
-
-    void deleteAsync(DataObject data, AsyncCompletionCallback<CommandResult> callback);
-
+    DataTO getTO(DataObject data);
+    DataStoreTO getStoreTO(DataStore store);
+    void createAsync(DataStore store, DataObject data, AsyncCompletionCallback<CreateCmdResult> callback);
+    void deleteAsync(DataStore store, DataObject data, AsyncCompletionCallback<CommandResult> callback);
     void copyAsync(DataObject srcdata, DataObject destData, AsyncCompletionCallback<CopyCommandResult> callback);
-
     boolean canCopy(DataObject srcData, DataObject destData);
-
     void resize(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback);
-
-    DataTO getTO(DataObject data);
-
-    DataStoreTO getStoreTO(DataStore store);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java
index 2528a53..b124d83 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java
@@ -22,7 +22,7 @@ import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.storage.command.CommandResult;
 
 public interface PrimaryDataStoreDriver extends DataStoreDriver {
-    void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCmdResult> callback);
-
-    void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CommandResult> callback);
+    public ChapInfo getChapInfo(VolumeInfo volumeInfo);
+    public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CreateCmdResult> callback);
+    public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback<CommandResult> callback);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreParameters.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreParameters.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreParameters.java
index 3b5362a..c05419f 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreParameters.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreParameters.java
@@ -20,6 +20,7 @@ package org.apache.cloudstack.engine.subsystem.api.storage;
 
 import java.util.Map;
 
+import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.storage.Storage.StoragePoolType;
 
 public class PrimaryDataStoreParameters {
@@ -30,12 +31,17 @@ public class PrimaryDataStoreParameters {
     private Map<String, String> details;
     private String tags;
     private StoragePoolType type;
+    private HypervisorType hypervisorType;
     private String host;
     private String path;
     private int port;
     private String uuid;
     private String name;
     private String userInfo;
+    private long capacityBytes;
+    private long usedBytes;
+    private boolean managed;
+    private Long capacityIops;
 
     /**
      * @return the userInfo
@@ -187,6 +193,30 @@ public class PrimaryDataStoreParameters {
         this.providerName = providerName;
     }
 
+    public void setManaged(boolean managed) {
+    	this.managed = managed;
+    }
+
+    public boolean isManaged() {
+    	return managed;
+    }
+
+    public void setCapacityIops(Long capacityIops) {
+        this.capacityIops = capacityIops;
+    }
+
+    public Long getCapacityIops() {
+        return capacityIops;
+    }
+
+    public void setHypervisorType(HypervisorType hypervisorType) {
+        this.hypervisorType = hypervisorType;
+    }
+
+    public HypervisorType getHypervisorType() {
+        return hypervisorType;
+    }
+
     /**
      * @return the clusterId
      */
@@ -231,4 +261,24 @@ public class PrimaryDataStoreParameters {
     public void setZoneId(Long zoneId) {
         this.zoneId = zoneId;
     }
+
+    public long getCapacityBytes()
+    {
+    	return capacityBytes;
+    }
+
+    public void setCapacityBytes(long capacityBytes)
+    {
+    	this.capacityBytes = capacityBytes;
+    }
+
+    public long getUsedBytes()
+    {
+    	return usedBytes;
+    }
+
+    public void setUsedBytes(long usedBytes)
+    {
+    	this.usedBytes = usedBytes;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
index f96ea40..7515088 100644
--- a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
+++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java
@@ -42,6 +42,8 @@ public interface VolumeService {
         }
     }
 
+    ChapInfo getChapInfo(VolumeInfo volumeInfo, DataStore dataStore);
+
     /**
      * Creates the volume based on the given criteria
      * 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/api/src/org/apache/cloudstack/storage/command/AttachCommand.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/command/AttachCommand.java b/engine/api/src/org/apache/cloudstack/storage/command/AttachCommand.java
index 6b4e9f7..44bce91 100644
--- a/engine/api/src/org/apache/cloudstack/storage/command/AttachCommand.java
+++ b/engine/api/src/org/apache/cloudstack/storage/command/AttachCommand.java
@@ -24,6 +24,14 @@ import com.cloud.agent.api.to.DiskTO;
 public final class AttachCommand extends Command implements StorageSubSystemCommand {
     private DiskTO disk;
     private String vmName;
+    private String _storageHost;
+    private int _storagePort;
+    private boolean _managed;
+    private String _iScsiName;
+    private String _chapInitiatorUsername;
+    private String _chapInitiatorPassword;
+    private String _chapTargetUsername;
+    private String _chapTargetPassword;
 
     public AttachCommand(DiskTO disk, String vmName) {
         super();
@@ -52,4 +60,67 @@ public final class AttachCommand extends Command implements StorageSubSystemComm
         this.vmName = vmName;
     }
 
+    public void setStorageHost(String storageHost) {
+        _storageHost = storageHost;
+    }
+
+    public String getStorageHost() {
+        return _storageHost;
+    }
+
+    public void setStoragePort(int storagePort) {
+        _storagePort = storagePort;
+    }
+
+    public int getStoragePort() {
+        return _storagePort;
+    }
+
+    public void setManaged(boolean managed) {
+        _managed = managed;
+    }
+
+    public boolean isManaged() {
+        return _managed;
+    }
+
+    public void set_iScsiName(String iScsiName) {
+        this._iScsiName = iScsiName;
+    }
+
+    public String get_iScsiName() {
+        return _iScsiName;
+    }
+
+    public void setChapInitiatorUsername(String chapInitiatorUsername) {
+        _chapInitiatorUsername = chapInitiatorUsername;
+    }
+
+    public String getChapInitiatorUsername() {
+        return _chapInitiatorUsername;
+    }
+
+    public void setChapInitiatorPassword(String chapInitiatorPassword) {
+        _chapInitiatorPassword = chapInitiatorPassword;
+    }
+
+    public String getChapInitiatorPassword() {
+        return _chapInitiatorPassword;
+    }
+
+    public void setChapTargetUsername(String chapTargetUsername) {
+        _chapTargetUsername = chapTargetUsername;
+    }
+
+    public String getChapTargetUsername() {
+        return _chapTargetUsername;
+    }
+
+    public void setChapTargetPassword(String chapTargetPassword) {
+        _chapTargetPassword = chapTargetPassword;
+    }
+
+    public String getChapTargetPassword() {
+        return _chapTargetPassword;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/api/src/org/apache/cloudstack/storage/command/DettachCommand.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/command/DettachCommand.java b/engine/api/src/org/apache/cloudstack/storage/command/DettachCommand.java
index a0ab4b2..bb7325c 100644
--- a/engine/api/src/org/apache/cloudstack/storage/command/DettachCommand.java
+++ b/engine/api/src/org/apache/cloudstack/storage/command/DettachCommand.java
@@ -24,6 +24,8 @@ import com.cloud.agent.api.to.DiskTO;
 public class DettachCommand extends Command implements StorageSubSystemCommand {
     private DiskTO disk;
     private String vmName;
+    private boolean _managed;
+    private String _iScsiName;
 
     public DettachCommand(DiskTO disk, String vmName) {
         super();
@@ -52,4 +54,19 @@ public class DettachCommand extends Command implements StorageSubSystemCommand {
         this.vmName = vmName;
     }
 
+    public void setManaged(boolean managed) {
+        _managed = managed;
+    }
+
+    public boolean isManaged() {
+        return _managed;
+    }
+
+    public void set_iScsiName(String iScsiName) {
+        _iScsiName = iScsiName;
+    }
+
+    public String get_iScsiName() {
+        return _iScsiName;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
----------------------------------------------------------------------
diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
index 9b8de67..a8c1e7f 100644
--- a/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
+++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java
@@ -103,6 +103,12 @@ public class StoragePoolVO implements StoragePool {
     @Enumerated(value = EnumType.STRING)
     private ScopeType scope;
 
+    @Column(name = "managed")
+    private boolean managed;
+
+    @Column(name = "capacity_iops", updatable = true, nullable = true)
+    private Long capacityIops;
+
     @Column(name = "hypervisor")
     @Enumerated(value = EnumType.STRING)
     private HypervisorType hypervisor;
@@ -201,8 +207,24 @@ public class StoragePoolVO implements StoragePool {
         usedBytes = available;
     }
 
-    public void setCapacityBytes(long capacity) {
-        capacityBytes = capacity;
+    public void setCapacityBytes(long capacityBytes) {
+        this.capacityBytes = capacityBytes;
+    }
+
+    public void setManaged(boolean managed) {
+    	this.managed = managed;
+    }
+
+    public boolean isManaged() {
+    	return managed;
+    }
+
+    public void setCapacityIops(Long capacityIops) {
+        this.capacityIops = capacityIops;
+    }
+
+    public Long getCapacityIops() {
+        return capacityIops;
     }
 
     public Long getClusterId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/DiskOfferingVO.java b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java
index b7363e7..d9656b4 100755
--- a/engine/schema/src/com/cloud/storage/DiskOfferingVO.java
+++ b/engine/schema/src/com/cloud/storage/DiskOfferingVO.java
@@ -94,6 +94,15 @@ public class DiskOfferingVO implements DiskOffering {
     @Column(name = "uuid")
     private String uuid;
 
+    @Column(name="customized_iops")
+    private Boolean customizedIops;
+
+    @Column(name="min_iops")
+    Long minIops;
+
+    @Column(name="max_iops")
+    Long maxIops;
+
     @Column(name = "sort_key")
     int sortKey;
 
@@ -116,8 +125,8 @@ public class DiskOfferingVO implements DiskOffering {
         this.uuid = UUID.randomUUID().toString();
     }
 
-    public DiskOfferingVO(Long domainId, String name, String displayText, long diskSize, String tags,
-            boolean isCustomized) {
+    public DiskOfferingVO(Long domainId, String name, String displayText, long diskSize, String tags, boolean isCustomized,
+    		Boolean isCustomizedIops, Long minIops, Long maxIops) {
         this.domainId = domainId;
         this.name = name;
         this.displayText = displayText;
@@ -128,6 +137,9 @@ public class DiskOfferingVO implements DiskOffering {
         this.useLocalStorage = false;
         this.customized = isCustomized;
         this.uuid = UUID.randomUUID().toString();
+        this.customizedIops = isCustomizedIops;
+        this.minIops = minIops;
+        this.maxIops = maxIops;
     }
 
     public DiskOfferingVO(String name, String displayText, boolean mirrored, String tags, boolean recreatable,
@@ -175,6 +187,36 @@ public class DiskOfferingVO implements DiskOffering {
     }
 
     @Override
+    public Boolean isCustomizedIops() {
+        return customizedIops;
+    }
+
+    @Override
+    public void setCustomizedIops(Boolean customizedIops) {
+        this.customizedIops = customizedIops;
+    }
+
+    @Override
+    public Long getMinIops() {
+        return minIops;
+    }
+
+	@Override
+    public void setMinIops(Long minIops) {
+        this.minIops = minIops;
+    }
+
+    @Override
+    public Long getMaxIops() {
+        return maxIops;
+    }
+
+    @Override
+    public void setMaxIops(Long maxIops) {
+        this.maxIops = maxIops;
+    }
+
+	@Override
     public String getUniqueName() {
         return uniqueName;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/schema/src/com/cloud/storage/VolumeVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/VolumeVO.java b/engine/schema/src/com/cloud/storage/VolumeVO.java
index 02c09a2..7b54f3d 100755
--- a/engine/schema/src/com/cloud/storage/VolumeVO.java
+++ b/engine/schema/src/com/cloud/storage/VolumeVO.java
@@ -70,6 +70,12 @@ public class VolumeVO implements Volume {
     @Column(name = "size")
     Long size;
 
+    @Column(name = "min_iops")
+    Long minIops;
+
+    @Column(name = "max_iops")
+    Long maxIops;
+
     @Column(name = "folder")
     String folder;
 
@@ -141,25 +147,32 @@ public class VolumeVO implements Volume {
     @Column(name = "display_volume", updatable = true, nullable = false)
     protected boolean displayVolume;
 
+    @Column(name = "iscsi_name")
+    private String _iScsiName;
+
     @Transient
     // @Column(name="reservation")
     String reservationId;
 
     // Real Constructor
-    public VolumeVO(Type type, String name, long dcId, long domainId, long accountId, long diskOfferingId, long size) {
+    public VolumeVO(Type type, String name, long dcId, long domainId, long accountId, long diskOfferingId, long size,
+    		Long minIops, Long maxIops, String iScsiName) {
         this.volumeType = type;
         this.name = name;
         this.dataCenterId = dcId;
         this.accountId = accountId;
         this.domainId = domainId;
         this.size = size;
+        this.minIops = minIops;
+        this.maxIops = maxIops;
+        this._iScsiName = iScsiName;
         this.diskOfferingId = diskOfferingId;
         this.state = State.Allocated;
         this.uuid = UUID.randomUUID().toString();
     }
 
-    public VolumeVO(String name, Long dcId, Long podId, long accountId, long domainId, Long instanceId, String folder,
-            String path, long size, Volume.Type vType) {
+    public VolumeVO(String name, long dcId, long podId, long accountId, long domainId, Long instanceId, String folder, String path,
+    		long size, Long minIops, Long maxIops, String iScsiName, Volume.Type vType) {
         this.name = name;
         this.accountId = accountId;
         this.domainId = domainId;
@@ -167,6 +180,9 @@ public class VolumeVO implements Volume {
         this.folder = folder;
         this.path = path;
         this.size = size;
+        this.minIops = minIops;
+        this.maxIops = maxIops;
+        this._iScsiName = iScsiName;
         this.podId = podId;
         this.dataCenterId = dcId;
         this.volumeType = vType;
@@ -177,11 +193,15 @@ public class VolumeVO implements Volume {
 
     // Copy Constructor
     public VolumeVO(Volume that) {
-        this(that.getName(), that.getDataCenterId(), that.getPodId(), that.getAccountId(), that.getDomainId(), that
-                .getInstanceId(), that.getFolder(), that.getPath(), that.getSize(), that.getVolumeType());
+        this(that.getName(), that.getDataCenterId(), that.getPodId(), that.getAccountId(), that.getDomainId(), that.getInstanceId(),
+        		that.getFolder(), that.getPath(), that.getSize(), that.getMinIops(), that.getMaxIops(),
+        		that.get_iScsiName(), that.getVolumeType());
         this.recreatable = that.isRecreatable();
         this.state = that.getState();
         this.size = that.getSize();
+        this.minIops = that.getMinIops();
+        this.maxIops = that.getMaxIops();
+        this._iScsiName = that.get_iScsiName();
         this.diskOfferingId = that.getDiskOfferingId();
         this.poolId = that.getPoolId();
         this.attached = that.getAttached();
@@ -275,6 +295,24 @@ public class VolumeVO implements Volume {
     }
 
     @Override
+    public Long getMinIops() {
+        return minIops;
+    }
+
+    public void setMinIops(Long minIops) {
+        this.minIops = minIops;
+    }
+
+    @Override
+    public Long getMaxIops() {
+        return maxIops;
+    }
+
+    public void setMaxIops(Long maxIops) {
+        this.maxIops = maxIops;
+    }
+
+    @Override
     public Long getInstanceId() {
         return instanceId;
     }
@@ -464,6 +502,15 @@ public class VolumeVO implements Volume {
         this.uuid = uuid;
     }
 
+    @Override
+    public String get_iScsiName() {
+    	return this._iScsiName;
+    }
+
+    public void set_iScsiName(String iScsiName) {
+    	this._iScsiName = iScsiName;
+    }
+
     public boolean isDisplayVolume() {
         return displayVolume;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDao.java b/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
index 79c0dc3..fb7dc70 100755
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDao.java
@@ -58,6 +58,8 @@ public interface VolumeDao extends GenericDao<VolumeVO, Long>, StateDao<Volume.S
 
     List<VolumeVO> findByPoolId(long poolId);
 
+    List<VolumeVO> findByPoolId(long poolId, Volume.Type volumeType);
+
     List<VolumeVO> findByInstanceAndDeviceId(long instanceId, long deviceId);
 
     List<VolumeVO> findUsableVolumesForInstance(long instanceId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
index f82b511..ba85466 100755
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -109,6 +109,19 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
         sc.setParameters("poolId", poolId);
         sc.setParameters("notDestroyed", Volume.State.Destroy);
         sc.setParameters("vType", Volume.Type.ROOT.toString());
+	    return listBy(sc);
+	}
+
+    @Override
+    public List<VolumeVO> findByPoolId(long poolId, Volume.Type volumeType) {
+        SearchCriteria<VolumeVO> sc = AllFieldsSearch.create();
+        sc.setParameters("poolId", poolId);
+        sc.setParameters("notDestroyed", Volume.State.Destroy);
+
+        if (volumeType != null) {
+            sc.setParameters("vType", volumeType.toString());
+        }
+
         return listBy(sc);
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
index 96c35f3..da62712 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/TemplateServiceImpl.java
@@ -166,7 +166,7 @@ public class TemplateServiceImpl implements TemplateService {
 
         AsyncCallbackDispatcher<TemplateServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
         caller.setCallback(caller.getTarget().createTemplateCallback(null, null)).setContext(context);
-        store.getDriver().createAsync(templateOnStore, caller);
+        store.getDriver().createAsync(store, templateOnStore, caller);
     }
 
     @Override
@@ -511,7 +511,7 @@ public class TemplateServiceImpl implements TemplateService {
         TemplateOpContext<TemplateApiResult> context = new TemplateOpContext<TemplateApiResult>(null, to, future);
         AsyncCallbackDispatcher<TemplateServiceImpl, CommandResult> caller = AsyncCallbackDispatcher.create(this);
         caller.setCallback(caller.getTarget().deleteTemplateCallback(null, null)).setContext(context);
-        to.getDataStore().getDriver().deleteAsync(to, caller);
+        to.getDataStore().getDriver().deleteAsync(to.getDataStore(), to, caller);
         return future;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
index 6d8e8e5..438ab69 100644
--- a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
+++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/ImageStoreImpl.java
@@ -145,7 +145,7 @@ public class ImageStoreImpl implements ImageStoreEntity {
     @Override
     public boolean delete(DataObject obj) {
         AsyncCallFuture<CommandResult> future = new AsyncCallFuture<CommandResult>();
-        this.driver.deleteAsync(obj, future);
+        this.driver.deleteAsync(obj.getDataStore(), obj, future);
         try {
             future.get();
         } catch (InterruptedException e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTest.java
index 40d9d41..90696ca 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTest.java
@@ -148,7 +148,8 @@ public class StorageAllocatorTest {
         diskOffering = diskOfferingDao.persist(diskOffering);
         diskOfferingId = diskOffering.getId();
 
-        volume = new VolumeVO(Volume.Type.ROOT, "volume", dcId, 1, 1, diskOffering.getId(), diskOffering.getDiskSize());
+        volume = new VolumeVO(Volume.Type.ROOT, "volume", dcId, 1, 1, diskOffering.getId(), diskOffering.getDiskSize(),
+                diskOffering.getMinIops(), diskOffering.getMaxIops(), "");
         volume = volumeDao.persist(volume);
         volumeId = volume.getId();
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
index 2579a38..f1eed3a 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
@@ -347,7 +347,7 @@ public class SnapshotTest extends CloudStackTestNGBase {
 
     private VolumeVO createVolume(Long templateId, long dataStoreId) {
 
-        VolumeVO volume = new VolumeVO(Volume.Type.DATADISK, UUID.randomUUID().toString(), this.dcId, 1L, 1L, 1L, 1000);
+        VolumeVO volume = new VolumeVO(Volume.Type.DATADISK, UUID.randomUUID().toString(), this.dcId, 1L, 1L, 1L, 1000, 0L, 0L, "");
         volume.setDataCenterId(this.dcId);
         volume.setPoolId(dataStoreId);
         volume = volumeDao.persist(volume);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
index 70fdb1b..cbfafc9 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
@@ -317,7 +317,7 @@ public class VolumeTest extends CloudStackTestNGBase {
     }
 
     private VolumeVO createVolume(Long templateId, long dataStoreId) {
-        VolumeVO volume = new VolumeVO(Volume.Type.DATADISK, UUID.randomUUID().toString(), this.dcId, 1L, 1L, 1L, 1000);
+        VolumeVO volume = new VolumeVO(Volume.Type.DATADISK, UUID.randomUUID().toString(), this.dcId, 1L, 1L, 1L, 1000, 0L, 0L, "");
         ;
         volume.setPoolId(dataStoreId);
         volume = volumeDao.persist(volume);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTestVmware.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTestVmware.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTestVmware.java
index 4acc8dc..be9dd19 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTestVmware.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTestVmware.java
@@ -317,7 +317,7 @@ public class VolumeTestVmware extends CloudStackTestNGBase {
     }
 
     private VolumeVO createVolume(Long templateId, long dataStoreId) {
-        VolumeVO volume = new VolumeVO(Volume.Type.DATADISK, UUID.randomUUID().toString(), this.dcId, 1L, 1L, 1L, 1000);
+        VolumeVO volume = new VolumeVO(Volume.Type.DATADISK, UUID.randomUUID().toString(), this.dcId, 1L, 1L, 1L, 1000, 0L, 0L, "");
         ;
         volume.setPoolId(dataStoreId);
         volume = volumeDao.persist(volume);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java
index 42b0463..08de7f3 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java
@@ -363,7 +363,7 @@ public class volumeServiceTest extends CloudStackTestNGBase {
     }
 
     private VolumeVO createVolume(Long templateId, long dataStoreId) {
-        VolumeVO volume = new VolumeVO(Volume.Type.DATADISK, UUID.randomUUID().toString(), this.dcId, 1L, 1L, 1L, 1000);
+        VolumeVO volume = new VolumeVO(Volume.Type.DATADISK, UUID.randomUUID().toString(), this.dcId, 1L, 1L, 1L, 1000, 0L, 0L, "");
         volume.setPoolId(dataStoreId);
         volume = volumeDao.persist(volume);
         return volume;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
index 631d220..48ec512 100644
--- a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
+++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java
@@ -355,7 +355,7 @@ public class SnapshotServiceImpl implements SnapshotService {
         AsyncCallbackDispatcher<SnapshotServiceImpl, CommandResult> caller = AsyncCallbackDispatcher.create(this);
         caller.setCallback(caller.getTarget().deleteSnapshotCallback(null, null)).setContext(context);
         DataStore store = snapInfo.getDataStore();
-        store.getDriver().deleteAsync(snapInfo, caller);
+        store.getDriver().deleteAsync(store, snapInfo, caller);
 
         SnapshotResult result = null;
         try {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
index 29b3400..300d932 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java
@@ -49,26 +49,38 @@ public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator {
         Volume volume = _volumeDao.findById(dskCh.getVolumeId());
         List<Volume> requestVolumes = new ArrayList<Volume>();
         requestVolumes.add(volume);
-        return storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
+
+        return storageMgr.storagePoolHasEnoughIops(requestVolumes, pool) &&
+               storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool);
     }
 
-    @Override
-    protected List<StoragePool> select(DiskProfile dskCh, VirtualMachineProfile<? extends VirtualMachine> vmProfile,
-            DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {
-        s_logger.debug("ZoneWideStoragePoolAllocator to find storage pool");
-        List<StoragePool> suitablePools = new ArrayList<StoragePool>();
-        HypervisorType hypervisor = dskCh.getHypervisorType();
-        if (hypervisor != null) {
-            if (hypervisor != HypervisorType.KVM && hypervisor != HypervisorType.VMware) {
-                s_logger.debug("Only kvm, VMware hypervisors are enabled to support zone wide storage");
-                return suitablePools;
+	@Override
+	protected List<StoragePool> select(DiskProfile dskCh,
+			VirtualMachineProfile<? extends VirtualMachine> vmProfile,
+			DeploymentPlan plan, ExcludeList avoid, int returnUpTo) {
+	    s_logger.debug("ZoneWideStoragePoolAllocator to find storage pool");
+		List<StoragePool> suitablePools = new ArrayList<StoragePool>();
+
+        List<StoragePoolVO> storagePools = _storagePoolDao.findZoneWideStoragePoolsByTags(plan.getDataCenterId(), dskCh.getTags());
+
+        if (storagePools == null) {
+            storagePools = new ArrayList<StoragePoolVO>();
+        }
+
+        List<StoragePoolVO> anyHypervisorStoragePools = new ArrayList<StoragePoolVO>();
+
+        for (StoragePoolVO storagePool : storagePools) {
+            if (HypervisorType.Any.equals(storagePool.getHypervisor())) {
+                anyHypervisorStoragePools.add(storagePool);
             }
         }
 
-        List<StoragePoolVO> storagePools = _storagePoolDao.findZoneWideStoragePoolsByTags(plan.getDataCenterId(), dskCh.getTags());
         List<StoragePoolVO> storagePoolsByHypervisor = _storagePoolDao.findZoneWideStoragePoolsByHypervisor(plan.getDataCenterId(), dskCh.getHypervisorType());
+
         storagePools.retainAll(storagePoolsByHypervisor);
 
+        storagePools.addAll(anyHypervisorStoragePools);
+
         // add remaining pools in zone, that did not match tags, to avoid set
         List<StoragePoolVO> allPools = _storagePoolDao.findZoneWideStoragePoolsByTags(plan.getDataCenterId(), null);
         allPools.removeAll(storagePools);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
index fa9f993..7878d8d 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java
@@ -162,7 +162,7 @@ public class DataObjectManagerImpl implements DataObjectManager {
         AsyncCallbackDispatcher<DataObjectManagerImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
         caller.setCallback(caller.getTarget().createAsynCallback(null, null)).setContext(context);
 
-        store.getDriver().createAsync(objInStore, caller);
+        store.getDriver().createAsync(store, objInStore, caller);
         return;
     }
 
@@ -321,7 +321,7 @@ public class DataObjectManagerImpl implements DataObjectManager {
         AsyncCallbackDispatcher<DataObjectManagerImpl, CommandResult> caller = AsyncCallbackDispatcher.create(this);
         caller.setCallback(caller.getTarget().deleteAsynCallback(null, null)).setContext(context);
 
-        data.getDataStore().getDriver().deleteAsync(data, caller);
+        data.getDataStore().getDriver().deleteAsync(data.getDataStore(), data, caller);
         return;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreEntityImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreEntityImpl.java
index e861910..0aebee2 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreEntityImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreEntityImpl.java
@@ -176,6 +176,12 @@ public class PrimaryDataStoreEntityImpl implements StorageEntity {
     }
 
     @Override
+    public Long getCapacityIops() {
+        // TODO Auto-generated method stub
+        return 0L;
+    }
+
+    @Override
     public Long getClusterId() {
         // TODO Auto-generated method stub
         return null;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
index 93b0c2b..97c1671 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/image/BaseImageStoreDriverImpl.java
@@ -81,7 +81,7 @@ public abstract class BaseImageStoreDriverImpl implements ImageStoreDriver {
     }
 
     @Override
-    public void createAsync(DataObject data, AsyncCompletionCallback<CreateCmdResult> callback) {
+    public void createAsync(DataStore dataStore, DataObject data, AsyncCompletionCallback<CreateCmdResult> callback) {
         CreateContext<CreateCmdResult> context = new CreateContext<CreateCmdResult>(callback, data);
         AsyncCallbackDispatcher<BaseImageStoreDriverImpl, DownloadAnswer> caller = AsyncCallbackDispatcher
                 .create(this);
@@ -184,7 +184,7 @@ public abstract class BaseImageStoreDriverImpl implements ImageStoreDriver {
     }
 
     @Override
-    public void deleteAsync(DataObject data, AsyncCompletionCallback<CommandResult> callback) {
+    public void deleteAsync(DataStore dataStore, DataObject data, AsyncCompletionCallback<CommandResult> callback) {
         DeleteCommand cmd = new DeleteCommand(data.getTO());
 
         CommandResult result = new CommandResult();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
index 6815dec..53ead0b 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java
@@ -79,6 +79,11 @@ public class PrimaryDataStoreHelper {
         dataStoreVO.setClusterId(params.getClusterId());
         dataStoreVO.setStatus(StoragePoolStatus.Initialized);
         dataStoreVO.setUserInfo(params.getUserInfo());
+        dataStoreVO.setManaged(params.isManaged());
+        dataStoreVO.setCapacityIops(params.getCapacityIops());
+        dataStoreVO.setCapacityBytes(params.getCapacityBytes());
+        dataStoreVO.setUsedBytes(params.getUsedBytes());
+        dataStoreVO.setHypervisor(params.getHypervisorType());
 
         Map<String, String> details = params.getDetails();
         String tags = params.getTags();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
index cfdb5c0..420fd29 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreImpl.java
@@ -288,6 +288,11 @@ public class PrimaryDataStoreImpl implements PrimaryDataStore {
     }
 
     @Override
+    public Long getCapacityIops() {
+        return this.pdsv.getCapacityIops();
+    }
+
+    @Override
     public Long getClusterId() {
         return this.pdsv.getClusterId();
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
index 071c110..55fc3a6 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java
@@ -107,6 +107,11 @@ public class VolumeObject implements VolumeInfo {
         volumeVO.setUuid(uuid);
     }
 
+    @Override
+    public String get_iScsiName() {
+    	return volumeVO.get_iScsiName();
+    }
+
     public void setSize(Long size) {
         volumeVO.setSize(size);
     }
@@ -126,6 +131,16 @@ public class VolumeObject implements VolumeInfo {
         return volumeVO.getSize();
     }
 
+    @Override
+    public Long getMinIops() {
+        return volumeVO.getMinIops();
+    }
+
+    @Override
+    public Long getMaxIops() {
+        return volumeVO.getMaxIops();
+    }
+
     public long getVolumeId() {
         return volumeVO.getId();
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
----------------------------------------------------------------------
diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
index 56b0b08..de1e423 100644
--- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
+++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java
@@ -35,8 +35,11 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine;
 import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver;
+import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver;
 import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo;
+import org.apache.cloudstack.engine.subsystem.api.storage.ChapInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
 import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService;
@@ -143,6 +146,16 @@ public class VolumeServiceImpl implements VolumeService {
 
     }
 
+    public ChapInfo getChapInfo(VolumeInfo volumeInfo, DataStore dataStore) {
+        DataStoreDriver dataStoreDriver = dataStore.getDriver();
+
+        if (dataStoreDriver instanceof PrimaryDataStoreDriver) {
+            return ((PrimaryDataStoreDriver)dataStoreDriver).getChapInfo(volumeInfo);
+        }
+
+        return null;
+    }
+
     @Override
     public AsyncCallFuture<VolumeApiResult> createVolumeAsync(VolumeInfo volume, DataStore dataStore) {
         AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<VolumeApiResult>();
@@ -154,7 +167,7 @@ public class VolumeServiceImpl implements VolumeService {
         AsyncCallbackDispatcher<VolumeServiceImpl, CreateCmdResult> caller = AsyncCallbackDispatcher.create(this);
         caller.setCallback(caller.getTarget().createVolumeCallback(null, null)).setContext(context);
 
-        dataStore.getDriver().createAsync(volumeOnStore, caller);
+        dataStore.getDriver().createAsync(dataStore, volumeOnStore, caller);
         return future;
     }
 
@@ -238,7 +251,7 @@ public class VolumeServiceImpl implements VolumeService {
         AsyncCallbackDispatcher<VolumeServiceImpl, CommandResult> caller = AsyncCallbackDispatcher.create(this);
         caller.setCallback(caller.getTarget().deleteVolumeCallback(null, null)).setContext(context);
 
-        volume.getDataStore().getDriver().deleteAsync(volume, caller);
+        volume.getDataStore().getDriver().deleteAsync(volume.getDataStore(), volume, caller);
         return future;
     }
 
@@ -935,7 +948,7 @@ public class VolumeServiceImpl implements VolumeService {
         caller.setCallback(caller.getTarget().registerVolumeCallback(null, null));
         caller.setContext(context);
 
-        store.getDriver().createAsync(volumeOnStore, caller);
+        store.getDriver().createAsync(store, volumeOnStore, caller);
         return future;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index e0c00fc..914017c 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -2573,7 +2573,7 @@ ServerResource {
             return new AttachVolumeAnswer(cmd, e.toString());
         }
 
-        return new AttachVolumeAnswer(cmd, cmd.getDeviceId());
+        return new AttachVolumeAnswer(cmd, cmd.getDeviceId(), cmd.getVolumePath());
     }
 
     private Answer execute(ReadyCommand cmd) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/99227f7b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
index 21b81e1..a59949f 100644
--- a/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
+++ b/plugins/hypervisors/simulator/src/com/cloud/agent/manager/MockStorageManagerImpl.java
@@ -258,7 +258,7 @@ public class MockStorageManagerImpl extends ManagerBase implements MockStorageMa
             }
             txn.commit();
 
-            return new AttachVolumeAnswer(cmd, cmd.getDeviceId());
+            return new AttachVolumeAnswer(cmd, cmd.getDeviceId(), cmd.getVolumePath());
         } catch (Exception ex) {
             txn.rollback();
             throw new CloudRuntimeException("Error when attaching volume " + cmd.getVolumeName() + " to VM "


Mime
View raw message