mirror of https://github.com/apache/cloudstack.git
api: Annotate some systemvm commands
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
a88ce6bb7f
commit
d9718e82f2
|
|
@ -21,7 +21,6 @@ import org.apache.log4j.Logger;
|
|||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.IdentityMapper;
|
||||
import org.apache.cloudstack.api.Implementation;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
|
|
@ -38,8 +37,8 @@ public class DestroySystemVmCmd extends BaseAsyncCmd {
|
|||
|
||||
private static final String s_name = "destroysystemvmresponse";
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the system virtual machine")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=SystemVmResponse.class,
|
||||
required=true, description="The ID of the system virtual machine")
|
||||
private Long id;
|
||||
|
||||
public Long getId() {
|
||||
|
|
|
|||
|
|
@ -21,10 +21,11 @@ import org.apache.log4j.Logger;
|
|||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.IdentityMapper;
|
||||
import org.apache.cloudstack.api.Implementation;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
import org.apache.cloudstack.api.response.HostResponse;
|
||||
import org.apache.cloudstack.api.response.SystemVmResponse;
|
||||
import org.apache.cloudstack.api.response.SystemVmInstanceResponse;
|
||||
import com.cloud.event.EventTypes;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
|
|
@ -47,12 +48,12 @@ public class MigrateSystemVMCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="host")
|
||||
@Parameter(name=ApiConstants.HOST_ID, type=CommandType.LONG, required=true, description="destination Host ID to migrate VM to")
|
||||
@Parameter(name=ApiConstants.HOST_ID, type=CommandType.UUID, entityType=HostResponse.class,
|
||||
required=true, description="destination Host ID to migrate VM to")
|
||||
private Long hostId;
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, required=true, description="the ID of the virtual machine")
|
||||
@Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=SystemVmResponse.class,
|
||||
required=true, description="the ID of the virtual machine")
|
||||
private Long virtualMachineId;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import org.apache.log4j.Logger;
|
|||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.IdentityMapper;
|
||||
import org.apache.cloudstack.api.Implementation;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
|
|
@ -42,8 +41,8 @@ public class RebootSystemVmCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the system virtual machine")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=SystemVmResponse.class,
|
||||
required=true, description="The ID of the system virtual machine")
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -42,8 +42,8 @@ public class StartSystemVMCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the system virtual machine")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=SystemVmResponse.class,
|
||||
required=true, description="The ID of the system virtual machine")
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ import org.apache.log4j.Logger;
|
|||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.BaseAsyncCmd;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.api.IdentityMapper;
|
||||
import org.apache.cloudstack.api.Implementation;
|
||||
import org.apache.cloudstack.api.Parameter;
|
||||
import org.apache.cloudstack.api.ServerApiException;
|
||||
|
|
@ -44,8 +43,8 @@ public class StopSystemVmCmd extends BaseAsyncCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the system virtual machine")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=SystemVmResponse.class,
|
||||
required=true, description="The ID of the system virtual machine")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.FORCED, type=CommandType.BOOLEAN, required=false, description="Force stop the VM. The caller knows the VM is stopped.")
|
||||
|
|
|
|||
|
|
@ -16,7 +16,9 @@
|
|||
// under the License.
|
||||
package org.apache.cloudstack.api.command.admin.systemvm;
|
||||
|
||||
import com.cloud.offering.DiskOffering;
|
||||
import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
|
||||
import org.apache.cloudstack.api.response.DiskOfferingResponse;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
|
@ -43,13 +45,12 @@ public class UpgradeSystemVMCmd extends BaseCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="vm_instance")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the system vm")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=SystemVmResponse.class,
|
||||
required=true, description="The ID of the system vm")
|
||||
private Long id;
|
||||
|
||||
@IdentityMapper(entityTableName="disk_offering")
|
||||
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.LONG, required=true,
|
||||
description="the service offering ID to apply to the system vm")
|
||||
@Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=DiskOfferingResponse.class,
|
||||
required=true, description="the service offering ID to apply to the system vm")
|
||||
private Long serviceOfferingId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -18,12 +18,15 @@ package org.apache.cloudstack.api.response;
|
|||
|
||||
import java.util.Date;
|
||||
|
||||
import com.cloud.storage.StoragePool;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
import com.cloud.serializer.Param;
|
||||
import com.cloud.storage.StoragePoolStatus;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import org.apache.cloudstack.api.BaseResponse;
|
||||
import org.apache.cloudstack.api.Entity;
|
||||
|
||||
@Entity(value=StoragePool.class)
|
||||
public class StoragePoolResponse extends BaseResponse {
|
||||
@SerializedName("id") @Param(description="the ID of the storage pool")
|
||||
private String id;
|
||||
|
|
|
|||
Loading…
Reference in New Issue