cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swill <>
Subject [GitHub] cloudstack pull request: Check the existence of 'forceencap' param...
Date Mon, 18 Apr 2016 20:24:55 GMT
Github user swill commented on the pull request:
    @remibergsma can you review the functionality you expect.  I think the logic is wrong,
and if it is not, then it is VERY misleading.
    The code in question that is being executed is this: `CsHelper.bool_to_yn(obj['encap'])`
    For reference, this is the code being executed:
    def bool_to_yn(val):
        if val:
            return "yes"
        return "no"
    If I just read your code, I would assume you would want the final result to be `forceencaps=no`,
but this code as written will result in `forceencaps=yes`.
    Here is a simple test to prove the case...
    I think @alexandrelimassantana is right.  In order to get the expected behavior, you need
to use the boolean `False`.

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