cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject git commit: updated refs/heads/4.3 to 041089a
Date Wed, 20 Nov 2013 06:07:43 GMT
Updated Branches:
  refs/heads/4.3 7ed2a21c2 -> 041089afe


Adding protocol parameter to loadbalancer response


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

Branch: refs/heads/4.3
Commit: 041089afe2f8a737feff74cd43d0a9bce69a20f7
Parents: 7ed2a21
Author: Syed Ahmed <sahmed@cloudops.com>
Authored: Tue Nov 19 22:10:22 2013 +0530
Committer: Murali Reddy <muralimmreddy@gmail.com>
Committed: Wed Nov 20 11:22:37 2013 +0530

----------------------------------------------------------------------
 api/src/com/cloud/network/rules/LoadBalancer.java        |  1 +
 .../com/cloud/network/rules/LoadBalancerContainer.java   |  2 ++
 .../cloudstack/api/response/LoadBalancerResponse.java    |  8 ++++++++
 .../cloudstack/lb/ApplicationLoadBalancerRuleVO.java     | 11 +++++++++++
 server/src/com/cloud/api/ApiResponseHelper.java          |  1 +
 5 files changed, 23 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/041089af/api/src/com/cloud/network/rules/LoadBalancer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/rules/LoadBalancer.java b/api/src/com/cloud/network/rules/LoadBalancer.java
index e6dadca..c260b81 100644
--- a/api/src/com/cloud/network/rules/LoadBalancer.java
+++ b/api/src/com/cloud/network/rules/LoadBalancer.java
@@ -25,4 +25,5 @@ public interface LoadBalancer extends FirewallRule, LoadBalancerContainer
{
 
     int getDefaultPortEnd();
 
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/041089af/api/src/com/cloud/network/rules/LoadBalancerContainer.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/rules/LoadBalancerContainer.java b/api/src/com/cloud/network/rules/LoadBalancerContainer.java
index 9d5ea59..c75d0cc 100644
--- a/api/src/com/cloud/network/rules/LoadBalancerContainer.java
+++ b/api/src/com/cloud/network/rules/LoadBalancerContainer.java
@@ -27,6 +27,8 @@ public interface LoadBalancerContainer {
     String getDescription();
     
     String getAlgorithm();
+
+    String getLbProtocol();
     
     Scheme getScheme();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/041089af/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java b/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java
index 0f18097..39650d3 100644
--- a/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java
+++ b/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java
@@ -91,6 +91,11 @@ public class LoadBalancerResponse extends BaseResponse implements ControlledEnti
     @Param(description = "the id of the zone the rule belongs to")
     private String zoneId;
 
+    @SerializedName(ApiConstants.PROTOCOL)
+    @Param(description = "the protocol of the loadbalanacer rule")
+    private String lbProtocol;
+
+
     @SerializedName(ApiConstants.TAGS)  @Param(description="the list of resource tags associated
with load balancer", responseObject = ResourceTagResponse.class)
     private List<ResourceTagResponse> tags;
     
@@ -170,4 +175,7 @@ public class LoadBalancerResponse extends BaseResponse implements ControlledEnti
         this.networkId = networkId;
     }
 
+    public void setLbProtocol(String lbProtocol) {
+        this.lbProtocol = lbProtocol;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/041089af/engine/schema/src/org/apache/cloudstack/lb/ApplicationLoadBalancerRuleVO.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/lb/ApplicationLoadBalancerRuleVO.java
b/engine/schema/src/org/apache/cloudstack/lb/ApplicationLoadBalancerRuleVO.java
index 37a747e..7bb7293 100644
--- a/engine/schema/src/org/apache/cloudstack/lb/ApplicationLoadBalancerRuleVO.java
+++ b/engine/schema/src/org/apache/cloudstack/lb/ApplicationLoadBalancerRuleVO.java
@@ -58,6 +58,10 @@ public class ApplicationLoadBalancerRuleVO extends FirewallRuleVO implements
App
     
     @Column(name="source_ip_address_network_id")
     Long sourceIpNetworkId;
+
+    @Column(name="lb_protocol")
+    String lbProtocol;
+
     
     @Column(name="source_ip_address")
     @Enumerated(value=EnumType.STRING)
@@ -112,6 +116,11 @@ public class ApplicationLoadBalancerRuleVO extends FirewallRuleVO implements
App
     }
 
     @Override
+    public String getLbProtocol() {
+        return lbProtocol;
+    }
+
+    @Override
     public int getDefaultPortStart() {
         return defaultPortStart;
     }
@@ -130,4 +139,6 @@ public class ApplicationLoadBalancerRuleVO extends FirewallRuleVO implements
App
     public int getInstancePort() {
         return defaultPortStart;
     }
+
+
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/041089af/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 5f66d55..409448d 100755
--- a/server/src/com/cloud/api/ApiResponseHelper.java
+++ b/server/src/com/cloud/api/ApiResponseHelper.java
@@ -748,6 +748,7 @@ public class ApiResponseHelper implements ResponseGenerator {
         lbResponse.setPublicPort(Integer.toString(loadBalancer.getSourcePortStart()));
         lbResponse.setPrivatePort(Integer.toString(loadBalancer.getDefaultPortStart()));
         lbResponse.setAlgorithm(loadBalancer.getAlgorithm());
+        lbResponse.setLbProtocol(loadBalancer.getLbProtocol());
         FirewallRule.State state = loadBalancer.getState();
         String stateToSet = state.toString();
         if (state.equals(FirewallRule.State.Revoke)) {


Mime
View raw message