incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [4/8] git commit: api: Annotate CreatePrivateNetworkCmd
Date Mon, 24 Dec 2012 01:46:01 GMT
api: Annotate CreatePrivateNetworkCmd

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

Branch: refs/heads/api_refactoring
Commit: fd784bd2d3c2975e36747d686f4e275793743e27
Parents: f4a407e
Author: Rohit Yadav <bhaisaab@apache.org>
Authored: Sun Dec 23 17:28:53 2012 -0800
Committer: Rohit Yadav <bhaisaab@apache.org>
Committed: Sun Dec 23 17:28:53 2012 -0800

----------------------------------------------------------------------
 .../api/commands/CreatePrivateNetworkCmd.java      |   16 ++++++++------
 1 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/fd784bd2/api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java b/api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java
index 7f97f51..92dc5a6 100644
--- a/api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java
+++ b/api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java
@@ -16,12 +16,14 @@
 // under the License.
 package com.cloud.api.commands;
 
+import org.apache.cloudstack.api.response.DomainResponse;
+import org.apache.cloudstack.api.response.PhysicalNetworkResponse;
+import org.apache.cloudstack.api.response.ProjectResponse;
 import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseAsyncCreateCmd;
 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;
@@ -49,8 +51,8 @@ public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd {
     @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, required=true, description="the
display text of the network")
     private String displayText;
 
-    @IdentityMapper(entityTableName="physical_network")
-    @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, required=true,
description="the Physical Network ID the network belongs to")
+    @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType =
PhysicalNetworkResponse.class,
+            required=true, description="the Physical Network ID the network belongs to")
     private Long physicalNetworkId;
 
     @Parameter(name=ApiConstants.GATEWAY, type=CommandType.STRING, required=true, description="the
gateway of the network")
@@ -72,12 +74,12 @@ public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd {
     @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="account who
will own the network")
     private String accountName;
 
-    @IdentityMapper(entityTableName="projects")
-    @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.LONG, description="an optional
project for the ssh key")
+    @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class,
+            description="an optional project for the ssh key")
     private Long projectId;
 
-    @IdentityMapper(entityTableName="domain")
-    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.LONG, description="domain ID
of the account owning a network")
+    @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class,
+            description="domain ID of the account owning a network")
     private Long domainId;
 
 


Mime
View raw message