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/18 23:33:08 UTC

[5/5] git commit: api: Annotate domain apis

api: Annotate domain apis

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/e940562d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e940562d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e940562d

Branch: refs/heads/api_refactoring
Commit: e940562dcac9dcfa07342a4d6cdc6cf4260fd8b1
Parents: 16be94e
Author: Rohit Yadav <bh...@apache.org>
Authored: Tue Dec 18 13:38:27 2012 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Tue Dec 18 13:38:27 2012 -0800

----------------------------------------------------------------------
 .../api/command/admin/domain/CreateDomainCmd.java  |    3 ++-
 .../api/command/admin/domain/DeleteDomainCmd.java  |    5 +++--
 .../admin/domain/ListDomainChildrenCmd.java        |    4 ++--
 .../api/command/admin/domain/ListDomainsCmd.java   |    3 ++-
 .../api/command/admin/domain/UpdateDomainCmd.java  |    4 ++--
 5 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e940562d/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java
index e789c17..000858b 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java
@@ -43,7 +43,8 @@ public class CreateDomainCmd extends BaseCmd {
     private String domainName;
 
     @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.PARENT_DOMAIN_ID, type=CommandType.LONG, description="assigns new domain a parent domain by domain ID of the parent.  If no parent domain is specied, the ROOT domain is assumed.")
+    @Parameter(name=ApiConstants.PARENT_DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
+            description="assigns new domain a parent domain by domain ID of the parent.  If no parent domain is specied, the ROOT domain is assumed.")
     private Long parentDomainId;
 
     @Parameter(name=ApiConstants.NETWORK_DOMAIN, type=CommandType.STRING, description="Network domain for networks in the domain")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e940562d/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java
index b18cb74..3e262e4 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java
@@ -16,6 +16,7 @@
 // under the License.
 package org.apache.cloudstack.api.command.admin.domain;
 
+import org.apache.cloudstack.api.response.DomainResponse;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.api.ApiConstants;
@@ -40,8 +41,8 @@ public class DeleteDomainCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="ID of domain to delete")
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainResponse.class,
+            required=true, description="ID of domain to delete")
     private Long id;
 
     @Parameter(name=ApiConstants.CLEANUP, type=CommandType.BOOLEAN, description="true if all domain resources (child domains, accounts) have to be cleaned up, false otherwise")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e940562d/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java
index d653ccd..bc09b22 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java
@@ -41,8 +41,8 @@ public class ListDomainChildrenCmd extends BaseListCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list children domain by parent domain ID.")
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainResponse.class,
+            description="list children domain by parent domain ID.")
     private Long id;
 
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list children domains by name")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e940562d/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java
index 45bd236..3db292f 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java
@@ -42,7 +42,8 @@ public class ListDomainsCmd extends BaseListCmd {
     /////////////////////////////////////////////////////
 
     @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="List domain by domain ID.")
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainResponse.class,
+            description="List domain by domain ID.")
     private Long id;
 
     @Parameter(name=ApiConstants.LEVEL, type=CommandType.INTEGER, description="List domains by domain level.")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e940562d/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java
index 78535d8..b3cb065 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java
@@ -38,8 +38,8 @@ public class UpdateDomainCmd extends BaseCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="ID of domain to update")
+    @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainResponse.class,
+            required=true, description="ID of domain to update")
     private Long id;
 
     @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="updates domain with this name")