On Tue, Oct 22, 2019 at 11:42:44PM +0200, Dmytro Shytyi wrote:
>
> [Dmytro] Yes we can augment additional nodes into "ietf-interfaces" it is
> what we do in the draft-shytyi-opsawg-vysm-04 :
>
>
> augment "/ietf-nfv:ucpe/ietf-if:interfaces/ietf-if:interface" {
> list ports {
> key "port";
> leaf port {
> type string;
> description
> "Name of the connector";
> }
This is _not_ augmenting into ietf-interfaces.
> We wold like to have this:
>
> module: ietf-ucpe
> +--rw ietf-ucpe:ucpe* [name]
> +--rw ietf-ucpe:Name string
> |
> +--rw ucpe-if:interfaces
If 'ucpe-if:interfaces' is supposed to be RFC 8343 interfaces, then
(1) you can't do this and (2) you do not want to do this.
> > >Cut and paste to change the 'nesting' is _not_ proper usage of
> >
> > YANG.
> >
> > [Dmytro]
> >
> > If I understood correctly I can't just derive the parts from the exisiting
> > module (by referencing them) to the new module.
> >
>
> I have no idea what you mean with "(by referencing them) to the new
> module". You can of course refer to definitions in ietf-interfaces.
>
> > So I have two questions:
> >
> > If i cant derive the parts from existing module while creating a new, how
> > to address this issue(when we want "ucpe-ietf-interfaces" to augment
> > "ietf-ucpe"). Could you suggest something?
> >I likely do not understand but you can of course augment
> >ietf-interfaces with additional nodes that refer to ietf-ucpe
> >definitions if that is what you are looking for.
>
>
> [Dmytro] Yes we can augment the "ietf-interfaces" with new modules. Hovewer
> in the draft-shytyi-opsawg-vysm-04 we are looking to augment module
> "ietf-ucpe" with modified "ietf-interfaces". Example
>
> SCHEME #1
>
> module: ietf-ucpe
> +--rw ietf-ucpe:ucpe* [name]
> +--rw ietf-ucpe:Name string
> |
> +--rw ucpe-if:interfaces
>
> ....
>
>
>
> To have a result similar to the scheme#1 (above) we derived the
> "ietf-interfaces" to "ietf-ucpe-interfaces". And "ietf-ucpe-interfaces" was
> modified (ex. with augment statement,etc..):
You are not composing and reusing models, you cut and paste models,
creating modified copies that do not interoperate. This is not what
the IETF tries to do.
The standard interfaces model is in /if:interfaces. There is likely no
point of replicating it elsewhere.
> module ietf-ucpe-interfaces {
> import ietf-ucpe { prefix ietf-vysm; }
> ...
> augment "/ietf-vysm:ucpe"{
> container interfaces {
> description "Interface parameters.";
> list interface {
> ...
> }
> }
> }
>
>
>
> If i cant derive the parts from existing module (ietf-interfaces) while
> creating a new("ietf-ucpe-interfaces) how we can get the result similar to
> scheme#1?
>
> Could you suggest something?
I have not seen a reason why scheme#1 is a good idea, I have given
reasons why copying is a bad idea. It appears to me like you are
trying to invent a different tree structure for a specific kind of
devices but having per device class different trees is not what we aim
for in the IETF. We aim for reuse of models across a wide range of
different devices.
/js
--
Juergen Schoenwaelder Jacobs University Bremen gGmbH
Phone: +49 421 200 3587 Campus Ring 1 | 28759 Bremen | Germany
Fax: +49 421 200 3103 <https://www.jacobs-university.de/>
_______________________________________________
OPSAWG mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/opsawg