api: annotate instance group Cmds

Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
Prasanna Santhanam 2012-12-21 16:12:10 -08:00
parent 71522b88dc
commit f548099d08
5 changed files with 15 additions and 12 deletions

View File

@ -43,15 +43,16 @@ public class CreateVMGroupCmd extends BaseCmd {
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the instance group")
private String groupName;
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account of the instance group. The account parameter must be used with the domainId parameter.")
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING,
description = "the account of the instance group. The account parameter must be used with the domainId parameter.")
private String accountName;
//@IdentityMapper(entityTableName = "domain")
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.LONG, description = "the domain ID of account owning the instance group", entityType=DomainResponse.class)
@Parameter(name = ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
description = "the domain ID of account owning the instance group")
private Long domainId;
//@IdentityMapper(entityTableName = "projects")
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.LONG, description = "The project of the instance group", entityType=ProjectAccountResponse.class)
@Parameter(name = ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType=ProjectAccountResponse.class,
description = "The project of the instance group")
private Long projectId;
// ///////////////////////////////////////////////////

View File

@ -38,8 +38,8 @@ public class DeleteVMGroupCmd extends BaseCmd{
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
//@IdentityMapper(entityTableName="instance_group")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the instance group", entityType=InstanceGroupResponse.class)
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=InstanceGroupResponse.class,
required=true, description="the ID of the instance group")
private Long id;
/////////////////////////////////////////////////////

View File

@ -20,7 +20,6 @@ import org.apache.log4j.Logger;
import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd;
import org.apache.cloudstack.api.IdentityMapper;
import org.apache.cloudstack.api.Implementation;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.response.InstanceGroupResponse;
@ -36,8 +35,8 @@ public class ListVMGroupsCmd extends BaseListProjectAndAccountResourcesCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@IdentityMapper(entityTableName="instance_group")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list instance groups by ID", entityType=InstanceGroupResponse.class)
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=InstanceGroupResponse.class,
description="list instance groups by ID")
private Long id;
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list instance groups by name")

View File

@ -37,8 +37,8 @@ public class UpdateVMGroupCmd extends BaseCmd{
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
//@IdentityMapper(entityTableName="instance_group")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="Instance group ID", entityType=InstanceGroupResponse.class)
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=InstanceGroupResponse.class,
required=true, description="Instance group ID")
private Long id;
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="new instance group name")

View File

@ -18,12 +18,15 @@ package org.apache.cloudstack.api.response;
import java.util.List;
import com.cloud.projects.ProjectAccount;
import org.apache.cloudstack.api.ApiConstants;
import com.cloud.utils.IdentityProxy;
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=ProjectAccount.class)
@SuppressWarnings("unused")
public class ProjectAccountResponse extends BaseResponse implements ControlledViewEntityResponse {
@SerializedName(ApiConstants.PROJECT_ID)