You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by nitin-maharana <gi...@git.apache.org> on 2016/01/13 18:20:05 UTC

[GitHub] cloudstack pull request: CLOUDSTACK-9235: Autoscale button is miss...

GitHub user nitin-maharana opened a pull request:

    https://github.com/apache/cloudstack/pull/1337

    CLOUDSTACK-9235: Autoscale button is missing in VPC

    Autoscale button is missing. This should not be the case since we are able to add NS as the external LB provider in VPC.
    
    Steps:
    =====
    1. Create a VPC offering with NS as the external LB provider
    2. Create a VPC and configure the public tier with the above offering
    3. Acquire an IP address and try to configure Load Balancing rule
    
    Result:
    ======
    Autoscale option is not visible at all for the LB.
    
    Expected Result:
    =============
    Autoscale option should be available and should work exactly like the way it works for a normal isolated network with NS. If we choose NS as service provider for LB, autoscale should also be visible. If VR is chosen, only then we should not display autoscale.
    
    Fix:
    ===
    In case of VPC, it checks the services available.
    If LB is there, It checks the provider is Netscaler then it shows the button or hides it.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/nitin-maharana/CloudStack CloudStack-Nitin20_4.7

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1337.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1337
    
----
commit 68ca3cb58af02bcbfc2d95d52b69483478df33ce
Author: Nitin Kumar Maharana <ni...@citrix.com>
Date:   2015-10-13T06:18:12Z

    CLOUDSTACK-9235: Autoscale button is missing in VPC
    
    In case of VPC, it checks the services available.
    If LB is there, It checks the provider is Netscaler then it shows the button or hides it.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9235: Autoscale button is miss...

Posted by pdube <gi...@git.apache.org>.
Github user pdube commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1337#discussion_r50060205
  
    --- Diff: ui/scripts/network.js ---
    @@ -3667,8 +3652,16 @@
                                                                 return 2; //hide Autoscale button (both header and form)
                                                             }
                                                         } else { //from VPC section
    -                                                        //VPC doesn't support autoscale
    -                                                        return 2;
    +                                                        var lbProviderIsNetscaler;
    +                                                        var services = args.context.vpc[0].service;
    +
    +                                                        lbProviderIsNetscaler = checkIfNetScalerProviderIsEnabled(services);
    +
    +                                                        if (lbProviderIsNetscaler == true) { //AutoScale is only supported on Netscaler (but not on any other provider like VirtualRouter)
    --- End diff --
    
    You could remove the condition here, it is unnecessary


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9235: Autoscale button is miss...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cloudstack/pull/1337


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9235: Autoscale button is miss...

Posted by pdube <gi...@git.apache.org>.
Github user pdube commented on the pull request:

    https://github.com/apache/cloudstack/pull/1337#issuecomment-172691481
  
    Code LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cloudstack pull request: CLOUDSTACK-9235: Autoscale button is miss...

Posted by rafaelweingartner <gi...@git.apache.org>.
Github user rafaelweingartner commented on the pull request:

    https://github.com/apache/cloudstack/pull/1337#issuecomment-171373038
  
    Hi @nitin-maharana, 
    What about a little change in your code?
    
    The complexity of that if/else structure that you are working on is too big.
    
    I believe that you can extract the code from lines 3673-3686 to a method that returns a Boolean indicating if there is a provider named “NetScaler”. Then you could do something like : 
    var lbProviderIsNetscaler = checkIfNetscalerProviderIsEnabled (services);



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---