Skip to content

Implement type constraints #149

@steiler

Description

@steiler

E.g. the following type has a limited value range, right now we do not honor this range.
https://github.com/nokia/srlinux-yang-models/blob/v24.3.2/srlinux-yang-models/srl_nokia/models/interfaces/srl_nokia-interfaces-vlans.yang#L105-L111

Is even a union:
https://github.com/nokia/srlinux-yang-models/blob/v24.3.2/srlinux-yang-models/srl_nokia/models/interfaces/srl_nokia-interfaces-vlans.yang#L175

Example data that makes it all the way to the device.

[
    {
        "path": "/",
        "value": {
            "interface": [
                {
                    "name": "ethernet-1/2",
                    "vlan-tagging": true,
                    "subinterface": [
                        {
                            "index": 6,
                            "vlan": {
                                "encap": {
                                    "single-tagged": {
                                        "vlan-id": 8000
                                    }
                                }
                            }
                        }
                    ]
                }
            ]
        }
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions