You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bf...@apache.org on 2013/04/10 19:46:14 UTC

[34/50] [abbrv] git commit: updated refs/heads/ui-mixed-zone-management to 7efbcfa

CLOUDSTACK-1862 Added vm ip address info in the list PF 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/c8f20031
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c8f20031
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c8f20031

Branch: refs/heads/ui-mixed-zone-management
Commit: c8f20031380cada2782c8849fcb5fcfbb1eb41fe
Parents: cbbba28
Author: Jayapal <ja...@citrix.com>
Authored: Wed Apr 10 12:19:06 2013 +0530
Committer: Abhinandan Prateek <ap...@apache.org>
Committed: Wed Apr 10 14:26:36 2013 +0530

----------------------------------------------------------------------
 .../api/response/FirewallRuleResponse.java         |   12 ++++++++++++
 server/src/com/cloud/api/ApiResponseHelper.java    |    1 +
 2 files changed, 13 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8f20031/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java b/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
index 08722ae..787410a 100644
--- a/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java
@@ -71,6 +71,18 @@ public class FirewallRuleResponse extends BaseResponse {
     @SerializedName(ApiConstants.TAGS)  @Param(description="the list of resource tags associated with the rule", responseObject = ResourceTagResponse.class)
     private List<ResourceTagResponse> tags;
 
+    @SerializedName(ApiConstants.VM_GUEST_IP) @Param(description="the vm ip address for the port forwarding rule")
+    private String destNatVmIp;
+
+
+    public String getDestNatVmIp() {
+        return destNatVmIp;
+    }
+
+    public void setDestNatVmIp(String destNatVmIp) {
+        this.destNatVmIp = destNatVmIp;
+    }
+
 
     @Override
     public String getObjectId() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8f20031/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 64be7f8..93b755a 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -965,6 +965,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         response.setPublicIpAddress(ip.getAddress().addr());
 
         if (ip != null && fwRule.getDestinationIpAddress() != null) {
+            response.setDestNatVmIp(fwRule.getDestinationIpAddress().toString());
             UserVm vm = ApiDBUtils.findUserVmById(fwRule.getVirtualMachineId());
             if (vm != null) {
                 response.setVirtualMachineId(vm.getUuid());