mirror of https://github.com/apache/cloudstack.git
Adding protocol parameter to loadbalancer response
This commit is contained in:
parent
67b071beaa
commit
481af07fb1
|
|
@ -25,4 +25,5 @@ public interface LoadBalancer extends FirewallRule, LoadBalancerContainer {
|
|||
|
||||
int getDefaultPortEnd();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ public interface LoadBalancerContainer {
|
|||
String getDescription();
|
||||
|
||||
String getAlgorithm();
|
||||
|
||||
String getLbProtocol();
|
||||
|
||||
Scheme getScheme();
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
@ -111,6 +115,11 @@ public class ApplicationLoadBalancerRuleVO extends FirewallRuleVO implements App
|
|||
return algorithm;
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue