cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ProjectMoon <>
Subject [GitHub] cloudstack pull request #1908: CLOUDSTACK-9317: Fixed disable static nat on ...
Date Thu, 09 Mar 2017 10:27:18 GMT
Github user ProjectMoon commented on a diff in the pull request:
    --- Diff: plugins/hypervisors/xenserver/src/com/cloud/hypervisor/xenserver/resource/
    @@ -625,15 +627,20 @@ protected ExecutionResult cleanupNetworkElementCommand(final IpAssocCommand
                     // there is only one ip in this public vlan and removing it, so
                     // remove the nic
    -                if (ipsCount == 1 && !ip.isAdd()) {
    -                    removeVif = true;
    +                if (lastIp != null && !ip.isAdd()) {
    --- End diff --
    Maybe it would make sense to check the value of `lastIp` being something instead of just
checking if it's not null? It works the way it is, but perhaps checking specifically for a
value like `"true"` would make sense. Would prevent someone from updating code later to send
`"false"` for whatever reason and then causing something unexpected. Relying on not null as
a truth value is a bit obtuse in my opinion.

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 or file a JIRA ticket
with INFRA.

View raw message