cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtutkow...@apache.org
Subject [3/5] git commit: updated refs/heads/sf-plugins-a to cb53d9f
Date Thu, 01 Oct 2015 02:23:22 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/ListSolidFireVirtualNetworksCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/ListSolidFireVirtualNetworksCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/ListSolidFireVirtualNetworksCmd.java
new file mode 100644
index 0000000..c5ac3bf
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/ListSolidFireVirtualNetworksCmd.java
@@ -0,0 +1,114 @@
+// 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.api.command.user.solidfire;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.ResponseObject.ResponseView;
+import org.apache.cloudstack.api.response.AccountResponse;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.ZoneResponse;
+import org.apache.cloudstack.api.response.solidfire.ApiSolidFireVirtualNetworkResponse;
+import org.apache.cloudstack.api.solidfire.SfApiConstants;
+import org.apache.cloudstack.solidfire.SfVirtualNetwork;
+import org.apache.cloudstack.solidfire.SolidFireManager;
+import org.apache.cloudstack.util.solidfire.SfUtil;
+
+@APICommand(name = "listSolidFireVirtualNetworks", responseObject = ApiSolidFireVirtualNetworkResponse.class, description = "List SolidFire Virtual Networks",
+    requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+public class ListSolidFireVirtualNetworksCmd extends BaseListCmd {
+    private static final Logger s_logger = Logger.getLogger(ListSolidFireVirtualNetworksCmd.class.getName());
+    private static final String s_name = "listsolidfirevirtualnetworksresponse";
+
+    @Inject private SolidFireManager _solidFireManager;
+
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ApiSolidFireVirtualNetworkResponse.class, description = SfApiConstants.VIRTUAL_NETWORK_ID_DESC)
+    private Long _id;
+
+    @Parameter(name = SfApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = SfApiConstants.SOLIDFIRE_CLUSTER_NAME_DESC)
+    private String _clusterName;
+
+    @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = SfApiConstants.ZONE_ID_DESC)
+    private Long _zoneId;
+
+    @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = SfApiConstants.ACCOUNT_ID_DESC)
+    private Long _accountId;
+
+    @Inject private SfUtil _sfUtil;
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public void execute() {
+        try {
+            s_logger.info(ListSolidFireVirtualNetworksCmd.class.getName() + ".execute invoked");
+
+            final List<SfVirtualNetwork> sfVirtualNetworks;
+
+            if (_id != null) {
+                sfVirtualNetworks = new ArrayList<>();
+
+                SfVirtualNetwork sfVirtualNetwork = _solidFireManager.listSolidFireVirtualNetworkById(_id);
+
+                if (sfVirtualNetwork != null) {
+                    sfVirtualNetworks.add(sfVirtualNetwork);
+                }
+            }
+            else if (_clusterName != null) {
+                sfVirtualNetworks = _solidFireManager.listSolidFireVirtualNetworkByClusterName(_clusterName);
+            }
+            else {
+                sfVirtualNetworks = _solidFireManager.listSolidFireVirtualNetworks(_zoneId, _accountId);
+            }
+
+            ResponseView responseView = _sfUtil.isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
+
+            List<ApiSolidFireVirtualNetworkResponse> responses = _sfUtil.getApiSolidFireVirtualNetworkResponse(sfVirtualNetworks, responseView);
+
+            ListResponse<ApiSolidFireVirtualNetworkResponse> listReponse = new ListResponse<>();
+
+            listReponse.setResponses(responses);
+            listReponse.setResponseName(getCommandName());
+            listReponse.setObjectName("apilistsolidfirevirtualnetworks");
+
+            setResponseObject(listReponse);
+        }
+        catch (Throwable t) {
+            s_logger.error(t.getMessage());
+
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, t.getMessage());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/ListSolidFireVolumesCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/ListSolidFireVolumesCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/ListSolidFireVolumesCmd.java
new file mode 100644
index 0000000..33bb758
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/ListSolidFireVolumesCmd.java
@@ -0,0 +1,99 @@
+// 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.api.command.user.solidfire;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseListCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.ResponseObject.ResponseView;
+import org.apache.cloudstack.api.response.ListResponse;
+import org.apache.cloudstack.api.response.solidfire.ApiSolidFireVolumeResponse;
+import org.apache.cloudstack.api.solidfire.SfApiConstants;
+import org.apache.cloudstack.solidfire.SfVolume;
+import org.apache.cloudstack.solidfire.SolidFireManager;
+import org.apache.cloudstack.util.solidfire.SfUtil;
+
+@APICommand(name = "listSolidFireVolumes", responseObject = ApiSolidFireVolumeResponse.class, description = "List SolidFire Volumes",
+    requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+public class ListSolidFireVolumesCmd extends BaseListCmd {
+    private static final Logger s_logger = Logger.getLogger(ListSolidFireVolumesCmd.class.getName());
+    private static final String s_name = "listsolidfirevolumesresponse";
+
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ApiSolidFireVolumeResponse.class, description = SfApiConstants.VOLUME_ID_DESC)
+    private Long _id;
+
+    @Inject private SolidFireManager _solidFireManager;
+    @Inject private SfUtil _sfUtil;
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public void execute() {
+        try {
+            s_logger.info(ListSolidFireVolumesCmd.class.getName() + ".execute invoked");
+
+            final List<SfVolume> sfVolumes;
+
+            if (_id != null) {
+                sfVolumes = new ArrayList<>();
+
+                SfVolume sfVolume = _solidFireManager.listSolidFireVolume(_id);
+
+                if (sfVolume != null) {
+                    sfVolumes.add(sfVolume);
+                }
+            }
+            else {
+                sfVolumes = _solidFireManager.listSolidFireVolumes();
+            }
+
+            ResponseView responseView = _sfUtil.isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
+
+            List<ApiSolidFireVolumeResponse> responses = _sfUtil.getApiSolidFireVolumeResponse(sfVolumes, responseView);
+
+            ListResponse<ApiSolidFireVolumeResponse> listReponse = new ListResponse<>();
+
+            listReponse.setResponses(responses);
+            listReponse.setResponseName(getCommandName());
+            listReponse.setObjectName("apilistsolidfirevolumes");
+
+            setResponseObject(listReponse);
+        }
+        catch (Throwable t) {
+            s_logger.error(t.getMessage());
+
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, t.getMessage());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/UpdateSolidFireVolumeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/UpdateSolidFireVolumeCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/UpdateSolidFireVolumeCmd.java
new file mode 100644
index 0000000..6958619
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/UpdateSolidFireVolumeCmd.java
@@ -0,0 +1,108 @@
+// 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.api.command.user.solidfire;
+
+import com.cloud.user.Account;
+
+import javax.inject.Inject;
+
+import org.apache.log4j.Logger;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.APICommand;
+import org.apache.cloudstack.api.ApiErrorCode;
+import org.apache.cloudstack.api.BaseCmd;
+import org.apache.cloudstack.api.Parameter;
+import org.apache.cloudstack.api.ServerApiException;
+import org.apache.cloudstack.api.ResponseObject.ResponseView;
+import org.apache.cloudstack.api.response.solidfire.ApiSolidFireVolumeResponse;
+import org.apache.cloudstack.api.solidfire.SfApiConstants;
+import org.apache.cloudstack.solidfire.SfVirtualNetwork;
+import org.apache.cloudstack.solidfire.SfVolume;
+import org.apache.cloudstack.solidfire.SolidFireManager;
+import org.apache.cloudstack.util.solidfire.SfUtil;
+
+@APICommand(name = "updateSolidFireVolume", responseObject = ApiSolidFireVolumeResponse.class, description = "Update SolidFire Volume",
+    requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
+public class UpdateSolidFireVolumeCmd extends BaseCmd {
+    private static final Logger s_logger = Logger.getLogger(UpdateSolidFireVolumeCmd.class.getName());
+    private static final String s_name = "updatesolidfirevolumeresponse";
+
+    @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ApiSolidFireVolumeResponse.class, description = SfApiConstants.VOLUME_ID_DESC, required = true)
+    private long _id;
+
+    @Parameter(name = ApiConstants.SIZE, type = CommandType.LONG, description = SfApiConstants.SIZE_DESC, required = true)
+    private long _size;
+
+    @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, description = SfApiConstants.MIN_IOPS_DESC, required = true)
+    private long _minIops;
+
+    @Parameter(name = ApiConstants.MAX_IOPS, type = CommandType.LONG, description = SfApiConstants.MAX_IOPS_DESC, required = true)
+    private long _maxIops;
+
+    @Parameter(name = SfApiConstants.BURST_IOPS, type = CommandType.LONG, description = SfApiConstants.BURST_IOPS_DESC, required = true)
+    private long _burstIops;
+
+    @Inject private SolidFireManager _solidFireManager;
+    @Inject private SfUtil _sfUtil;
+
+    /////////////////////////////////////////////////////
+    /////////////// API Implementation///////////////////
+    /////////////////////////////////////////////////////
+
+    @Override
+    public String getCommandName() {
+        return s_name;
+    }
+
+    @Override
+    public long getEntityOwnerId() {
+        SfVolume sfVolume = _entityMgr.findById(SfVolume.class, _id);
+
+        if (sfVolume != null) {
+            SfVirtualNetwork sfVirtualNetwork = _entityMgr.findById(SfVirtualNetwork.class, sfVolume.getSfVirtualNetworkId());
+
+            if (sfVirtualNetwork != null) {
+                sfVirtualNetwork.getAccountId();
+            }
+        }
+        return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked
+    }
+
+    @Override
+    public void execute() {
+        try {
+            s_logger.info(UpdateSolidFireVolumeCmd.class.getName() + ".execute invoked");
+
+            SfVolume sfVolume = _solidFireManager.updateSolidFireVolume(_id, _size, _minIops, _maxIops, _burstIops);
+
+            ResponseView responseView = _sfUtil.isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
+
+            ApiSolidFireVolumeResponse response = _sfUtil.getApiSolidFireVolumeResponse(sfVolume, responseView);
+
+            response.setResponseName(getCommandName());
+            response.setObjectName("apiupdatesolidfirevolume");
+
+            setResponseObject(response);
+        }
+        catch (Throwable t) {
+            s_logger.error(t.getMessage());
+
+            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, t.getMessage());
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireClusterResponse.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireClusterResponse.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireClusterResponse.java
new file mode 100644
index 0000000..5c6c688
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireClusterResponse.java
@@ -0,0 +1,161 @@
+// 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.api.response.solidfire;
+
+import com.cloud.serializer.Param;
+
+import com.google.gson.annotations.SerializedName;
+
+import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
+import org.apache.cloudstack.api.solidfire.SfApiConstants;
+import org.apache.cloudstack.solidfire.SfCluster;
+
+@EntityReference(value = SfCluster.class)
+public class ApiSolidFireClusterResponse extends BaseResponse {
+    @SerializedName("id")
+    @Param(description = "CloudStack ID")
+    private long _id;
+
+    @SerializedName("uuid")
+    @Param(description = "CloudStack UUID")
+    private String _uuid;
+
+    @SerializedName("name")
+    @Param(description = SfApiConstants.SOLIDFIRE_CLUSTER_NAME_DESC)
+    private String _name;
+
+    @SerializedName("mvip")
+    @Param(description = SfApiConstants.SOLIDFIRE_MVIP_DESC)
+    private String _mvip;
+
+    @SerializedName("username")
+    @Param(description = SfApiConstants.SOLIDFIRE_USERNAME_DESC)
+    private String _username;
+
+    @SerializedName("totalcapacity")
+    @Param(description = "SolidFire cluster total capacity for CloudStack (in GBs)")
+    private long _totalCapacity;
+
+    @SerializedName("totalminiops")
+    @Param(description = "SolidFire cluster total minimum IOPS for CloudStack")
+    private long _totalMinIops;
+
+    @SerializedName("totalmaxiops")
+    @Param(description = "SolidFire cluster total maximum IOPS for CloudStack")
+    private long _totalMaxIops;
+
+    @SerializedName("totalburstiops")
+    @Param(description = "SolidFire cluster total burst IOPS for CloudStack")
+    private long _totalBurstIops;
+
+    @SerializedName("zoneid")
+    @Param(description = "Zone ID that the SolidFire cluster is associated with")
+    private long _zoneId;
+
+    @SerializedName("zonename")
+    @Param(description = "Zone name that the SolidFire cluster is associated with")
+    private String _zoneName;
+
+    public void setId(long id) {
+        _id = id;
+    }
+
+    public long getId() {
+        return _id;
+    }
+
+    public void setUuid(String uuid) {
+        _uuid = uuid;
+    }
+
+    public String getUuid() {
+        return _uuid;
+    }
+
+    public void setName(String name) {
+        _name = name;
+    }
+
+    public String getName() {
+        return _name;
+    }
+
+    public void setMvip(String mvip) {
+        _mvip = mvip;
+    }
+
+    public String getMvip() {
+        return _mvip;
+    }
+
+    public void setUsername(String username) {
+        _username = username;
+    }
+
+    public String getUsername() {
+        return _username;
+    }
+
+    public void setTotalCapacity(long totalCapacity) {
+        _totalCapacity = totalCapacity;
+    }
+
+    public long getTotalCapacity() {
+        return _totalCapacity;
+    }
+
+    public void setTotalMinIops(long totalMinIops) {
+        _totalMinIops = totalMinIops;
+    }
+
+    public long getTotalMinIops() {
+        return _totalMinIops;
+    }
+
+    public void setTotalMaxIops(long totalMaxIops) {
+        _totalMaxIops = totalMaxIops;
+    }
+
+    public long getTotalMaxIops() {
+        return _totalMaxIops;
+    }
+
+    public void setTotalBurstIops(long totalBurstIops) {
+        _totalBurstIops = totalBurstIops;
+    }
+
+    public long getTotalBurstIops() {
+        return _totalBurstIops;
+    }
+
+    public void setZoneId(long zoneId) {
+        _zoneId = zoneId;
+    }
+
+    public long getZoneId() {
+        return _zoneId;
+    }
+
+    public void setZoneName(String zoneName) {
+        _zoneName = zoneName;
+    }
+
+    public String getZoneName() {
+        return _zoneName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireVirtualNetworkResponse.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireVirtualNetworkResponse.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireVirtualNetworkResponse.java
new file mode 100644
index 0000000..b47cae0
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireVirtualNetworkResponse.java
@@ -0,0 +1,209 @@
+// 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.api.response.solidfire;
+
+import com.cloud.serializer.Param;
+
+import com.google.gson.annotations.SerializedName;
+
+import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
+import org.apache.cloudstack.api.solidfire.SfApiConstants;
+import org.apache.cloudstack.solidfire.SfVirtualNetwork;
+
+@EntityReference(value = SfVirtualNetwork.class)
+public class ApiSolidFireVirtualNetworkResponse extends BaseResponse {
+    @SerializedName("id")
+    @Param(description = "CloudStack ID")
+    private long _id;
+
+    @SerializedName("uuid")
+    @Param(description = "CloudStack UUID")
+    private String _uuid;
+
+    @SerializedName("name")
+    @Param(description = SfApiConstants.VIRTUAL_NETWORK_NAME_DESC)
+    private String _name;
+
+    @SerializedName("tag")
+    @Param(description = SfApiConstants.VIRTUAL_NETWORK_TAG_DESC)
+    private String _tag;
+
+    @SerializedName("startip")
+    @Param(description = SfApiConstants.START_IP_ADDRESS_DESC)
+    private String _startIp;
+
+    @SerializedName("size")
+    @Param(description = SfApiConstants.SIZE_DESC)
+    private int _size;
+
+    @SerializedName("netmask")
+    @Param(description = SfApiConstants.NETMASK_DESC)
+    private String _netmask;
+
+    @SerializedName("svip")
+    @Param(description = SfApiConstants.SOLIDFIRE_SVIP_DESC)
+    private String _svip;
+
+    @SerializedName("accountid")
+    @Param(description = "ID of the account the VLAN is associated with")
+    private long _accountId;
+
+    @SerializedName("accountuuid")
+    @Param(description = "UUID of the account the VLAN is associated with")
+    private String _accountUuid;
+
+    @SerializedName("accountname")
+    @Param(description = "Name of the account the volume is associated with")
+    private String _accountName;
+
+    @SerializedName("zoneid")
+    @Param(description = "ID of the zone the VLAN is associated with")
+    private long _zoneId;
+
+    @SerializedName("zoneuuid")
+    @Param(description = "UUID of the zone the VLAN is associated with")
+    private String _zoneUuid;
+
+    @SerializedName("zonename")
+    @Param(description = "Name of the zone the volume is associated with")
+    private String _zoneName;
+
+    @SerializedName("clustername")
+    @Param(description = "Name of cluster the VLAN belongs to")
+    private String _clusterName;
+
+    public void setId(long id) {
+        _id = id;
+    }
+
+    public long getId() {
+        return _id;
+    }
+
+    public void setUuid(String uuid) {
+        _uuid = uuid;
+    }
+
+    public String getUuid() {
+        return _uuid;
+    }
+
+    public void setName(String name) {
+        _name = name;
+    }
+
+    public String getName() {
+        return _name;
+    }
+
+    public void setTag(String tag) {
+        _tag = tag;
+    }
+
+    public String getTag() {
+        return _tag;
+    }
+
+    public void setStartIp(String startIp) {
+        _startIp = startIp;
+    }
+
+    public String getStartIp() {
+        return _startIp;
+    }
+
+    public void setSize(int size) {
+        _size = size;
+    }
+
+    public int getSize() {
+        return _size;
+    }
+
+    public void setNetmask(String netmask) {
+        _netmask = netmask;
+    }
+
+    public String getNetmask() {
+        return _netmask;
+    }
+
+    public void setSvip(String svip) {
+        _svip = svip;
+    }
+
+    public String getSvip() {
+        return _svip;
+    }
+
+    public void setAccountId(long accountId) {
+        _accountId = accountId;
+    }
+
+    public long getAccountId() {
+        return _accountId;
+    }
+
+    public void setAccountUuid(String accountUuid) {
+        _accountUuid = accountUuid;
+    }
+
+    public String getAccountUuid() {
+        return _accountUuid;
+    }
+
+    public void setAccountName(String accountName) {
+        _accountName = accountName;
+    }
+
+    public String getAccountName() {
+        return _accountName;
+    }
+
+    public void setZoneId(long zoneId) {
+        _zoneId = zoneId;
+    }
+
+    public long getZoneId() {
+        return _zoneId;
+    }
+
+    public void setZoneUuid(String zoneUuid) {
+        _zoneUuid = zoneUuid;
+    }
+
+    public String getZoneUuid() {
+        return _zoneUuid;
+    }
+
+    public void setZoneName(String zoneName) {
+        _zoneName = zoneName;
+    }
+
+    public String getZoneName() {
+        return _zoneName;
+    }
+
+    public void setClusterName(String clusterName) {
+        _clusterName = clusterName;
+    }
+
+    public String getClusterName() {
+        return _clusterName;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireVolumeResponse.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireVolumeResponse.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireVolumeResponse.java
new file mode 100644
index 0000000..d6e6029
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/solidfire/ApiSolidFireVolumeResponse.java
@@ -0,0 +1,320 @@
+// 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.api.response.solidfire;
+
+import java.util.Date;
+
+import com.cloud.serializer.Param;
+
+import com.google.gson.annotations.SerializedName;
+
+import org.apache.cloudstack.api.ApiConstants;
+import org.apache.cloudstack.api.BaseResponse;
+import org.apache.cloudstack.api.EntityReference;
+import org.apache.cloudstack.api.solidfire.SfApiConstants;
+import org.apache.cloudstack.solidfire.SfVolume;
+
+@EntityReference(value = SfVolume.class)
+public class ApiSolidFireVolumeResponse extends BaseResponse {
+    @SerializedName("id")
+    @Param(description = "CloudStack ID")
+    private long _id;
+
+    @SerializedName("uuid")
+    @Param(description = "CloudStack UUID")
+    private String _uuid;
+
+    @SerializedName("name")
+    @Param(description = SfApiConstants.VOLUME_NAME_DESC)
+    private String _name;
+
+    @SerializedName("iqn")
+    @Param(description = SfApiConstants.IQN_DESC)
+    private String _iqn;
+
+    @SerializedName("size")
+    @Param(description = SfApiConstants.SIZE_DESC)
+    private long _size;
+
+    @SerializedName("miniops")
+    @Param(description = SfApiConstants.MIN_IOPS_DESC)
+    private long _minIops;
+
+    @SerializedName("maxiops")
+    @Param(description = SfApiConstants.MAX_IOPS_DESC)
+    private long _maxIops;
+
+    @SerializedName("burstiops")
+    @Param(description = SfApiConstants.BURST_IOPS_DESC)
+    private long _burstIops;
+
+    @SerializedName("accountid")
+    @Param(description = "ID of the account the volume is associated with")
+    private long _accountId;
+
+    @SerializedName("accountuuid")
+    @Param(description = "UUID of the account the volume is associated with")
+    private String _accountUuid;
+
+    @SerializedName("accountname")
+    @Param(description = "Name of the account the volume is associated with")
+    private String _accountName;
+
+    @SerializedName("vlanid")
+    @Param(description = "ID of the VLAN the volume is associated with")
+    private long _vlanId;
+
+    @SerializedName("vlanuuid")
+    @Param(description = "UUID of the VLAN the volume is associated with")
+    private String _vlanUuid;
+
+    @SerializedName("vlanname")
+    @Param(description = "Name of the VLAN the volume is associated with")
+    private String _vlanName;
+
+    @SerializedName("zoneid")
+    @Param(description = "ID of the zone the volume is associated with")
+    private long _zoneId;
+
+    @SerializedName("zoneuuid")
+    @Param(description = "UUID of the zone the volume is associated with")
+    private String _zoneUuid;
+
+    @SerializedName("zonename")
+    @Param(description = "Name of the zone the volume is associated with")
+    private String _zoneName;
+
+    @SerializedName("clustername")
+    @Param(description = "Name of cluster the volume belongs to")
+    private String _clusterName;
+
+    @SerializedName("targetportal")
+    @Param(description = "Target portal")
+    private String _targetPortal;
+
+    @SerializedName("chapinitiatorusername")
+    @Param(description = "CHAP initiator username")
+    private String _chapInitiatorUsername;
+
+    @SerializedName("chapinitiatorsecret")
+    @Param(description = "CHAP initiator secret")
+    private String _chapInitiatorSecret;
+
+    @SerializedName("chaptargetusername")
+    @Param(description = "CHAP target username")
+    private String _chapTargetUsername;
+
+    @SerializedName("chaptargetsecret")
+    @Param(description = "CHAP target secret")
+    private String _chapTargetSecret;
+
+    @SerializedName(ApiConstants.CREATED)
+    @Param(description = "Date volume was created")
+    private Date _created;
+
+    public void setId(long id) {
+        _id = id;
+    }
+
+    public long getId() {
+        return _id;
+    }
+
+    public void setUuid(String uuid) {
+        _uuid = uuid;
+    }
+
+    public String getUuid() {
+        return _uuid;
+    }
+
+    public void setName(String name) {
+        _name = name;
+    }
+
+    public String getName() {
+        return _name;
+    }
+
+    public void setIqn(String iqn) {
+        _iqn = iqn;
+    }
+
+    public String getIqn() {
+        return _iqn;
+    }
+
+    public void setSize(long size) {
+        _size = size;
+    }
+
+    public long getSize() {
+        return _size;
+    }
+
+    public void setMinIops(long minIops) {
+        _minIops = minIops;
+    }
+
+    public long getMinIops() {
+        return _minIops;
+    }
+
+    public void setMaxIops(long maxIops) {
+        _maxIops = maxIops;
+    }
+
+    public long getMaxIops() {
+        return _maxIops;
+    }
+
+    public void setBurstIops(long burstIops) {
+        _burstIops = burstIops;
+    }
+
+    public long getBurstIops() {
+        return _burstIops;
+    }
+
+    public void setAccountId(long accountId) {
+        _accountId = accountId;
+    }
+
+    public long getAccountId() {
+        return _accountId;
+    }
+
+    public void setAccountUuid(String accountUuid) {
+        _accountUuid = accountUuid;
+    }
+
+    public String getAccountUuid() {
+        return _accountUuid;
+    }
+
+    public void setAccountName(String accountName) {
+        _accountName = accountName;
+    }
+
+    public String getAccountName() {
+        return _accountName;
+    }
+
+    public void setVlanId(long vlanId) {
+        _vlanId = vlanId;
+    }
+
+    public long getVlanId() {
+        return _vlanId;
+    }
+
+    public void setVlanUuid(String vlanUuid) {
+        _vlanUuid = vlanUuid;
+    }
+
+    public String getVlanUuid() {
+        return _vlanUuid;
+    }
+
+    public void setVlanName(String vlanName) {
+        _vlanName = vlanName;
+    }
+
+    public String getVlanName() {
+        return _vlanName;
+    }
+
+    public void setZoneId(long zoneId) {
+        _zoneId = zoneId;
+    }
+
+    public long getZoneId() {
+        return _zoneId;
+    }
+
+    public void setZoneUuid(String zoneUuid) {
+        _zoneUuid = zoneUuid;
+    }
+
+    public String getZoneUuid() {
+        return _zoneUuid;
+    }
+
+    public void setZoneName(String zoneName) {
+        _zoneName = zoneName;
+    }
+
+    public String getZoneName() {
+        return _zoneName;
+    }
+
+    public void setClusterName(String clusterName) {
+        _clusterName = clusterName;
+    }
+
+    public String getClusterName() {
+        return _clusterName;
+    }
+
+    public void setTargetPortal(String targetPortal) {
+        _targetPortal = targetPortal;
+    }
+
+    public String getTargetPortal() {
+        return _targetPortal;
+    }
+
+    public void setChapInitiatorUsername(String chapInitiatorUsername) {
+        _chapInitiatorUsername = chapInitiatorUsername;
+    }
+
+    public String getChapInitiatorUsername() {
+        return _chapInitiatorUsername;
+    }
+
+    public void setChapInitiatorSecret(String chapInitiatorSecret) {
+        _chapInitiatorSecret = chapInitiatorSecret;
+    }
+
+    public String getChapInitiatorSecret() {
+        return _chapInitiatorSecret;
+    }
+
+    public void setChapTargetUsername(String chapTargetUsername) {
+        _chapTargetUsername = chapTargetUsername;
+    }
+
+    public String getTargetInitiatorUsername() {
+        return _chapTargetUsername;
+    }
+
+    public void setChapTargetSecret(String chapTargetSecret) {
+        _chapTargetSecret = chapTargetSecret;
+    }
+
+    public String getTargetInitiatorSecret() {
+        return _chapTargetSecret;
+    }
+
+    public void setCreated(Date created) {
+        _created = created;
+    }
+
+    public Date getCreated() {
+        return _created;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/ApiSolidFireService.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/ApiSolidFireService.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/ApiSolidFireService.java
new file mode 100644
index 0000000..5715c01
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/ApiSolidFireService.java
@@ -0,0 +1,6 @@
+package org.apache.cloudstack.api.solidfire;
+
+import com.cloud.utils.component.PluggableService;
+
+public interface ApiSolidFireService extends PluggableService {
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/ApiSolidFireServiceImpl.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/ApiSolidFireServiceImpl.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/ApiSolidFireServiceImpl.java
new file mode 100644
index 0000000..9d33fcf
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/ApiSolidFireServiceImpl.java
@@ -0,0 +1,45 @@
+package org.apache.cloudstack.api.solidfire;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.cloudstack.api.command.admin.solidfire.CreateReferenceToSolidFireClusterCmd;
+import org.apache.cloudstack.api.command.admin.solidfire.CreateSolidFireVirtualNetworkCmd;
+import org.apache.cloudstack.api.command.admin.solidfire.DeleteReferenceToSolidFireClusterCmd;
+import org.apache.cloudstack.api.command.admin.solidfire.DeleteSolidFireVirtualNetworkCmd;
+import org.apache.cloudstack.api.command.admin.solidfire.ListSolidFireClustersCmd;
+import org.apache.cloudstack.api.command.admin.solidfire.UpdateReferenceToSolidFireClusterCmd;
+import org.apache.cloudstack.api.command.admin.solidfire.UpdateSolidFireVirtualNetworkCmd;
+import org.apache.cloudstack.api.command.user.solidfire.CreateSolidFireVolumeCmd;
+import org.apache.cloudstack.api.command.user.solidfire.DeleteSolidFireVolumeCmd;
+import org.apache.cloudstack.api.command.user.solidfire.ListSolidFireVirtualNetworksCmd;
+import org.apache.cloudstack.api.command.user.solidfire.ListSolidFireVolumesCmd;
+import org.apache.cloudstack.api.command.user.solidfire.UpdateSolidFireVolumeCmd;
+import org.springframework.stereotype.Component;
+
+import com.cloud.utils.component.AdapterBase;
+
+@Component
+public class ApiSolidFireServiceImpl extends AdapterBase implements ApiSolidFireService {
+    @Override
+    public List<Class<?>> getCommands() {
+        List<Class<?>> cmdList = new ArrayList<Class<?>>();
+
+        cmdList.add(ListSolidFireClustersCmd.class);
+        cmdList.add(CreateReferenceToSolidFireClusterCmd.class);
+        cmdList.add(UpdateReferenceToSolidFireClusterCmd.class);
+        cmdList.add(DeleteReferenceToSolidFireClusterCmd.class);
+
+        cmdList.add(ListSolidFireVirtualNetworksCmd.class);
+        cmdList.add(CreateSolidFireVirtualNetworkCmd.class);
+        cmdList.add(UpdateSolidFireVirtualNetworkCmd.class);
+        cmdList.add(DeleteSolidFireVirtualNetworkCmd.class);
+
+        cmdList.add(ListSolidFireVolumesCmd.class);
+        cmdList.add(CreateSolidFireVolumeCmd.class);
+        cmdList.add(UpdateSolidFireVolumeCmd.class);
+        cmdList.add(DeleteSolidFireVolumeCmd.class);
+
+        return cmdList;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/SfApiConstants.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/SfApiConstants.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/SfApiConstants.java
new file mode 100644
index 0000000..193361c
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/solidfire/SfApiConstants.java
@@ -0,0 +1,44 @@
+package org.apache.cloudstack.api.solidfire;
+
+public class SfApiConstants {
+    public static final String MVIP = "mvip";
+    public static final String SVIP = "svip";
+    public static final String CLUSTER_NAME = "clustername";
+    public static final String NAME = "name";
+    public static final String TAG = "tag";
+    public static final String START_IP = "startip";
+    public static final String SIZE = "size";
+    public static final String NETMASK = "netmask";
+    public static final String TOTAL_CAPACITY = "totalcapacity";
+    public static final String TOTAL_MIN_IOPS = "totalminiops";
+    public static final String TOTAL_MAX_IOPS = "totalmaxiops";
+    public static final String TOTAL_BURST_IOPS = "totalburstiops";
+    public static final String BURST_IOPS = "burstiops";
+    public static final String SF_VIRTUAL_NETWORK_ID = "sfvirtualnetworkid";
+
+    // descriptions
+    public static final String SOLIDFIRE_CLUSTER_NAME_DESC = "SolidFire cluster name";
+    public static final String SOLIDFIRE_MVIP_DESC = "SolidFire management virtual IP address";
+    public static final String SOLIDFIRE_SVIP_DESC = "SolidFire storage virtual IP address for VLAN";
+    public static final String SOLIDFIRE_USERNAME_DESC = "SolidFire cluster admin username";
+    public static final String SOLIDFIRE_PASSWORD_DESC = "SolidFire cluster admin password";
+    public static final String TOTAL_CAPACITY_DESC = "Total capacity (in GBs)";
+    public static final String TOTAL_MIN_IOPS_DESC = "Total minimum IOPS";
+    public static final String TOTAL_MAX_IOPS_DESC = "Total maximum IOPS";
+    public static final String TOTAL_BURST_IOPS_DESC = "Total burst IOPS";
+    public static final String IQN_DESC = "Volume IQN";
+    public static final String SIZE_DESC = "Size (in GBs)";
+    public static final String MIN_IOPS_DESC = "Min IOPS";
+    public static final String MAX_IOPS_DESC = "Max IOPS";
+    public static final String BURST_IOPS_DESC = "Burst IOPS";
+    public static final String VIRTUAL_NETWORK_NAME_DESC = "VLAN name";
+    public static final String VIRTUAL_NETWORK_TAG_DESC = "VLAN tag";
+    public static final String START_IP_ADDRESS_DESC = "Start IP address";
+    public static final String NUMBER_OF_IP_ADDRESSES_DESC = "Number of contiguous IP addresses starting at '" + SfApiConstants.START_IP + "'";
+    public static final String NETMASK_DESC = "Netmask of VLAN";
+    public static final String ACCOUNT_ID_DESC = "Account ID";
+    public static final String VIRTUAL_NETWORK_ID_DESC = "Virtual network ID";
+    public static final String VOLUME_ID_DESC = "Volume ID";
+    public static final String VOLUME_NAME_DESC = "Volume name";
+    public static final String ZONE_ID_DESC = "Zone ID";
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfClusterDao.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfClusterDao.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfClusterDao.java
new file mode 100644
index 0000000..a2537be
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfClusterDao.java
@@ -0,0 +1,29 @@
+// 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.dataaccess.dao.solidfire;
+
+import java.util.List;
+
+import org.apache.cloudstack.dataaccess.vo.solidfire.SfClusterVO;
+
+import com.cloud.utils.db.GenericDao;
+
+public interface SfClusterDao extends GenericDao<SfClusterVO, Long> {
+    SfClusterVO findByName(String name);
+
+    List<SfClusterVO> findByZoneId(long zoneId);
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfClusterDaoImpl.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfClusterDaoImpl.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfClusterDaoImpl.java
new file mode 100644
index 0000000..f4db610
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfClusterDaoImpl.java
@@ -0,0 +1,62 @@
+// 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.dataaccess.dao.solidfire;
+
+import java.util.List;
+
+import javax.ejb.Local;
+
+import org.apache.cloudstack.dataaccess.vo.solidfire.SfClusterVO;
+import org.springframework.stereotype.Component;
+
+import com.cloud.utils.db.DB;
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.SearchCriteria.Op;
+
+@Component
+@Local(value = SfClusterVO.class)
+public class SfClusterDaoImpl extends GenericDaoBase<SfClusterVO, Long> implements SfClusterDao {
+    @SuppressWarnings("deprecation")
+    @Override
+    @DB()
+    public SfClusterVO findByName(final String name) {
+        SearchCriteria<SfClusterVO> sc = createSearchCriteria();
+
+        sc.addAnd("name", SearchCriteria.Op.EQ, name);
+
+        return findOneBy(sc);
+    }
+
+    @Override
+    public List<SfClusterVO> findByZoneId(long zoneId) {
+        String columnName = "zoneId";
+
+        SearchBuilder<SfClusterVO> searchBuilder = createSearchBuilder();
+
+        searchBuilder.and(columnName, searchBuilder.entity().getZoneId(), Op.EQ);
+
+        searchBuilder.done();
+
+        SearchCriteria<SfClusterVO> sc = searchBuilder.create();
+
+        sc.setParameters(columnName, zoneId);
+
+        return listBy(sc);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVirtualNetworkDao.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVirtualNetworkDao.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVirtualNetworkDao.java
new file mode 100644
index 0000000..3a3a2a6
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVirtualNetworkDao.java
@@ -0,0 +1,29 @@
+// 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.dataaccess.dao.solidfire;
+
+import java.util.List;
+
+import org.apache.cloudstack.dataaccess.vo.solidfire.SfVirtualNetworkVO;
+
+import com.cloud.utils.db.GenericDao;
+
+public interface SfVirtualNetworkDao extends GenericDao<SfVirtualNetworkVO, Long> {
+    List<SfVirtualNetworkVO> findByClusterId(long clusterId);
+
+    List<SfVirtualNetworkVO> findByAccountId(long accountId);
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVirtualNetworkDaoImpl.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVirtualNetworkDaoImpl.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVirtualNetworkDaoImpl.java
new file mode 100644
index 0000000..56bd5b9
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVirtualNetworkDaoImpl.java
@@ -0,0 +1,67 @@
+// 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.dataaccess.dao.solidfire;
+
+import java.util.List;
+
+import javax.ejb.Local;
+
+import org.apache.cloudstack.dataaccess.vo.solidfire.SfVirtualNetworkVO;
+import org.springframework.stereotype.Component;
+
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.SearchCriteria.Op;
+
+@Component
+@Local(value = SfVirtualNetworkVO.class)
+public class SfVirtualNetworkDaoImpl extends GenericDaoBase<SfVirtualNetworkVO, Long> implements SfVirtualNetworkDao {
+    @Override
+    public List<SfVirtualNetworkVO> findByClusterId(long clusterId) {
+        String columnName = "sf_cluster_id";
+
+        SearchBuilder<SfVirtualNetworkVO> searchBuilder = createSearchBuilder();
+
+        searchBuilder.and(columnName, searchBuilder.entity().getSfClusterId(), Op.EQ);
+
+        searchBuilder.done();
+
+        SearchCriteria<SfVirtualNetworkVO> sc = searchBuilder.create();
+
+        sc.setParameters(columnName, clusterId);
+
+        return listBy(sc);
+    }
+
+    @Override
+    public List<SfVirtualNetworkVO> findByAccountId(long accountId) {
+        String columnName = "account_id";
+
+        SearchBuilder<SfVirtualNetworkVO> searchBuilder = createSearchBuilder();
+
+        searchBuilder.and(columnName, searchBuilder.entity().getAccountId(), Op.EQ);
+
+        searchBuilder.done();
+
+        SearchCriteria<SfVirtualNetworkVO> sc = searchBuilder.create();
+
+        sc.setParameters(columnName, accountId);
+
+        return listBy(sc);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVolumeDao.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVolumeDao.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVolumeDao.java
new file mode 100644
index 0000000..10a58ef
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVolumeDao.java
@@ -0,0 +1,27 @@
+// 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.dataaccess.dao.solidfire;
+
+import java.util.List;
+
+import org.apache.cloudstack.dataaccess.vo.solidfire.SfVolumeVO;
+
+import com.cloud.utils.db.GenericDao;
+
+public interface SfVolumeDao extends GenericDao<SfVolumeVO, Long> {
+    List<SfVolumeVO> findBySfVirtualNetworkId(long sfVirtualNetworkId);
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVolumeDaoImpl.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVolumeDaoImpl.java
new file mode 100644
index 0000000..23824a3
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/dao/solidfire/SfVolumeDaoImpl.java
@@ -0,0 +1,50 @@
+// 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.dataaccess.dao.solidfire;
+
+import java.util.List;
+
+import javax.ejb.Local;
+
+import org.apache.cloudstack.dataaccess.vo.solidfire.SfVolumeVO;
+import org.springframework.stereotype.Component;
+
+import com.cloud.utils.db.GenericDaoBase;
+import com.cloud.utils.db.SearchBuilder;
+import com.cloud.utils.db.SearchCriteria;
+import com.cloud.utils.db.SearchCriteria.Op;
+
+@Component
+@Local(value = SfVolumeVO.class)
+public class SfVolumeDaoImpl extends GenericDaoBase<SfVolumeVO, Long> implements SfVolumeDao {
+    @Override
+    public List<SfVolumeVO> findBySfVirtualNetworkId(long sfVirtualNetworkId) {
+        String columnName = "sf_virtual_network_id";
+
+        SearchBuilder<SfVolumeVO> searchBuilder = createSearchBuilder();
+
+        searchBuilder.and(columnName, searchBuilder.entity().getSfVirtualNetworkId(), Op.EQ);
+
+        searchBuilder.done();
+
+        SearchCriteria<SfVolumeVO> sc = searchBuilder.create();
+
+        sc.setParameters(columnName, sfVirtualNetworkId);
+
+        return listBy(sc);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfClusterVO.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfClusterVO.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfClusterVO.java
new file mode 100644
index 0000000..ca5bb60
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfClusterVO.java
@@ -0,0 +1,173 @@
+// 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.dataaccess.vo.solidfire;
+
+import java.util.Date;
+import java.util.UUID;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+import org.apache.cloudstack.solidfire.SfCluster;
+
+import com.cloud.utils.db.GenericDao;
+
+@Entity
+@Table(name = "sf_cluster")
+public class SfClusterVO implements SfCluster {
+    private static final long serialVersionUID = 1;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id")
+    private long id;
+
+    @Column(name = "uuid")
+    private String uuid;
+
+    @Column(name = "name")
+    private String name;
+
+    @Column(name = "mvip")
+    private String mvip;
+
+    @Column(name = "username")
+    private String username;
+
+    @Column(name = "password")
+    private String password;
+
+    @Column(name = "total_capacity")
+    private long totalCapacity;
+
+    @Column(name = "total_min_iops")
+    private long totalMinIops;
+
+    @Column(name = "total_max_iops")
+    private long totalMaxIops;
+
+    @Column(name = "total_burst_iops")
+    private long totalBurstIops;
+
+    @Column(name = "zone_id")
+    private long zoneId;
+
+    @Column(name = GenericDao.CREATED_COLUMN)
+    private Date created;
+
+    @Column(name = "updated")
+    @Temporal(value = TemporalType.TIMESTAMP)
+    private Date updated;
+
+    @Column(name = GenericDao.REMOVED_COLUMN)
+    private Date removed;
+
+    public SfClusterVO() {
+        uuid = UUID.randomUUID().toString();
+    }
+
+    public SfClusterVO(String name, String mvip, String username, String password, long totalCapacity,
+            long totalMinIops, long totalMaxIops, long totalBurstIops,long zoneId) {
+        this.uuid = UUID.randomUUID().toString();
+        this.name = name;
+        this.mvip = mvip;
+        this.username = username;
+        this.password = password;
+        this.totalCapacity = totalCapacity;
+        this.totalMinIops = totalMinIops;
+        this.totalMaxIops = totalMaxIops;
+        this.totalBurstIops = totalBurstIops;
+        this.zoneId = zoneId;
+    }
+
+    @Override
+    public long getId() {
+        return id;
+    }
+
+    @Override
+    public String getUuid() {
+        return uuid;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getMvip() {
+        return mvip;
+    }
+
+    @Override
+    public String getUsername() {
+        return username;
+    }
+
+    @Override
+    public String getPassword() {
+        return password;
+    }
+
+    public void setTotalCapacity(long totalCapacity) {
+        this.totalCapacity = totalCapacity;
+    }
+
+    @Override
+    public long getTotalCapacity() {
+        return totalCapacity;
+    }
+
+    public void setTotalMinIops(long totalMinIops) {
+        this.totalMinIops = totalMinIops;
+    }
+
+    @Override
+    public long getTotalMinIops() {
+        return totalMinIops;
+    }
+
+    public void setTotalMaxIops(long totalMaxIops) {
+        this.totalMaxIops = totalMaxIops;
+    }
+
+    @Override
+    public long getTotalMaxIops() {
+        return totalMaxIops;
+    }
+
+    public void setTotalBurstIops(long totalBurstIops) {
+        this.totalBurstIops = totalBurstIops;
+    }
+
+    @Override
+    public long getTotalBurstIops() {
+        return totalBurstIops;
+    }
+
+    @Override
+    public long getZoneId() {
+        return zoneId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfVirtualNetworkVO.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfVirtualNetworkVO.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfVirtualNetworkVO.java
new file mode 100644
index 0000000..2f0fb02
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfVirtualNetworkVO.java
@@ -0,0 +1,180 @@
+// 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.dataaccess.vo.solidfire;
+
+import java.util.Date;
+import java.util.UUID;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+import org.apache.cloudstack.solidfire.SfVirtualNetwork;
+
+import com.cloud.utils.db.GenericDao;
+
+@Entity
+@Table(name = "sf_virtual_network")
+public class SfVirtualNetworkVO implements SfVirtualNetwork {
+    private static final long serialVersionUID = 1;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id")
+    private long id;
+
+    @Column(name = "uuid")
+    private String uuid;
+
+    @Column(name = "sf_id")
+    private long sfId;
+
+    @Column(name = "name")
+    private String name;
+
+    @Column(name = "tag")
+    private String tag;
+
+    @Column(name = "start_ip")
+    private String startIp;
+
+    @Column(name = "size")
+    private int size;
+
+    @Column(name = "netmask")
+    private String netmask;
+
+    @Column(name = "svip")
+    private String svip;
+
+    @Column(name = "account_id")
+    private long accountId;
+
+    @Column(name = "sf_cluster_id")
+    private long sfClusterId;
+
+    @Column(name = GenericDao.CREATED_COLUMN)
+    private Date created;
+
+    @Column(name = "updated")
+    @Temporal(value = TemporalType.TIMESTAMP)
+    private Date updated;
+
+    @Column(name = GenericDao.REMOVED_COLUMN)
+    private Date removed;
+
+    public SfVirtualNetworkVO() {
+        uuid = UUID.randomUUID().toString();
+    }
+
+    public SfVirtualNetworkVO(long sfId, String name, String tag, String startIp, int size, String netmask, String svip, long accountId, long sfClusterId) {
+        this.uuid = UUID.randomUUID().toString();
+        this.sfId = sfId;
+        this.name = name;
+        this.tag = tag;
+        this.startIp = startIp;
+        this.size = size;
+        this.netmask = netmask;
+        this.svip = svip;
+        this.accountId = accountId;
+        this.sfClusterId = sfClusterId;
+    }
+
+    @Override
+    public long getId() {
+        return id;
+    }
+
+    @Override
+    public String getUuid() {
+        return uuid;
+    }
+
+    @Override
+    public long getSfId() {
+        return sfId;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    public void setTag(String tag) {
+        this.tag = tag;
+    }
+
+    @Override
+    public String getTag() {
+        return tag;
+    }
+
+    public void setStartIp(String startIp) {
+        this.startIp = startIp;
+    }
+
+    @Override
+    public String getStartIp() {
+        return startIp;
+    }
+
+    public void setSize(int size) {
+        this.size = size;
+    }
+
+    @Override
+    public int getSize() {
+        return size;
+    }
+
+    public void setNetmask(String netmask) {
+        this.netmask = netmask;
+    }
+
+    @Override
+    public String getNetmask() {
+        return netmask;
+    }
+
+    public void setSvip(String svip) {
+        this.svip = svip;
+    }
+
+    @Override
+    public String getSvip() {
+        return svip;
+    }
+
+    @Override
+    public long getAccountId() {
+        return accountId;
+    }
+
+    @Override
+    public long getSfClusterId() {
+        return sfClusterId;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfVolumeVO.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfVolumeVO.java b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfVolumeVO.java
new file mode 100644
index 0000000..0fe748e
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/dataaccess/vo/solidfire/SfVolumeVO.java
@@ -0,0 +1,168 @@
+// 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.dataaccess.vo.solidfire;
+
+import java.util.Date;
+import java.util.UUID;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+
+import org.apache.cloudstack.solidfire.SfVolume;
+
+import com.cloud.utils.db.GenericDao;
+
+@Entity
+@Table(name = "sf_volume")
+public class SfVolumeVO implements SfVolume {
+    private static final long serialVersionUID = 1;
+
+    @Id
+    @GeneratedValue(strategy = GenerationType.IDENTITY)
+    @Column(name = "id")
+    private long id;
+
+    @Column(name = "uuid")
+    private String uuid;
+
+    @Column(name = "sf_id")
+    private long sfId;
+
+    @Column(name = "name")
+    private String name;
+
+    @Column(name = "iqn")
+    private String iqn;
+
+    @Column(name = "size")
+    private long size;
+
+    @Column(name = "min_iops")
+    private long minIops;
+
+    @Column(name = "max_iops")
+    private long maxIops;
+
+    @Column(name = "burst_iops")
+    private long burstIops;
+
+    @Column(name = "sf_virtual_network_id")
+    private long sfVirtualNetworkId;
+
+    @Column(name = GenericDao.CREATED_COLUMN)
+    private Date created;
+
+    @Column(name = "updated")
+    @Temporal(value = TemporalType.TIMESTAMP)
+    private Date updated;
+
+    @Column(name = GenericDao.REMOVED_COLUMN)
+    private Date removed;
+
+    public SfVolumeVO() {
+        uuid = UUID.randomUUID().toString();
+    }
+
+    public SfVolumeVO(long sfId, String name, String iqn, long size, long minIops, long maxIops, long burstIops, long sfVirtualNetworkId) {
+        this.uuid = UUID.randomUUID().toString();
+        this.sfId = sfId;
+        this.name = name;
+        this.iqn = iqn;
+        this.size = size;
+        this.minIops = minIops;
+        this.maxIops = maxIops;
+        this.burstIops = burstIops;
+        this.sfVirtualNetworkId = sfVirtualNetworkId;
+    }
+
+    @Override
+    public long getId() {
+        return id;
+    }
+
+    @Override
+    public String getUuid() {
+        return uuid;
+    }
+
+    @Override
+    public long getSfId() {
+        return sfId;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public String getIqn() {
+        return iqn;
+    }
+
+    public void setSize(long size) {
+        this.size = size;
+    }
+
+    @Override
+    public long getSize() {
+        return size;
+    }
+
+    public void setMinIops(long minIops) {
+        this.minIops = minIops;
+    }
+
+    @Override
+    public long getMinIops() {
+        return minIops;
+    }
+
+    public void setMaxIops(long maxIops) {
+        this.maxIops = maxIops;
+    }
+
+    @Override
+    public long getMaxIops() {
+        return maxIops;
+    }
+
+    public void setBurstIops(long burstIops) {
+        this.burstIops = burstIops;
+    }
+
+    @Override
+    public long getBurstIops() {
+        return burstIops;
+    }
+
+    @Override
+    public long getSfVirtualNetworkId() {
+        return sfVirtualNetworkId;
+    }
+
+    @Override
+    public Date getCreated() {
+        return created;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfCluster.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfCluster.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfCluster.java
new file mode 100644
index 0000000..b2e0a32
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfCluster.java
@@ -0,0 +1,40 @@
+// 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.solidfire;
+
+import org.apache.cloudstack.api.Identity;
+import org.apache.cloudstack.api.InternalIdentity;
+
+public interface SfCluster extends Identity, InternalIdentity {
+    String getName();
+
+    String getMvip();
+
+    String getUsername();
+
+    String getPassword();
+
+    long getTotalCapacity();
+
+    long getTotalMinIops();
+
+    long getTotalMaxIops();
+
+    long getTotalBurstIops();
+
+    long getZoneId();
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfVirtualNetwork.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfVirtualNetwork.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfVirtualNetwork.java
new file mode 100644
index 0000000..f41e319
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfVirtualNetwork.java
@@ -0,0 +1,40 @@
+// 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.solidfire;
+
+import org.apache.cloudstack.api.Identity;
+import org.apache.cloudstack.api.InternalIdentity;
+
+public interface SfVirtualNetwork extends Identity, InternalIdentity {
+    long getSfId();
+
+    String getName();
+
+    String getTag();
+
+    String getStartIp();
+
+    int getSize();
+
+    String getNetmask();
+
+    String getSvip();
+
+    long getAccountId();
+
+    long getSfClusterId();
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfVolume.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfVolume.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfVolume.java
new file mode 100644
index 0000000..84218d0
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SfVolume.java
@@ -0,0 +1,42 @@
+// 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.solidfire;
+
+import java.util.Date;
+
+import org.apache.cloudstack.api.Identity;
+import org.apache.cloudstack.api.InternalIdentity;
+
+public interface SfVolume extends Identity, InternalIdentity {
+    long getSfId();
+
+    String getName();
+
+    String getIqn();
+
+    long getSize();
+
+    long getMinIops();
+
+    long getMaxIops();
+
+    long getBurstIops();
+
+    long getSfVirtualNetworkId();
+
+    Date getCreated();
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5a33835d/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SolidFireManager.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SolidFireManager.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SolidFireManager.java
new file mode 100644
index 0000000..458d96b
--- /dev/null
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/SolidFireManager.java
@@ -0,0 +1,66 @@
+// 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.solidfire;
+
+import java.util.List;
+
+import org.apache.cloudstack.framework.config.Configurable;
+
+public interface SolidFireManager extends Configurable {
+    // ********** Cluster-related commands **********
+
+    SfCluster listSolidFireCluster(String clusterName);
+
+    List<SfCluster> listSolidFireClusters();
+
+    SfCluster createReferenceToSolidFireCluster(String mvip, String username, String password, long totalCapacity,
+            long totalMinIops, long totalMaxIops, long totalBurstIops, long zoneId);
+
+    SfCluster updateReferenceToSolidFireCluster(String clusterName, long totalCapacity,
+            long totalMinIops, long totalMaxIops, long totalBurstIops);
+
+    SfCluster deleteReferenceToSolidFireCluster(String clusterName);
+
+    // ********** VLAN-related commands **********
+
+    SfVirtualNetwork listSolidFireVirtualNetworkById(long id);
+
+    List<SfVirtualNetwork> listSolidFireVirtualNetworkByClusterName(String clusterName);
+
+    // Long (instead of long) for both zoneId and accountId because they're optional and null is used to indicate that they're not present
+    // zoneId and accountId are not dependent upon one another (i.e. either one can be null, both can be null, or both can be not be null)
+    List<SfVirtualNetwork> listSolidFireVirtualNetworks(Long zoneId, Long accountId);
+
+    SfVirtualNetwork createSolidFireVirtualNetwork(String clusterName, String name, String tag, String startIp, int size,
+            String netmask, String svip, long accountId);
+
+    SfVirtualNetwork updateSolidFireVirtualNetwork(long id, String name, String startIp, int size, String netmask);
+
+    SfVirtualNetwork deleteSolidFireVirtualNetwork(long id);
+
+ // ********** Volume-related commands **********
+
+    SfVolume listSolidFireVolume(long id);
+
+    List<SfVolume> listSolidFireVolumes();
+
+    SfVolume createSolidFireVolume(String name, long size, long minIops, long maxIops, long burstIops, long accountId, long sfVirtualNetworkId);
+
+    SfVolume updateSolidFireVolume(long id, long size, long minIops, long maxIops, long burstIops);
+
+    SfVolume deleteSolidFireVolume(long id);
+}


Mime
View raw message