Repository: cloudstack Updated Branches: refs/heads/4.4-forward ca59f0160 -> b961dbc8f refs/heads/master 8d27c19ae -> f424a04b0
fdfdfd Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b961dbc8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b961dbc8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b961dbc8 Branch: refs/heads/4.4-forward Commit: b961dbc8f947a5cf107a14786c428710aa701cd5 Parents: ca59f01 Author: Nitin Mehta <nitin.me...@citrix.com> Authored: Tue Aug 5 17:29:34 2014 -0700 Committer: Nitin Mehta <nitin.me...@citrix.com> Committed: Wed Aug 6 16:47:55 2014 -0700 ---------------------------------------------------------------------- .../cloudstack/api/response/DomainRouterResponse.java | 12 ++++++++++++ .../cloudstack/api/response/SystemVmResponse.java | 12 ++++++++++++ server/src/com/cloud/api/ApiResponseHelper.java | 1 + .../cloud/api/query/dao/DomainRouterJoinDaoImpl.java | 1 + .../src/com/cloud/api/query/vo/DomainRouterJoinVO.java | 9 +++++++++ 5 files changed, 35 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b961dbc8/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java index ed16020..9225ba0 100644 --- a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java +++ b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java @@ -85,6 +85,10 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView @Param(description = "the hostname for the router") private String hostName; + @SerializedName("hypervisor") + @Param(description = "the hypervisor on which the template runs") + private String hypervisor; + @SerializedName(ApiConstants.LINK_LOCAL_IP) @Param(description = "the link local IP address for the router") private String linkLocalIp; @@ -262,6 +266,14 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView this.hostName = hostName; } + public String getHypervisor() { + return hypervisor; + } + + public void setHypervisor(String hypervisor) { + this.hypervisor = hypervisor; + } + public void setPublicIp(String publicIp) { this.publicIp = publicIp; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b961dbc8/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java b/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java index 8c27c18..9e20b49 100644 --- a/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java @@ -85,6 +85,10 @@ public class SystemVmResponse extends BaseResponse { @Param(description = "the hostname for the system VM") private String hostName; + @SerializedName("hypervisor") + @Param(description = "the hypervisor on which the template runs") + private String hypervisor; + @SerializedName(ApiConstants.PRIVATE_IP) @Param(description = "the private IP address for the system VM") private String privateIp; @@ -240,6 +244,14 @@ public class SystemVmResponse extends BaseResponse { this.hostName = hostName; } + public String getHypervisor() { + return hypervisor; + } + + public void setHypervisor(String hypervisor) { + this.hypervisor = hypervisor; + } + public String getPrivateIp() { return privateIp; } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b961dbc8/server/src/com/cloud/api/ApiResponseHelper.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java index c07d454..85e2ea2 100755 --- a/server/src/com/cloud/api/ApiResponseHelper.java +++ b/server/src/com/cloud/api/ApiResponseHelper.java @@ -1160,6 +1160,7 @@ public class ApiResponseHelper implements ResponseGenerator { if (host != null) { vmResponse.setHostId(host.getUuid()); vmResponse.setHostName(host.getName()); + vmResponse.setHypervisor(host.getHypervisorType().toString()); } } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b961dbc8/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java index 9594c01..b054b0e 100644 --- a/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java +++ b/server/src/com/cloud/api/query/dao/DomainRouterJoinDaoImpl.java @@ -94,6 +94,7 @@ public class DomainRouterJoinDaoImpl extends GenericDaoBase<DomainRouterJoinVO, if (router.getHostId() != null) { routerResponse.setHostId(router.getHostUuid()); routerResponse.setHostName(router.getHostName()); + routerResponse.setHypervisor(router.getHypervisorType().toString()); } routerResponse.setPodId(router.getPodUuid()); long nic_id = router.getNicId(); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b961dbc8/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java index 79eb3bf..b4124de 100644 --- a/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java +++ b/server/src/com/cloud/api/query/vo/DomainRouterJoinVO.java @@ -26,6 +26,7 @@ import javax.persistence.Enumerated; import javax.persistence.Id; import javax.persistence.Table; +import com.cloud.hypervisor.Hypervisor; import com.cloud.network.Network.GuestType; import com.cloud.network.Networks.TrafficType; import com.cloud.network.router.VirtualRouter; @@ -126,6 +127,10 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti @Column(name = "host_name", nullable = false) private String hostName; + @Column(name="hypervisor_type") + @Enumerated(value=EnumType.STRING) + private Hypervisor.HypervisorType hypervisorType; + @Column(name = "template_id", updatable = true, nullable = true, length = 17) private long templateId; @@ -338,6 +343,10 @@ public class DomainRouterJoinVO extends BaseViewVO implements ControlledViewEnti return hostName; } + public Hypervisor.HypervisorType getHypervisorType() { + return hypervisorType; + } + public Long getClusterId() { return clusterId; }