cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject [20/50] [abbrv] git commit: updated refs/heads/object_store to f41c800
Date Sat, 15 Jun 2013 02:52:20 GMT
CLOUDSTACK-2934 Fixed not showing uuid in list firewall rules response

Signed-off-by: Abhinandan Prateek <aprateek@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b72c79b3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b72c79b3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b72c79b3

Branch: refs/heads/object_store
Commit: b72c79b3702716b8202a0c592011d7e428c18160
Parents: aeb0247
Author: Jayapal <jayapalreddy.uradi@citrix.com>
Authored: Tue Jun 11 20:01:23 2013 +0530
Committer: Abhinandan Prateek <aprateek@apache.org>
Committed: Thu Jun 13 14:37:34 2013 +0530

----------------------------------------------------------------------
 .../org/apache/cloudstack/api/response/FirewallResponse.java | 8 ++++----
 server/src/com/cloud/api/ApiResponseHelper.java              | 5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b72c79b3/api/src/org/apache/cloudstack/api/response/FirewallResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/FirewallResponse.java b/api/src/org/apache/cloudstack/api/response/FirewallResponse.java
index 26d2433..13a04b6 100644
--- a/api/src/org/apache/cloudstack/api/response/FirewallResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/FirewallResponse.java
@@ -39,10 +39,10 @@ public class FirewallResponse extends BaseResponse {
     private String endPort;
 
     @SerializedName(ApiConstants.IP_ADDRESS_ID) @Param(description="the public ip address
id for the firewall rule")
-    private Long publicIpAddressId;
+    private String publicIpAddressId;
 
     @SerializedName(ApiConstants.NETWORK_ID) @Param(description="the network id of the firewall
rule")
-    private Long networkId;
+    private String networkId;
 
     @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="the public ip address for
the firewall rule")
     private String publicIpAddress;
@@ -78,7 +78,7 @@ public class FirewallResponse extends BaseResponse {
         this.endPort = endPort;
     }
 
-    public void setPublicIpAddressId(Long publicIpAddressId) {
+    public void setPublicIpAddressId(String publicIpAddressId) {
         this.publicIpAddressId = publicIpAddressId;
     }
 
@@ -86,7 +86,7 @@ public class FirewallResponse extends BaseResponse {
         this.publicIpAddress = publicIpAddress;
     }
 
-    public void setNetworkId(Long networkId) {
+    public void setNetworkId(String networkId) {
         this.networkId = networkId;
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b72c79b3/server/src/com/cloud/api/ApiResponseHelper.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiResponseHelper.java b/server/src/com/cloud/api/ApiResponseHelper.java
index 4f75b99..94c5d6c 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -2399,11 +2399,12 @@ public class ApiResponseHelper implements ResponseGenerator {
 
         if (fwRule.getTrafficType() == FirewallRule.TrafficType.Ingress) {
             IpAddress ip = ApiDBUtils.findIpAddressById(fwRule.getSourceIpAddressId());
-            response.setPublicIpAddressId(ip.getId());
+            response.setPublicIpAddressId(ip.getUuid());
             response.setPublicIpAddress(ip.getAddress().addr());
         } else if (fwRule.getTrafficType() == FirewallRule.TrafficType.Egress) {
             response.setPublicIpAddress(null);
-            response.setNetworkId(fwRule.getNetworkId());
+            Network network = ApiDBUtils.findNetworkById(fwRule.getNetworkId());
+            response.setNetworkId(network.getUuid());
         }
 
         FirewallRule.State state = fwRule.getState();


Mime
View raw message