Re: [netmod] Question in Schema Mount

2020-03-17 Thread Martin Björklund
Hi,

SAMIER BARGUIL GIRALDO  wrote:
> Hi,
> 
> It is posible to mount just part of other yang module (i.e. just the "state" 
> branch) using the current definition?

Section 1 of RFC 8528 says:

   This document allows mounting of complete data models only.


/martin



> 
> 
> Samier Barguil
> Transport & IP Networks | GCTIO - Technology | CIT Centro Integrado de 
> Transporte |
> 
> Móvil +57 3017026430
> 
> Móvil +34 665416074
> 
> E-mail samier.barguilgiraldo@telefonica.com
> 
> E-mail samier.barg...@wipro.com
> 
> 
> 
> Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, 
> puede contener información privilegiada o confidencial y es para uso 
> exclusivo de la persona o entidad de destino. Si no es usted. el destinatario 
> indicado, queda notificado de que la lectura, utilización, divulgación y/o 
> copia sin autorización puede estar prohibida en virtud de la legislación 
> vigente. Si ha recibido este mensaje por error, le rogamos que nos lo 
> comunique inmediatamente por esta misma vía y proceda a su destrucción.
> 
> The information contained in this transmission is privileged and confidential 
> information intended only for the use of the individual or entity named 
> above. If the reader of this message is not the intended recipient, you are 
> hereby notified that any dissemination, distribution or copying of this 
> communication is strictly prohibited. If you have received this transmission 
> in error, do not read it. Please immediately reply to the sender that you 
> have received this communication in error and then delete it.
> 
> Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, 
> pode conter informação privilegiada ou confidencial e é para uso exclusivo da 
> pessoa ou entidade de destino. Se não é vossa senhoria o destinatário 
> indicado, fica notificado de que a leitura, utilização, divulgação e/ou cópia 
> sem autorização pode estar proibida em virtude da legislação vigente. Se 
> recebeu esta mensagem por erro, rogamos-lhe que nos o comunique imediatamente 
> por esta mesma via e proceda a sua destruição

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Question in Schema Mount

2020-03-17 Thread SAMIER BARGUIL GIRALDO
Hi,

It is posible to mount just part of other yang module (i.e. just the "state" 
branch) using the current definition?

Regards


Samier Barguil
Transport & IP Networks | GCTIO - Technology | CIT Centro Integrado de 
Transporte |

Móvil +57 3017026430

Móvil +34 665416074

E-mail samier.barguilgiraldo@telefonica.com

E-mail samier.barg...@wipro.com



Este mensaje y sus adjuntos se dirigen exclusivamente a su destinatario, puede 
contener información privilegiada o confidencial y es para uso exclusivo de la 
persona o entidad de destino. Si no es usted. el destinatario indicado, queda 
notificado de que la lectura, utilización, divulgación y/o copia sin 
autorización puede estar prohibida en virtud de la legislación vigente. Si ha 
recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente 
por esta misma vía y proceda a su destrucción.

The information contained in this transmission is privileged and confidential 
information intended only for the use of the individual or entity named above. 
If the reader of this message is not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this communication 
is strictly prohibited. If you have received this transmission in error, do not 
read it. Please immediately reply to the sender that you have received this 
communication in error and then delete it.

Esta mensagem e seus anexos se dirigem exclusivamente ao seu destinatário, pode 
conter informação privilegiada ou confidencial e é para uso exclusivo da pessoa 
ou entidade de destino. Se não é vossa senhoria o destinatário indicado, fica 
notificado de que a leitura, utilização, divulgação e/ou cópia sem autorização 
pode estar proibida em virtude da legislação vigente. Se recebeu esta mensagem 
por erro, rogamos-lhe que nos o comunique imediatamente por esta mesma via e 
proceda a sua destruição
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Question about schema-mount

2019-11-28 Thread Martin Bjorklund
Hi,


