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/06 23:32:20 UTC
git commit: api_refactoring: Add parameter annotation for admin zone
group.
Updated Branches:
refs/heads/api_refactoring da6e81aa2 -> 3d04bfcad
api_refactoring: Add parameter annotation for admin zone group.
Add the entityType to the parameter annotation.
modified: api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java
modified: api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java
modified: api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java
modified: api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.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/3d04bfca
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/3d04bfca
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/3d04bfca
Branch: refs/heads/api_refactoring
Commit: 3d04bfcadc175c0130b80f9cbda214a9d710cc4a
Parents: da6e81a
Author: Fang Wang <fa...@citrix.com>
Authored: Thu Dec 6 13:43:26 2012 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Thu Dec 6 14:30:37 2012 -0800
----------------------------------------------------------------------
.../api/admin/zone/command/CreateZoneCmd.java | 6 ++++--
.../api/admin/zone/command/DeleteZoneCmd.java | 5 +++--
.../zone/command/MarkDefaultZoneForAccountCmd.java | 15 +++++++++------
.../api/admin/zone/command/UpdateZoneCmd.java | 4 ++--
4 files changed, 18 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3d04bfca/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java b/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java
index 30d288b..64dfbee 100755
--- a/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.java
+++ b/api/src/org/apache/cloudstack/api/admin/zone/command/CreateZoneCmd.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.DomainResponse;
import com.cloud.api.response.ZoneResponse;
import com.cloud.dc.DataCenter;
import com.cloud.user.Account;
@@ -60,8 +62,8 @@ public class CreateZoneCmd extends BaseCmd {
@Parameter(name=ApiConstants.DOMAIN, type=CommandType.STRING, description="Network domain name for the networks in the zone")
private String domain;
- @IdentityMapper(entityTableName="domain")
- @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the containing domain, null for public zones")
+ //@IdentityMapper(entityTableName="domain")
+ @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="the ID of the containing domain, null for public zones", entityType=DomainResponse.class)
private Long domainId;
@Parameter(name=ApiConstants.NETWORK_TYPE, type=CommandType.STRING, required=true, description="network type of the zone, can be Basic or Advanced")
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3d04bfca/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java b/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java
index 1144cb3..7577067 100644
--- a/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java
+++ b/api/src/org/apache/cloudstack/api/admin/zone/command/DeleteZoneCmd.java
@@ -25,6 +25,7 @@ import org.apache.cloudstack.api.Implementation;
import org.apache.cloudstack.api.Parameter;
import org.apache.cloudstack.api.ServerApiException;
import com.cloud.api.response.SuccessResponse;
+import com.cloud.api.response.ZoneResponse;
import com.cloud.user.Account;
import com.cloud.user.UserContext;
@@ -38,8 +39,8 @@ public class DeleteZoneCmd extends BaseCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
- @IdentityMapper(entityTableName="data_center")
- @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone")
+ //@IdentityMapper(entityTableName="data_center")
+ @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone", entityType=ZoneResponse.class)
private Long id;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3d04bfca/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java b/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java
index fe130f7..fdb1d9c 100644
--- a/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java
+++ b/api/src/org/apache/cloudstack/api/admin/zone/command/MarkDefaultZoneForAccountCmd.java
@@ -28,6 +28,9 @@ import com.cloud.user.Account;
import com.cloud.event.EventTypes;
import com.cloud.async.AsyncJob;
import com.cloud.api.response.AccountResponse;
+import com.cloud.api.response.DomainResponse;
+import com.cloud.api.response.ZoneResponse;
+
import org.apache.cloudstack.api.ServerApiException;
import org.apache.cloudstack.api.BaseCmd;
@@ -41,16 +44,16 @@ public class MarkDefaultZoneForAccountCmd extends BaseAsyncCmd {
////////////////API parameters //////////////////////
/////////////////////////////////////////////////////
- @IdentityMapper(entityTableName="account")
- @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true, description="Name of the account that is to be marked.")
+ //@IdentityMapper(entityTableName="account")
+ @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true, description="Name of the account that is to be marked.", entityType=AccountResponse.class)
private String accountName;
- @IdentityMapper(entityTableName="domain")
- @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, required=true, description="Marks the account that belongs to the specified domain.")
+ //@IdentityMapper(entityTableName="domain")
+ @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, required=true, description="Marks the account that belongs to the specified domain.", entityType=DomainResponse.class)
private Long domainId;
- @IdentityMapper(entityTableName="data_center")
- @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="The Zone ID with which the account is to be marked.")
+ //@IdentityMapper(entityTableName="data_center")
+ @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.LONG, required=true, description="The Zone ID with which the account is to be marked.", entityType=ZoneResponse.class)
private Long defaultZoneId;
/////////////////////////////////////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3d04bfca/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java b/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java
index 59e715d..f1e9f73 100755
--- a/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java
+++ b/api/src/org/apache/cloudstack/api/admin/zone/command/UpdateZoneCmd.java
@@ -51,8 +51,8 @@ public class UpdateZoneCmd extends BaseCmd {
@Parameter(name=ApiConstants.GUEST_CIDR_ADDRESS, type=CommandType.STRING, description="the guest CIDR address for the Zone")
private String guestCidrAddress;
- @IdentityMapper(entityTableName="data_center")
- @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone")
+ //@IdentityMapper(entityTableName="data_center")
+ @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the Zone", entityType=ZoneResponse.class)
private Long id;
@Parameter(name=ApiConstants.INTERNAL_DNS1, type=CommandType.STRING, description="the first internal DNS for the Zone")