Skip to content

non min/max multiple ranges error #150

@ohad182

Description

@ohad182

Hi,

i tried to load a yang file with the following content and i get range error no matter what the value is:

// doesnt work - getting range violation error
container my_container {
	description "container settings";
	list my-list {
		description "a list of values";
		key "list-base";

		leaf list-base {
			description "the base list element";
			type uint32 {
				range "0 | 1024 | 2048 | 3072 | 4096 | 5120";
			}
		}
	}
}

when i set min/max in each of the or parts, it works well

// works
container my_container {
	description "container settings";
	list my-list {
		description "a list of values";
		key "list-base";

		leaf list-base {
			description "the base list element";
			type uint32 {
				range "0 .. 0 | 1024 .. 1024 | 2048 .. 2048 | 3072 .. 3072 | 4096 .. 4096 | 5120 .. 5120";
			}
		}
	}
}

can we have support for the first range?
from my understanding, the RFC supports it: https://datatracker.ietf.org/doc/html/rfc6020#section-9.2.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions