cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From miguelaferreira <...@git.apache.org>
Subject [GitHub] cloudstack pull request: From4.5.1: NSX/Nicira Plugin does not sup...
Date Fri, 16 Oct 2015 07:34:05 GMT
Github user miguelaferreira commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/935#discussion_r42215794
  
    --- Diff: plugins/network-elements/nicira-nvp/src/com/cloud/network/resource/NiciraNvpResource.java
---
    @@ -191,6 +204,19 @@ public PingCommand getCurrentStatus(final long id) {
             return new PingCommand(Host.Type.L2Networking, id);
         }
     
    +    private int searchApiProvider(ClusterRoleConfig[] configuredRoles) {
    +        int length = configuredRoles.length;
    +        for (int i = 0; i < length; i++) {
    +            if (! configuredRoles[i].getRole().equals("api_provider")){
    --- End diff --
    
    The searchApiProvider returns an index (if the element is found), and that index is then
used to obtain the element from the array (Line 190). Why not return the element right away?
    This would simplify the code around line 190


---
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.
---

Mime
View raw message