cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaanHoogland <...@git.apache.org>
Subject [GitHub] cloudstack pull request: CLOUDSTACK-9106 - As a Developer I want t...
Date Sun, 06 Dec 2015 15:42:59 GMT
Github user DaanHoogland commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1179#discussion_r46771839
  
    --- Diff: server/src/com/cloud/network/element/VirtualRouterElement.java ---
    @@ -841,24 +857,26 @@ public VirtualRouterProvider addElement(final Long nspId, final
Type providerTyp
     
         @Override
         public boolean applyPFRules(final Network network, final List<PortForwardingRule>
rules) throws ResourceUnavailableException {
    +        boolean result = false;
             if (canHandle(network, Service.PortForwarding)) {
                 final List<DomainRouterVO> routers = _routerDao.listByNetworkAndRole(network.getId(),
Role.VIRTUAL_ROUTER);
                 if (routers == null || routers.isEmpty()) {
                     s_logger.debug("Virtual router elemnt doesn't need to apply firewall
rules on the backend; virtual " + "router doesn't exist in the network " + network.getId());
    -                return true;
    +                result = true;
    --- End diff --
    
    I agree with your consideration and I am not forcing you to change to win my lgtm. I just
want to make sure we discuss the consideration here for posterity and change only if a simple
good alternative comes up.
    
    I noticed line 874 and wondered about this and the &= thingy upstairs. I would use
a combination of first trying all of them and then throw the exception if any of them failed


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