diff --git a/api/src/org/apache/cloudstack/api/user/vmgroup/command/CreateVMGroupCmd.java b/api/src/org/apache/cloudstack/api/user/vmgroup/command/CreateVMGroupCmd.java index 15b506f49dc..e452533b689 100644 --- a/api/src/org/apache/cloudstack/api/user/vmgroup/command/CreateVMGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/user/vmgroup/command/CreateVMGroupCmd.java @@ -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; // /////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/user/vmgroup/command/DeleteVMGroupCmd.java b/api/src/org/apache/cloudstack/api/user/vmgroup/command/DeleteVMGroupCmd.java index 43761d2dcef..9001b6cf250 100644 --- a/api/src/org/apache/cloudstack/api/user/vmgroup/command/DeleteVMGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/user/vmgroup/command/DeleteVMGroupCmd.java @@ -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; ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/user/vmgroup/command/ListVMGroupsCmd.java b/api/src/org/apache/cloudstack/api/user/vmgroup/command/ListVMGroupsCmd.java index 94a7d152d97..ff5158d89fa 100644 --- a/api/src/org/apache/cloudstack/api/user/vmgroup/command/ListVMGroupsCmd.java +++ b/api/src/org/apache/cloudstack/api/user/vmgroup/command/ListVMGroupsCmd.java @@ -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") diff --git a/api/src/org/apache/cloudstack/api/user/vmgroup/command/UpdateVMGroupCmd.java b/api/src/org/apache/cloudstack/api/user/vmgroup/command/UpdateVMGroupCmd.java index 33d29a064e8..6735f16deab 100644 --- a/api/src/org/apache/cloudstack/api/user/vmgroup/command/UpdateVMGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/user/vmgroup/command/UpdateVMGroupCmd.java @@ -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")