Open mpet opened 1 year ago
sysrepoctl
to perform any YANG modules changes.No, updating the supported YANG modules in a running NETCONF session is not a supported use-case by NETCONF, it is not mentioned anywhere. And as long as there is a NETCONF session, the server is holding the YANG context lock and any YANG modules changes will fail on a timeout because of this. So no, the session will not get any notification.
I suppose it could be improved to support this, to some extent. It would be possible to implement some internal mechanism of informing about context changes that results in the server updating its context and sending the mentioned notification to all the connected sessions. They could then restart their connection to have the updated context, there is no simple and direct way of doing so without a connection restart (would again have to be some proprietary design and solution). If they don't, they would continue to use the old context, should already be properly handled.
Also just double checking: And there will be no netconf-capability-change notification when the module is changed?
Right, that can be sent, too. Although it seems to be redundant, the 2 notifications would essentially include the same information.
@michalvasko and I guess that there is no difference if we use adding a module?
I do not understand the question, difference between what?
Hi,
We need to test this RFC:
https://datatracker.ietf.org/doc/rfc8525/
Before I create a test case I wonder if the following scenario is supported in Netopeer2:
Our NETCONF client have an open session to netopeer2 and we make a change on the module ( remove or disable) in sysrepo. Client wait for a notifcation, yang-library-update, and when notifcation is received we read data from yang-library module again.
These are the modules:
Which operation, remove or disable, module in sysrepo is easiest to perfom and restore? 1.1 Any of these modules that I can perform remove or disable on without giving netopeer2 issues? 1.2 Commands to use ?
Will a notifcation, yang-library-update, be sent in the same NETCONF session ( I have a subscription ongoing for that NETCONF session) to client when module change takes place?
br,
//mikael
Operations in sys-repo:
https://netopeer.liberouter.org/doc/sysrepo/master/html/group__schema__api.html#ga7321be6b965ffc6ca89fee61a806faae
https://netopeer.liberouter.org/doc/sysrepo/master/html/group__schema__api.html#ga7793eebc32a87bc48b340030cde5042c