mirror of https://github.com/apache/cloudstack.git
api_refactoring: VMgroup parameter annotation.
modified: api/src/org/apache/cloudstack/api/user/vmgroup/command/CreateVMGroupCmd.java modified: api/src/org/apache/cloudstack/api/user/vmgroup/command/DeleteVMGroupCmd.java modified: api/src/org/apache/cloudstack/api/user/vmgroup/command/ListVMGroupsCmd.java modified: api/src/org/apache/cloudstack/api/user/vmgroup/command/UpdateVMGroupCmd.java Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
parent
8a313d7f84
commit
a6c02e1483
|
|
@ -24,7 +24,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.InstanceGroupResponse;
|
||||
import com.cloud.api.response.ProjectAccountResponse;
|
||||
import com.cloud.user.UserContext;
|
||||
import com.cloud.vm.InstanceGroup;
|
||||
|
||||
|
|
@ -44,12 +47,12 @@ public class CreateVMGroupCmd extends BaseCmd {
|
|||
@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")
|
||||
//@IdentityMapper(entityTableName = "domain")
|
||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.LONG, description = "the domain ID of account owning the instance group", entityType=DomainResponse.class)
|
||||
private Long domainId;
|
||||
|
||||
@IdentityMapper(entityTableName = "projects")
|
||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.LONG, description = "The project of the instance group")
|
||||
//@IdentityMapper(entityTableName = "projects")
|
||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.LONG, description = "The project of the instance group", entityType=ProjectAccountResponse.class)
|
||||
private Long projectId;
|
||||
|
||||
// ///////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ 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.InstanceGroupResponse;
|
||||
import com.cloud.api.response.SuccessResponse;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.vm.InstanceGroup;
|
||||
|
|
@ -37,8 +39,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")
|
||||
//@IdentityMapper(entityTableName="instance_group")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the instance group", entityType=InstanceGroupResponse.class)
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ public class ListVMGroupsCmd extends BaseListProjectAndAccountResourcesCmd {
|
|||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="instance_group")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list instance groups by ID")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list instance groups by ID", entityType=InstanceGroupResponse.class)
|
||||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list instance groups by name")
|
||||
|
|
|
|||
|
|
@ -38,8 +38,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")
|
||||
//@IdentityMapper(entityTableName="instance_group")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="Instance group ID", entityType=InstanceGroupResponse.class)
|
||||
private Long id;
|
||||
|
||||
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="new instance group name")
|
||||
|
|
|
|||
Loading…
Reference in New Issue