Subject: Re: [netconf] YANG attributes in a datastore

From: Qin Wu <[email-masked]>
Date: Wed, 11 Dec 2019 01:46:26 +0000

I am wondering whether the metadata is part of NMDA datastore, e.g., operational datastore?
Should protocol operation tackle these metadata?

-Qin
-----邮件原件-----
发件人: netconf [mailto:[email-masked]] 代表 Balázs Lengyel
发送时间: 2019年12月10日 22:59
收件人: Martin Bjorklund <[email-masked]>; [email-masked]
抄送: [email-masked]
主题: Re: [netconf] YANG attributes in a datastore

Hello,
If we try to standardize editing metadata, we will face a number of issues that need to be clarified:

- Will you model whether the attribute (metadata) is writable?  Config is not an allowed substatement in https://tools.ietf.org/html/rfc7952#section-3
- Can a metadata have other additional properties? (mandatory, cardinality, uniqueness of some kind?)
- If it is modified, will it be subject to validation, error-messages? Will a bad metadata result in a failed error-config?

Regards Balazs

-----Original Message-----
From: netconf <[email-masked]> On Behalf Of Martin Bjorklund
Sent: 2019. december 10., kedd 15:04
To: [email-masked]
Cc: [email-masked]
Subject: Re: [netconf] YANG attributes in a datastore

Hi,

Michal Vaško <[email-masked]> wrote:
> Hello,
> we are thinking about adding support for arbitrary attributes [1] in 
> our YANG/NETCONF datastore. To my knowledge, only the representation 
> in XML or JSON is defined and standardized but there are no guidelines 
> for editing (CRUD) these attributes.
> 
> So, my question is a rather general one, regarding implementations 
> that support editing these attributes, would you mind sharing some 
> basic ideas or principles used? Or is this outside any consensus and 
> each implementation is free to handle this completely in its own 
> fashion? Thanks for any input.

I think this depends on the attribute defintion.  Some attributes are read-only from the northbound's protocol point of view.  Internally in the server you may need some API to set/change them of course.  Some other attributes are read-write.

In our implementation we support a few read-write attributes (and some read-only).  Here's a simple example (in an edit-config):

  <foo annotation="hello"/>

This would set/change the "annotation" attribute's value to "hello", regardless of its previous value.

To delete an annotation, you would do:

  <foo annotation=""/>

Each of our attributes has a special value that means "delete" (in most cases it is the empty string.

/martin

> 
> Regards,
> Michal
> 
> [1] https://tools.ietf.org/html/rfc7952
> 
> _______________________________________________
> netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
> 
_______________________________________________
netconf mailing list
[email-masked]
https://www.ietf.org/mailman/listinfo/netconf