You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2014/04/10 10:32:44 UTC
git commit: updated refs/heads/4.4 to 5e9b25b
Repository: cloudstack
Updated Branches:
refs/heads/4.4 87f6c6f88 -> 5e9b25bad
CLOUDSTACK-6373: listHost API response is not listing all the details of vgpuType.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5e9b25ba
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5e9b25ba
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5e9b25ba
Branch: refs/heads/4.4
Commit: 5e9b25bad07ec08968abbd17c80ba1baafc618ec
Parents: 87f6c6f
Author: Sanjay Tripathi <sa...@citrix.com>
Authored: Thu Apr 10 13:55:25 2014 +0530
Committer: Sanjay Tripathi <sa...@citrix.com>
Committed: Thu Apr 10 13:55:25 2014 +0530
----------------------------------------------------------------------
.../org/apache/cloudstack/api/ApiConstants.java | 6 +++
.../cloudstack/api/response/VgpuResponse.java | 57 ++++++++++++++++----
.../cloud/api/query/dao/HostJoinDaoImpl.java | 8 ++-
3 files changed, 61 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5e9b25ba/api/src/org/apache/cloudstack/api/ApiConstants.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java
index 08ab7af..70e1984 100755
--- a/api/src/org/apache/cloudstack/api/ApiConstants.java
+++ b/api/src/org/apache/cloudstack/api/ApiConstants.java
@@ -591,7 +591,13 @@ public class ApiConstants {
public static final String GPUGROUPNAME = "gpugroupname";
public static final String VGPU = "vgpu";
public static final String VGPUTYPE = "vgputype";
+ public static final String VIDEORAM = "videoram";
+ public static final String MAXHEADS = "maxheads";
+ public static final String MAXRESOLUTIONX = "maxresolutionx";
+ public static final String MAXRESOLUTIONY = "maxresolutiony";
+ public static final String MAXVGPUPERPGPU = "maxvgpuperpgpu";
public static final String REMAININGCAPACITY = "remainingcapacity";
+ public static final String MAXCAPACITY = "maxcapacity";
public static final String DISTRIBUTED_VPC_ROUTER = "distributedvpcrouter";
public static final String SUPPORTS_REGION_LEVEL_VPC = "supportsregionLevelvpc";
public static final String SUPPORTS_STRECHED_L2_SUBNET = "supportsstrechedl2subnet";
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5e9b25ba/api/src/org/apache/cloudstack/api/response/VgpuResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/VgpuResponse.java b/api/src/org/apache/cloudstack/api/response/VgpuResponse.java
index 17e194b..c51dc8d 100644
--- a/api/src/org/apache/cloudstack/api/response/VgpuResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/VgpuResponse.java
@@ -29,24 +29,63 @@ public class VgpuResponse extends BaseResponse {
@Param(description = "Model Name of vGPU")
private String name;
+ @SerializedName(ApiConstants.VIDEORAM)
+ @Param(description = "Video RAM for this vGPU type")
+ private Long videoRam;
+
+ @SerializedName(ApiConstants.MAXHEADS)
+ @Param(description = "Maximum displays per user")
+ private Long maxHeads;
+
+ @SerializedName(ApiConstants.MAXRESOLUTIONX)
+ @Param(description = "Maximum X resolution per display")
+ private Long maxResolutionX;
+
+ @SerializedName(ApiConstants.MAXRESOLUTIONY)
+ @Param(description = "Maximum Y resolution per display")
+ private Long maxResolutionY;
+
+ @SerializedName(ApiConstants.MAXVGPUPERPGPU)
+ @Param(description = "Maximum no. of vgpu per gpu card (pgpu)")
+ private Long maxVgpuPerPgpu;
+
@SerializedName(ApiConstants.REMAININGCAPACITY)
- @Param(description = "No. of more VMs can be deployped with this vGPU type")
- private Long capacity;
+ @Param(description = "Remaining capacity in terms of no. of more VMs that can be deployped with this vGPU type")
+ private Long remainingCapacity;
- public String getName() {
- return name;
- }
+ @SerializedName(ApiConstants.MAXCAPACITY)
+ @Param(description = "Maximum vgpu can be created with this vgpu type on the given gpu group")
+ private Long maxCapacity;
public void setName(String name) {
this.name = name;
}
- public Long getCapacity() {
- return capacity;
+ public void setVideoRam(Long videoRam) {
+ this.videoRam = videoRam;
+ }
+
+ public void setMaxHeads(Long maxHeads) {
+ this.maxHeads = maxHeads;
}
- public void setCapacity(Long capacity) {
- this.capacity = capacity;
+ public void setMaxResolutionX(Long maxResolutionX) {
+ this.maxResolutionX = maxResolutionX;
}
+ public void setMaxResolutionY(Long maxResolutionY) {
+ this.maxResolutionY = maxResolutionY;
+ }
+
+ public void setMaxVgpuPerPgpu(Long maxVgpuPerPgpu) {
+ this.maxVgpuPerPgpu = maxVgpuPerPgpu;
+ }
+
+ public void setRemainingCapacity(Long remainingCapacity) {
+ this.remainingCapacity = remainingCapacity;
+ }
+
+ public void setmaxCapacity(Long maxCapacity) {
+ this.maxCapacity = maxCapacity;
+ }
}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5e9b25ba/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
index 6c890fc..9a4b38e 100644
--- a/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
+++ b/server/src/com/cloud/api/query/dao/HostJoinDaoImpl.java
@@ -108,7 +108,13 @@ public class HostJoinDaoImpl extends GenericDaoBase<HostJoinVO, Long> implements
for (VGPUTypesVO vgpuType : vgpuTypes) {
VgpuResponse vgpuResponse = new VgpuResponse();
vgpuResponse.setName(vgpuType.getVgpuType());
- vgpuResponse.setCapacity(vgpuType.getRemainingCapacity());
+ vgpuResponse.setVideoRam(vgpuType.getVideoRam());
+ vgpuResponse.setMaxHeads(vgpuType.getMaxHeads());
+ vgpuResponse.setMaxResolutionX(vgpuType.getMaxResolutionX());
+ vgpuResponse.setMaxResolutionY(vgpuType.getMaxResolutionY());
+ vgpuResponse.setMaxVgpuPerPgpu(vgpuType.getMaxVgpuPerPgpu());
+ vgpuResponse.setRemainingCapacity(vgpuType.getRemainingCapacity());
+ vgpuResponse.setmaxCapacity(vgpuType.getMaxCapacity());
vgpus.add(vgpuResponse);
}
gpuResponse.setVgpu(vgpus);