Closed abierman closed 5 years ago
@abierman: This is more how you are looking at issue:
augment - you could think of that statement is actually importing a subtree from imported module and modifing it.
iana-if-type - In this case it is specified in iana-if-type that it imports ietf-interfaces. I can image having use ietf-interfaces without iana-if-type.
Isn't this solved with packages (#50)?
Andy: maybe this is more a YANG-library or a YANG-package issue.
Closed in Feb 6 Virtual Interim meeting.
There is no way in YANG to express a module dependency besides the "import" statement. This does not support 2 common use-cases:
iana-if-type (used with ietf-interfaces but not imported)
augment (augmented module never imports anything from the augmenting module)
Possible solution could be a new statement
requires {
// could have SEMVER info specifying acceptable versions
}
In order to support placeholder modules and flexible dependency chains, virtual modules could be supported, similar to Yocto
module A { requires routing; ...
}
module ietf-routing { provides routing; ... }