acidjunk / acidjunk/pyang

DSDL plugin mandatory containers

Aperta
#72 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
auto-migrated Priority-Medium Type-Defect
Lingua principale
Python
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

```
I have a question regarding mandatory containers.

RFC6110 claims that:
A container node is mandatory if its definition does not contain
the 'presence' substatement and at least one of its child nodes is
mandatory.

All clear. But what about the case when all of the mandatory children are state
data and you wish to generate a RNG schema to validate configuration only data.
As it is now such a schema will demand an empty container to be present even if
this is completly redundant. Is this a bug or a feature? Shouldn't such a
container be wrapped in rng:optional when extracting it from a hybrid schema?
After all it will no longer have any mandatory children after the
transformation...

An example module which demonstrates this case is ietf-netconf-acm@2011-12-23
with "nacm" root container which specifies three mandatory leafs – all of
which are state leafs. If you generate a RNG schema for target config with DSDL
plugin, this container will always need to be present for the instance document
to be valid.

```

Original issue reported on code.google.com by `jernej.t...@gmail.com` on 11 Apr 2012 at 11:02

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.