Closed matlabrui-code closed 11 months ago
Seems you have a leafref in the notification to the configuration data. However, when validating a notification, it is the data from the operational
datastore that it is being validated against meaning you need to have /hardware/component/state/admin-state
node with value locked
in the operational
datastore for the notification to validate and be sent. How to get data to this datastore is described in the sysrepo documentation.
Seems you have a leafref in the notification to the configuration data. However, when validating a notification, it is the data from the
operational
datastore that it is being validated against meaning you need to have/hardware/component/state/admin-state
node with valuelocked
in theoperational
datastore for the notification to validate and be sent. How to get data to this datastore is described in the sysrepo documentation.
But the notfifcation node branch are different with wtih the node which was reporting the error. So you mean that should I configure the node which is not belonging to the notification branch?
I do not understand what you are confused about and am not sure you even understand what a leafref is, so please read about it if you do not. The notification you are trying to send has 3 leaves of the leafref type, which needs to point to existing target instances in the oeprational
datastore. These instances (or at least one) do not exist in your case hence you getting the error.
I do not understand what you are confused about and am not sure you even understand what a leafref is, so please read about it if you do not. The notification you are trying to send has 3 leaves of the leafref type, which needs to point to existing target instances in the
oeprational
datastore. These instances (or at least one) do not exist in your case hence you getting the error.
OK, I got the reason.The notification leaf "/ietf-hardware:hardware-state-oper-disabled/admin-statae" is relavent to the leaf "/hardware/component/state/admin-state", I should configure the second leaf first ,then the notification would happen.
Yes, that is correct.
Hi all, When I want to notify the admin-state node of ietf-hardware.yang, netconf server occurred a mistake print as below:
libyang[0]: Invalid leafref value "locked" - no existing target instance "/hardware/component/state/admin-state". (path: Schema location /ietf-hardware:hardware-state-oper-enabled/admin-state, data location /ietf-hardware:hardware-state-oper-enabled/admin-state.)>>>admin_state_enabled_notification send failed, rc=9, Validation failed
And I attched my code as below:
It seems like I didn't fill the value on "/hardware/component/state/admin-state" path. What I've done was for /ietf-"hardware:hardware-state-oper-disabled" notify path, but I think I just want to notfiy the node in the notify path. So, what should I do to check out this issue?