"Bogaert, Bart (Nokia - BE/Antwerp)"  wrote:
> Hi Martin,
> 
> -Original Message-
> From: Martin Bjorklund  
> Sent: Thursday, November 28, 2019 9:28 AM
> To: Bogaert, Bart (Nokia - BE/Antwerp) 
> Cc: netmod@ietf.org
> Subject: Re: [netmod] Question about schema-mount
> 
> Hi,
> 
> "Bogaert, Bart (Nokia - BE/Antwerp)"  wrote:
> > Hi,
> > 
> > We're trying to figure out whether it is possible to define a module 
> > in the parent schema which would use a node being a leafref to a node 
> > in a model under a mount point.
> 
> In order for this to work, the leafref target would have to be present
> at compile time / design time.  RFC 8528 defines Design time,
> Implementation time, and Run time mounts, and says: "Design-time
> mounts are outside the scope of this document" (see section 1).
> 
> Another alternative would be some new kind of "leafref-like" construct
> that supported this.
> 
> What you can do though is to ensure the leaf in the parent module is
> of the same type as the mounted node you want to refer to, and explain
> in text what the semantics is.
> 
> [Bogaert, Bart] Thanks for this feedback.  The use case we're looking
> into is the following:
> [Bogaert, Bart] A forwarder contains references to interfaces which
> are defined as leafref with path /interfaces/interface/name.  In the
> scope of this question the path would be
> /logical-network/elements/logical-network-element/interfaces/interface/name.
> Question is: will this work with leafref?

No, since a YANG compiler that sees this leafref will fail to find the
target and thus throw an error.

[side note: a single leafref wouldn't work anyway, since you would the
name of both the lne and the name of the interface]

> What will the [Bogaert,
> Bart] NETCONF server do in such a case, in other word: is it able to
> resolve this leafref or do we have to define this as a some kind of
> string that includes the name of the logical-network-element and the
> name of the interface?

Yes, a single string or two leafs, 'lne-name' and 'if-name'.


/martin


> > I don't seem to find any statement
> > that would prohibit this but RFC 8530, referred to from the schema 
> > mount RFC, uses a leafref to a node in a module which is still in the 
> > list of YANG modules of the parent (and consequently in the YANG 
> > library of the parent).
> > 
> > So, using RFC8530 as example:
> > 
> > Instead of lne:bind-lne-name being a leafref to 
> > /logical-network-elements/logical-network-element/name we would point 
> > to 
> > /logical-network-elements/logical-network-element/interfaces/interface/name.
> > 
> > The interfaces YANG module is also part of the YANG library of the 
> > parent but I'm not so sure whether above construction would work well 
> > as the information related to the mounted YANG modules is in a YANG 
> > library different from the parent's YANG library.
> > 
> > Note that there is also some confusion with the examples in RFC8530:
> > while the bind-lne-name in the YANG module is a leafref as syntax, the
> > examples work with a string as syntax for that same leaf.
> 
> Do you mean the tree diagram?
> 
> [Bogaert, Bart] Correct.
> 
> Best regards, Bart
> 
>module: ietf-interfaces
>  +--rw interfaces
> +--rw interface* [name]
>+--rw namestring
>+--rw lne:bind-lne-name?  string
> 
> This looks like a bug to me; it should be a leafref.
> 
> 
> /martin
> 

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Question about schema-mount

2019-11-28 Thread Bogaert, Bart (Nokia - BE/Antwerp)
Hi Martin,

-Original Message-
From: Martin Bjorklund  
Sent: Thursday, November 28, 2019 9:28 AM
To: Bogaert, Bart (Nokia - BE/Antwerp) 
Cc: netmod@ietf.org
Subject: Re: [netmod] Question about schema-mount

Hi,

"Bogaert, Bart (Nokia - BE/Antwerp)"  wrote:
> Hi,
> 
> We're trying to figure out whether it is possible to define a module 
> in the parent schema which would use a node being a leafref to a node 
> in a model under a mount point.

In order for this to work, the leafref target would have to be present at 
compile time / design time.  RFC 8528 defines Design time, Implementation time, 
and Run time mounts, and says: "Design-time mounts are outside the scope of 
this document" (see section 1).

Another alternative would be some new kind of "leafref-like" construct that 
supported this.

What you can do though is to ensure the leaf in the parent module is of the 
same type as the mounted node you want to refer to, and explain in text what 
the semantics is.

[Bogaert, Bart] Thanks for this feedback.  The use case we're looking into is 
the following:
[Bogaert, Bart] A forwarder contains references to interfaces which are defined 
as leafref with path /interfaces/interface/name.  In the scope of this question 
the path would be 
/logical-network/elements/logical-network-element/interfaces/interface/name.  
Question is: will this work with leafref?  What will the [Bogaert, Bart] 
NETCONF server do in such a case, in other word: is it able to resolve this 
leafref or do we have to define this as a some kind of string that includes the 
name of the logical-network-element and the name of the interface?


