Hi all,

In RFC7950 sec 
7.20.3.2<https://datatracker.ietf.org/doc/html/rfc7950#section-7.20.3.2>:



   The argument "add" adds properties to the target node.  The

   properties to add are identified by substatements to the "deviate"

   statement.  If a property can only appear once, the property MUST NOT

   exist in the target node.



   The argument "replace" replaces properties of the target node.  The

   properties to replace are identified by substatements to the

   "deviate" statement.  The properties to replace MUST exist in the

   target node.



   The argument "delete" deletes properties from the target node.  The

   properties to delete are identified by substatements to the "delete"

   statement.  The substatement's keyword MUST match a corresponding

   keyword in the target node, and the argument's string MUST be equal

   to the corresponding keyword's argument string in the target node.



What's the meaning of property? Is it a sub-statement?



I see pyang and libyang have two different explanation. Pyang treat 'config' 
property as always exist property, because 'config' statement has default value 
(true or derived from parent).

But libyang think if there is no 'config' sub-statement, then the 'config' 
property will be not exist.



So there is a conflict when using pyang/libyang to parse YANG module.

For example,

Module a {

Container a {



   Leaf b {

     Type string;

   }

}



}





Module a-dev {

   Deviation  "/a:a/a:b" {

     Deviate add {

       Config false;

    }

   }

}



This example, pyang will report error, because pyang think 'config' property is 
always exist, so this propery should not be added. But libyang think it's valid.



If we change the type of deviate from 'add' to 'replace'.



Module a-dev {

   Deviation  "/a:a/a:b" {

     Deviate replace {

       Config false;

    }

   }

}



Pyang will think it's valid. But libyang think it's invalid.



So I think WG should clarify what's the meaning of property.



Ref:

Issue on pyang: https://github.com/mbj4668/pyang/issues/815



Issue on libyang: https://github.com/CESNET/libyang/issues/2010











_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to