incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [4/50] [abbrv] git commit: f5: Annotate f5 cmd classes, remove IdentityMapper
Date Wed, 09 Jan 2013 04:37:26 GMT
f5: Annotate f5 cmd classes, remove IdentityMapper

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

Branch: refs/heads/master
Commit: 4dd5f14e76d7442ef2ea90b3c0aa4bb630ea9a71
Parents: 4cf0b05
Author: Rohit Yadav <bhaisaab@apache.org>
Authored: Fri Jan 4 16:49:27 2013 -0800
Committer: Rohit Yadav <bhaisaab@apache.org>
Committed: Fri Jan 4 16:49:27 2013 -0800

----------------------------------------------------------------------
 .../api/commands/ConfigureF5LoadBalancerCmd.java   |    4 ++--
 .../api/commands/DeleteF5LoadBalancerCmd.java      |    5 +++--
 .../commands/ListF5LoadBalancerNetworksCmd.java    |    5 ++---
 .../cloud/api/commands/ListF5LoadBalancersCmd.java |    4 ++--
 .../cloud/api/response/F5LoadBalancerResponse.java |    3 +++
 .../network/ExternalLoadBalancerDeviceVO.java      |    3 ++-
 6 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4dd5f14e/plugins/network-elements/f5/src/com/cloud/api/commands/ConfigureF5LoadBalancerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/api/commands/ConfigureF5LoadBalancerCmd.java
b/plugins/network-elements/f5/src/com/cloud/api/commands/ConfigureF5LoadBalancerCmd.java
index f6eddc8..e796b57 100644
--- a/plugins/network-elements/f5/src/com/cloud/api/commands/ConfigureF5LoadBalancerCmd.java
+++ b/plugins/network-elements/f5/src/com/cloud/api/commands/ConfigureF5LoadBalancerCmd.java
@@ -44,8 +44,8 @@ public class ConfigureF5LoadBalancerCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="external_load_balancer_devices")
-    @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.LONG, required=true,
description="F5 load balancer device ID")
+    @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.UUID, entityType
= F5LoadBalancerResponse.class,
+            required=true, description="F5 load balancer device ID")
     private Long lbDeviceId;
 
     @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_CAPACITY, type=CommandType.LONG, required=false,
description="capacity of the device, Capacity will be interpreted as number of networks device
can handle")

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4dd5f14e/plugins/network-elements/f5/src/com/cloud/api/commands/DeleteF5LoadBalancerCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/api/commands/DeleteF5LoadBalancerCmd.java
b/plugins/network-elements/f5/src/com/cloud/api/commands/DeleteF5LoadBalancerCmd.java
index 346bfdf..bca90d5 100644
--- a/plugins/network-elements/f5/src/com/cloud/api/commands/DeleteF5LoadBalancerCmd.java
+++ b/plugins/network-elements/f5/src/com/cloud/api/commands/DeleteF5LoadBalancerCmd.java
@@ -29,6 +29,7 @@ import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.PlugService;
 import org.apache.cloudstack.api.ServerApiException;
 import org.apache.cloudstack.api.response.SuccessResponse;
+import com.cloud.api.response.F5LoadBalancerResponse;
 import com.cloud.event.EventTypes;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
@@ -49,8 +50,8 @@ public class DeleteF5LoadBalancerCmd extends BaseAsyncCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="external_load_balancer_devices")
-    @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.LONG, required=true,
description="netscaler load balancer device ID")
+    @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.UUID, entityType
= F5LoadBalancerResponse.class,
+            required=true, description="netscaler load balancer device ID")
     private Long lbDeviceId;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4dd5f14e/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancerNetworksCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancerNetworksCmd.java
b/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancerNetworksCmd.java
index 0194b5d..4ec98f0 100644
--- a/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancerNetworksCmd.java
+++ b/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancerNetworksCmd.java
@@ -25,7 +25,6 @@ import org.apache.log4j.Logger;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.BaseCmd;
 import org.apache.cloudstack.api.BaseListCmd;
-import org.apache.cloudstack.api.IdentityMapper;
 import org.apache.cloudstack.api.APICommand;
 import org.apache.cloudstack.api.Parameter;
 import org.apache.cloudstack.api.PlugService;
@@ -52,8 +51,8 @@ public class ListF5LoadBalancerNetworksCmd extends BaseListCmd {
     //////////////// API parameters /////////////////////
     /////////////////////////////////////////////////////
 
-    @IdentityMapper(entityTableName="external_load_balancer_devices")
-    @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.LONG, required
= true, description="f5 load balancer device ID")
+    @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.UUID, entityType
= F5LoadBalancerResponse.class,
+            required = true, description="f5 load balancer device ID")
     private Long lbDeviceId;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4dd5f14e/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancersCmd.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancersCmd.java
b/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancersCmd.java
index 36b6dc0..c03d55a 100644
--- a/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancersCmd.java
+++ b/plugins/network-elements/f5/src/com/cloud/api/commands/ListF5LoadBalancersCmd.java
@@ -50,8 +50,8 @@ public class ListF5LoadBalancersCmd extends BaseListCmd {
             description="the Physical Network ID")
     private Long physicalNetworkId;
 
-    @IdentityMapper(entityTableName="external_load_balancer_devices")
-    @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.LONG,  description="f5
load balancer device ID")
+    @Parameter(name=ApiConstants.LOAD_BALANCER_DEVICE_ID, type=CommandType.UUID, entityType
= F5LoadBalancerResponse.class,
+            description="f5 load balancer device ID")
     private Long lbDeviceId;
 
     /////////////////////////////////////////////////////

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4dd5f14e/plugins/network-elements/f5/src/com/cloud/api/response/F5LoadBalancerResponse.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/f5/src/com/cloud/api/response/F5LoadBalancerResponse.java
b/plugins/network-elements/f5/src/com/cloud/api/response/F5LoadBalancerResponse.java
index a6d540f..9f6d645 100644
--- a/plugins/network-elements/f5/src/com/cloud/api/response/F5LoadBalancerResponse.java
+++ b/plugins/network-elements/f5/src/com/cloud/api/response/F5LoadBalancerResponse.java
@@ -16,11 +16,14 @@
 // under the License.
 package com.cloud.api.response;
 
+import org.apache.cloudstack.api.EntityReference;
 import org.apache.cloudstack.api.ApiConstants;
 import com.cloud.serializer.Param;
 import com.google.gson.annotations.SerializedName;
 import org.apache.cloudstack.api.BaseResponse;
+import com.cloud.network.ExternalLoadBalancerDeviceVO;
 
+@EntityReference(value=ExternalLoadBalancerDeviceVO.class)
 public class F5LoadBalancerResponse extends BaseResponse {
     @SerializedName(ApiConstants.LOAD_BALANCER_DEVICE_ID) @Param(description="device id of
the F5 load balancer")
     private String id;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/4dd5f14e/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java b/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java
index c78decb..46723d6 100644
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceVO.java
@@ -16,6 +16,7 @@
 // under the License.
 package com.cloud.network;
 
+import org.apache.cloudstack.api.Identity;
 import org.apache.cloudstack.api.InternalIdentity;
 import org.apache.cloudstack.network.ExternalNetworkDeviceManager;
 
@@ -36,7 +37,7 @@ import javax.persistence.Table;
 
 @Entity
 @Table(name="external_load_balancer_devices")
-public class ExternalLoadBalancerDeviceVO implements InternalIdentity {
+public class ExternalLoadBalancerDeviceVO implements InternalIdentity, Identity {
 
     @Id
     @GeneratedValue(strategy = GenerationType.IDENTITY)


Mime
View raw message