> I don't seem to find any statement
> that would prohibit this but RFC 8530, referred to from the schema 
> mount RFC, uses a leafref to a node in a module which is still in the 
> list of YANG modules of the parent (and consequently in the YANG 
> library of the parent).
> 
> So, using RFC8530 as example:
> 
> Instead of lne:bind-lne-name being a leafref to 
> /logical-network-elements/logical-network-element/name we would point 
> to 
> /logical-network-elements/logical-network-element/interfaces/interface/name.
> 
> The interfaces YANG module is also part of the YANG library of the 
> parent but I'm not so sure whether above construction would work well 
> as the information related to the mounted YANG modules is in a YANG 
> library different from the parent's YANG library.
> 
> Note that there is also some confusion with the examples in RFC8530:
> while the bind-lne-name in the YANG module is a leafref as syntax, the 
> examples work with a string as syntax for that same leaf.

Do you mean the tree diagram?

[Bogaert, Bart] Correct.

Best regards, Bart

   module: ietf-interfaces
 +--rw interfaces
+--rw interface* [name]
   +--rw namestring
   +--rw lne:bind-lne-name?  string

This looks like a bug to me; it should be a leafref.


/martin

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Question about schema-mount

2019-11-28 Thread Martin Bjorklund
Hi,

"Bogaert, Bart (Nokia - BE/Antwerp)"  wrote:
> Hi,
> 
> We're trying to figure out whether it is possible to define a module
> in the parent schema which would use a node being a leafref to a node
> in a model under a mount point.

In order for this to work, the leafref target would have to be present
at compile time / design time.  RFC 8528 defines Design time,
Implementation time, and Run time mounts, and says: "Design-time
mounts are outside the scope of this document" (see section 1).

Another alternative would be some new kind of "leafref-like" construct
that supported this.

What you can do though is to ensure the leaf in the parent module is
of the same type as the mounted node you want to refer to, and explain
in text what the semantics is.


> I don't seem to find any statement
> that would prohibit this but RFC 8530, referred to from the schema
> mount RFC, uses a leafref to a node in a module which is still in the
> list of YANG modules of the parent (and consequently in the YANG
> library of the parent).
> 
> So, using RFC8530 as example:
> 
> Instead of lne:bind-lne-name being a leafref to
> /logical-network-elements/logical-network-element/name we would point
> to
> /logical-network-elements/logical-network-element/interfaces/interface/name.
> 
> The interfaces YANG module is also part of the YANG library of the
> parent but I'm not so sure whether above construction would work well
> as the information related to the mounted YANG modules is in a YANG
> library different from the parent's YANG library.
> 
> Note that there is also some confusion with the examples in RFC8530:
> while the bind-lne-name in the YANG module is a leafref as syntax, the
> examples work with a string as syntax for that same leaf.

Do you mean the tree diagram?

   module: ietf-interfaces
 +--rw interfaces
+--rw interface* [name]
   +--rw namestring
   +--rw lne:bind-lne-name?  string

This looks like a bug to me; it should be a leafref.


/martin

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


Re: [netmod] Question on schema-mount

2018-02-08 Thread Martin Bjorklund
Hi,

"Bogaert, Bart (Nokia - BE/Antwerp)"  wrote:
> Hi,
> 
> We have a question w.r.t. deletion of entry in a list using mounted
> schema knowing that in NC/Y there is no such thing as a "cascading
> delete" (leafref constructions in many cases even makes it impossible
> to delete a resource if it is still referred).
> 
> How does this apply to such a schema being mounted.  Using the example
> from the draft:
> 
>  +--rw interfaces
>  |  +--rw interface* [name]
>  | ...
>  +--rw logical-device* [name]
> +--rw name
> |   ...
> +--rw interfaces
>   +--rw interface* [name]
>  ...
> 
> Is it possible in this case to delete /logical-device[name='x'] and
> the server has to remove all the data associated with the mounted
> schema?  Or does the edit-config also explicitly has to delete the
> data related to the mounted schema?

This is not a generic schema mount question, but a question for the
model that provides the mount.

Suppose the model that defines logical-device also augments the
/interfaces list with an leaf to assign interfaces to logical-devices:

  augment /if:interfaces/if:interface {
leaf assign-to-logical-device {
  type leafref {
path /logical-device/name;
  }
}
  }

Then you wouldn't be able to delete the logical-device if it still has
an interface assigned to it.

Also, if you actually remove /logical-device[name='x'], schema mount
doesn't say anything about what really happens - will the server first
delete all config on the logical device and then delete the logical
device entry in the parent, or will the server just delete the entry
in the parent?  These are all questions for the specific model.  I
don't know if the LNE/NI documents specify this behaviour, but they
probably should.

> I could not find something in the draft that deals with this (or it is
> there, but then I did not understand that section very well).

Schema mount doesn't change anything in this regard; it doesn't add
any magical implicit delete or anything like that.


/martin

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod