You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mt...@apache.org on 2015/09/19 03:31:07 UTC
[01/50] git commit: updated refs/heads/sf-plugins to 157efc3
Repository: cloudstack
Updated Branches:
refs/heads/sf-plugins eb085be18 -> 157efc3e2 (forced update)
Extend plug-in functionality
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0d79e116
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0d79e116
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0d79e116
Branch: refs/heads/sf-plugins
Commit: 0d79e116530edeb5a091c252673bf39a07a6a1f3
Parents: 5727c3e
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Mon Jul 6 20:22:36 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:17 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 35 +++++++++++++++---------
1 file changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d79e116/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index 70e5208..ff16c91 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -28,6 +28,28 @@
}
});
},
+ actions: {
+ add: {
+ label: 'Add Shared Volume',
+ preFilter: function(args) {
+ return true;
+ },
+ messages: {
+ confirm: function(args) {
+ return 'Please fill in the following data to add a new shared volume.';
+ },
+ notification: function(args) {
+ return 'Add Shared Volume';
+ }
+ },
+ createForm: {
+ title: 'Add Shared Volume',
+ desc: 'Please fill in the following data to add a new shared volume.',
+ fields: {
+ }
+ }
+ }
+ },
detailView: {
name: 'Shared volume details',
isMaximized: true,
@@ -41,19 +63,6 @@
}
}
}
- },
- actions: {
- add: {
- label: 'Add Shared Volume',
- preFilter: function(args) {
- return true;
- },
- messages: {
- notification: function(args) {
- return 'Add Shared Volume';
- }
- }
- }
}
});
};
[12/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Return additional volume-related data
Add additional volume-delete logic
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a6e84edb
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a6e84edb
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a6e84edb
Branch: refs/heads/sf-plugins
Commit: a6e84edba361d8e811c6d678a54fd08e4dfea804
Parents: e34de4a
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Thu Jul 9 14:29:01 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:19 2015 -0600
----------------------------------------------------------------------
.../apache/cloudstack/api/helper/ApiHelper.java | 4 +
.../response/ApiSolidFireVolumeResponse.java | 51 ++++++++++
.../solidfire/dataaccess/SfVolume.java | 4 +
.../solidfire/dataaccess/vo/SfVolumeVO.java | 5 +
ui/plugins/sfSharedVolume/sfSharedVolume.js | 101 +++++++++++++++++++
5 files changed, 165 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a6e84edb/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
index 9a83404..89c48eb 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
@@ -180,6 +180,7 @@ public class ApiHelper {
sfResponse.setMinIops(sfVolume.getMinIops());
sfResponse.setMaxIops(sfVolume.getMaxIops());
sfResponse.setBurstIops(sfVolume.getBurstIops());
+ sfResponse.setCreated(sfVolume.getCreated());
SfVirtualNetwork sfVirtualNetwork = _sfVirtualNetworkDao.findById(sfVolume.getSfVirtualNetworkId());
@@ -188,6 +189,7 @@ public class ApiHelper {
Account account = _accountDao.findById(sfVirtualNetwork.getAccountId());
sfResponse.setAccountUuid(account.getUuid());
+ sfResponse.setAccountName(account.getAccountName());
SfCluster sfCluster = _sfClusterDao.findById(sfVirtualNetwork.getSfClusterId());
@@ -196,6 +198,7 @@ public class ApiHelper {
DataCenterVO dataCenterVO = _zoneDao.findById(sfCluster.getZoneId());
sfResponse.setZoneUuid(dataCenterVO.getUuid());
+ sfResponse.setZoneName(dataCenterVO.getName());
if (ResponseView.Full.equals(responseView)) {
sfResponse.setClusterName(sfCluster.getName());
@@ -204,6 +207,7 @@ public class ApiHelper {
sfResponse.setTargetPortal(sfVirtualNetwork.getSvip());
sfResponse.setVlanId(sfVirtualNetwork.getId());
sfResponse.setVlanUuid(sfVirtualNetwork.getUuid());
+ sfResponse.setVlanName(sfVirtualNetwork.getName());
AccountDetailVO accountDetail = _accountDetailsDao.findDetail(sfVirtualNetwork.getAccountId(), SolidFireUtil.CHAP_INITIATOR_USERNAME);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a6e84edb/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java
index e4f0e70..97ab909 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java
@@ -16,10 +16,13 @@
// under the License.
package org.apache.cloudstack.api.response;
+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.helper.ApiHelper;
@@ -67,6 +70,10 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
@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;
@@ -75,6 +82,10 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
@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;
@@ -83,6 +94,10 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
@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;
@@ -107,6 +122,10 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
@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;
}
@@ -187,6 +206,14 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
return _accountUuid;
}
+ public void setAccountName(String accountName) {
+ _accountName = accountName;
+ }
+
+ public String getAccountName() {
+ return _accountName;
+ }
+
public void setVlanId(long vlanId) {
_vlanId = vlanId;
}
@@ -203,6 +230,14 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
return _vlanUuid;
}
+ public void setVlanName(String vlanName) {
+ _vlanName = vlanName;
+ }
+
+ public String getVlanName() {
+ return _vlanName;
+ }
+
public void setZoneId(long zoneId) {
_zoneId = zoneId;
}
@@ -219,6 +254,14 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
return _zoneUuid;
}
+ public void setZoneName(String zoneName) {
+ _zoneName = zoneName;
+ }
+
+ public String getZoneName() {
+ return _zoneName;
+ }
+
public void setClusterName(String clusterName) {
_clusterName = clusterName;
}
@@ -266,4 +309,12 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
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/a6e84edb/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java
index d59395d..dd5e11d 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java
@@ -16,6 +16,8 @@
// under the License.
package org.apache.cloudstack.solidfire.dataaccess;
+import java.util.Date;
+
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
@@ -35,4 +37,6 @@ public interface SfVolume extends Identity, InternalIdentity {
long getBurstIops();
long getSfVirtualNetworkId();
+
+ Date getCreated();
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a6e84edb/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java
index f1aede1..9334b51 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java
@@ -160,4 +160,9 @@ public class SfVolumeVO implements SfVolume {
public long getSfVirtualNetworkId() {
return sfVirtualNetworkId;
}
+
+ @Override
+ public Date getCreated() {
+ return created;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a6e84edb/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index 6eb9cf1..ab76ff3 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -230,6 +230,107 @@
}
},
action: function(args) {
+ $.ajax({
+ url: createURL('deleteSolidFireVolume'),
+ data: data,
+ success: function(json) {
+ var sfvolumeObj = json.deletesolidfirevolumeresponse.apideletesolidfirevolume;
+
+ args.response.success({
+ data: sfvolumeObj
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ }
+ },
+ tabs: {
+ details: {
+ title: 'label.details',
+ preFilter: function(args) {
+ var hiddenFields;
+
+ if (isAdmin()) {
+ hiddenFields = [];
+ } else {
+ hiddenFields = ['clustername', 'accountname'];
+ }
+
+ return hiddenFields;
+ },
+ fields: [
+ {
+ name: {
+ label: 'label.name'
+ }
+ },
+ {
+ uuid: {
+ label: 'label.id'
+ },
+ clustername: {
+ label: 'Cluster'
+ },
+ zonename: {
+ label: 'label.zone'
+ },
+ accountname: {
+ label: 'label.account'
+ },
+ vlanname: {
+ label: 'VLAN'
+ },
+ size: {
+ label: 'label.disk.size.gb'
+ },
+ miniops: {
+ label: 'label.disk.iops.min'
+ },
+ maxiops: {
+ label: 'label.disk.iops.max'
+ },
+ burstiops: {
+ label: 'Burst IOPS'
+ },
+ targetportal: {
+ label: 'Target Portal'
+ },
+ iqn: {
+ label: 'IQN'
+ },
+ chapinitiatorusername: {
+ label: 'Initiator Username'
+ },
+ chapinitiatorsecret: {
+ label: 'Initiator Secret'
+ },
+ created: {
+ label: 'label.created',
+ converter: cloudStack.converters.toLocalDate
+ }
+ }
+ ],
+ tags: cloudStack.api.tags({
+ resourceType: 'Volume',
+ contextId: 'volumes'
+ }),
+ dataProvider: function(args) {
+ $.ajax({
+ url: createURL("listSolidFireVolumes&id=" + args.context.volumes[0].id),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var jsonObj = json.listsolidfirevolumesresponse.sfvolume[0];
+
+ args.response.success({
+ actionFilter: volumeActionfilter,
+ data: jsonObj
+ });
+ }
+ });
}
}
}
[36/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
The "clustername" parameter should not be required.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/83a3aa62
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/83a3aa62
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/83a3aa62
Branch: refs/heads/sf-plugins
Commit: 83a3aa62ecaefe48849f8b92d1d98912addde72a
Parents: 589041d
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 21 18:14:37 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:22 2015 -0600
----------------------------------------------------------------------
.../command/user/solidfire/ListSolidFireVirtualNetworksCmd.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/83a3aa62/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
index 2f380e7..0dca421 100644
--- 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
@@ -49,7 +49,7 @@ public class ListSolidFireVirtualNetworksCmd extends BaseListCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ApiSolidFireVirtualNetworkResponse.class, description = ApiHelper.VIRTUAL_NETWORK_ID_DESC)
private Long _id;
- @Parameter(name = ApiHelper.CLUSTER_NAME, type = CommandType.STRING, description = ApiHelper.SOLIDFIRE_CLUSTER_NAME_DESC, required = true)
+ @Parameter(name = ApiHelper.CLUSTER_NAME, type = CommandType.STRING, description = ApiHelper.SOLIDFIRE_CLUSTER_NAME_DESC)
private String _clusterName;
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = ApiHelper.ZONE_ID_DESC)
[19/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
"long" changed to "Long" so an un-supplied account ID comes in as null instead of as 0
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6bee8755
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6bee8755
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6bee8755
Branch: refs/heads/sf-plugins
Commit: 6bee87555a3f0821dddcf9bf78a2150525a0ce2d
Parents: 9ecc358
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Fri Jul 10 18:52:09 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:20 2015 -0600
----------------------------------------------------------------------
.../command/user/solidfire/ListSolidFireVirtualNetworksCmd.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6bee8755/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
index 750f1c8..2ec91a1 100644
--- 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
@@ -53,7 +53,7 @@ public class ListSolidFireVirtualNetworksCmd extends BaseListCmd {
private Long _zoneId;
@Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = ApiHelper.ACCOUNT_ID_DESC)
- private long _accountId;
+ private Long _accountId;
@Inject private ApiHelper _apiHelper;
[05/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Conditionally show the Account field in the Add Shared Volume window
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/90396cfe
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/90396cfe
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/90396cfe
Branch: refs/heads/sf-plugins
Commit: 90396cfe89320f11b71aa00fb5d8124434964187
Parents: cc64dc1
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 7 23:37:51 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:18 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 7 +++++++
1 file changed, 7 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90396cfe/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index f8f3aaf..d935b04 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -108,12 +108,19 @@
validation: {
required: true
},
+ isHidden: true,
select: function(args) {
$.ajax({
url: createURL("listAccounts"),
dataType: "json",
async: true,
success: function(json) {
+ if (isAdmin()) {
+ var $form = $(this).closest('form');
+
+ $form.find('.form-item[rel=account]').show();
+ }
+
var accountObjs = json.listaccountsresponse.account;
args.response.success({
[18/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Send selected zone and account to listSolidFireVirtualNetworks API command
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/620af9ca
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/620af9ca
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/620af9ca
Branch: refs/heads/sf-plugins
Commit: 620af9ca67d8620a6f713cb4d59ffa06a06e6a7a
Parents: 26af0a4
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 8 19:45:54 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:19 2015 -0600
----------------------------------------------------------------------
.../ListSolidFireVirtualNetworksCmd.java | 8 +++++++-
.../solidfire/ApiSolidFireService2.java | 5 +++--
.../solidfire/ApiSolidFireServiceImpl2.java | 20 +++++++++++++++++---
ui/plugins/sfSharedVolume/sfSharedVolume.js | 10 ++++++++--
4 files changed, 35 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/620af9ca/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
index a8c0ccd..750f1c8 100644
--- 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
@@ -31,6 +31,7 @@ import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.ResponseObject.ResponseView;
import org.apache.cloudstack.api.helper.ApiHelper;
+import org.apache.cloudstack.api.response.AccountResponse;
import org.apache.cloudstack.api.response.ApiSolidFireVirtualNetworkResponse;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.api.response.ZoneResponse;
@@ -51,6 +52,11 @@ public class ListSolidFireVirtualNetworksCmd extends BaseListCmd {
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = ApiHelper.ZONE_ID_DESC)
private Long _zoneId;
+ @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = ApiHelper.ACCOUNT_ID_DESC)
+ private long _accountId;
+
+ @Inject private ApiHelper _apiHelper;
+
/////////////////////////////////////////////////////
/////////////// API Implementation///////////////////
/////////////////////////////////////////////////////
@@ -77,7 +83,7 @@ public class ListSolidFireVirtualNetworksCmd extends BaseListCmd {
}
}
else {
- sfVirtualNetworks = _apiSolidFireService2.listSolidFireVirtualNetworks(_zoneId);
+ sfVirtualNetworks = _apiSolidFireService2.listSolidFireVirtualNetworks(_zoneId, _accountId);
}
ResponseView responseView = ApiHelper.instance().isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/620af9ca/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
index 288b7f7..07f200a 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
@@ -44,8 +44,9 @@ public interface ApiSolidFireService2 extends PluggableService, Configurable {
SfVirtualNetwork listSolidFireVirtualNetwork(long id);
- // Long (instead of long) because it's optional and null is used to indicate that it's not present
- List<SfVirtualNetwork> listSolidFireVirtualNetworks(Long zoneId);
+ // 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);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/620af9ca/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 9af4ac2..d91febc 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -254,20 +254,34 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
@Override
- public List<SfVirtualNetwork> listSolidFireVirtualNetworks(Long zoneId) {
+ public List<SfVirtualNetwork> listSolidFireVirtualNetworks(Long zoneId, Long accountId) {
s_logger.info("listSolidFireVirtualNetworks invoked");
final List<SfVirtualNetworkVO> sfVirtualNetworkVOs;
if (ApiHelper.instance().isRootAdmin()) {
if (zoneId != null) {
- sfVirtualNetworkVOs = filterVirtualNetworksByZone(_sfVirtualNetworkDao.listAll(), zoneId);
+ if (accountId != null) {
+ sfVirtualNetworkVOs = filterVirtualNetworksByZone(_sfVirtualNetworkDao.findByAccountId(accountId), zoneId);
+ }
+ else {
+ sfVirtualNetworkVOs = filterVirtualNetworksByZone(_sfVirtualNetworkDao.listAll(), zoneId);
+ }
}
else {
- sfVirtualNetworkVOs = _sfVirtualNetworkDao.listAll();
+ if (accountId != null) {
+ sfVirtualNetworkVOs = _sfVirtualNetworkDao.findByAccountId(accountId);
+ }
+ else {
+ sfVirtualNetworkVOs = _sfVirtualNetworkDao.listAll();
+ }
}
}
else {
+ if (accountId != null && accountId != _apiHelper.getCallingAccount().getId()) {
+ throw new CloudRuntimeException("Only a root admin can specify an account other than his own.");
+ }
+
if (zoneId != null) {
sfVirtualNetworkVOs = filterVirtualNetworksByZone(_sfVirtualNetworkDao.findByAccountId(ApiHelper.instance().getCallingAccount().getId()), zoneId);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/620af9ca/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index 0f55a5d..2d904cd 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -131,7 +131,7 @@
filteredAccountObjs = accountObjs;
}
else {
- for (int i = 0; i < accountObjs.length; i++) {
+ for (i = 0; i < accountObjs.length; i++) {
var accountObj = accountObjs[i];
if (accountObj.domainid == g_domainid) {
@@ -155,9 +155,15 @@
validation: {
required: true
},
+ dependsOn: ['availabilityZone', 'account'],
select: function(args) {
+ var params = [];
+
+ params.push("&zoneid=" + args.data.availabilityZone);
+ params.push("&accountid=" + args.data.account);
+
$.ajax({
- url: createURL("listSolidFireVirtualNetworks"),
+ url: createURL("listSolidFireVirtualNetworks" + params.join("")),
dataType: "json",
async: true,
success: function(json) {
[21/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Improvements to delete-volume logic
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/74ae95fa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/74ae95fa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/74ae95fa
Branch: refs/heads/sf-plugins
Commit: 74ae95facdd93eb3bb7ddb70e051c923293ae154
Parents: cb933f2
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Thu Jul 9 17:31:46 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:20 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 21 ++++++---------------
1 file changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/74ae95fa/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index c37d9c3..b43b221 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -157,8 +157,8 @@
},
dependsOn: ['availabilityZone', 'account'],
select: function(args) {
- if (args.data.availabilityZone === null || args.data.availabilityZone === "" ||
- args.data.account === null || args.data.account === "") {
+ if (args.data.availabilityZone == null || args.data.availabilityZone == "" ||
+ args.data.account == null || args.data.account == "") {
return;
}
@@ -214,31 +214,22 @@
},
detailView: {
name: 'label.volume.details',
- viewAll: {
- path: 'storage.snapshots',
- label: 'label.snapshots'
- },
actions: {
- deleteVolume: {
+ remove: {
label: 'Delete Shared Volume',
messages: {
confirm: function(args) {
return 'Are you sure you would like to delete this shared volume?';
},
notification: function(args) {
- return 'Shared volume deleted';
+ return 'Delete Shared Volume';
}
},
action: function(args) {
$.ajax({
- url: createURL('deleteSolidFireVolume'),
- data: data,
+ url: createURL('deleteSolidFireVolume&id=' + args.context.sfSharedVolumes[0].id),
success: function(json) {
- var sfvolumeObj = json.deletesolidfirevolumeresponse.apideletesolidfirevolume;
-
- args.response.success({
- data: sfvolumeObj
- });
+ args.response.success();
},
error: function(json) {
args.response.error(parseXMLHttpResponse(json));
[47/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
The SVIP cannot be changed
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/09760553
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/09760553
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/09760553
Branch: refs/heads/sf-plugins
Commit: 09760553394f37967d1764eb136d328be7687f06
Parents: f5a299a
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 28 15:16:42 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:24 2015 -0600
----------------------------------------------------------------------
.../solidfire/UpdateSolidFireVirtualNetworkCmd.java | 5 +----
.../cloudstack/solidfire/ApiSolidFireService2.java | 2 +-
.../cloudstack/solidfire/ApiSolidFireServiceImpl2.java | 6 ++----
.../cloudstack/solidfire/util/SolidFireConnection.java | 12 +++++-------
ui/plugins/sfAdministration/sfAdministration.js | 4 +---
5 files changed, 10 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09760553/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
index 2d71947..6620d26 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
@@ -56,9 +56,6 @@ public class UpdateSolidFireVirtualNetworkCmd extends BaseCmd {
@Parameter(name = ApiHelper.NETMASK, type = CommandType.STRING, description = ApiHelper.NETMASK, required = true)
private String _netmask;
- @Parameter(name = ApiHelper.SVIP, type = CommandType.STRING, description = ApiHelper.SOLIDFIRE_SVIP_DESC, required = true)
- private String _svip;
-
@Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
@@ -87,7 +84,7 @@ public class UpdateSolidFireVirtualNetworkCmd extends BaseCmd {
try {
s_logger.info(UpdateSolidFireVirtualNetworkCmd.class.getName() + ".execute invoked");
- SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.updateSolidFireVirtualNetwork(_id, _name, _startIp, _size, _netmask, _svip);
+ SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.updateSolidFireVirtualNetwork(_id, _name, _startIp, _size, _netmask);
ApiSolidFireVirtualNetworkResponse response = _apiHelper.getApiSolidFireVirtualNetworkResponse(sfVirtualNetwork, ResponseView.Full);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09760553/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
index 12f276c..03bcb19 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
@@ -53,7 +53,7 @@ public interface ApiSolidFireService2 extends PluggableService, Configurable {
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, String svip);
+ SfVirtualNetwork updateSolidFireVirtualNetwork(long id, String name, String startIp, int size, String netmask);
SfVirtualNetwork deleteSolidFireVirtualNetwork(long id);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09760553/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 9137c07..28cbd89 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -332,7 +332,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
@Override
- public SfVirtualNetwork updateSolidFireVirtualNetwork(long id, String name, String startIp, int size, String netmask, String svip) {
+ public SfVirtualNetwork updateSolidFireVirtualNetwork(long id, String name, String startIp, int size, String netmask) {
s_logger.info("updateSolidFireVirtualNetwork invoked");
verifyRootAdmin();
@@ -345,14 +345,12 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
SolidFireConnection sfConnection = new SolidFireConnection(sfClusterVO.getMvip(), sfClusterVO.getUsername(), sfClusterVO.getPassword());
- sfConnection.modifyVirtualNetwork(name, sfVirtualNetworkVO.getTag(), startIp, size, netmask, svip);
+ sfConnection.modifyVirtualNetwork(name, sfVirtualNetworkVO.getTag(), startIp, size, netmask);
sfVirtualNetworkVO.setName(name);
- sfVirtualNetworkVO.setTag(sfVirtualNetworkVO.getTag());
sfVirtualNetworkVO.setStartIp(startIp);
sfVirtualNetworkVO.setSize(size);
sfVirtualNetworkVO.setNetmask(netmask);
- sfVirtualNetworkVO.setSvip(svip);
if (_sfVirtualNetworkDao.update(sfVirtualNetworkVO.getId(), sfVirtualNetworkVO)) {
return sfVirtualNetworkVO;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09760553/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
index f00a84b..a9e8d84 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
@@ -95,10 +95,10 @@ public class SolidFireConnection {
return virtualNetworkAddResult.result.virtualNetworkID;
}
- public void modifyVirtualNetwork(String name, String tag, String startIp, int size, String netmask, String svip) {
+ public void modifyVirtualNetwork(String name, String tag, String startIp, int size, String netmask) {
final Gson gson = new GsonBuilder().create();
- VirtualNetworkToModify virtualNetworkToModify = new VirtualNetworkToModify(name, tag, startIp, size, netmask, svip);
+ VirtualNetworkToModify virtualNetworkToModify = new VirtualNetworkToModify(name, tag, startIp, size, netmask);
String strVirtualNetworkToModifyJson = gson.toJson(virtualNetworkToModify);
@@ -428,8 +428,8 @@ public class SolidFireConnection {
private final String method = "ModifyVirtualNetwork";
private final VirtualNetworkToModifyParams params;
- public VirtualNetworkToModify(String name, String tag, String startIp, int size, String netmask, String svip) {
- params = new VirtualNetworkToModifyParams(name, tag, startIp, size, netmask, svip);
+ public VirtualNetworkToModify(String name, String tag, String startIp, int size, String netmask) {
+ params = new VirtualNetworkToModifyParams(name, tag, startIp, size, netmask);
}
private static final class VirtualNetworkToModifyParams {
@@ -437,16 +437,14 @@ public class SolidFireConnection {
private final String virtualNetworkTag;
private final AddressBlock[] addressBlocks = new AddressBlock[1];
private final String netmask;
- private final String svip;
- public VirtualNetworkToModifyParams(String name, String tag, String startIp, int size, String netmask, String svip) {
+ public VirtualNetworkToModifyParams(String name, String tag, String startIp, int size, String netmask) {
this.name = name;
this.virtualNetworkTag = tag;
this.addressBlocks[0] = new AddressBlock(startIp, size);
this.netmask = netmask;
- this.svip = svip;
}
private static final class AddressBlock {
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09760553/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index 9fabf58..ce6da59 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -463,7 +463,6 @@
params.push("&netmask=" + args.data.netmask);
params.push("&startip=" + args.data.startip);
params.push("&size=" + args.data.size);
- params.push("&svip=" + args.data.svip);
$.ajax({
url: createURL('updateSolidFireVirtualNetwork' + params.join("")),
@@ -540,8 +539,7 @@
isEditable: true
},
svip: {
- label: 'SVIP',
- isEditable: true
+ label: 'SVIP'
}
}
],
[48/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Modify a virtual network by using its SolidFire ID instead of its VLAN tag
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4cc742e6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4cc742e6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4cc742e6
Branch: refs/heads/sf-plugins
Commit: 4cc742e6226fd7b7db1aa19793ca7a1440bf4ba1
Parents: 0976055
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 29 12:25:01 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:24 2015 -0600
----------------------------------------------------------------------
.../solidfire/ApiSolidFireServiceImpl2.java | 2 +-
.../solidfire/util/SolidFireConnection.java | 16 ++++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4cc742e6/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 28cbd89..29a920c 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -345,7 +345,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
SolidFireConnection sfConnection = new SolidFireConnection(sfClusterVO.getMvip(), sfClusterVO.getUsername(), sfClusterVO.getPassword());
- sfConnection.modifyVirtualNetwork(name, sfVirtualNetworkVO.getTag(), startIp, size, netmask);
+ sfConnection.modifyVirtualNetwork(sfVirtualNetworkVO.getSfId(), name, startIp, size, netmask);
sfVirtualNetworkVO.setName(name);
sfVirtualNetworkVO.setStartIp(startIp);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4cc742e6/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
index a9e8d84..33f47c8 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
@@ -95,10 +95,10 @@ public class SolidFireConnection {
return virtualNetworkAddResult.result.virtualNetworkID;
}
- public void modifyVirtualNetwork(String name, String tag, String startIp, int size, String netmask) {
+ public void modifyVirtualNetwork(long id, String name, String startIp, int size, String netmask) {
final Gson gson = new GsonBuilder().create();
- VirtualNetworkToModify virtualNetworkToModify = new VirtualNetworkToModify(name, tag, startIp, size, netmask);
+ VirtualNetworkToModify virtualNetworkToModify = new VirtualNetworkToModify(id, name, startIp, size, netmask);
String strVirtualNetworkToModifyJson = gson.toJson(virtualNetworkToModify);
@@ -428,19 +428,19 @@ public class SolidFireConnection {
private final String method = "ModifyVirtualNetwork";
private final VirtualNetworkToModifyParams params;
- public VirtualNetworkToModify(String name, String tag, String startIp, int size, String netmask) {
- params = new VirtualNetworkToModifyParams(name, tag, startIp, size, netmask);
+ public VirtualNetworkToModify(long id, String name, String startIp, int size, String netmask) {
+ params = new VirtualNetworkToModifyParams(id, name, startIp, size, netmask);
}
private static final class VirtualNetworkToModifyParams {
+ private final long virtualNetworkID;
private final String name;
- private final String virtualNetworkTag;
private final AddressBlock[] addressBlocks = new AddressBlock[1];
private final String netmask;
- public VirtualNetworkToModifyParams(String name, String tag, String startIp, int size, String netmask) {
+ public VirtualNetworkToModifyParams(long id, String name, String startIp, int size, String netmask) {
+ this.virtualNetworkID = id;
this.name = name;
- this.virtualNetworkTag = tag;
this.addressBlocks[0] = new AddressBlock(startIp, size);
@@ -470,7 +470,7 @@ public class SolidFireConnection {
}
private static final class VirtualNetworkToDeleteParams {
- private long virtualNetworkID;
+ private final long virtualNetworkID;
private VirtualNetworkToDeleteParams(long id) {
virtualNetworkID = id;
[10/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Add "action:" section
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c3a09576
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c3a09576
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c3a09576
Branch: refs/heads/sf-plugins
Commit: c3a0957689099396b919a25b4570c60139085a98
Parents: 6393542
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 7 12:40:14 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:18 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 25 +++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c3a09576/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index 99ad905..c0d9fbe 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -82,7 +82,30 @@
}
}
}
- }
+ },
+ action: function(args) {
+ $.ajax({
+ url: createURL('createVolume'),
+ data: data,
+ success: function(json) {
+ var jid = json.createvolumeresponse.jobid;
+ args.response.success({
+ _custom: {
+ jobId: jid,
+ getUpdatedItem: function(json) {
+ return json.queryasyncjobresultresponse.jobresult.volume;
+ },
+ getActionFilter: function() {
+ return volumeActionfilter;
+ }
+ }
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
}
},
detailView: {
[27/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Return "false" instead of throwing an exception when the user doesn't have permission to execute an operation
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/756c5ceb
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/756c5ceb
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/756c5ceb
Branch: refs/heads/sf-plugins
Commit: 756c5ceb4b7a9a3cf0bd167e0bbaf644401ca4d2
Parents: 8cd2827
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 14 20:36:53 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:21 2015 -0600
----------------------------------------------------------------------
.../org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/756c5ceb/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 58ebc4b..b626c67 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -494,7 +494,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
return true;
}
- throw new PermissionDeniedException("Insufficient permissions to perform this action");
+ return false;
}
@Override
[22/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Support filtering volumes by name (in a case-insensitive fashion)
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9ecc358a
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9ecc358a
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9ecc358a
Branch: refs/heads/sf-plugins
Commit: 9ecc358a2d99740fda1cdd2107453d77305a8519
Parents: 6456534
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Fri Jul 10 13:49:02 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:20 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9ecc358a/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index f2182f6..6d4c791 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -19,9 +19,24 @@
dataProvider: function(args) {
plugin.ui.apiCall('listSolidFireVolumes', {
success: function(json) {
+ var sfvolumesfiltered = [];
var sfvolumes = json.listsolidfirevolumesresponse.sfvolume;
+ var search = args.filterBy.search.value == null ? "" : args.filterBy.search.value.toLowerCase();
- args.response.success({ data: sfvolumes });
+ if (search == "") {
+ sfvolumesfiltered = sfvolumes;
+ }
+ else {
+ for (i = 0; i < sfvolumes.length; i++) {
+ sfvolume = sfvolumes[i];
+
+ if (sfvolume.name.toLowerCase().indexOf(search) > -1 ) {
+ sfvolumesfiltered.push(sfvolume);
+ }
+ }
+ }
+
+ args.response.success({ data: sfvolumesfiltered });
},
error: function(errorMessage) {
args.response.error(errorMessage);
[07/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Allow user to create a volume
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/18800c9b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/18800c9b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/18800c9b
Branch: refs/heads/sf-plugins
Commit: 18800c9bb693a8673310670bb55e0cfbe1662718
Parents: 7709243
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 7 17:22:14 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:18 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 27 +++++++++++++-----------
1 file changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/18800c9b/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index 8896526..c6371ca 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -114,7 +114,7 @@
dataType: "json",
async: true,
success: function(json) {
- var virtualNetworkObjs = json.listvirtualnetworksresponse.virtualnetwork;
+ var virtualNetworkObjs = json.listsolidfirevirtualnetworksresponse.sfvirtualnetwork;
args.response.success({
descriptionField: 'name',
@@ -127,21 +127,24 @@
}
},
action: function(args) {
+ var data = {
+ name: args.data.name,
+ size: args.data.diskSize,
+ miniops: args.data.minIops,
+ maxiops: args.data.maxIops,
+ burstiops: args.data.burstIops,
+ sfvirtualnetworkid: args.data.vlan,
+ accountid: 2
+ };
+
$.ajax({
- url: createURL('createVolume'),
+ url: createURL('createSolidFireVolume'),
data: data,
success: function(json) {
- var jid = json.createvolumeresponse.jobid;
+ var sfvolumeObj = json.createsolidfirevolumeresponse.apicreatesolidfirevolume;
+
args.response.success({
- _custom: {
- jobId: jid,
- getUpdatedItem: function(json) {
- return json.queryasyncjobresultresponse.jobresult.volume;
- },
- getActionFilter: function() {
- return volumeActionfilter;
- }
- }
+ data: sfvolumeObj
});
},
error: function(json) {
[31/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Corrected a property reference when attempting to update a cluster
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c3ccab02
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c3ccab02
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c3ccab02
Branch: refs/heads/sf-plugins
Commit: c3ccab026f8ee3e0e5baf37c69c74eb7565f87ff
Parents: 9fe932e
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 15 19:58:14 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:21 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c3ccab02/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index b44038f..d2b568e 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -174,7 +174,7 @@
action: function (args) {
var params = [];
- params.push("&name=" + args.context.sfClusters[0].name);
+ params.push("&name=" + args.context.sfAdministration[0].name);
params.push("&totalcapacity=" + args.data.totalcapacity);
params.push("&totalminiops=" + args.data.totalminiops);
params.push("&totalmaxiops=" + args.data.totalmaxiops);
[11/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Add VLAN combo box to Add Shared Volume window
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/77092438
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/77092438
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/77092438
Branch: refs/heads/sf-plugins
Commit: 7709243841662dafac988060932baf6cba62a333
Parents: b7ef791
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 7 13:57:31 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:18 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77092438/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index cce02db..8896526 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -77,7 +77,6 @@
},
diskSize: {
label: 'label.disk.size.gb',
- docID: 'Size of the volume in GB',
validation: {
required: true,
number: true
@@ -103,6 +102,27 @@
required: true,
number: true
}
+ },
+ vlan: {
+ label: 'VLAN',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listSolidFireVirtualNetworks"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var virtualNetworkObjs = json.listvirtualnetworksresponse.virtualnetwork;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: virtualNetworkObjs
+ });
+ }
+ });
+ }
}
}
},
[29/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Updates to config and table names
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/35626b6c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/35626b6c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/35626b6c
Branch: refs/heads/sf-plugins
Commit: 35626b6c6fd528ddf5557fb1841b233738fb7387
Parents: be5f7da
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 15 19:17:41 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:21 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/config.js | 2 +-
ui/plugins/sfAdministration/sfAdministration.js | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35626b6c/ui/plugins/sfAdministration/config.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/config.js b/ui/plugins/sfAdministration/config.js
index 7e8bb61..376ae56 100644
--- a/ui/plugins/sfAdministration/config.js
+++ b/ui/plugins/sfAdministration/config.js
@@ -1,5 +1,5 @@
(function (cloudStack) {
- cloudStack.plugins.sfSharedVolume.config = {
+ cloudStack.plugins.sfAdministration.config = {
title: 'SolidFire Administration',
desc: 'SolidFire Administration',
externalLink: 'http://www.solidfire.com/',
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35626b6c/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index c836576..ddc0e33 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -10,9 +10,9 @@
id: 'sfAdministration',
fields: {
name: { label: 'label.name' },
- iqn: { label: 'MVIP' },
- size: { label: 'Username' },
- miniops: { label: 'label.zone' }
+ mvip: { label: 'MVIP' },
+ username: { label: 'Username' },
+ zonename: { label: 'label.zone' }
},
dataProvider: function(args) {
plugin.ui.apiCall('listSolidFireClusters', {
[45/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Pass in the ID of the virtual network
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2c42b05
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2c42b05
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2c42b05
Branch: refs/heads/sf-plugins
Commit: c2c42b0599fb66421eda610eba607a72349f2859
Parents: a68837d
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 21 19:00:11 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:23 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2c42b05/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index ff6bae5..a18f81d 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -511,7 +511,8 @@
action: function (args) {
var params = [];
- params.push("&name=" + args.context.name);
+ params.push("&id=" + args.context.sfVirtualNetworks[0].id);
+ params.push("&name=" + args.data.name);
params.push("&tag=" + args.data.tag);
params.push("&startip=" + args.data.startip);
params.push("&size=" + "10"); // Mike T. args.data.size);
[04/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Get IQN from newly created volume, store in DB, and return from API call
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d1ba1e2d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d1ba1e2d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d1ba1e2d
Branch: refs/heads/sf-plugins
Commit: d1ba1e2df824beaade7c2c735138b9c5ecb9bbe9
Parents: 351c66c
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Mon Jul 6 18:06:58 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:17 2015 -0600
----------------------------------------------------------------------
.../apache/cloudstack/api/helper/ApiHelper.java | 4 +-
.../response/ApiSolidFireVolumeResponse.java | 12 ++
.../solidfire/ApiSolidFireServiceImpl2.java | 4 +-
.../solidfire/dataaccess/SfVolume.java | 2 +
.../solidfire/dataaccess/vo/SfVolumeVO.java | 11 +-
.../solidfire/util/SolidFireConnection.java | 216 +++++++++++++++++--
6 files changed, 233 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1ba1e2d/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
index 0e29e90..9a83404 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
@@ -54,6 +54,7 @@ public class ApiHelper {
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";
@@ -66,7 +67,7 @@ public class ApiHelper {
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 = "Name for volume";
+ public static final String VOLUME_NAME_DESC = "Volume name";
public static final String ZONE_ID_DESC = "Zone ID";
@Inject private AccountDao _accountDao;
@@ -174,6 +175,7 @@ public class ApiHelper {
sfResponse.setId(sfVolume.getId());
sfResponse.setUuid(sfVolume.getUuid());
sfResponse.setName(sfVolume.getName());
+ sfResponse.setIqn(sfVolume.getIqn());
sfResponse.setSize(sfVolume.getSize());
sfResponse.setMinIops(sfVolume.getMinIops());
sfResponse.setMaxIops(sfVolume.getMaxIops());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1ba1e2d/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java
index 2da7dfb..e4f0e70 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVolumeResponse.java
@@ -39,6 +39,10 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
@Param(description = ApiHelper.VOLUME_NAME_DESC)
private String _name;
+ @SerializedName("iqn")
+ @Param(description = ApiHelper.IQN_DESC)
+ private String _iqn;
+
@SerializedName("size")
@Param(description = ApiHelper.SIZE_DESC)
private long _size;
@@ -127,6 +131,14 @@ public class ApiSolidFireVolumeResponse extends BaseResponse {
return _name;
}
+ public void setIqn(String iqn) {
+ _iqn = iqn;
+ }
+
+ public String getIqn() {
+ return _iqn;
+ }
+
public void setSize(long size) {
_size = size;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1ba1e2d/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 663123b..9af4ac2 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -702,7 +702,9 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
long sfVolumeId = sfConnection.createVolume(name, sfAccountId, size, minIops, maxIops, burstIops);
- SfVolumeVO sfVolumeVO = new SfVolumeVO(sfVolumeId, name, size, minIops, maxIops, burstIops, sfVirtualNetworkId);
+ SolidFireConnection.SolidFireVolume sfVolume = sfConnection.getVolume(sfVolumeId);
+
+ SfVolumeVO sfVolumeVO = new SfVolumeVO(sfVolumeId, name, sfVolume.getIqn(), size, minIops, maxIops, burstIops, sfVirtualNetworkId);
return _sfVolumeDao.persist(sfVolumeVO);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1ba1e2d/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java
index 481106c..d59395d 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/SfVolume.java
@@ -24,6 +24,8 @@ public interface SfVolume extends Identity, InternalIdentity {
String getName();
+ String getIqn();
+
long getSize();
long getMinIops();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1ba1e2d/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java
index 2710704..f1aede1 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/dataaccess/vo/SfVolumeVO.java
@@ -51,6 +51,9 @@ public class SfVolumeVO implements SfVolume {
@Column(name = "name")
private String name;
+ @Column(name = "iqn")
+ private String iqn;
+
@Column(name = "size")
private long size;
@@ -80,10 +83,11 @@ public class SfVolumeVO implements SfVolume {
uuid = UUID.randomUUID().toString();
}
- public SfVolumeVO(long sfId, String name, long size, long minIops, long maxIops, long burstIops, long sfVirtualNetworkId) {
+ 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;
@@ -111,6 +115,11 @@ public class SfVolumeVO implements SfVolume {
return name;
}
+ @Override
+ public String getIqn() {
+ return iqn;
+ }
+
public void setSize(long size) {
this.size = size;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d1ba1e2d/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
index 1161b41..813f6e2 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
@@ -22,9 +22,7 @@ import com.google.gson.GsonBuilder;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
-import java.io.UnsupportedEncodingException;
import java.net.URI;
-import java.net.URISyntaxException;
import java.security.KeyManagementException;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
@@ -39,7 +37,6 @@ import org.apache.cloudstack.utils.security.SSLUtils;
import org.apache.http.HttpResponse;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
-import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
@@ -47,11 +44,14 @@ import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.BasicClientConnectionManager;
+import org.apache.log4j.Logger;
import com.cloud.utils.exception.CloudRuntimeException;
@SuppressWarnings("deprecation")
public class SolidFireConnection {
+ private static final Logger s_logger = Logger.getLogger(SolidFireConnection.class.getName());
+
private final String _managementVip;
private final int _managementPort = 443;
private final String _clusterAdminUsername;
@@ -127,6 +127,28 @@ public class SolidFireConnection {
}
}
+ public SolidFireVolume getVolume(long lVolumeId) {
+ final Gson gson = new GsonBuilder().create();
+
+ VolumeToGet volumeToGet = new VolumeToGet(lVolumeId);
+
+ String strVolumeToGetJson = gson.toJson(volumeToGet);
+
+ String strVolumeGetResultJson = executeJsonRpc(strVolumeToGetJson);
+
+ VolumeGetResult volumeGetResult = gson.fromJson(strVolumeGetResultJson, VolumeGetResult.class);
+
+ verifyResult(volumeGetResult.result, strVolumeGetResultJson, gson);
+
+ String strVolumeName = getVolumeName(volumeGetResult, lVolumeId);
+ String strVolumeIqn = getVolumeIqn(volumeGetResult, lVolumeId);
+ long lAccountId = getVolumeAccountId(volumeGetResult, lVolumeId);
+ String strVolumeStatus = getVolumeStatus(volumeGetResult, lVolumeId);
+ long lTotalSize = getVolumeTotalSize(volumeGetResult, lVolumeId);
+
+ return new SolidFireVolume(lVolumeId, strVolumeName, strVolumeIqn, lAccountId, strVolumeStatus, lTotalSize);
+ }
+
public long createVolume(String name, long accountId, long totalSizeInGBs, long minIops, long maxIops, long burstIops) {
final Gson gson = new GsonBuilder().create();
@@ -283,14 +305,10 @@ public class SolidFireConnection {
}catch (IOException ex) {
throw new CloudRuntimeException(ex.getMessage());
}
- } catch (UnsupportedEncodingException ex) {
- throw new CloudRuntimeException(ex.getMessage());
- } catch (ClientProtocolException ex) {
- throw new CloudRuntimeException(ex.getMessage());
- } catch (IOException ex) {
- throw new CloudRuntimeException(ex.getMessage());
- } catch (URISyntaxException ex) {
- throw new CloudRuntimeException(ex.getMessage());
+ } catch (Throwable t) {
+ s_logger.error(t.getMessage());
+
+ throw new CloudRuntimeException(t.getMessage());
} finally {
if (httpClient != null) {
try {
@@ -308,6 +326,7 @@ public class SolidFireConnection {
try {
SSLContext sslContext = SSLUtils.getSSLContext();
+
X509TrustManager tm = new X509TrustManager() {
@Override
public void checkClientTrusted(X509Certificate[] xcs, String string) throws CertificateException {
@@ -323,7 +342,7 @@ public class SolidFireConnection {
}
};
- sslContext.init(null, new TrustManager[] {tm}, new SecureRandom());
+ sslContext.init(null, new TrustManager[] { tm }, new SecureRandom());
SSLSocketFactory socketFactory = new SSLSocketFactory(sslContext, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
SchemeRegistry registry = new SchemeRegistry();
@@ -335,13 +354,24 @@ public class SolidFireConnection {
return new DefaultHttpClient(mgr, client.getParams());
} catch (NoSuchAlgorithmException ex) {
+ s_logger.error(ex.getMessage());
+
throw new CloudRuntimeException(ex.getMessage());
} catch (KeyManagementException ex) {
+ s_logger.error(ex.getMessage());
+
throw new CloudRuntimeException(ex.getMessage());
}
finally {
if (client != null) {
- client.close();
+ try {
+ client.close();
+ }
+ catch (Throwable t) {
+ s_logger.error(t.getMessage());
+
+ throw t;
+ }
}
}
}
@@ -453,6 +483,29 @@ public class SolidFireConnection {
}
@SuppressWarnings("unused")
+ private static final class VolumeToGet
+ {
+ private final String method = "ListActiveVolumes";
+ private final VolumeToGetParams params;
+
+ private VolumeToGet(final long lVolumeId)
+ {
+ params = new VolumeToGetParams(lVolumeId);
+ }
+
+ private static final class VolumeToGetParams
+ {
+ private final long startVolumeID;
+ private final long limit = 1;
+
+ private VolumeToGetParams(final long lVolumeId)
+ {
+ startVolumeID = lVolumeId;
+ }
+ }
+ }
+
+ @SuppressWarnings("unused")
private static final class VolumeToCreate {
private final String method = "CreateVolume";
private final VolumeToCreateParams params;
@@ -642,6 +695,23 @@ public class SolidFireConnection {
}
}
+ private static final class VolumeGetResult {
+ private Result result;
+
+ private static final class Result {
+ private Volume[] volumes;
+
+ private static final class Volume {
+ private long volumeID;
+ private String name;
+ private String iqn;
+ private long accountID;
+ private String status;
+ private long totalSize;
+ }
+ }
+ }
+
private static final class VolumeCreateResult {
private Result result;
@@ -696,6 +766,83 @@ public class SolidFireConnection {
throw new IllegalStateException("Problem with the following JSON: " + strJson);
}
+ private static final String ACTIVE = "active";
+
+ public static class SolidFireVolume {
+ private final long _id;
+ private final String _name;
+ private final String _iqn;
+ private final long _accountId;
+ private final String _status;
+ private final long _totalSize;
+
+ public SolidFireVolume(long id, String name, String iqn,
+ long accountId, String status, long totalSize)
+ {
+ _id = id;
+ _name = name;
+ _iqn = iqn;
+ _accountId = accountId;
+ _status = status;
+ _totalSize = totalSize;
+ }
+
+ public long getId() {
+ return _id;
+ }
+
+ public String getName() {
+ return _name;
+ }
+
+ public String getIqn() {
+ return _iqn;
+ }
+
+ public long getAccountId() {
+ return _accountId;
+ }
+
+ public boolean isActive() {
+ return ACTIVE.equalsIgnoreCase(_status);
+ }
+
+ public long getTotalSize() {
+ return _totalSize;
+ }
+
+ @Override
+ public int hashCode() {
+ return _iqn.hashCode();
+ }
+
+ @Override
+ public String toString() {
+ return _name;
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ if (!obj.getClass().equals(SolidFireVolume.class)) {
+ return false;
+ }
+
+ SolidFireVolume sfv = (SolidFireVolume)obj;
+
+ if (_id == sfv._id && _name.equals(sfv._name) &&
+ _iqn.equals(sfv._iqn) && _accountId == sfv._accountId &&
+ isActive() == sfv.isActive() && getTotalSize() == sfv.getTotalSize()) {
+ return true;
+ }
+
+ return false;
+ }
+ }
+
public static class SolidFireAccount
{
private final long _id;
@@ -761,4 +908,47 @@ public class SolidFireConnection {
private static long convertGBsToBytes(long gbs) {
return gbs * 1024 * 1024 * 1024;
}
+
+ private static String getVolumeName(VolumeGetResult volumeGetResult, long lVolumeId) {
+ if (volumeGetResult.result.volumes != null && volumeGetResult.result.volumes.length == 1 && volumeGetResult.result.volumes[0].volumeID == lVolumeId) {
+ return volumeGetResult.result.volumes[0].name;
+ }
+
+ throw new CloudRuntimeException("Could not determine the name of the volume for volume ID of " + lVolumeId + ".");
+ }
+
+ private static String getVolumeIqn(VolumeGetResult volumeGetResult, long lVolumeId) {
+ if (volumeGetResult.result.volumes != null && volumeGetResult.result.volumes.length == 1 && volumeGetResult.result.volumes[0].volumeID == lVolumeId) {
+ return volumeGetResult.result.volumes[0].iqn;
+ }
+
+ throw new CloudRuntimeException("Could not determine the IQN of the volume for volume ID of " + lVolumeId + ".");
+ }
+
+ private static long getVolumeAccountId(VolumeGetResult volumeGetResult, long lVolumeId) {
+ if (volumeGetResult.result.volumes != null && volumeGetResult.result.volumes.length == 1 && volumeGetResult.result.volumes[0].volumeID == lVolumeId) {
+ return volumeGetResult.result.volumes[0].accountID;
+ }
+
+ throw new CloudRuntimeException("Could not determine the account ID of the volume for volume ID of " + lVolumeId + ".");
+ }
+
+ private static String getVolumeStatus(VolumeGetResult volumeGetResult, long lVolumeId) {
+ if (volumeGetResult.result.volumes != null && volumeGetResult.result.volumes.length == 1 && volumeGetResult.result.volumes[0].volumeID == lVolumeId) {
+ return volumeGetResult.result.volumes[0].status;
+ }
+
+ throw new CloudRuntimeException("Could not determine the status of the volume for volume ID of " + lVolumeId + ".");
+ }
+
+ private static long getVolumeTotalSize(VolumeGetResult volumeGetResult, long lVolumeId)
+ {
+ if (volumeGetResult.result.volumes != null && volumeGetResult.result.volumes.length == 1 &&
+ volumeGetResult.result.volumes[0].volumeID == lVolumeId)
+ {
+ return volumeGetResult.result.volumes[0].totalSize;
+ }
+
+ throw new CloudRuntimeException("Could not determine the total size of the volume for volume ID of " + lVolumeId + ".");
+ }
}
[23/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Perform basic verification on the passed-in IOPS values
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ab601866
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ab601866
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ab601866
Branch: refs/heads/sf-plugins
Commit: ab6018665911a6c744baf43629ff79fdbc3e441b
Parents: 6bee875
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Sun Jul 12 22:35:33 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:20 2015 -0600
----------------------------------------------------------------------
.../solidfire/ApiSolidFireServiceImpl2.java | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ab601866/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index d91febc..7c585a8 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -639,6 +639,8 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
private SfVolume createVolume(String name, long size, long minIops, long maxIops, long burstIops, long accountId, long sfVirtualNetworkId) {
+ verifyIops(minIops, maxIops, burstIops);
+
Account account = _accountDao.findById(accountId);
SfVirtualNetwork sfVirtualNetwork = getSfVirtualNetwork(sfVirtualNetworkId);
@@ -740,6 +742,8 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
private SfVolumeVO updateVolume(SfVolumeVO sfVolumeVO, long size, long minIops, long maxIops, long burstIops) {
+ verifyIops(minIops, maxIops, burstIops);
+
SfVirtualNetwork sfVirtualNetwork = getSfVirtualNetwork(sfVolumeVO.getSfVirtualNetworkId());
Account account = _accountDao.findById(sfVirtualNetwork.getAccountId());
@@ -989,4 +993,18 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
return sfVirtualNetworkVOsToReturn;
}
+
+ private static void verifyIops(long minIops, long maxIops, long burstIops) {
+ if (minIops <= 0 || maxIops <= 0 || burstIops <= 0) {
+ throw new IllegalArgumentException("The 'Min IOPS', 'Max IOPS', and 'Burst IOPS' values must be greater than 0.");
+ }
+
+ if (minIops > maxIops) {
+ throw new IllegalArgumentException("The 'Min IOPS' value cannot exceed the 'Max IOPS' value.");
+ }
+
+ if (maxIops > burstIops) {
+ throw new IllegalArgumentException("The 'Max IOPS' value cannot exceed the 'Burst IOPS' value.");
+ }
+ }
}
[16/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
A root admin can see all accounts whereas others can only see the account they belong to
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/26af0a40
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/26af0a40
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/26af0a40
Branch: refs/heads/sf-plugins
Commit: 26af0a401d91dffa0d09a44c673983c2f58fbc19
Parents: 15213a3
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 8 15:07:13 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:19 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 25 ++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/26af0a40/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index 90395cc..0f55a5d 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -110,20 +110,41 @@
},
isHidden: true,
select: function(args) {
+ var accountNameParam = "";
+
if (isAdmin()) {
args.$form.find('.form-item[rel=account]').show();
}
+ else {
+ accountNameParam = "&name=" + g_account;
+ }
$.ajax({
- url: createURL("listAccounts"),
+ url: createURL("listAccounts&listAll=true" + accountNameParam),
dataType: "json",
async: true,
success: function(json) {
var accountObjs = json.listaccountsresponse.account;
+ var filteredAccountObjs = [];
+
+ if (isAdmin()) {
+ filteredAccountObjs = accountObjs;
+ }
+ else {
+ for (int i = 0; i < accountObjs.length; i++) {
+ var accountObj = accountObjs[i];
+
+ if (accountObj.domainid == g_domainid) {
+ filteredAccountObjs.push(accountObj);
+
+ break; // there should only be one account with a particular name in a domain
+ }
+ }
+ }
args.response.success({
descriptionField: 'name',
- data: accountObjs
+ data: filteredAccountObjs
});
}
});
[49/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Minor formatting changes
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/fcf50ba0
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fcf50ba0
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fcf50ba0
Branch: refs/heads/sf-plugins
Commit: fcf50ba0fbcab0c8716041224fc694e0e0566936
Parents: c996493
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Fri Sep 18 16:31:53 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:24 2015 -0600
----------------------------------------------------------------------
.../apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fcf50ba0/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 29a920c..7ad57e6 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -374,7 +374,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
if (!_sfVirtualNetworkDao.remove(id)) {
- throw new CloudRuntimeException("Unable to remove the following virtual network:" + id);
+ throw new CloudRuntimeException("Unable to remove the following virtual network: " + id);
}
SfCluster sfCluster = getSfCluster(sfVirtualNetwork.getSfClusterId());
@@ -476,7 +476,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
verifyPermissionsForAccount(sfVirtualNetwork.getAccountId());
if (!_sfVolumeDao.remove(id)) {
- throw new CloudRuntimeException("Unable to remove the following volume:" + id);
+ throw new CloudRuntimeException("Unable to remove the following volume: " + id);
}
SfCluster sfCluster = getSfCluster(sfVirtualNetwork.getSfClusterId());
[43/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Add " (in GB)" to the text of two fields
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c6e513a6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c6e513a6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c6e513a6
Branch: refs/heads/sf-plugins
Commit: c6e513a65d4b8a76690bf3eeb04fc39ec8fc27f8
Parents: 2faa48d
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Thu Jul 23 17:22:32 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:23 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c6e513a6/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index 68a3197..a5945a0 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -115,7 +115,7 @@
}
},
totalCapacity: {
- label: 'Total Capacity',
+ label: 'Total Capacity (in GB)',
validation: {
required: true,
number: true
@@ -260,7 +260,7 @@
label: 'Username'
},
totalcapacity: {
- label: 'Total Capacity',
+ label: 'Total Capacity (in GB)',
isEditable: true
},
totalminiops: {
[42/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
The VLAN tag cannot be changed
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f5a299a4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f5a299a4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f5a299a4
Branch: refs/heads/sf-plugins
Commit: f5a299a42cabb82d52cbeb59a068c314c79b662a
Parents: c6e513a
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 28 15:10:02 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:23 2015 -0600
----------------------------------------------------------------------
.../solidfire/UpdateSolidFireVirtualNetworkCmd.java | 5 +----
.../cloudstack/solidfire/ApiSolidFireService2.java | 3 +--
.../cloudstack/solidfire/ApiSolidFireServiceImpl2.java | 7 +++----
.../cloudstack/solidfire/util/SolidFireConnection.java | 12 +++++-------
ui/plugins/sfAdministration/sfAdministration.js | 4 +---
5 files changed, 11 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5a299a4/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
index 210b640..2d71947 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
@@ -47,9 +47,6 @@ public class UpdateSolidFireVirtualNetworkCmd extends BaseCmd {
@Parameter(name = ApiHelper.NAME, type = CommandType.STRING, description = ApiHelper.VIRTUAL_NETWORK_NAME_DESC, required = true)
private String _name;
- @Parameter(name = ApiHelper.TAG, type = CommandType.STRING, description = ApiHelper.VIRTUAL_NETWORK_TAG_DESC, required = true)
- private String _tag;
-
@Parameter(name = ApiHelper.START_IP, type = CommandType.STRING, description = ApiHelper.START_IP_ADDRESS_DESC, required = true)
private String _startIp;
@@ -90,7 +87,7 @@ public class UpdateSolidFireVirtualNetworkCmd extends BaseCmd {
try {
s_logger.info(UpdateSolidFireVirtualNetworkCmd.class.getName() + ".execute invoked");
- SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.updateSolidFireVirtualNetwork(_id, _name, _tag, _startIp, _size, _netmask, _svip);
+ SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.updateSolidFireVirtualNetwork(_id, _name, _startIp, _size, _netmask, _svip);
ApiSolidFireVirtualNetworkResponse response = _apiHelper.getApiSolidFireVirtualNetworkResponse(sfVirtualNetwork, ResponseView.Full);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5a299a4/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
index e6ed7d2..12f276c 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
@@ -53,8 +53,7 @@ public interface ApiSolidFireService2 extends PluggableService, Configurable {
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 tag, String startIp, int size,
- String netmask, String svip);
+ SfVirtualNetwork updateSolidFireVirtualNetwork(long id, String name, String startIp, int size, String netmask, String svip);
SfVirtualNetwork deleteSolidFireVirtualNetwork(long id);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5a299a4/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index ff11202..9137c07 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -332,8 +332,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
@Override
- public SfVirtualNetwork updateSolidFireVirtualNetwork(long id, String name, String tag, String startIp, int size,
- String netmask, String svip) {
+ public SfVirtualNetwork updateSolidFireVirtualNetwork(long id, String name, String startIp, int size, String netmask, String svip) {
s_logger.info("updateSolidFireVirtualNetwork invoked");
verifyRootAdmin();
@@ -346,10 +345,10 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
SolidFireConnection sfConnection = new SolidFireConnection(sfClusterVO.getMvip(), sfClusterVO.getUsername(), sfClusterVO.getPassword());
- sfConnection.modifyVirtualNetwork(sfVirtualNetworkVO.getSfId(), name, tag, startIp, size, netmask, svip);
+ sfConnection.modifyVirtualNetwork(name, sfVirtualNetworkVO.getTag(), startIp, size, netmask, svip);
sfVirtualNetworkVO.setName(name);
- sfVirtualNetworkVO.setTag(tag);
+ sfVirtualNetworkVO.setTag(sfVirtualNetworkVO.getTag());
sfVirtualNetworkVO.setStartIp(startIp);
sfVirtualNetworkVO.setSize(size);
sfVirtualNetworkVO.setNetmask(netmask);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5a299a4/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
index 813f6e2..f00a84b 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/util/SolidFireConnection.java
@@ -95,10 +95,10 @@ public class SolidFireConnection {
return virtualNetworkAddResult.result.virtualNetworkID;
}
- public void modifyVirtualNetwork(long id, String name, String tag, String startIp, int size, String netmask, String svip) {
+ public void modifyVirtualNetwork(String name, String tag, String startIp, int size, String netmask, String svip) {
final Gson gson = new GsonBuilder().create();
- VirtualNetworkToModify virtualNetworkToModify = new VirtualNetworkToModify(id, name, tag, startIp, size, netmask, svip);
+ VirtualNetworkToModify virtualNetworkToModify = new VirtualNetworkToModify(name, tag, startIp, size, netmask, svip);
String strVirtualNetworkToModifyJson = gson.toJson(virtualNetworkToModify);
@@ -428,20 +428,18 @@ public class SolidFireConnection {
private final String method = "ModifyVirtualNetwork";
private final VirtualNetworkToModifyParams params;
- public VirtualNetworkToModify(long id, String name, String tag, String startIp, int size, String netmask, String svip) {
- params = new VirtualNetworkToModifyParams(id, name, tag, startIp, size, netmask, svip);
+ public VirtualNetworkToModify(String name, String tag, String startIp, int size, String netmask, String svip) {
+ params = new VirtualNetworkToModifyParams(name, tag, startIp, size, netmask, svip);
}
private static final class VirtualNetworkToModifyParams {
- private final long virtualNetworkID;
private final String name;
private final String virtualNetworkTag;
private final AddressBlock[] addressBlocks = new AddressBlock[1];
private final String netmask;
private final String svip;
- public VirtualNetworkToModifyParams(long id, String name, String tag, String startIp, int size, String netmask, String svip) {
- this.virtualNetworkID = id;
+ public VirtualNetworkToModifyParams(String name, String tag, String startIp, int size, String netmask, String svip) {
this.name = name;
this.virtualNetworkTag = tag;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5a299a4/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index a5945a0..9fabf58 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -460,7 +460,6 @@
params.push("&id=" + args.context.sfVirtualNetworks[0].id);
params.push("&name=" + args.data.name);
- params.push("&tag=" + args.data.tag);
params.push("&netmask=" + args.data.netmask);
params.push("&startip=" + args.data.startip);
params.push("&size=" + args.data.size);
@@ -525,8 +524,7 @@
label: 'label.account'
},
tag: {
- label: 'Tag',
- isEditable: true
+ label: 'Tag'
},
netmask: {
label: 'Netmask',
[13/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Start adding related code to delete a volume
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e34de4a6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e34de4a6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e34de4a6
Branch: refs/heads/sf-plugins
Commit: e34de4a6dd205f3ba0938517a5f6e6edd0dcf79e
Parents: 862841a
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Thu Jul 9 09:03:35 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:19 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 25 ++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e34de4a6/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index a1a72fc..6eb9cf1 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -157,8 +157,8 @@
},
dependsOn: ['availabilityZone', 'account'],
select: function(args) {
- if (args.data.availabilityZone == null || args.data.availabilityZone == "" ||
- args.data.account == null || args.data.account == "") {
+ if (args.data.availabilityZone === null || args.data.availabilityZone === "" ||
+ args.data.account === null || args.data.account === "") {
return;
}
@@ -213,14 +213,23 @@
}
},
detailView: {
- name: 'Shared volume details',
- isMaximized: true,
+ name: 'label.volume.details',
+ viewAll: {
+ path: 'storage.snapshots',
+ label: 'label.snapshots'
+ },
actions: {
- edit: {
- label: 'Edit shared volume',
- compactLabel: 'label.edit',
+ deleteVolume: {
+ label: 'Delete Shared Volume',
+ messages: {
+ confirm: function(args) {
+ return 'Are you sure you would like to delete this shared volume?';
+ },
+ notification: function(args) {
+ return 'Shared volume deleted';
+ }
+ },
action: function(args) {
- var sharedVolumeObj = args.context;
}
}
}
[24/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Correcting a rebase issue concerning the ApiHelper class and its use
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8cd28278
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8cd28278
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8cd28278
Branch: refs/heads/sf-plugins
Commit: 8cd282788d92819976bbb4d20c7a956ca711f81f
Parents: ab60186
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 14 18:36:56 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:20 2015 -0600
----------------------------------------------------------------------
.../solidfire/spring-solidfire-context.xml | 1 +
.../CreateReferenceToSolidFireClusterCmd.java | 3 ++-
.../CreateSolidFireVirtualNetworkCmd.java | 3 ++-
.../DeleteReferenceToSolidFireClusterCmd.java | 3 ++-
.../DeleteSolidFireVirtualNetworkCmd.java | 3 ++-
.../admin/solidfire/ListSolidFireClustersCmd.java | 3 ++-
.../UpdateReferenceToSolidFireClusterCmd.java | 3 ++-
.../UpdateSolidFireVirtualNetworkCmd.java | 3 ++-
.../user/solidfire/CreateSolidFireVolumeCmd.java | 5 +++--
.../user/solidfire/DeleteSolidFireVolumeCmd.java | 5 +++--
.../solidfire/ListSolidFireVirtualNetworksCmd.java | 4 ++--
.../user/solidfire/ListSolidFireVolumesCmd.java | 5 +++--
.../user/solidfire/UpdateSolidFireVolumeCmd.java | 5 +++--
.../apache/cloudstack/api/helper/ApiHelper.java | 6 ------
.../solidfire/ApiSolidFireServiceImpl2.java | 17 +++++++++--------
15 files changed, 38 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/resources/META-INF/cloudstack/solidfire/spring-solidfire-context.xml
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/resources/META-INF/cloudstack/solidfire/spring-solidfire-context.xml b/plugins/api/solidfire/resources/META-INF/cloudstack/solidfire/spring-solidfire-context.xml
index 334393d..d056571 100644
--- a/plugins/api/solidfire/resources/META-INF/cloudstack/solidfire/spring-solidfire-context.xml
+++ b/plugins/api/solidfire/resources/META-INF/cloudstack/solidfire/spring-solidfire-context.xml
@@ -27,6 +27,7 @@
http://www.springframework.org/schema/context/spring-context-3.0.xsd"
>
+ <bean id="apiHelper" class="org.apache.cloudstack.api.helper.ApiHelper" />
<bean id="apiSolidFireServiceImpl2" class="org.apache.cloudstack.solidfire.ApiSolidFireServiceImpl2"/>
<bean id="sfClusterDao" class="org.apache.cloudstack.solidfire.dataaccess.dao.SfClusterDaoImpl" />
<bean id="sfVolumeDao" class="org.apache.cloudstack.solidfire.dataaccess.dao.SfVolumeDaoImpl" />
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateReferenceToSolidFireClusterCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateReferenceToSolidFireClusterCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateReferenceToSolidFireClusterCmd.java
index ecc2b9d..65b82dd 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateReferenceToSolidFireClusterCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateReferenceToSolidFireClusterCmd.java
@@ -64,6 +64,7 @@ public class CreateReferenceToSolidFireClusterCmd extends BaseCmd {
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = ApiHelper.ZONE_ID_DESC, required = true)
private long _zoneId;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -88,7 +89,7 @@ public class CreateReferenceToSolidFireClusterCmd extends BaseCmd {
SfCluster sfCluster = _apiSolidFireService2.createReferenceToSolidFireCluster(_mvip, _username, _password, _totalCapacity,
_totalMinIops, _totalMaxIops, _totalBurstIops, _zoneId);
- ApiSolidFireClusterResponse response = ApiHelper.instance().getApiSolidFireClusterResponse(sfCluster);
+ ApiSolidFireClusterResponse response = _apiHelper.getApiSolidFireClusterResponse(sfCluster);
response.setResponseName(getCommandName());
response.setObjectName("apicreatereferencetosolidfirecluster");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateSolidFireVirtualNetworkCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateSolidFireVirtualNetworkCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateSolidFireVirtualNetworkCmd.java
index c91d4d3..3d428ea 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateSolidFireVirtualNetworkCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/CreateSolidFireVirtualNetworkCmd.java
@@ -63,6 +63,7 @@ public class CreateSolidFireVirtualNetworkCmd extends BaseCmd {
@Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = ApiHelper.ACCOUNT_ID_DESC, required = true)
private long _accountId;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -86,7 +87,7 @@ public class CreateSolidFireVirtualNetworkCmd extends BaseCmd {
SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.createSolidFireVirtualNetwork(_clusterName, _name, _tag, _startIp, _size, _netmask, _svip, _accountId);
- ApiSolidFireVirtualNetworkResponse response = ApiHelper.instance().getApiSolidFireVirtualNetworkResponse(sfVirtualNetwork, ResponseView.Full);
+ ApiSolidFireVirtualNetworkResponse response = _apiHelper.getApiSolidFireVirtualNetworkResponse(sfVirtualNetwork, ResponseView.Full);
response.setResponseName(getCommandName());
response.setObjectName("apicreatesolidfirevirtualnetwork");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteReferenceToSolidFireClusterCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteReferenceToSolidFireClusterCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteReferenceToSolidFireClusterCmd.java
index 058df8d..77673fd 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteReferenceToSolidFireClusterCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteReferenceToSolidFireClusterCmd.java
@@ -41,6 +41,7 @@ public class DeleteReferenceToSolidFireClusterCmd extends BaseCmd {
@Parameter(name = ApiHelper.NAME, type = CommandType.STRING, description = ApiHelper.SOLIDFIRE_CLUSTER_NAME_DESC, required = true)
private String _name;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -64,7 +65,7 @@ public class DeleteReferenceToSolidFireClusterCmd extends BaseCmd {
SfCluster sfCluster = _apiSolidFireService2.deleteReferenceToSolidFireCluster(_name);
- ApiSolidFireClusterResponse response = ApiHelper.instance().getApiSolidFireClusterResponse(sfCluster);
+ ApiSolidFireClusterResponse response = _apiHelper.getApiSolidFireClusterResponse(sfCluster);
response.setResponseName(getCommandName());
response.setObjectName("apideletereferencetosolidfirecluster");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteSolidFireVirtualNetworkCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteSolidFireVirtualNetworkCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteSolidFireVirtualNetworkCmd.java
index 8ea4a67..b21e6c6 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteSolidFireVirtualNetworkCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/DeleteSolidFireVirtualNetworkCmd.java
@@ -43,6 +43,7 @@ public class DeleteSolidFireVirtualNetworkCmd extends BaseCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ApiSolidFireVirtualNetworkResponse.class, description = ApiHelper.VIRTUAL_NETWORK_ID_DESC, required = true)
private long _id;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -72,7 +73,7 @@ public class DeleteSolidFireVirtualNetworkCmd extends BaseCmd {
SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.deleteSolidFireVirtualNetwork(_id);
- ApiSolidFireVirtualNetworkResponse response = ApiHelper.instance().getApiSolidFireVirtualNetworkResponse(sfVirtualNetwork, ResponseView.Full);
+ ApiSolidFireVirtualNetworkResponse response = _apiHelper.getApiSolidFireVirtualNetworkResponse(sfVirtualNetwork, ResponseView.Full);
response.setResponseName(getCommandName());
response.setObjectName("apideletesolidfirevirtualnetwork");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/ListSolidFireClustersCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/ListSolidFireClustersCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/ListSolidFireClustersCmd.java
index 3cdf73f..dea0a8e 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/ListSolidFireClustersCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/ListSolidFireClustersCmd.java
@@ -43,6 +43,7 @@ public class ListSolidFireClustersCmd extends BaseListCmd {
@Parameter(name = ApiHelper.NAME, type = CommandType.STRING, description = ApiHelper.SOLIDFIRE_CLUSTER_NAME_DESC)
private String _name;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -74,7 +75,7 @@ public class ListSolidFireClustersCmd extends BaseListCmd {
sfClusters = _apiSolidFireService2.listSolidFireClusters();
}
- List<ApiSolidFireClusterResponse> responses = ApiHelper.instance().getApiSolidFireClusterResponse(sfClusters);
+ List<ApiSolidFireClusterResponse> responses = _apiHelper.getApiSolidFireClusterResponse(sfClusters);
ListResponse<ApiSolidFireClusterResponse> listReponse = new ListResponse<>();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateReferenceToSolidFireClusterCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateReferenceToSolidFireClusterCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateReferenceToSolidFireClusterCmd.java
index 2423f3b..0411205 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateReferenceToSolidFireClusterCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateReferenceToSolidFireClusterCmd.java
@@ -53,6 +53,7 @@ public class UpdateReferenceToSolidFireClusterCmd extends BaseCmd {
@Parameter(name = ApiHelper.TOTAL_BURST_IOPS, type = CommandType.LONG, description = ApiHelper.TOTAL_BURST_IOPS_DESC, required = true)
private long _totalBurstIops;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -77,7 +78,7 @@ public class UpdateReferenceToSolidFireClusterCmd extends BaseCmd {
SfCluster sfCluster = _apiSolidFireService2.updateReferenceToSolidFireCluster(_name, _totalCapacity,
_totalMinIops, _totalMaxIops, _totalBurstIops);
- ApiSolidFireClusterResponse response = ApiHelper.instance().getApiSolidFireClusterResponse(sfCluster);
+ ApiSolidFireClusterResponse response = _apiHelper.getApiSolidFireClusterResponse(sfCluster);
response.setResponseName(getCommandName());
response.setObjectName("apiupdatereferencetosolidfirecluster");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
index e52e056..210b640 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/admin/solidfire/UpdateSolidFireVirtualNetworkCmd.java
@@ -62,6 +62,7 @@ public class UpdateSolidFireVirtualNetworkCmd extends BaseCmd {
@Parameter(name = ApiHelper.SVIP, type = CommandType.STRING, description = ApiHelper.SOLIDFIRE_SVIP_DESC, required = true)
private String _svip;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -91,7 +92,7 @@ public class UpdateSolidFireVirtualNetworkCmd extends BaseCmd {
SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.updateSolidFireVirtualNetwork(_id, _name, _tag, _startIp, _size, _netmask, _svip);
- ApiSolidFireVirtualNetworkResponse response = ApiHelper.instance().getApiSolidFireVirtualNetworkResponse(sfVirtualNetwork, ResponseView.Full);
+ ApiSolidFireVirtualNetworkResponse response = _apiHelper.getApiSolidFireVirtualNetworkResponse(sfVirtualNetwork, ResponseView.Full);
response.setResponseName(getCommandName());
response.setObjectName("apiupdatesolidfirevirtualnetwork");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/CreateSolidFireVolumeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/CreateSolidFireVolumeCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/CreateSolidFireVolumeCmd.java
index e189e12..1f68346 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/CreateSolidFireVolumeCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/CreateSolidFireVolumeCmd.java
@@ -62,6 +62,7 @@ public class CreateSolidFireVolumeCmd extends BaseCmd {
description = ApiHelper.VIRTUAL_NETWORK_ID_DESC, required = true)
private long _sfVirtualNetworkId;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -85,9 +86,9 @@ public class CreateSolidFireVolumeCmd extends BaseCmd {
SfVolume sfVolume = _apiSolidFireService2.createSolidFireVolume(_name, _size, _minIops, _maxIops, _burstIops, _accountId, _sfVirtualNetworkId);
- ResponseView responseView = ApiHelper.instance().isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
+ ResponseView responseView = _apiHelper.isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
- ApiSolidFireVolumeResponse response = ApiHelper.instance().getApiSolidFireVolumeResponse(sfVolume, responseView);
+ ApiSolidFireVolumeResponse response = _apiHelper.getApiSolidFireVolumeResponse(sfVolume, responseView);
response.setResponseName(getCommandName());
response.setObjectName("apicreatesolidfirevolume");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/DeleteSolidFireVolumeCmd.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/DeleteSolidFireVolumeCmd.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/DeleteSolidFireVolumeCmd.java
index a3f6bb9..772b75c 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/DeleteSolidFireVolumeCmd.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/command/user/solidfire/DeleteSolidFireVolumeCmd.java
@@ -44,6 +44,7 @@ public class DeleteSolidFireVolumeCmd extends BaseCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ApiSolidFireVolumeResponse.class, description = ApiHelper.VOLUME_ID_DESC, required = true)
private long _id;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -77,9 +78,9 @@ public class DeleteSolidFireVolumeCmd extends BaseCmd {
SfVolume sfVolume = _apiSolidFireService2.deleteSolidFireVolume(_id);
- ResponseView responseView = ApiHelper.instance().isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
+ ResponseView responseView = _apiHelper.isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
- ApiSolidFireVolumeResponse response = ApiHelper.instance().getApiSolidFireVolumeResponse(sfVolume, responseView);
+ ApiSolidFireVolumeResponse response = _apiHelper.getApiSolidFireVolumeResponse(sfVolume, responseView);
response.setResponseName(getCommandName());
response.setObjectName("apideletesolidfirevolume");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/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
index 2ec91a1..358dfe6 100644
--- 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
@@ -86,9 +86,9 @@ public class ListSolidFireVirtualNetworksCmd extends BaseListCmd {
sfVirtualNetworks = _apiSolidFireService2.listSolidFireVirtualNetworks(_zoneId, _accountId);
}
- ResponseView responseView = ApiHelper.instance().isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
+ ResponseView responseView = _apiHelper.isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
- List<ApiSolidFireVirtualNetworkResponse> responses = ApiHelper.instance().getApiSolidFireVirtualNetworkResponse(sfVirtualNetworks, responseView);
+ List<ApiSolidFireVirtualNetworkResponse> responses = _apiHelper.getApiSolidFireVirtualNetworkResponse(sfVirtualNetworks, responseView);
ListResponse<ApiSolidFireVirtualNetworkResponse> listReponse = new ListResponse<>();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/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
index 2e8c56e..3890f11 100644
--- 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
@@ -45,6 +45,7 @@ public class ListSolidFireVolumesCmd extends BaseListCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ApiSolidFireVolumeResponse.class, description = ApiHelper.VOLUME_ID_DESC)
private Long _id;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -76,9 +77,9 @@ public class ListSolidFireVolumesCmd extends BaseListCmd {
sfVolumes = _apiSolidFireService2.listSolidFireVolumes();
}
- ResponseView responseView = ApiHelper.instance().isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
+ ResponseView responseView = _apiHelper.isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
- List<ApiSolidFireVolumeResponse> responses = ApiHelper.instance().getApiSolidFireVolumeResponse(sfVolumes, responseView);
+ List<ApiSolidFireVolumeResponse> responses = _apiHelper.getApiSolidFireVolumeResponse(sfVolumes, responseView);
ListResponse<ApiSolidFireVolumeResponse> listReponse = new ListResponse<>();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/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
index 0e494d9..3b1e6b7 100644
--- 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
@@ -56,6 +56,7 @@ public class UpdateSolidFireVolumeCmd extends BaseCmd {
@Parameter(name = ApiHelper.BURST_IOPS, type = CommandType.LONG, description = ApiHelper.BURST_IOPS_DESC, required = true)
private long _burstIops;
+ @Inject private ApiHelper _apiHelper;
@Inject private ApiSolidFireService2 _apiSolidFireService2;
/////////////////////////////////////////////////////
@@ -88,9 +89,9 @@ public class UpdateSolidFireVolumeCmd extends BaseCmd {
SfVolume sfVolume = _apiSolidFireService2.updateSolidFireVolume(_id, _size, _minIops, _maxIops, _burstIops);
- ResponseView responseView = ApiHelper.instance().isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
+ ResponseView responseView = _apiHelper.isRootAdmin() ? ResponseView.Full : ResponseView.Restricted;
- ApiSolidFireVolumeResponse response = ApiHelper.instance().getApiSolidFireVolumeResponse(sfVolume, responseView);
+ ApiSolidFireVolumeResponse response = _apiHelper.getApiSolidFireVolumeResponse(sfVolume, responseView);
response.setResponseName(getCommandName());
response.setObjectName("apiupdatesolidfirevolume");
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
index 89c48eb..b042499 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
@@ -27,8 +27,6 @@ import com.cloud.user.dao.AccountDao;
import com.cloud.utils.exception.CloudRuntimeException;
public class ApiHelper {
- private static ApiHelper s_apiHelperInstance = new ApiHelper();
-
public static final String MVIP = "mvip";
public static final String SVIP = "svip";
public static final String CLUSTER_NAME = "clustername";
@@ -80,10 +78,6 @@ public class ApiHelper {
private ApiHelper() {
}
- public static ApiHelper instance() {
- return s_apiHelperInstance;
- }
-
public ApiSolidFireClusterResponse getApiSolidFireClusterResponse(SfCluster sfCluster) {
ApiSolidFireClusterResponse sfResponse = new ApiSolidFireClusterResponse();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8cd28278/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 7c585a8..58ebc4b 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -109,6 +109,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
@Inject private AccountDao _accountDao;
@Inject private AccountDetailsDao _accountDetailsDao;
@Inject private AccountManager _accountMgr;
+ @Inject private ApiHelper _apiHelper;
@Inject private DataCenterDao _zoneDao;
@Inject private SfClusterDao _sfClusterDao;
@Inject private SfVirtualNetworkDao _sfVirtualNetworkDao;
@@ -259,7 +260,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
final List<SfVirtualNetworkVO> sfVirtualNetworkVOs;
- if (ApiHelper.instance().isRootAdmin()) {
+ if (_apiHelper.isRootAdmin()) {
if (zoneId != null) {
if (accountId != null) {
sfVirtualNetworkVOs = filterVirtualNetworksByZone(_sfVirtualNetworkDao.findByAccountId(accountId), zoneId);
@@ -283,10 +284,10 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
if (zoneId != null) {
- sfVirtualNetworkVOs = filterVirtualNetworksByZone(_sfVirtualNetworkDao.findByAccountId(ApiHelper.instance().getCallingAccount().getId()), zoneId);
+ sfVirtualNetworkVOs = filterVirtualNetworksByZone(_sfVirtualNetworkDao.findByAccountId(_apiHelper.getCallingAccount().getId()), zoneId);
}
else {
- sfVirtualNetworkVOs = _sfVirtualNetworkDao.findByAccountId(ApiHelper.instance().getCallingAccount().getId());
+ sfVirtualNetworkVOs = _sfVirtualNetworkDao.findByAccountId(_apiHelper.getCallingAccount().getId());
}
}
@@ -396,13 +397,13 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
final List<SfVolumeVO> sfVolumeVOs;
- if (ApiHelper.instance().isRootAdmin()) {
+ if (_apiHelper.isRootAdmin()) {
sfVolumeVOs = _sfVolumeDao.listAll();
}
else {
sfVolumeVOs = new ArrayList<>();
- List<SfVirtualNetworkVO> sfVirtualNetworkVOs = _sfVirtualNetworkDao.findByAccountId(ApiHelper.instance().getCallingAccount().getId());
+ List<SfVirtualNetworkVO> sfVirtualNetworkVOs = _sfVirtualNetworkDao.findByAccountId(_apiHelper.getCallingAccount().getId());
if (sfVirtualNetworkVOs != null) {
for (SfVirtualNetwork sfVirtualNetwork : sfVirtualNetworkVOs) {
@@ -569,15 +570,15 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
private void verifyRootAdmin() {
- if (!ApiHelper.instance().isRootAdmin()) {
+ if (!_apiHelper.isRootAdmin()) {
throw new PermissionDeniedException("Only a root admin can perform this operation.");
}
}
private void verifyPermissionsForAccount(long accountId) {
- Account account = ApiHelper.instance().getCallingAccount();
+ Account account = _apiHelper.getCallingAccount();
- if (ApiHelper.instance().isRootAdmin(account.getId())) {
+ if (_apiHelper.isRootAdmin(account.getId())) {
return; // permissions OK
}
[02/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Add temp icon
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5727c3ed
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5727c3ed
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5727c3ed
Branch: refs/heads/sf-plugins
Commit: 5727c3edfd97987ad185ccd4f62cdbeac7de6940
Parents: 7b93d8a
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Mon Jul 6 19:34:18 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:17 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/icon.png | Bin 0 -> 7943 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5727c3ed/ui/plugins/sfSharedVolume/icon.png
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/icon.png b/ui/plugins/sfSharedVolume/icon.png
new file mode 100644
index 0000000..a313d35
Binary files /dev/null and b/ui/plugins/sfSharedVolume/icon.png differ
[33/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Return the account name and the zone name and make use of the account name
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9cff6a78
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9cff6a78
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9cff6a78
Branch: refs/heads/sf-plugins
Commit: 9cff6a78568a77a0e9955ae9dfb860f66d860a5d
Parents: d8154cc
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Mon Jul 20 23:12:02 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:22 2015 -0600
----------------------------------------------------------------------
.../apache/cloudstack/api/helper/ApiHelper.java | 2 ++
.../ApiSolidFireVirtualNetworkResponse.java | 24 ++++++++++++++++++++
ui/plugins/sfAdministration/sfAdministration.js | 2 +-
3 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9cff6a78/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
index b042499..c93040e 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/helper/ApiHelper.java
@@ -127,6 +127,7 @@ public class ApiHelper {
Account account = _accountDao.findById(sfVirtualNetwork.getAccountId());
sfResponse.setAccountUuid(account.getUuid());
+ sfResponse.setAccountName(account.getAccountName());
SfCluster sfCluster = _sfClusterDao.findById(sfVirtualNetwork.getSfClusterId());
@@ -135,6 +136,7 @@ public class ApiHelper {
DataCenterVO dataCenterVO = _zoneDao.findById(sfCluster.getZoneId());
sfResponse.setZoneUuid(dataCenterVO.getUuid());
+ sfResponse.setZoneName(dataCenterVO.getName());
if (ResponseView.Full.equals(responseView)) {
sfResponse.setTag(sfVirtualNetwork.getTag());
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9cff6a78/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVirtualNetworkResponse.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVirtualNetworkResponse.java b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVirtualNetworkResponse.java
index 2764019..0001825 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVirtualNetworkResponse.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/api/response/ApiSolidFireVirtualNetworkResponse.java
@@ -67,6 +67,10 @@ public class ApiSolidFireVirtualNetworkResponse extends BaseResponse {
@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;
@@ -75,6 +79,10 @@ public class ApiSolidFireVirtualNetworkResponse extends BaseResponse {
@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;
@@ -159,6 +167,14 @@ public class ApiSolidFireVirtualNetworkResponse extends BaseResponse {
return _accountUuid;
}
+ public void setAccountName(String accountName) {
+ _accountName = accountName;
+ }
+
+ public String getAccountName() {
+ return _accountName;
+ }
+
public void setZoneId(long zoneId) {
_zoneId = zoneId;
}
@@ -175,6 +191,14 @@ public class ApiSolidFireVirtualNetworkResponse extends BaseResponse {
return _zoneUuid;
}
+ public void setZoneName(String zoneName) {
+ _zoneName = zoneName;
+ }
+
+ public String getZoneName() {
+ return _zoneName;
+ }
+
public void setClusterName(String clusterName) {
_clusterName = clusterName;
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9cff6a78/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index 46ac7f2..7afeeda 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -307,7 +307,7 @@
name: { label: 'label.name' },
tag: { label: 'Tag' },
svip: { label: 'SVIP' },
- account: { label: 'label.account' }
+ accountname: { label: 'label.account' }
},
dataProvider: function(args) {
var clustername = args.context.sfAdministration[0].name;
[39/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Add and use an API to retrieve the virtual networks of a particular cluster
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d8154cce
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d8154cce
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d8154cce
Branch: refs/heads/sf-plugins
Commit: d8154ccea5f366ffa20fb26592d97a10ff2937fd
Parents: c716155
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Mon Jul 20 15:39:58 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:22 2015 -0600
----------------------------------------------------------------------
.../ListSolidFireVirtualNetworksCmd.java | 8 ++++-
.../solidfire/ApiSolidFireService2.java | 4 ++-
.../solidfire/ApiSolidFireServiceImpl2.java | 31 ++++++++++++++++++--
ui/plugins/sfAdministration/sfAdministration.js | 4 +--
4 files changed, 41 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8154cce/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
index 358dfe6..2f380e7 100644
--- 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
@@ -49,6 +49,9 @@ public class ListSolidFireVirtualNetworksCmd extends BaseListCmd {
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ApiSolidFireVirtualNetworkResponse.class, description = ApiHelper.VIRTUAL_NETWORK_ID_DESC)
private Long _id;
+ @Parameter(name = ApiHelper.CLUSTER_NAME, type = CommandType.STRING, description = ApiHelper.SOLIDFIRE_CLUSTER_NAME_DESC, required = true)
+ private String _clusterName;
+
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = ApiHelper.ZONE_ID_DESC)
private Long _zoneId;
@@ -76,12 +79,15 @@ public class ListSolidFireVirtualNetworksCmd extends BaseListCmd {
if (_id != null) {
sfVirtualNetworks = new ArrayList<>();
- SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.listSolidFireVirtualNetwork(_id);
+ SfVirtualNetwork sfVirtualNetwork = _apiSolidFireService2.listSolidFireVirtualNetworkById(_id);
if (sfVirtualNetwork != null) {
sfVirtualNetworks.add(sfVirtualNetwork);
}
}
+ else if (_clusterName != null) {
+ sfVirtualNetworks = _apiSolidFireService2.listSolidFireVirtualNetworkByClusterName(_clusterName);
+ }
else {
sfVirtualNetworks = _apiSolidFireService2.listSolidFireVirtualNetworks(_zoneId, _accountId);
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8154cce/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
index 07f200a..e6ed7d2 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireService2.java
@@ -42,7 +42,9 @@ public interface ApiSolidFireService2 extends PluggableService, Configurable {
// ********** VLAN-related commands **********
- SfVirtualNetwork listSolidFireVirtualNetwork(long id);
+ 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)
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8154cce/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index b626c67..208e62a 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -244,8 +244,8 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
@Override
- public SfVirtualNetwork listSolidFireVirtualNetwork(long id) {
- s_logger.info("listSolidFireVirtualNetwork invoked");
+ public SfVirtualNetwork listSolidFireVirtualNetworkById(long id) {
+ s_logger.info("listSolidFireVirtualNetworkById invoked");
SfVirtualNetwork sfVirtualNetwork = getSfVirtualNetwork(id);
@@ -255,6 +255,17 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
}
@Override
+ public List<SfVirtualNetwork> listSolidFireVirtualNetworkByClusterName(String clusterName) {
+ s_logger.info("listSolidFireVirtualNetworkByClusterName invoked");
+
+ verifyRootAdmin();
+
+ SfCluster sfCluster = getSfCluster(clusterName);
+
+ return filterVirtualNetworksByCluster(_sfVirtualNetworkDao.listAll(), sfCluster.getId());
+ }
+
+ @Override
public List<SfVirtualNetwork> listSolidFireVirtualNetworks(Long zoneId, Long accountId) {
s_logger.info("listSolidFireVirtualNetworks invoked");
@@ -979,6 +990,22 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
_accountDetailsDao.persist(accountDetail);
}
+ private List<SfVirtualNetwork> filterVirtualNetworksByCluster(List<SfVirtualNetworkVO> sfVirtualNetworkVOs, long clusterId) {
+ List<SfVirtualNetwork> sfVirtualNetworkVOsToReturn = new ArrayList<>();
+
+ if (sfVirtualNetworkVOs != null) {
+ for (SfVirtualNetworkVO sfVirtualNetworkVO : sfVirtualNetworkVOs) {
+ long sfClusterId = sfVirtualNetworkVO.getSfClusterId();
+
+ if (sfClusterId == clusterId) {
+ sfVirtualNetworkVOsToReturn.add(sfVirtualNetworkVO);
+ }
+ }
+ }
+
+ return sfVirtualNetworkVOsToReturn;
+ }
+
private List<SfVirtualNetworkVO> filterVirtualNetworksByZone(List<SfVirtualNetworkVO> sfVirtualNetworkVOs, long zoneId) {
List<SfVirtualNetworkVO> sfVirtualNetworkVOsToReturn = new ArrayList<>();
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8154cce/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index be1be98..46ac7f2 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -310,9 +310,9 @@
account: { label: 'label.account' }
},
dataProvider: function(args) {
- var virtualnetworkid = args.context.virtualnetwork[0].id;
+ var clustername = args.context.sfAdministration[0].name;
- plugin.ui.apiCall('listSolidFireVirtualNetworks&' + virtualnetworkid, {
+ plugin.ui.apiCall('listSolidFireVirtualNetworks&clustername=' + clustername, {
success: function(json) {
var sfvirtualnetworksfiltered = [];
var sfvirtualnetworks = json.listsolidfirevirtualnetworksresponse.sfvirtualnetwork;
[32/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Corrected a property reference when attempting to delete a cluster
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9a0e7b9c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9a0e7b9c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9a0e7b9c
Branch: refs/heads/sf-plugins
Commit: 9a0e7b9c0dcf4fd33d4e57bd71a751a00052cb21
Parents: c3ccab0
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 15 20:00:44 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:21 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9a0e7b9c/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index d2b568e..4c843ee 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -207,7 +207,7 @@
},
action: function(args) {
$.ajax({
- url: createURL('deleteReferenceToSolidFireCluster&name=' + args.context.sfSharedVolumes[0].name),
+ url: createURL('deleteReferenceToSolidFireCluster&name=' + args.context.sfAdministration[0].name),
success: function(json) {
args.response.success();
},
[25/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Display volume details
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cb933f2e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cb933f2e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cb933f2e
Branch: refs/heads/sf-plugins
Commit: cb933f2e0075276d5ce689fad8857c1065c9cfa4
Parents: a6e84ed
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Thu Jul 9 17:02:01 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:20 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb933f2e/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index ab76ff3..c37d9c3 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -313,20 +313,15 @@
}
}
],
- tags: cloudStack.api.tags({
- resourceType: 'Volume',
- contextId: 'volumes'
- }),
dataProvider: function(args) {
$.ajax({
- url: createURL("listSolidFireVolumes&id=" + args.context.volumes[0].id),
+ url: createURL("listSolidFireVolumes&id=" + args.context.sfSharedVolumes[0].id),
dataType: "json",
async: true,
success: function(json) {
var jsonObj = json.listsolidfirevolumesresponse.sfvolume[0];
args.response.success({
- actionFilter: volumeActionfilter,
data: jsonObj
});
}
[06/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Add account combo box to Add Shared Volume window
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cc64dc1d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cc64dc1d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cc64dc1d
Branch: refs/heads/sf-plugins
Commit: cc64dc1d5849625b8d2bc1e1c07742a33f8dcce5
Parents: 18800c9
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 7 17:38:26 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:18 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 39 ++++++++++++++++++------
1 file changed, 30 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cc64dc1d/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index c6371ca..f8f3aaf 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -69,14 +69,14 @@
}
},
name: {
- label: 'label.name',
+ label: 'label.name',
docID: 'helpVolumeName',
validation: {
required: true
}
},
diskSize: {
- label: 'label.disk.size.gb',
+ label: 'label.disk.size.gb',
validation: {
required: true,
number: true
@@ -103,6 +103,27 @@
number: true
}
},
+ account: {
+ label: 'Account',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listAccounts"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var accountObjs = json.listaccountsresponse.account;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: accountObjs
+ });
+ }
+ });
+ }
+ },
vlan: {
label: 'VLAN',
validation: {
@@ -126,22 +147,22 @@
}
}
},
- action: function(args) {
+ action: function(args) {
var data = {
name: args.data.name,
- size: args.data.diskSize,
+ size: args.data.diskSize,
miniops: args.data.minIops,
maxiops: args.data.maxIops,
- burstiops: args.data.burstIops,
- sfvirtualnetworkid: args.data.vlan,
- accountid: 2
+ burstiops: args.data.burstIops,
+ accountid: args.data.account,
+ sfvirtualnetworkid: args.data.vlan
};
$.ajax({
url: createURL('createSolidFireVolume'),
data: data,
success: function(json) {
- var sfvolumeObj = json.createsolidfirevolumeresponse.apicreatesolidfirevolume;
+ var sfvolumeObj = json.createsolidfirevolumeresponse.apicreatesolidfirevolume;
args.response.success({
data: sfvolumeObj
@@ -151,7 +172,7 @@
args.response.error(parseXMLHttpResponse(json));
}
});
- }
+ }
}
},
detailView: {
[14/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Adding in additional checks on "availabilityZone" and "account"
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/862841a6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/862841a6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/862841a6
Branch: refs/heads/sf-plugins
Commit: 862841a6e509befc48b98fea3b07bc8a73b1a4e0
Parents: 85e90ca
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 8 22:46:41 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:19 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/862841a6/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index 5835edd..a1a72fc 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -157,7 +157,8 @@
},
dependsOn: ['availabilityZone', 'account'],
select: function(args) {
- if (args.data.availabilityZone == null || args.data.account == null) {
+ if (args.data.availabilityZone == null || args.data.availabilityZone == "" ||
+ args.data.account == null || args.data.account == "") {
return;
}
[38/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Adding in Virtual Networks panel
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c7161556
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c7161556
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c7161556
Branch: refs/heads/sf-plugins
Commit: c71615561571c12d81719f6a500a63fe2c5385ac
Parents: f6f2ba6
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Sat Jul 18 23:33:57 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:22 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 538 +++++++++++--------
1 file changed, 300 insertions(+), 238 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c7161556/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index bdb467b..be1be98 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -3,278 +3,340 @@
plugin.ui.addSection({
id: 'sfAdministration',
title: 'SolidFire Administration',
+ sectionSelect: {
+ label: 'label.select-view',
+ preFilter: function() {
+ return ['sfAdministration'];
+ }
+ },
preFilter: function(args) {
return isAdmin();
},
- listView: {
- id: 'sfAdministration',
- fields: {
- name: { label: 'label.name' },
- mvip: { label: 'MVIP' },
- username: { label: 'Username' },
- zonename: { label: 'label.zone' }
- },
- dataProvider: function(args) {
- plugin.ui.apiCall('listSolidFireClusters', {
- success: function(json) {
- var sfclustersfiltered = [];
- var sfclusters = json.listsolidfireclustersresponse.sfcluster;
- var search = args.filterBy.search.value == null ? "" : args.filterBy.search.value.toLowerCase();
-
- if (search == "") {
- sfclustersfiltered = sfclusters;
- }
- else {
- for (i = 0; i < sfclusters.length; i++) {
- sfcluster = sfclusters[i];
+ sections: {
+ sfAdministration: {
+ id: 'sfAdministration',
+ type: 'select',
+ title: 'SolidFire Clusters',
+ listView: {
+ section: 'sfAdministration',
+ id: 'sfAdministration',
+ fields: {
+ name: { label: 'label.name' },
+ mvip: { label: 'MVIP' },
+ username: { label: 'Username' },
+ zonename: { label: 'label.zone' }
+ },
+ dataProvider: function(args) {
+ plugin.ui.apiCall('listSolidFireClusters', {
+ success: function(json) {
+ var sfclustersfiltered = [];
+ var sfclusters = json.listsolidfireclustersresponse.sfcluster;
+ var search = args.filterBy.search.value == null ? "" : args.filterBy.search.value.toLowerCase();
- if (sfcluster.name.toLowerCase().indexOf(search) > -1 ) {
- sfclustersfiltered.push(sfcluster);
+ if (search == "") {
+ sfclustersfiltered = sfclusters;
}
- }
- }
-
- args.response.success({ data: sfclustersfiltered });
- },
- error: function(errorMessage) {
- args.response.error(errorMessage);
- }
- });
- },
- actions: {
- add: {
- label: 'Add Reference to Cluster',
- preFilter: function(args) {
- return true;
- },
- messages: {
- confirm: function(args) {
- return 'Please fill in the following data to add a new reference to a cluster.';
- },
- notification: function(args) {
- return 'Add Reference to Cluster';
- }
- },
- createForm: {
- title: 'Add Reference to Cluster',
- desc: 'Please fill in the following data to add a new reference to a cluster.',
- fields: {
- availabilityZone: {
- label: 'label.availability.zone',
- docID: 'helpVolumeAvailabilityZone',
- validation: {
- required: true
- },
- select: function(args) {
- $.ajax({
- url: createURL("listZones&available=true"),
- dataType: "json",
- async: true,
- success: function(json) {
- var zoneObjs = json.listzonesresponse.zone;
+ else {
+ for (i = 0; i < sfclusters.length; i++) {
+ sfcluster = sfclusters[i];
- args.response.success({
- descriptionField: 'name',
- data: zoneObjs
- });
+ if (sfcluster.name.toLowerCase().indexOf(search) > -1 ) {
+ sfclustersfiltered.push(sfcluster);
}
- });
- }
- },
- mvip: {
- label: 'MVIP',
- validation: {
- required: true
- }
- },
- username: {
- label: 'label.username',
- docID: 'helpUserUsername',
- validation: {
- required: true
- }
- },
- password: {
- label: 'label.password',
- docID: 'helpUserPassword',
- isPassword: true,
- validation: {
- required: true
+ }
}
+
+ args.response.success({ data: sfclustersfiltered });
},
- totalCapacity: {
- label: 'Total Capacity',
- validation: {
- required: true,
- number: true
- }
+ error: function(errorMessage) {
+ args.response.error(errorMessage);
+ }
+ });
+ },
+ actions: {
+ add: {
+ label: 'Add Reference to Cluster',
+ preFilter: function(args) {
+ return true;
},
- totalMinIops: {
- label: 'Total Min IOPS',
- validation: {
- required: true,
- number: true
+ messages: {
+ confirm: function(args) {
+ return 'Please fill in the following data to add a new reference to a cluster.';
+ },
+ notification: function(args) {
+ return 'Add Reference to Cluster';
}
},
- totalMaxIops: {
- label: 'Total Max IOPS',
- validation: {
- required: true,
- number: true
+ createForm: {
+ title: 'Add Reference to Cluster',
+ desc: 'Please fill in the following data to add a new reference to a cluster.',
+ fields: {
+ availabilityZone: {
+ label: 'label.availability.zone',
+ docID: 'helpVolumeAvailabilityZone',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listZones&available=true"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var zoneObjs = json.listzonesresponse.zone;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: zoneObjs
+ });
+ }
+ });
+ }
+ },
+ mvip: {
+ label: 'MVIP',
+ validation: {
+ required: true
+ }
+ },
+ username: {
+ label: 'label.username',
+ docID: 'helpUserUsername',
+ validation: {
+ required: true
+ }
+ },
+ password: {
+ label: 'label.password',
+ docID: 'helpUserPassword',
+ isPassword: true,
+ validation: {
+ required: true
+ }
+ },
+ totalCapacity: {
+ label: 'Total Capacity',
+ validation: {
+ required: true,
+ number: true
+ }
+ },
+ totalMinIops: {
+ label: 'Total Min IOPS',
+ validation: {
+ required: true,
+ number: true
+ }
+ },
+ totalMaxIops: {
+ label: 'Total Max IOPS',
+ validation: {
+ required: true,
+ number: true
+ }
+ },
+ totalBurstIops: {
+ label: 'Total Burst IOPS',
+ validation: {
+ required: true,
+ number: true
+ }
+ }
}
},
- totalBurstIops: {
- label: 'Total Burst IOPS',
- validation: {
- required: true,
- number: true
- }
- }
- }
- },
- action: function(args) {
- var data = {
- zoneid: args.data.availabilityZone,
- mvip: args.data.mvip,
- username: args.data.username,
- password: args.data.password,
- totalcapacity: args.data.totalCapacity,
- totalminiops: args.data.totalMinIops,
- totalmaxiops: args.data.totalMaxIops,
- totalburstiops: args.data.totalBurstIops
- };
+ action: function(args) {
+ var data = {
+ zoneid: args.data.availabilityZone,
+ mvip: args.data.mvip,
+ username: args.data.username,
+ password: args.data.password,
+ totalcapacity: args.data.totalCapacity,
+ totalminiops: args.data.totalMinIops,
+ totalmaxiops: args.data.totalMaxIops,
+ totalburstiops: args.data.totalBurstIops
+ };
- $.ajax({
- url: createURL('createReferenceToSolidFireCluster'),
- data: data,
- success: function(json) {
- var sfclusterObj = json.createreferencetosolidfireclusterresponse.apicreatereferencetosolidfirecluster;
+ $.ajax({
+ url: createURL('createReferenceToSolidFireCluster'),
+ data: data,
+ success: function(json) {
+ var sfclusterObj = json.createreferencetosolidfireclusterresponse.apicreatereferencetosolidfirecluster;
- args.response.success({
- data: sfclusterObj
+ args.response.success({
+ data: sfclusterObj
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
});
- },
- error: function(json) {
- args.response.error(parseXMLHttpResponse(json));
- }
- });
- }
- }
- },
- detailView: {
- name: 'label.details',
- actions: {
- edit: {
- label: 'label.edit',
- messages: {
- notification: function(args) {
- return 'Edit Cluster';
}
+ }
+ },
+ detailView: {
+ name: 'label.details',
+ viewAll: {
+ path: 'sfAdministration.sfVirtualNetworks',
+ label: 'Virtual Networks'
},
- action: function (args) {
- var params = [];
+ actions: {
+ edit: {
+ label: 'label.edit',
+ messages: {
+ notification: function(args) {
+ return 'Edit Cluster';
+ }
+ },
+ action: function (args) {
+ var params = [];
- params.push("&name=" + args.context.sfAdministration[0].name);
- params.push("&totalcapacity=" + args.data.totalcapacity);
- params.push("&totalminiops=" + args.data.totalminiops);
- params.push("&totalmaxiops=" + args.data.totalmaxiops);
- params.push("&totalburstiops=" + args.data.totalburstiops);
+ params.push("&name=" + args.context.sfAdministration[0].name);
+ params.push("&totalcapacity=" + args.data.totalcapacity);
+ params.push("&totalminiops=" + args.data.totalminiops);
+ params.push("&totalmaxiops=" + args.data.totalmaxiops);
+ params.push("&totalburstiops=" + args.data.totalburstiops);
- $.ajax({
- url: createURL('updateReferenceToSolidFireCluster' + params.join("")),
- success: function(json) {
- var sfclusterObj = json.updatereferencetosolidfireclusterresponse.apiupdatereferencetosolidfirecluster;
+ $.ajax({
+ url: createURL('updateReferenceToSolidFireCluster' + params.join("")),
+ success: function(json) {
+ var sfclusterObj = json.updatereferencetosolidfireclusterresponse.apiupdatereferencetosolidfirecluster;
- args.response.success({
- data: sfclusterObj
+ args.response.success({
+ data: sfclusterObj
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
});
- },
- error: function(json) {
- args.response.error(parseXMLHttpResponse(json));
}
- });
- }
- },
- remove: {
- label: 'Delete Reference to Cluster',
- messages: {
- confirm: function(args) {
- return 'Are you sure you would like to delete this reference to a SolidFire cluster?';
},
- notification: function(args) {
- return 'Delete Reference to Cluster';
+ remove: {
+ label: 'Delete Reference to Cluster',
+ messages: {
+ confirm: function(args) {
+ return 'Are you sure you would like to delete this reference to a SolidFire cluster?';
+ },
+ notification: function(args) {
+ return 'Delete Reference to Cluster';
+ }
+ },
+ action: function(args) {
+ $.ajax({
+ url: createURL('deleteReferenceToSolidFireCluster&name=' + args.context.sfAdministration[0].name),
+ success: function(json) {
+ args.response.success();
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
}
},
- action: function(args) {
- $.ajax({
- url: createURL('deleteReferenceToSolidFireCluster&name=' + args.context.sfAdministration[0].name),
- success: function(json) {
- args.response.success();
+ tabs: {
+ details: {
+ title: 'label.details',
+ preFilter: function(args) {
+ return [];
},
- error: function(json) {
- args.response.error(parseXMLHttpResponse(json));
+ fields: [
+ {
+ name: {
+ label: 'label.name'
+ }
+ },
+ {
+ uuid: {
+ label: 'label.id'
+ },
+ zonename: {
+ label: 'label.zone'
+ },
+ mvip: {
+ label: 'MVIP'
+ },
+ username: {
+ label: 'Username'
+ },
+ totalcapacity: {
+ label: 'Total Capacity',
+ isEditable: true
+ },
+ totalminiops: {
+ label: 'Total Min IOPS',
+ isEditable: true
+ },
+ totalmaxiops: {
+ label: 'Total Max IOPS',
+ isEditable: true
+ },
+ totalburstiops: {
+ label: 'Total Burst IOPS',
+ isEditable: true
+ }
+ }
+ ],
+ dataProvider: function(args) {
+ $.ajax({
+ url: createURL("listSolidFireClusters&name=" + args.context.sfAdministration[0].name),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var jsonObj = json.listsolidfireclustersresponse.sfcluster[0];
+
+ args.response.success({
+ data: jsonObj
+ });
+ }
+ });
}
- });
+ }
}
}
- },
- tabs: {
- details: {
- title: 'label.details',
- preFilter: function(args) {
- return [];
- },
- fields: [
- {
- name: {
- label: 'label.name'
- }
- },
- {
- uuid: {
- label: 'label.id'
- },
- zonename: {
- label: 'label.zone'
- },
- mvip: {
- label: 'MVIP'
- },
- username: {
- label: 'Username'
- },
- totalcapacity: {
- label: 'Total Capacity',
- isEditable: true
- },
- totalminiops: {
- label: 'Total Min IOPS',
- isEditable: true
- },
- totalmaxiops: {
- label: 'Total Max IOPS',
- isEditable: true
- },
- totalburstiops: {
- label: 'Total Burst IOPS',
- isEditable: true
+ }
+ },
+ sfVirtualNetworks: {
+ id: 'sfVirtualNetworks',
+ type: 'select',
+ title: 'SolidFire Virtual Networks',
+ listView: {
+ section: 'sfVirtualNetworks',
+ id: 'sfVirtualNetworks',
+ fields: {
+ name: { label: 'label.name' },
+ tag: { label: 'Tag' },
+ svip: { label: 'SVIP' },
+ account: { label: 'label.account' }
+ },
+ dataProvider: function(args) {
+ var virtualnetworkid = args.context.virtualnetwork[0].id;
+
+ plugin.ui.apiCall('listSolidFireVirtualNetworks&' + virtualnetworkid, {
+ success: function(json) {
+ var sfvirtualnetworksfiltered = [];
+ var sfvirtualnetworks = json.listsolidfirevirtualnetworksresponse.sfvirtualnetwork;
+ var search = args.filterBy.search.value == null ? "" : args.filterBy.search.value.toLowerCase();
+
+ if (search == "") {
+ sfvirtualnetworksfiltered = sfvirtualnetworks;
}
- }
- ],
- dataProvider: function(args) {
- $.ajax({
- url: createURL("listSolidFireClusters&name=" + args.context.sfAdministration[0].name),
- dataType: "json",
- async: true,
- success: function(json) {
- var jsonObj = json.listsolidfireclustersresponse.sfcluster[0];
+ else {
+ for (i = 0; i < sfvirtualnetworks.length; i++) {
+ sfvirtualnetwork = sfvirtualnetworks[i];
- args.response.success({
- data: jsonObj
- });
+ if (sfvirtualnetwork.name.toLowerCase().indexOf(search) > -1 ) {
+ sfvirtualnetworksfiltered.push(sfvirtualnetwork);
+ }
+ }
}
- });
- }
+
+ args.response.success({ data: sfvirtualnetworksfiltered });
+ },
+ error: function(errorMessage) {
+ args.response.error(errorMessage);
+ }
+ });
}
}
}
[35/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Extending functionality related to virtual networks
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/589041df
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/589041df
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/589041df
Branch: refs/heads/sf-plugins
Commit: 589041df1c14ca983a91fc7335c3af43e57584b9
Parents: 80ab54c
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 21 17:32:51 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:22 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 154 +++++++++++++++++++
1 file changed, 154 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/589041df/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index cbabf39..158b714 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -468,6 +468,160 @@
}
}
}
+ },
+ action: function(args) {
+ var data = {
+ clustername: args.context.sfAdministration[0].name,
+ name: args.data.name,
+ tag: args.data.tag,
+ startip: args.data.startip,
+ size: 10, // Mike T. args.data.size,
+ netmask: args.data.netmask,
+ svip: args.data.svip,
+ accountid: args.data.account
+ };
+
+ $.ajax({
+ url: createURL('createSolidFireVirtualNetwork'),
+ data: data,
+ success: function(json) {
+ var sfVirtualNetworkObj = json.createsolidfirevirtualnetworkresponse.apicreatesolidfirevirtualnetwork;
+
+ args.response.success({
+ data: sfVirtualNetworkObj
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ }
+ },
+ detailView: {
+ name: 'label.details',
+ actions: {
+ edit: {
+ label: 'label.edit',
+ messages: {
+ notification: function(args) {
+ return 'Edit Virtual Network';
+ }
+ },
+ action: function (args) {
+ var params = [];
+
+ params.push("&name=" + args.context.name);
+ params.push("&tag=" + args.data.tag);
+ params.push("&startip=" + args.data.startip);
+ params.push("&size=" + "10"); // Mike T. args.data.size);
+ params.push("&netmask=" + args.data.netmask);
+ params.push("&svip=" + args.data.svip);
+
+ $.ajax({
+ url: createURL('updateSolidFireVirtualNetwork' + params.join("")),
+ success: function(json) {
+ var sfVirtualNetworkObj = json.updatesolidfirevirtualnetworkresponse.apiupdatesolidfirevirtualnetwork;
+
+ args.response.success({
+ data: sfVirtualNetworkObj
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ },
+ remove: {
+ label: 'Delete Virtual Network',
+ messages: {
+ confirm: function(args) {
+ return 'Are you sure you would like to delete this virtual network?';
+ },
+ notification: function(args) {
+ return 'Delete Virtual Network';
+ }
+ },
+ action: function(args) {
+ $.ajax({
+ url: createURL('deleteSolidFireVirtualNetwork&id=' + args.context.sfVirtualNetwork[0].id),
+ success: function(json) {
+ args.response.success();
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ }
+ },
+ tabs: {
+ details: {
+ title: 'label.details',
+ preFilter: function(args) {
+ return [];
+ },
+ fields: [
+ {
+ name: {
+ label: 'label.name',
+ isEditable: true
+ }
+ },
+ {
+ uuid: {
+ label: 'label.id'
+ },
+ accountname: {
+ label: 'label.account'
+ },
+ tag: {
+ label: 'Tag',
+ isEditable: true
+ },
+ physicalnetwork: {
+ label: 'Physical Network'
+ },
+ networkoffering: {
+ label: 'Network Offering'
+ },
+ gateway: {
+ label: 'Gateway',
+ isEditable: true
+ },
+ netmask: {
+ label: 'Netmask',
+ isEditable: true
+ },
+ startip: {
+ label: 'Start IP',
+ isEditable: true
+ },
+ endip: {
+ label: 'End IP',
+ isEditable: true
+ },
+ svip: {
+ label: 'SVIP',
+ isEditable: true
+ }
+ }
+ ],
+ dataProvider: function(args) {
+ $.ajax({
+ url: createURL("listSolidFireVirtualNetworks&id=" + args.context.sfVirtualNetwork[0].id),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var jsonObj = json.listsolidfirevirtualnetworksresponse.sfvirtualnetwork[0];
+
+ args.response.success({
+ data: jsonObj
+ });
+ }
+ });
+ }
}
}
}
[26/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Adding GUI plug-in for root admins to control infrastructure for shared volumes
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/be5f7da9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/be5f7da9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/be5f7da9
Branch: refs/heads/sf-plugins
Commit: be5f7da964bc2527fd87b8c15b0d654b1aaaafef
Parents: 756c5ce
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 15 18:20:37 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:21 2015 -0600
----------------------------------------------------------------------
ui/plugins/plugins.js | 3 +-
ui/plugins/sfAdministration/config.js | 9 +
ui/plugins/sfAdministration/icon.png | Bin 0 -> 7943 bytes
ui/plugins/sfAdministration/sfAdministration.js | 284 +++++++++++++++++++
4 files changed, 295 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5f7da9/ui/plugins/plugins.js
----------------------------------------------------------------------
diff --git a/ui/plugins/plugins.js b/ui/plugins/plugins.js
index 6e5557f..d115eef 100644
--- a/ui/plugins/plugins.js
+++ b/ui/plugins/plugins.js
@@ -17,6 +17,7 @@
(function($, cloudStack) {
cloudStack.plugins = [
// 'testPlugin',
- // 'sfSharedVolume'
+ // 'sfSharedVolume',
+ // 'sfAdministration'
];
}(jQuery, cloudStack));
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5f7da9/ui/plugins/sfAdministration/config.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/config.js b/ui/plugins/sfAdministration/config.js
new file mode 100644
index 0000000..7e8bb61
--- /dev/null
+++ b/ui/plugins/sfAdministration/config.js
@@ -0,0 +1,9 @@
+(function (cloudStack) {
+ cloudStack.plugins.sfSharedVolume.config = {
+ title: 'SolidFire Administration',
+ desc: 'SolidFire Administration',
+ externalLink: 'http://www.solidfire.com/',
+ authorName: 'Mike Tutkowski',
+ authorEmail: 'mike.tutkowski@solidfire.com'
+ };
+}(cloudStack));
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5f7da9/ui/plugins/sfAdministration/icon.png
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/icon.png b/ui/plugins/sfAdministration/icon.png
new file mode 100644
index 0000000..a313d35
Binary files /dev/null and b/ui/plugins/sfAdministration/icon.png differ
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/be5f7da9/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
new file mode 100644
index 0000000..c836576
--- /dev/null
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -0,0 +1,284 @@
+(function (cloudStack) {
+ cloudStack.plugins.sfAdministration = function(plugin) {
+ plugin.ui.addSection({
+ id: 'sfAdministration',
+ title: 'sfAdministration',
+ preFilter: function(args) {
+ return isAdmin();
+ },
+ listView: {
+ id: 'sfAdministration',
+ fields: {
+ name: { label: 'label.name' },
+ iqn: { label: 'MVIP' },
+ size: { label: 'Username' },
+ miniops: { label: 'label.zone' }
+ },
+ dataProvider: function(args) {
+ plugin.ui.apiCall('listSolidFireClusters', {
+ success: function(json) {
+ var sfclustersfiltered = [];
+ var sfclusters = json.listsolidfireclustersresponse.sfcluster;
+ var search = args.filterBy.search.value == null ? "" : args.filterBy.search.value.toLowerCase();
+
+ if (search == "") {
+ sfclustersfiltered = sfclusters;
+ }
+ else {
+ for (i = 0; i < sfclusters.length; i++) {
+ sfcluster = sfclusters[i];
+
+ if (sfcluster.name.toLowerCase().indexOf(search) > -1 ) {
+ sfclustersfiltered.push(sfcluster);
+ }
+ }
+ }
+
+ args.response.success({ data: sfclustersfiltered });
+ },
+ error: function(errorMessage) {
+ args.response.error(errorMessage);
+ }
+ });
+ },
+ actions: {
+ add: {
+ label: 'Add Reference to Cluster',
+ preFilter: function(args) {
+ return true;
+ },
+ messages: {
+ confirm: function(args) {
+ return 'Please fill in the following data to add a new reference to a cluster.';
+ },
+ notification: function(args) {
+ return 'Add Reference to Cluster';
+ }
+ },
+ createForm: {
+ title: 'Add Reference to Cluster',
+ desc: 'Please fill in the following data to add a new reference to a cluster.',
+ fields: {
+ mvip: {
+ label: 'MVIP',
+ validation: {
+ required: true
+ }
+ },
+ username: {
+ label: 'label.username',
+ docID: 'helpUserUsername',
+ validation: {
+ required: true
+ }
+ },
+ password: {
+ label: 'label.password',
+ docID: 'helpUserPassword',
+ isPassword: true,
+ validation: {
+ required: true
+ }
+ },
+ totalCapacity: {
+ label: 'Total Capacity',
+ validation: {
+ required: true,
+ number: true
+ }
+ },
+ totalMinIops: {
+ label: 'Total Min IOPS',
+ validation: {
+ required: true,
+ number: true
+ }
+ },
+ totalMaxIops: {
+ label: 'Total Max IOPS',
+ validation: {
+ required: true,
+ number: true
+ }
+ },
+ totalBurstIops: {
+ label: 'Total Burst IOPS',
+ validation: {
+ required: true,
+ number: true
+ }
+ },
+ availabilityZone: {
+ label: 'label.availability.zone',
+ docID: 'helpVolumeAvailabilityZone',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listZones&available=true"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var zoneObjs = json.listzonesresponse.zone;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: zoneObjs
+ });
+ }
+ });
+ }
+ }
+ }
+ },
+ action: function(args) {
+ var data = {
+ mvip: args.data.mvip,
+ username: args.data.username,
+ password: args.data.password,
+ totalcapacity: args.data.totalcapacity,
+ totalminiops: args.data.totalminiops,
+ totalmaxiops: args.data.totalmaxiops,
+ totalburstiops: args.data.totalburstiops,
+ availabilityzone: args.data.availabilityzone
+ };
+
+ $.ajax({
+ url: createURL('createReferenceToSolidFireCluster'),
+ data: data,
+ success: function(json) {
+ var sfclusterObj = json.createreferencetosolidfireclusterresponse.apicreatereferencetosolidfirecluster;
+
+ args.response.success({
+ data: sfclusterObj
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ }
+ },
+ detailView: {
+ name: 'label.details',
+ actions: {
+ edit: {
+ label: 'label.edit',
+ messages: {
+ notification: function(args) {
+ return 'Edit Cluster';
+ }
+ },
+ action: function (args) {
+ var params = [];
+
+ params.push("&name=" + args.context.sfClusters[0].name);
+ params.push("&totalcapacity=" + args.data.totalcapacity);
+ params.push("&totalminiops=" + args.data.totalminiops);
+ params.push("&totalmaxiops=" + args.data.totalmaxiops);
+ params.push("&totalburstiops=" + args.data.totalburstiops);
+
+ $.ajax({
+ url: createURL('updateReferenceToSolidFireCluster' + params.join("")),
+ success: function(json) {
+ var sfclusterObj = json.updatereferencetosolidfireclusterresponse.apiupdatereferencetosolidfirecluster;
+
+ args.response.success({
+ data: sfclusterObj
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ },
+ remove: {
+ label: 'Delete Reference to Cluster',
+ messages: {
+ confirm: function(args) {
+ return 'Are you sure you would like to delete this reference to a SolidFire cluster?';
+ },
+ notification: function(args) {
+ return 'Delete Reference to Cluster';
+ }
+ },
+ action: function(args) {
+ $.ajax({
+ url: createURL('deleteReferenceToSolidFireCluster&name=' + args.context.sfSharedVolumes[0].name),
+ success: function(json) {
+ args.response.success();
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ }
+ },
+ tabs: {
+ details: {
+ title: 'label.details',
+ preFilter: function(args) {
+ return [];
+ },
+ fields: [
+ {
+ name: {
+ label: 'label.name'
+ }
+ },
+ {
+ uuid: {
+ label: 'label.id'
+ },
+ mvip: {
+ label: 'MVIP'
+ },
+ username: {
+ label: 'Username'
+ },
+ totalcapacity: {
+ label: 'Total Capacity',
+ isEditable: true
+ },
+ miniops: {
+ label: 'Total Min IOPS',
+ isEditable: true
+ },
+ maxiops: {
+ label: 'Total Max IOPS',
+ isEditable: true
+ },
+ burstiops: {
+ label: 'Total Burst IOPS',
+ isEditable: true
+ },
+ zone: {
+ label: 'Zone'
+ }
+ }
+ ],
+ dataProvider: function(args) {
+ $.ajax({
+ url: createURL("listSolidFireClusters&name=" + args.context.sfClusters[0].name),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var jsonObj = json.listsolidfireclustersresponse.sfcluster[0];
+
+ args.response.success({
+ data: jsonObj
+ });
+ }
+ });
+ }
+ }
+ }
+ }
+ }
+ });
+ };
+}(cloudStack));
\ No newline at end of file
[17/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Conditionally show the Account field in the Add Shared Volume window
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/15213a3f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/15213a3f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/15213a3f
Branch: refs/heads/sf-plugins
Commit: 15213a3facd749d1f9698abc2b72affd46240a63
Parents: 90396cf
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 8 00:21:10 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:19 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/15213a3f/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index d935b04..90395cc 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -110,17 +110,15 @@
},
isHidden: true,
select: function(args) {
+ if (isAdmin()) {
+ args.$form.find('.form-item[rel=account]').show();
+ }
+
$.ajax({
url: createURL("listAccounts"),
dataType: "json",
async: true,
success: function(json) {
- if (isAdmin()) {
- var $form = $(this).closest('form');
-
- $form.find('.form-item[rel=account]').show();
- }
-
var accountObjs = json.listaccountsresponse.account;
args.response.success({
[50/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Throw a PermissionDeniedException instead of returning false when permission should be denied
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/157efc3e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/157efc3e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/157efc3e
Branch: refs/heads/sf-plugins
Commit: 157efc3e234c76134dba1a7be110e3f2d87c29c9
Parents: fcf50ba
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Fri Sep 18 19:26:54 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:24 2015 -0600
----------------------------------------------------------------------
.../org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/157efc3e/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 7ad57e6..b7658f2 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -502,7 +502,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
return true;
}
- return false;
+ throw new PermissionDeniedException("User " + user.getFirstname() + " " + user.getLastname() + " cannot access the following command: " + apiCommandName);
}
@Override
[41/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Modifications to fields for virtual-networking support
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/576e524f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/576e524f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/576e524f
Branch: refs/heads/sf-plugins
Commit: 576e524fee1bc978414440851ceb09aaa33eddfe
Parents: c2c42b0
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 22 20:07:23 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:23 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 88 +++-----------------
1 file changed, 13 insertions(+), 75 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/576e524f/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index a18f81d..68a3197 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -383,66 +383,12 @@
required: true
}
},
- description: {
- label: 'Description',
- validation: {
- required: true
- }
- },
tag: {
label: 'Tag',
validation: {
required: true
}
},
- physicalnetwork: {
- label: 'Physical Network',
- validation: {
- required: true
- },
- select: function(args) {
- $.ajax({
- url: createURL("listAccounts&listAll=true"),
- dataType: "json",
- async: true,
- success: function(json) {
- var accountObjs = json.listaccountsresponse.account;
-
- args.response.success({
- descriptionField: 'name',
- data: accountObjs
- });
- }
- });
- }
- },
- networkoffering: {
- label: 'Network Offering',
- validation: {
- required: true
- },
- select: function(args) {
- $.ajax({
- url: createURL("listAccounts&listAll=true"),
- dataType: "json",
- async: true,
- success: function(json) {
- var accountObjs = json.listaccountsresponse.account;
-
- args.response.success({
- descriptionField: 'name',
- data: accountObjs
- });
- }
- });
- }
- },
- gateway: {
- label: 'Gateway',
- validation: {
- required: true
- }
- },
netmask: {
label: 'Netmask',
validation: {
@@ -455,10 +401,11 @@
required: true
}
},
- endip: {
- label: 'End IP',
+ size: {
+ label: 'Size',
validation: {
- required: true
+ required: true,
+ number: true
}
},
svip: {
@@ -472,13 +419,13 @@
action: function(args) {
var data = {
clustername: args.context.sfAdministration[0].name,
+ accountid: args.data.account,
name: args.data.name,
tag: args.data.tag,
- startip: args.data.startip,
- size: 10, // Mike T. args.data.size,
netmask: args.data.netmask,
- svip: args.data.svip,
- accountid: args.data.account
+ startip: args.data.startip,
+ size: args.data.size,
+ svip: args.data.svip
};
$.ajax({
@@ -514,9 +461,9 @@
params.push("&id=" + args.context.sfVirtualNetworks[0].id);
params.push("&name=" + args.data.name);
params.push("&tag=" + args.data.tag);
- params.push("&startip=" + args.data.startip);
- params.push("&size=" + "10"); // Mike T. args.data.size);
params.push("&netmask=" + args.data.netmask);
+ params.push("&startip=" + args.data.startip);
+ params.push("&size=" + args.data.size);
params.push("&svip=" + args.data.svip);
$.ajax({
@@ -581,16 +528,6 @@
label: 'Tag',
isEditable: true
},
- physicalnetwork: {
- label: 'Physical Network'
- },
- networkoffering: {
- label: 'Network Offering'
- },
- gateway: {
- label: 'Gateway',
- isEditable: true
- },
netmask: {
label: 'Netmask',
isEditable: true
@@ -599,8 +536,9 @@
label: 'Start IP',
isEditable: true
},
- endip: {
- label: 'End IP',
+ size: {
+ label: 'Size',
+ number: true,
isEditable: true
},
svip: {
[44/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Changed args.context.sfVirtualNetwork to args.context.sfVirtualNetworks in two places
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a68837d3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a68837d3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a68837d3
Branch: refs/heads/sf-plugins
Commit: a68837d36f95b013a2c2abd99ee7fe045cb5e496
Parents: 83a3aa6
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 21 18:15:22 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:23 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a68837d3/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index 158b714..ff6bae5 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -545,7 +545,7 @@
},
action: function(args) {
$.ajax({
- url: createURL('deleteSolidFireVirtualNetwork&id=' + args.context.sfVirtualNetwork[0].id),
+ url: createURL('deleteSolidFireVirtualNetwork&id=' + args.context.sfVirtualNetworks[0].id),
success: function(json) {
args.response.success();
},
@@ -610,7 +610,7 @@
],
dataProvider: function(args) {
$.ajax({
- url: createURL("listSolidFireVirtualNetworks&id=" + args.context.sfVirtualNetwork[0].id),
+ url: createURL("listSolidFireVirtualNetworks&id=" + args.context.sfVirtualNetworks[0].id),
dataType: "json",
async: true,
success: function(json) {
[37/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Changed the names of some properties that are sent to the CS MS
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f6f2ba64
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f6f2ba64
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f6f2ba64
Branch: refs/heads/sf-plugins
Commit: f6f2ba64158c9e9dcb4b9df93e37f3d1f9f3b508
Parents: 6795be5
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 15 22:19:29 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:22 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f6f2ba64/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index e16f0f5..bdb467b 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -134,14 +134,14 @@
},
action: function(args) {
var data = {
- availabilityzone: args.data.availabilityzone,
+ zoneid: args.data.availabilityZone,
mvip: args.data.mvip,
username: args.data.username,
password: args.data.password,
- totalcapacity: args.data.totalcapacity,
- totalminiops: args.data.totalminiops,
- totalmaxiops: args.data.totalmaxiops,
- totalburstiops: args.data.totalburstiops
+ totalcapacity: args.data.totalCapacity,
+ totalminiops: args.data.totalMinIops,
+ totalmaxiops: args.data.totalMaxIops,
+ totalburstiops: args.data.totalBurstIops
};
$.ajax({
[15/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
If either (or both) combo boxes is null or undefined, return
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/85e90ca9
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/85e90ca9
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/85e90ca9
Branch: refs/heads/sf-plugins
Commit: 85e90ca9ee8d583dafe4a656eaed42016d116ec4
Parents: 620af9c
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 8 20:25:47 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:19 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/85e90ca9/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index 2d904cd..5835edd 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -157,6 +157,10 @@
},
dependsOn: ['availabilityZone', 'account'],
select: function(args) {
+ if (args.data.availabilityZone == null || args.data.account == null) {
+ return;
+ }
+
var params = [];
params.push("&zoneid=" + args.data.availabilityZone);
[46/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Update to a POM file for 4.5.3-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c9964937
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c9964937
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c9964937
Branch: refs/heads/sf-plugins
Commit: c996493724b3e68a9683c727bb1c5d5ad90f23f1
Parents: 4cc742e
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Fri Sep 18 16:31:39 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:24 2015 -0600
----------------------------------------------------------------------
plugins/api/solidfire/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c9964937/plugins/api/solidfire/pom.xml
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/pom.xml b/plugins/api/solidfire/pom.xml
index 52d5051..35ee222 100644
--- a/plugins/api/solidfire/pom.xml
+++ b/plugins/api/solidfire/pom.xml
@@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloudstack-plugins</artifactId>
- <version>4.5.2-SNAPSHOT</version>
+ <version>4.5.3-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<dependencies>
[34/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Adding the Add Virtual Network window
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/80ab54cd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/80ab54cd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/80ab54cd
Branch: refs/heads/sf-plugins
Commit: 80ab54cd90d49b2d40458dafd296f1b736dd1209
Parents: 9cff6a7
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 21 12:50:50 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:22 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 137 ++++++++++++++++++-
1 file changed, 135 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/80ab54cd/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index 7afeeda..cbabf39 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -61,7 +61,7 @@
},
messages: {
confirm: function(args) {
- return 'Please fill in the following data to add a new reference to a cluster.';
+ return 'Please fill in the following data to add a reference to a cluster.';
},
notification: function(args) {
return 'Add Reference to Cluster';
@@ -69,7 +69,7 @@
},
createForm: {
title: 'Add Reference to Cluster',
- desc: 'Please fill in the following data to add a new reference to a cluster.',
+ desc: 'Please fill in the following data to add a reference to a cluster.',
fields: {
availabilityZone: {
label: 'label.availability.zone',
@@ -337,6 +337,139 @@
args.response.error(errorMessage);
}
});
+ },
+ actions: {
+ add: {
+ label: 'Add Virtual Network',
+ preFilter: function(args) {
+ return true;
+ },
+ messages: {
+ confirm: function(args) {
+ return 'Please fill in the following data to add a virtual network.';
+ },
+ notification: function(args) {
+ return 'Add Virtual Network';
+ }
+ },
+ createForm: {
+ title: 'Add Virtual Network',
+ desc: 'Please fill in the following data to add a virtual network.',
+ fields: {
+ account: {
+ label: 'Account',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listAccounts&listAll=true"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var accountObjs = json.listaccountsresponse.account;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: accountObjs
+ });
+ }
+ });
+ }
+ },
+ name: {
+ label: 'Name',
+ validation: {
+ required: true
+ }
+ },
+ description: {
+ label: 'Description',
+ validation: {
+ required: true
+ }
+ },
+ tag: {
+ label: 'Tag',
+ validation: {
+ required: true
+ }
+ },
+ physicalnetwork: {
+ label: 'Physical Network',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listAccounts&listAll=true"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var accountObjs = json.listaccountsresponse.account;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: accountObjs
+ });
+ }
+ });
+ }
+ },
+ networkoffering: {
+ label: 'Network Offering',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listAccounts&listAll=true"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var accountObjs = json.listaccountsresponse.account;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: accountObjs
+ });
+ }
+ });
+ }
+ },
+ gateway: {
+ label: 'Gateway',
+ validation: {
+ required: true
+ }
+ },
+ netmask: {
+ label: 'Netmask',
+ validation: {
+ required: true
+ }
+ },
+ startip: {
+ label: 'Start IP',
+ validation: {
+ required: true
+ }
+ },
+ endip: {
+ label: 'End IP',
+ validation: {
+ required: true
+ }
+ },
+ svip: {
+ label: 'SVIP',
+ validation: {
+ required: true
+ }
+ }
+ }
+ }
+ }
}
}
}
[03/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Add editing ability
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7b93d8a6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7b93d8a6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7b93d8a6
Branch: refs/heads/sf-plugins
Commit: 7b93d8a679d8226502e31359c2ce7db4aba7aea9
Parents: d1ba1e2
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Mon Jul 6 19:34:07 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:17 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7b93d8a6/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index baf8aea..70e5208 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -11,7 +11,7 @@
fields: {
name: { label: 'label.name' },
iqn: { label: 'IQN' },
- size: { label: 'Size' },
+ size: { label: 'Size (GB)' },
miniops: { label: 'Min IOPS' },
maxiops: { label: 'Max IOPS' },
burstiops: { label: 'Burst IOPS' }
@@ -28,15 +28,16 @@
}
});
},
- actions: {
- delete: {
- label: "Delete Shared Volume",
- messages: {
- confirm: function() { return 'Are you sure you want to delete this shared volume?' },
- notification: function() { return 'Deleted shared volume' }
- },
- action: function(args) {
- var instance = args.context.sfSharedVolumes[0];
+ detailView: {
+ name: 'Shared volume details',
+ isMaximized: true,
+ actions: {
+ edit: {
+ label: 'Edit shared volume',
+ compactLabel: 'label.edit',
+ action: function(args) {
+ var sharedVolumeObj = args.context;
+ }
}
}
}
[20/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Adding the ability to edit certain properties of a volume
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6456534c
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6456534c
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6456534c
Branch: refs/heads/sf-plugins
Commit: 6456534c07f6252a9bcb20cebe27c939c5e32cd4
Parents: 74ae95f
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Fri Jul 10 10:21:16 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:20 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 45 +++++++++++++++++++++---
1 file changed, 40 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6456534c/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index b43b221..f2182f6 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -215,8 +215,39 @@
detailView: {
name: 'label.volume.details',
actions: {
+ edit: {
+ label: 'label.edit',
+ messages: {
+ notification: function(args) {
+ return 'Edit Shared Volume';
+ }
+ },
+ action: function (args) {
+ var params = [];
+
+ params.push("&id=" + args.context.sfSharedVolumes[0].id);
+ params.push("&size=" + args.data.size);
+ params.push("&miniops=" + args.data.miniops);
+ params.push("&maxiops=" + args.data.maxiops);
+ params.push("&burstiops=" + args.data.burstiops);
+
+ $.ajax({
+ url: createURL('updateSolidFireVolume' + params.join("")),
+ success: function(json) {
+ var sfvolumeObj = json.updatesolidfirevolumeresponse.apiupdatesolidfirevolume;
+
+ args.response.success({
+ data: sfvolumeObj
+ });
+ },
+ error: function(json) {
+ args.response.error(parseXMLHttpResponse(json));
+ }
+ });
+ }
+ },
remove: {
- label: 'Delete Shared Volume',
+ label: 'label.delete',
messages: {
confirm: function(args) {
return 'Are you sure you would like to delete this shared volume?';
@@ -275,16 +306,20 @@
label: 'VLAN'
},
size: {
- label: 'label.disk.size.gb'
+ label: 'label.disk.size.gb',
+ isEditable: true
},
miniops: {
- label: 'label.disk.iops.min'
+ label: 'label.disk.iops.min',
+ isEditable: true
},
maxiops: {
- label: 'label.disk.iops.max'
+ label: 'label.disk.iops.max',
+ isEditable: true
},
burstiops: {
- label: 'Burst IOPS'
+ label: 'Burst IOPS',
+ isEditable: true
},
targetportal: {
label: 'Target Portal'
[40/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Modified an error message related to trying to delete a reference to a cluster that has one or more virtual networks
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2faa48d4
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2faa48d4
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2faa48d4
Branch: refs/heads/sf-plugins
Commit: 2faa48d41184c4df5f895c1b8d7a7ad953a1d4ef
Parents: 576e524
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Thu Jul 23 17:21:37 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:23 2015 -0600
----------------------------------------------------------------------
.../org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2faa48d4/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
----------------------------------------------------------------------
diff --git a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
index 208e62a..ff11202 100644
--- a/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
+++ b/plugins/api/solidfire/src/org/apache/cloudstack/solidfire/ApiSolidFireServiceImpl2.java
@@ -233,7 +233,7 @@ public class ApiSolidFireServiceImpl2 extends AdapterBase implements APIChecker,
List<SfVirtualNetworkVO> sfVirtualNetworks = _sfVirtualNetworkDao.findByClusterId(sfCluster.getId());
if (sfVirtualNetworks != null && sfVirtualNetworks.size() > 0) {
- throw new CloudRuntimeException("Unable to delete a cluster that has one or more virtual networks");
+ throw new CloudRuntimeException("Unable to delete a reference to a cluster that has one or more virtual networks");
}
if (!_sfClusterDao.remove(sfCluster.getId())) {
[08/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Add zone combo box to Add Shared Volume window
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b7ef791d
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b7ef791d
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b7ef791d
Branch: refs/heads/sf-plugins
Commit: b7ef791d1c15469a829558da995e9b346708ce08
Parents: c3a0957
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Tue Jul 7 13:07:58 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:18 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 33 ++++++++++++++++++++----
1 file changed, 28 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b7ef791d/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index c0d9fbe..cce02db 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -46,15 +46,38 @@
title: 'Add Shared Volume',
desc: 'Please fill in the following data to add a new shared volume.',
fields: {
+ availabilityZone: {
+ label: 'label.availability.zone',
+ docID: 'helpVolumeAvailabilityZone',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listZones&available=true"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var zoneObjs = json.listzonesresponse.zone;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: zoneObjs
+ });
+ }
+ });
+ }
+ },
name: {
+ label: 'label.name',
docID: 'helpVolumeName',
- label: 'label.name',
validation: {
required: true
}
},
diskSize: {
- label: 'label.disk.size.gb',
+ label: 'label.disk.size.gb',
+ docID: 'Size of the volume in GB',
validation: {
required: true,
number: true
@@ -63,21 +86,21 @@
minIops: {
label: 'label.disk.iops.min',
validation: {
- required: false,
+ required: true,
number: true
}
},
maxIops: {
label: 'label.disk.iops.max',
validation: {
- required: false,
+ required: true,
number: true
}
},
burstIops: {
label: 'Burst IOPS',
validation: {
- required: false,
+ required: true,
number: true
}
}
[09/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Extend plug-in functionality
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/63935428
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/63935428
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/63935428
Branch: refs/heads/sf-plugins
Commit: 639354284fde4abf01727c08c0c27cf5666c806d
Parents: 0d79e11
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Mon Jul 6 20:56:46 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:18 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfSharedVolume/sfSharedVolume.js | 35 ++++++++++++++++++++++++
1 file changed, 35 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/63935428/ui/plugins/sfSharedVolume/sfSharedVolume.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfSharedVolume/sfSharedVolume.js b/ui/plugins/sfSharedVolume/sfSharedVolume.js
index ff16c91..99ad905 100644
--- a/ui/plugins/sfSharedVolume/sfSharedVolume.js
+++ b/ui/plugins/sfSharedVolume/sfSharedVolume.js
@@ -46,6 +46,41 @@
title: 'Add Shared Volume',
desc: 'Please fill in the following data to add a new shared volume.',
fields: {
+ name: {
+ docID: 'helpVolumeName',
+ label: 'label.name',
+ validation: {
+ required: true
+ }
+ },
+ diskSize: {
+ label: 'label.disk.size.gb',
+ validation: {
+ required: true,
+ number: true
+ }
+ },
+ minIops: {
+ label: 'label.disk.iops.min',
+ validation: {
+ required: false,
+ number: true
+ }
+ },
+ maxIops: {
+ label: 'label.disk.iops.max',
+ validation: {
+ required: false,
+ number: true
+ }
+ },
+ burstIops: {
+ label: 'Burst IOPS',
+ validation: {
+ required: false,
+ number: true
+ }
+ }
}
}
}
[30/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Changed the title and the names of some properties
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9fe932ed
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9fe932ed
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9fe932ed
Branch: refs/heads/sf-plugins
Commit: 9fe932ed0676d06441f56d81fabb0a400f81579c
Parents: 35626b6
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 15 19:41:13 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:21 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9fe932ed/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index ddc0e33..b44038f 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -2,7 +2,7 @@
cloudStack.plugins.sfAdministration = function(plugin) {
plugin.ui.addSection({
id: 'sfAdministration',
- title: 'sfAdministration',
+ title: 'SolidFire Administration',
preFilter: function(args) {
return isAdmin();
},
@@ -244,26 +244,26 @@
label: 'Total Capacity',
isEditable: true
},
- miniops: {
+ totalminiops: {
label: 'Total Min IOPS',
isEditable: true
},
- maxiops: {
+ totalmaxiops: {
label: 'Total Max IOPS',
isEditable: true
},
- burstiops: {
+ totalburstiops: {
label: 'Total Burst IOPS',
isEditable: true
},
- zone: {
- label: 'Zone'
+ zonename: {
+ label: 'label.zone'
}
}
],
dataProvider: function(args) {
$.ajax({
- url: createURL("listSolidFireClusters&name=" + args.context.sfClusters[0].name),
+ url: createURL("listSolidFireClusters&name=" + args.context.sfAdministration[0].name),
dataType: "json",
async: true,
success: function(json) {
[28/50] git commit: updated refs/heads/sf-plugins to 157efc3
Posted by mt...@apache.org.
Placed the Zone field at the top of the "create" window and "view" panel
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6795be5f
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6795be5f
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6795be5f
Branch: refs/heads/sf-plugins
Commit: 6795be5f6d97d16696ad053db72c5ea8e6280fc9
Parents: 9a0e7b9
Author: Mike Tutkowski <mi...@solidfire.com>
Authored: Wed Jul 15 21:53:43 2015 -0600
Committer: Mike Tutkowski <mi...@solidfire.com>
Committed: Fri Sep 18 19:28:21 2015 -0600
----------------------------------------------------------------------
ui/plugins/sfAdministration/sfAdministration.js | 54 ++++++++++----------
1 file changed, 27 insertions(+), 27 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6795be5f/ui/plugins/sfAdministration/sfAdministration.js
----------------------------------------------------------------------
diff --git a/ui/plugins/sfAdministration/sfAdministration.js b/ui/plugins/sfAdministration/sfAdministration.js
index 4c843ee..e16f0f5 100644
--- a/ui/plugins/sfAdministration/sfAdministration.js
+++ b/ui/plugins/sfAdministration/sfAdministration.js
@@ -59,6 +59,28 @@
title: 'Add Reference to Cluster',
desc: 'Please fill in the following data to add a new reference to a cluster.',
fields: {
+ availabilityZone: {
+ label: 'label.availability.zone',
+ docID: 'helpVolumeAvailabilityZone',
+ validation: {
+ required: true
+ },
+ select: function(args) {
+ $.ajax({
+ url: createURL("listZones&available=true"),
+ dataType: "json",
+ async: true,
+ success: function(json) {
+ var zoneObjs = json.listzonesresponse.zone;
+
+ args.response.success({
+ descriptionField: 'name',
+ data: zoneObjs
+ });
+ }
+ });
+ }
+ },
mvip: {
label: 'MVIP',
validation: {
@@ -107,41 +129,19 @@
required: true,
number: true
}
- },
- availabilityZone: {
- label: 'label.availability.zone',
- docID: 'helpVolumeAvailabilityZone',
- validation: {
- required: true
- },
- select: function(args) {
- $.ajax({
- url: createURL("listZones&available=true"),
- dataType: "json",
- async: true,
- success: function(json) {
- var zoneObjs = json.listzonesresponse.zone;
-
- args.response.success({
- descriptionField: 'name',
- data: zoneObjs
- });
- }
- });
- }
}
}
},
action: function(args) {
var data = {
+ availabilityzone: args.data.availabilityzone,
mvip: args.data.mvip,
username: args.data.username,
password: args.data.password,
totalcapacity: args.data.totalcapacity,
totalminiops: args.data.totalminiops,
totalmaxiops: args.data.totalmaxiops,
- totalburstiops: args.data.totalburstiops,
- availabilityzone: args.data.availabilityzone
+ totalburstiops: args.data.totalburstiops
};
$.ajax({
@@ -234,6 +234,9 @@
uuid: {
label: 'label.id'
},
+ zonename: {
+ label: 'label.zone'
+ },
mvip: {
label: 'MVIP'
},
@@ -255,9 +258,6 @@
totalburstiops: {
label: 'Total Burst IOPS',
isEditable: true
- },
- zonename: {
- label: 'label.zone'
}
}
],