diff --git a/api/src/org/apache/cloudstack/api/admin/vm/command/AssignVMCmd.java b/api/src/org/apache/cloudstack/api/admin/vm/command/AssignVMCmd.java index 57b87fa6a47..5ae6140a189 100644 --- a/api/src/org/apache/cloudstack/api/admin/vm/command/AssignVMCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/vm/command/AssignVMCmd.java @@ -28,6 +28,10 @@ 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 com.cloud.api.response.DomainResponse; +import com.cloud.api.response.NetworkResponse; +import com.cloud.api.response.SecurityGroupResponse; import com.cloud.api.response.UserVmResponse; import com.cloud.user.Account; import com.cloud.uservm.UserVm; @@ -42,24 +46,24 @@ public class AssignVMCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="vm_instance") - @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, required=true, description="the vm ID of the user VM to be moved") + //@IdentityMapper(entityTableName="vm_instance") + @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.LONG, required=true, description="the vm ID of the user VM to be moved", entityType=UserVmResponse.class) private Long virtualMachineId; @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true, description="account name of the new VM owner.") private String accountName; - @IdentityMapper(entityTableName="domain") - @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, required=true, description="domain id of the new VM owner.") + //@IdentityMapper(entityTableName="domain") + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, required=true, description="domain id of the new VM owner.", entityType=DomainResponse.class) private Long domainId; //Network information - @IdentityMapper(entityTableName="networks") - @Parameter(name=ApiConstants.NETWORK_IDS, type=CommandType.LIST, collectionType=CommandType.LONG, description="list of network ids that will be part of VM network after move in advanced network setting.") + //@IdentityMapper(entityTableName="networks") + @Parameter(name=ApiConstants.NETWORK_IDS, type=CommandType.LIST, collectionType=CommandType.LONG, description="list of network ids that will be part of VM network after move in advanced network setting.", entityType=NetworkResponse.class) private List networkIds; - @IdentityMapper(entityTableName="security_group") - @Parameter(name=ApiConstants.SECURITY_GROUP_IDS, type=CommandType.LIST, collectionType=CommandType.LONG, description="comma separated list of security groups id that going to be applied to the virtual machine. Should be passed only when vm is moved in a zone with Basic Network support.") + //@IdentityMapper(entityTableName="security_group") + @Parameter(name=ApiConstants.SECURITY_GROUP_IDS, type=CommandType.LIST, collectionType=CommandType.LONG, description="comma separated list of security groups id that going to be applied to the virtual machine. Should be passed only when vm is moved in a zone with Basic Network support.", entityType=SecurityGroupResponse.class) private List securityGroupIdList; ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/admin/vm/command/MigrateVMCmd.java b/api/src/org/apache/cloudstack/api/admin/vm/command/MigrateVMCmd.java index 57cd8fe7361..6103a864786 100644 --- a/api/src/org/apache/cloudstack/api/admin/vm/command/MigrateVMCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/vm/command/MigrateVMCmd.java @@ -25,6 +25,9 @@ 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 com.cloud.api.response.HostResponse; +import com.cloud.api.response.StoragePoolResponse; import com.cloud.api.response.UserVmResponse; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; @@ -49,16 +52,16 @@ public class MigrateVMCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="host") - @Parameter(name=ApiConstants.HOST_ID, type=CommandType.LONG, required=false, description="Destination Host ID to migrate VM to. Required for live migrating a VM from host to host") + //@IdentityMapper(entityTableName="host") + @Parameter(name=ApiConstants.HOST_ID, type=CommandType.LONG, required=false, description="Destination Host ID to migrate VM to. Required for live migrating a VM from host to host", entityType=HostResponse.class) 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.LONG, required=true, description="the ID of the virtual machine", entityType=UserVmResponse.class) private Long virtualMachineId; @IdentityMapper(entityTableName="storage_pool") - @Parameter(name=ApiConstants.STORAGE_ID, type=CommandType.LONG, required=false, description="Destination storage pool ID to migrate VM volumes to. Required for migrating the root disk volume") + @Parameter(name=ApiConstants.STORAGE_ID, type=CommandType.LONG, required=false, description="Destination storage pool ID to migrate VM volumes to. Required for migrating the root disk volume", entityType=StoragePoolResponse.class) private Long storageId; ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/admin/vm/command/RecoverVMCmd.java b/api/src/org/apache/cloudstack/api/admin/vm/command/RecoverVMCmd.java index 5baa67fdafb..c10907cf203 100644 --- a/api/src/org/apache/cloudstack/api/admin/vm/command/RecoverVMCmd.java +++ b/api/src/org/apache/cloudstack/api/admin/vm/command/RecoverVMCmd.java @@ -39,8 +39,8 @@ public class RecoverVMCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @IdentityMapper(entityTableName="vm_instance") - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the virtual machine") + //@IdentityMapper(entityTableName="vm_instance") + @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="The ID of the virtual machine", entityType=UserVmResponse.class) private Long id; /////////////////////////////////////////////////////