You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ap...@apache.org on 2013/06/13 11:14:36 UTC

git commit: updated refs/heads/master to b72c79b

Updated Branches:
  refs/heads/master aeb024723 -> b72c79b37


CLOUDSTACK-2934 Fixed not showing uuid in list firewall rules response

Signed-off-by: Abhinandan Prateek <ap...@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/master
Commit: b72c79b3702716b8202a0c592011d7e428c18160
Parents: aeb0247
Author: Jayapal <ja...@citrix.com>
Authored: Tue Jun 11 20:01:23 2013 +0530
Committer: Abhinandan Prateek <ap...@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();