Github user swill commented on the pull request:

    https://github.com/apache/cloudstack/pull/1402#issuecomment-211562114
  
    @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...
    
    
![image](https://cloud.githubusercontent.com/assets/13644/14618718/f7f43556-0581-11e6-8ffb-2efd1577d433.png)
    
    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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to