Open
Description
Hi,
When any node parsed with invalid value libyang parses it as an opaque node and on netopeer2-cli the edit-config operation does not throws any error.
Now we have a scenario where we want to send error to netopeer-cli client if the value is parsed is not valid. Could you pls suggest how to do that.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
michalvasko commentedon Apr 28, 2025
Opaque nodes are accepted only in a few specific cases, otherwise an error from netopeer2 is returned. It is not clear what exactly you want to do but if to change the behavior of netopeer2, you cannot do that without changing its code.
siprab commentedon Apr 28, 2025
Hi Michal,
We have a leaf-list node of type string which we have deviated to accept only specific string as its value using pattern. So when doing edit-config for that node with a value other than specified strings, on netopeer-cli the edit-config operation getting return as OK but in netopeer log we have log like below:
michalvasko commentedon Apr 28, 2025
The server should respond with an error but for some reason it detects no changes. Can you post the YANG data you have on the server and the exact edit-config you are sending?
siprab commentedon Apr 28, 2025
Hi Michal,
attached the yang files, deviation statement is present in "deviation_du_modify.yang" and the edit-config data is as below:
<ManagedElement xmlns="urn:3gpp:sa5:_3gpp-common-managed-element"> <id>1</id> <NtfSubscriptionControl> <id>1_cm</id> <attributes> <notificationRecipientAddress>https://10.20.30.40:9993/eventListener/v7/</notificationRecipientAddress> <notificationTypes>xyz</notificationTypes> </attributes> </NtfSubscriptionControl> </ManagedElement>
yang_files.zip
Thanks
michalvasko commentedon Apr 28, 2025
I also need the "current" data you have stored of
_3gpp-common-managed-element
on the server.siprab commentedon Apr 28, 2025
Hi Michal,
below is the current data on the server:
Thanks
michalvasko commentedon Apr 29, 2025
You are missing an instance of a mandatory node
priorityLabel
in/_3gpp-common-managed-element:ManagedElement[id='1']/attributes
so I do not know how you can have that data on the server, it does not allow setting invalid data. So I am not able to help you if you do not accurately describe your use-case. Also, what version of netopeer2 are you using?