mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
bug 8257: Returning hypervisor type in Listvm command so that volume gets attached to the corresponding vm's
This commit is contained in:
parent
94f9c1297f
commit
f53e18b0ab
13
api/src/com/cloud/api/response/UserVmResponse.java
Normal file → Executable file
13
api/src/com/cloud/api/response/UserVmResponse.java
Normal file → Executable file
@ -145,7 +145,18 @@ public class UserVmResponse extends BaseResponse {
|
||||
@SerializedName("nic") @Param(description="the list of nics associated with vm", responseObject = NicResponse.class)
|
||||
private List<NicResponse> nics;
|
||||
|
||||
public Long getObjectId() {
|
||||
@SerializedName("hypervisor") @Param(description="the hypervisor on which the template runs")
|
||||
private String hypervisor;
|
||||
|
||||
public String getHypervisor() {
|
||||
return hypervisor;
|
||||
}
|
||||
|
||||
public void setHypervisor(String hypervisor) {
|
||||
this.hypervisor = hypervisor;
|
||||
}
|
||||
|
||||
public Long getObjectId() {
|
||||
return getId();
|
||||
}
|
||||
|
||||
|
||||
@ -1021,6 +1021,9 @@ public class ApiResponseHelper implements ResponseGenerator {
|
||||
userVmResponse.setHostName(ApiDBUtils.findHostById(userVm.getHostId()).getName());
|
||||
}
|
||||
|
||||
if(userVm.getHypervisorType() != null){
|
||||
userVmResponse.setHypervisor(userVm.getHypervisorType().toString());
|
||||
}
|
||||
// Template Info
|
||||
VMTemplateVO template = ApiDBUtils.findTemplateById(userVm.getTemplateId());
|
||||
if (template != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user