ASF GitHub Bot commented on CLOUDSTACK-9618:

Github user jburwell commented on a diff in the pull request:

    --- Diff: 
    @@ -260,7 +264,7 @@ public boolean applyLBRules(Network config, 
List<LoadBalancingRule> rules) throw
             Map<Capability, String> lbCapabilities = new HashMap<Capability, 
             // Specifies that the RoundRobin and Leastconn algorithms are 
supported for load balancing rules
    -        lbCapabilities.put(Capability.SupportedLBAlgorithms, 
    +        lbCapabilities.put(Capability.SupportedLBAlgorithms, 
    --- End diff --
    The list of strings declared on this line must be sync with the list used 
to validate the algorithm on line 237.  Therefore, please consider extracting 
this list to a constant `ImmutableSet<String>`, `SUPPORTED_ALGORITHMS` in order 
to ensure cohesion between declaration and validation.  With this change, the 
validateLBRule can be re-implemented as follows:
    public boolean validateLBRule(Network network, LoadBalancingRule rule) {
        Preconditions.checkArgument(network != null, "validateLBRule requires a 
non-null network");
        Preconditions.checkArgument(rule != null, "validateLBRule requires a 
non-null rule");
        return (canHandle(network, Service.Lb)) : 
SUPPORTED_ALGORITHMS.contains(rule.getAlgorithm()) : true;
    This line can be re-implemented as follows:

> Load Balancer configuration page does not have "Source" method in the drop 
> down list
> ------------------------------------------------------------------------------------
>                 Key: CLOUDSTACK-9618
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9618
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Nitin Kumar Maharana
> If we create an isolated network with NetScaler published service offering 
> for Load balancing service, then the load balancing configuration UI does not 
> show "Source" as one of the supported LB methods in the drop down list. It 
> only shows "Round-Robin" and "LeastConnection" methods in the list. Howerver, 
> It successfully creates LB rule with "Source" as the LB method using API.

This message was sent by Atlassian JIRA

Reply via email to