mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 6212: returning a whole bunch of new params in the api response
status 6212: resolved fixed
This commit is contained in:
parent
a6ca920452
commit
eee7c2c97e
@ -37,10 +37,13 @@ import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.serializer.GsonHelper;
|
||||
import com.cloud.server.ManagementServer;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.storage.StoragePoolVO;
|
||||
import com.cloud.storage.VMTemplateVO;
|
||||
import com.cloud.storage.VolumeVO;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.user.User;
|
||||
import com.cloud.uservm.UserVm;
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.exception.ExecutionException;
|
||||
import com.cloud.vm.InstanceGroupVO;
|
||||
import com.google.gson.Gson;
|
||||
@ -233,7 +236,16 @@ public class DeployVMExecutor extends VMOperationExecutor {
|
||||
|
||||
resultObject.setCpuNumber(String.valueOf(offering.getCpu()));
|
||||
resultObject.setCpuSpeed(String.valueOf(offering.getSpeed()));
|
||||
resultObject.setMemory(String.valueOf(offering.getRamSize()));
|
||||
resultObject.setMemory(String.valueOf(offering.getRamSize()));
|
||||
|
||||
//root device related
|
||||
VolumeVO rootVolume = managementServer.findRootVolume(vm.getId());
|
||||
if(rootVolume!=null)
|
||||
{
|
||||
resultObject.setRootDeviceId(rootVolume.getDeviceId());
|
||||
StoragePoolVO storagePool = managementServer.findPoolById(rootVolume.getPoolId());
|
||||
resultObject.setRootDeviceType(storagePool.getPoolType().toString());
|
||||
}
|
||||
|
||||
resultObject.setNetworkGroupList(managementServer.getNetworkGroupsNamesForVm(vm.getId()));
|
||||
return resultObject;
|
||||
|
||||
@ -125,6 +125,28 @@ public class DeployVMResultObject {
|
||||
@Param(name="networkgrouplist")
|
||||
private String networkGroupList;
|
||||
|
||||
@Param(name="rootdeviceid")
|
||||
private Long rootDeviceId;
|
||||
|
||||
@Param(name="rootdevicetype")
|
||||
private String rootDeviceType;
|
||||
|
||||
public Long getRootDeviceId(){
|
||||
return this.rootDeviceId;
|
||||
}
|
||||
|
||||
public void setRootDeviceId(Long rootDeviceId){
|
||||
this.rootDeviceId = rootDeviceId;
|
||||
}
|
||||
|
||||
public String getRootDeviceType(){
|
||||
return this.rootDeviceType;
|
||||
}
|
||||
|
||||
public void setRootDeviceType(String deviceType){
|
||||
this.rootDeviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getNetworkGroupList(){
|
||||
return this.networkGroupList;
|
||||
}
|
||||
|
||||
@ -21,7 +21,9 @@ package com.cloud.async.executor;
|
||||
import com.cloud.api.BaseCmd;
|
||||
import com.cloud.server.ManagementServer;
|
||||
import com.cloud.service.ServiceOfferingVO;
|
||||
import com.cloud.storage.StoragePoolVO;
|
||||
import com.cloud.storage.VMTemplateVO;
|
||||
import com.cloud.storage.VolumeVO;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.vm.UserVmVO;
|
||||
import com.cloud.vm.InstanceGroupVO;
|
||||
@ -116,6 +118,15 @@ public class VMExecutorHelper {
|
||||
|
||||
resultObject.setHostid(vm.getHostId());
|
||||
resultObject.setHostname(managementServer.getHostBy(vm.getHostId()).getName());
|
||||
|
||||
//root device related
|
||||
VolumeVO rootVolume = managementServer.findRootVolume(vm.getId());
|
||||
if(rootVolume!=null)
|
||||
{
|
||||
resultObject.setRootDeviceId(rootVolume.getDeviceId());
|
||||
StoragePoolVO storagePool = managementServer.findPoolById(rootVolume.getPoolId());
|
||||
resultObject.setRootDeviceType(storagePool.getPoolType().toString());
|
||||
}
|
||||
|
||||
return resultObject;
|
||||
}
|
||||
|
||||
@ -120,6 +120,28 @@ public class VMOperationResultObject {
|
||||
@Param(name="networkgrouplist")
|
||||
private String networkGroupList;
|
||||
|
||||
@Param(name="rootdeviceid")
|
||||
private Long rootDeviceId;
|
||||
|
||||
@Param(name="rootdevicetype")
|
||||
private String rootDeviceType;
|
||||
|
||||
public Long getRootDeviceId(){
|
||||
return this.rootDeviceId;
|
||||
}
|
||||
|
||||
public void setRootDeviceId(Long rootDeviceId){
|
||||
this.rootDeviceId = rootDeviceId;
|
||||
}
|
||||
|
||||
public String getRootDeviceType(){
|
||||
return this.rootDeviceType;
|
||||
}
|
||||
|
||||
public void setRootDeviceType(String deviceType){
|
||||
this.rootDeviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getNetworkGroupList(){
|
||||
return this.networkGroupList;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user