You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/12/07 16:59:27 UTC
[2/4] git commit: api_refactoring: VMgroup parameter annotation.
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 <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/a6c02e14
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/a6c02e14
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/a6c02e14
Branch: refs/heads/api_refactoring
Commit: a6c02e14838fd5200eb65e65bdea2267897656b9
Parents: 8a313d7
Author: Fang Wang <fa...@citrix.com>
Authored: Thu Dec 6 14:47:07 2012 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Thu Dec 6 16:09:43 2012 -0800
----------------------------------------------------------------------
.../api/user/vmgroup/command/CreateVMGroupCmd.java | 11 +++++++----
.../api/user/vmgroup/command/DeleteVMGroupCmd.java | 6 ++++--
.../api/user/vmgroup/command/ListVMGroupsCmd.java | 2 +-
.../api/user/vmgroup/command/UpdateVMGroupCmd.java | 4 ++--
4 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a6c02e14/api/src/org/apache/cloudstack/api/user/vmgroup/command/CreateVMGroupCmd.java
----------------------------------------------------------------------
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 15b506f..e452533 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;
// ///////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a6c02e14/api/src/org/apache/cloudstack/api/user/vmgroup/command/DeleteVMGroupCmd.java
----------------------------------------------------------------------
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 43761d2..9001b6c 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;
/////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a6c02e14/api/src/org/apache/cloudstack/api/user/vmgroup/command/ListVMGroupsCmd.java
----------------------------------------------------------------------
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 94a7d15..ff5158d 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")
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/a6c02e14/api/src/org/apache/cloudstack/api/user/vmgroup/command/UpdateVMGroupCmd.java
----------------------------------------------------------------------
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 33d29a0..6735f16 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")