incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [2/3] git commit: api: Annotate vm related apis in admin pkg
Date Sun, 23 Dec 2012 03:09:49 GMT
api: Annotate vm related apis in admin pkg

Signed-off-by: Rohit Yadav <bhaisaab@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/6f3c7bf4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/6f3c7bf4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/6f3c7bf4

Branch: refs/heads/api_refactoring
Commit: 6f3c7bf4c71b595354d783cae10945f13dcc2aef
Parents: 5d8e106
Author: Rohit Yadav <bhaisaab@apache.org>
Authored: Sat Dec 22 18:58:01 2012 -0800
Committer: Rohit Yadav <bhaisaab@apache.org>
Committed: Sat Dec 22 18:58:01 2012 -0800

----------------------------------------------------------------------
 .../api/command/admin/vm/AssignVMCmd.java          |   16 +++++++-------
 .../api/command/admin/vm/MigrateVMCmd.java         |   13 +++++------
 .../api/command/admin/vm/RecoverVMCmd.java         |    4 +-
 3 files changed, 16 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6f3c7bf4/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java
index 73d9c9d..18ac324 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java
@@ -45,24 +45,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", entityType=UserVmResponse.class)
+    @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class,
+            required=true, description="the vm ID of the user VM to be moved")
     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.", entityType=DomainResponse.class)
+    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
+            required=true, description="domain id of the new VM owner.")
     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.", entityType=NetworkResponse.class)
+    @Parameter(name=ApiConstants.NETWORK_IDS, type=CommandType.LIST, collectionType=CommandType.UUID,
entityType=NetworkResponse.class,
+            description="list of network ids that will be part of VM network after move in
advanced network setting.")
     private List<Long> 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.", entityType=SecurityGroupResponse.class)
+    @Parameter(name=ApiConstants.SECURITY_GROUP_IDS, type=CommandType.LIST, collectionType=CommandType.UUID,
entityType=SecurityGroupResponse.class,
+            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.")
     private List<Long> securityGroupIdList;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6f3c7bf4/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
index 1d2f87f..19fee5b 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java
@@ -21,7 +21,6 @@ import org.apache.log4j.Logger;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseAsyncCmd;
 import org.apache.cloudstack.api.BaseCmd;
-import org.apache.cloudstack.api.IdentityMapper;
 import org.apache.cloudstack.api.Implementation;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.ServerApiException;
@@ -52,16 +51,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", entityType=HostResponse.class)
+    @Parameter(name=ApiConstants.HOST_ID, type=CommandType.UUID, entityType=HostResponse.class,
+            required=false, description="Destination Host ID to migrate VM to. Required for
live migrating a VM from host to host")
     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", entityType=UserVmResponse.class)
+    @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class,
+            required=true, description="the ID of the virtual machine")
     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", entityType=StoragePoolResponse.class)
+    @Parameter(name=ApiConstants.STORAGE_ID, type=CommandType.LONG, entityType=StoragePoolResponse.class,
+            required=false, description="Destination storage pool ID to migrate VM volumes
to. Required for migrating the root disk volume")
     private Long storageId;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6f3c7bf4/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java
index 9e32768..5033b3e 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java
@@ -38,8 +38,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", entityType=UserVmResponse.class)
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class,
+            required=true, description="The ID of the virtual machine")
     private Long id;
 
     /////////////////////////////////////////////////////


Mime
View raw message