Leaf-list => vlan and vlan-range

Hi,

In YANG, there is leaf-list which carries the list of data.
Here the data type in vlan can be a single value or a range separated by two dots.

Case 1:
When the payload is:
10
21…25

Will it stored in data-store as in input (or) will it get expanded and stored as 10, 21, 22, 23, 24, 25?
What is the right/best approach?

Case 2:
When there is payload to delete 23 after Case 1.

Does it need to be:
delete 21…25
add 21…22
add 24…25

or it can be simple delete:
delete 23

Case 3:
Ideally the devices support many means to manage the configuration:
CLI, Ansible, Chef, Puppet, NXAPI , REST API, Netconf of Native model and OC model

Same as Case 2 where user delete the VLAN 23 but through different mean (say CLI)
What is expected in OC data store (get-config)?

Case4:
For all above cases config is to be understood.
How about the “State”?
How the leaf-list operates for the same?

Would like to understand more as open standard + implementation challenges/specifics.

A YANG leaf-list is really just a leaf (with a type) that can exist in multiple instances - this is obvious if you look at the XML representation in NETCONF, i.e.

<name>1</name>
<name>2</name>
<name>3</name>

There is no type in YANG that can make some specific syntax for the value of one of the instances, like 1…3, magically turn into multiple instances like in the XML above.