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

Parent list key is not validated if not provided via RESTCONF #83

Closed
achernavin22 opened this issue Apr 8, 2019 · 0 comments
Closed
Labels

Comments

@achernavin22
Copy link

In the ietf-netconf-acm module there is a list with an embedded list:

list rule-list {
    key name;

    leaf name {
        type string {
            length "1..max";
        }
    }

    list rule {
        key name;

        leaf name {
            type string {
                length "1..max";
            }
        }
    }
}

If you PUT /data/ietf-netconf-acm:nacm/rule-list/rule=test this rule, it will be accepted:

{
    "ietf-netconf-acm:rule": [
        {
            "name": "test",
            "module-name": "*",
            "access-operations": "*",
            "action": "deny"
        }
    ]
}

Every time you PUT that rule, a new rule-list is created with empty name that is a key and must be mandatory:

{
    "name": null,
    "rule": [
        {
            "name": "test",
            "module-name": "*",
            "access-operations": "*",
            "action": "deny"
        }
    ]
}
@olofhagsand olofhagsand added the bug label Apr 9, 2019
olofhagsand added a commit that referenced this issue Apr 11, 2019
…nd skipped.

* [Parent list key is not validated if not provided via RESTCONF #83](#83), thanks achernavin22.
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