mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-9618: Load Balancer configuration page does not have "Source" method in the drop down list
Added the source method to supported algorithm list in Netscaler element. Added a validation check.
This commit is contained in:
parent
13bfdd71e6
commit
3dc0eed71d
@ -232,6 +232,10 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
|
||||
|
||||
@Override
|
||||
public boolean validateLBRule(Network network, LoadBalancingRule rule) {
|
||||
if (canHandle(network, Service.Lb)) {
|
||||
String algo = rule.getAlgorithm();
|
||||
return (algo.equals("roundrobin") || algo.equals("leastconn") || algo.equals("source"));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -260,7 +264,7 @@ public class NetscalerElement extends ExternalLoadBalancerDeviceManagerImpl impl
|
||||
Map<Capability, String> lbCapabilities = new HashMap<Capability, String>();
|
||||
|
||||
// Specifies that the RoundRobin and Leastconn algorithms are supported for load balancing rules
|
||||
lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin,leastconn");
|
||||
lbCapabilities.put(Capability.SupportedLBAlgorithms, "roundrobin, leastconn, source");
|
||||
|
||||
// specifies that Netscaler network element can provided both shared and isolation modes
|
||||
lbCapabilities.put(Capability.SupportedLBIsolation, "dedicated, shared");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user