mirror of https://github.com/apache/cloudstack.git
api: Annotate missing systemvm api, annotate SystemVmResponse
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
d9718e82f2
commit
5548d08fb6
|
|
@ -23,11 +23,14 @@ import org.apache.log4j.Logger;
|
|||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseListCmd;
|
||||
import org.apache.cloudstack.api.IdentityMapper;
|
||||
import org.apache.cloudstack.api.Implementation;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.response.HostResponse;
|
||||
import org.apache.cloudstack.api.response.ListResponse;
|
||||
import org.apache.cloudstack.api.response.PodResponse;
|
||||
import org.apache.cloudstack.api.response.StoragePoolResponse;
|
||||
import org.apache.cloudstack.api.response.SystemVmResponse;
|
||||
import org.apache.cloudstack.api.response.ZoneResponse;
|
||||
import com.cloud.async.AsyncJob;
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
|
|
@ -42,19 +45,19 @@ public class ListSystemVMsCmd extends BaseListCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="host")
|
||||
@Parameter(name=ApiConstants.HOST_ID, type=CommandType.LONG, description="the host ID of the system VM")
|
||||
@Parameter(name=ApiConstants.HOST_ID, type=CommandType.UUID, entityType=HostResponse.class,
|
||||
description="the host ID of the system VM")
|
||||
private Long hostId;
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="the ID of the system VM")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=SystemVmResponse.class,
|
||||
description="the ID of the system VM")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the system VM")
|
||||
private String systemVmName;
|
||||
|
||||
@IdentityMapper(entityTableName="host_pod_ref")
|
||||
@Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, description="the Pod ID of the system VM")
|
||||
@Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class,
|
||||
description="the Pod ID of the system VM")
|
||||
private Long podId;
|
||||
|
||||
@Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="the state of the system VM")
|
||||
|
|
@ -63,12 +66,12 @@ public class ListSystemVMsCmd extends BaseListCmd {
|
|||
@Parameter(name=ApiConstants.SYSTEM_VM_TYPE, type=CommandType.STRING, description="the system VM type. Possible types are \"consoleproxy\" and \"secondarystoragevm\".")
|
||||
private String systemVmType;
|
||||
|
||||
@IdentityMapper(entityTableName="data_center")
|
||||
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, description="the Zone ID of the system VM")
|
||||
@Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType=ZoneResponse.class,
|
||||
description="the Zone ID of the system VM")
|
||||
private Long zoneId;
|
||||
|
||||
@IdentityMapper(entityTableName="storage_pool")
|
||||
@Parameter(name=ApiConstants.STORAGE_ID, type=CommandType.LONG, description="the storage ID where vm's volumes belong to", since="3.0.1")
|
||||
@Parameter(name=ApiConstants.STORAGE_ID, type=CommandType.UUID, entityType=StoragePoolResponse.class,
|
||||
description="the storage ID where vm's volumes belong to", since="3.0.1")
|
||||
private Long storageId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -18,11 +18,14 @@ package org.apache.cloudstack.api.response;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import org.apache.cloudstack.api.Entity;
|
||||
|
||||
@Entity(value=VirtualMachine.class)
|
||||
public class SystemVmResponse extends BaseResponse {
|
||||
@SerializedName("id") @Param(description="the ID of the system VM")
|
||||
private String id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue