Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ACL table test failure due to JSON file format issue #182

Closed
stcheng opened this issue May 17, 2017 · 5 comments
Closed

ACL table test failure due to JSON file format issue #182

stcheng opened this issue May 17, 2017 · 5 comments
Labels

Comments

@stcheng
Copy link
Contributor

stcheng commented May 17, 2017

https://github.com/Azure/sonic-mgmt/blob/master/ansible/roles/test/templates/acltb_test_rules.j2

In this file, several arrays are appended with each other and the format is not correct so that after the JSON file is generated, it cannot be applied.

root@str-msn2700-05:/etc/swss/config.d# swssconfig acltb_test_rules.json
Exception caught:parse error - unexpected ','; expected end of input
@stcheng
Copy link
Contributor Author

stcheng commented May 17, 2017

@andriymoroz-mlnx could you take a look at this?

@andriymoroz-mlnx
Copy link
Contributor

Could you send me the generated json file?

@stcheng
Copy link
Contributor Author

stcheng commented May 19, 2017

    {
        "ACL_RULE_TABLE:ACL_Testbed_Test_Table:RuleB2_Priority_test_permit": {
            "priority" : "51",
            "src_ip" : "10.0.0.3",
            "packet_action" : "forward"
        },
        "OP": "SET"
    }
]
[
    {
        "ACL_RULE_TABLE:ACL_Testbed_Test_Table:Rule01_SRC_IP_test": {
            "priority" : "50",
            "src_ip" : "10.0.0.2",
            "packet_action" : "drop"
        },
        "OP": "SET"
    },

between two sets of rules, they are divided by ] and [, which cannot be parsed by swssconfig.

@andriymoroz-mlnx
Copy link
Contributor

This is not supposed to be generated...
The code inside loop should be inserted only once for loop.index==2

@stcheng
Copy link
Contributor Author

stcheng commented May 21, 2017

@andriymoroz-mlnx it seems to be jinja2 version issue: sonic-net/sonic-buildimage#618.

@stcheng stcheng closed this as completed May 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants