mirror of https://github.com/apache/cloudstack.git
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
|
|
@ -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…
Reference in New Issue