On netopeer2-cli, subscribing for notifications with following xpath filter is throwing error at netopeer-server. Though netopeer2-cli outputs "OK" but no notification comes on edit-config. unable to find where "instance-identifier" type is defined and its supported pattern. Please help in how to subscribe for specific xpath edit-config notifications.
subscribe --filter-xpath /ietf-netconf-notifications:netconf-config-change/edit[target="/urn:hb-mgmt:1.0:hb"]
OK
server side logs:2023-07-27T11:52:20.186501793Z netopeer2-server|INFO "netopeer2-server-log" [INF]: SR: Published event "rpc" "/notifications:create-subscription" with ID 1 priority 0 for 1 subscribers.
2023-07-27T11:52:20.186521542Z netopeer2-server|INFO "netopeer2-server-log" [INF]: SR: Processing "/notifications:create-subscription" "rpc" event with ID 1 priority 0 (remaining 1 subscribers).
2023-07-27T11:52:20.186526198Z netopeer2-server|ERROR "netopeer2-server-log" [ERR]: LY: Invalid character ':'[13] of expression '/urn:hb-mgmt:1.0:hb'. (Schema location "/ietf-netconf-notifications:netconf-config-change/edit/target".)
2023-07-27T11:52:20.186530416Z netopeer2-server|WARNING "netopeer2-server-log" [WRN]: LY: Invalid value "/urn:hb-mgmt:1.0:hb" which does not fit the type (Invalid instance-identifier "/urn:hb-mgmt:1.0:hb" value - syntax error.).
2023-07-27T11:52:20.186534670Z netopeer2-server|WARNING "netopeer2-server-log" [WRN]: LY: Previous warning generated by XPath subexpression[55] "target="/urn:hb-mgmt:1.0:hb"" with context node "/".
Server side log:2023-07-27T12:06:12.444928449Z netopeer2-server|INFO "netopeer2-server-log" [INF]: SR: Published event "rpc" "/notifications:create-subscription" with ID 4 priority 0 for 1 subscribers.
2023-07-27T12:06:12.444943313Z netopeer2-server|INFO "netopeer2-server-log" [INF]: SR: Processing "/notifications:create-subscription" "rpc" event with ID 4 priority 0 (remaining 1 subscribers).
2023-07-27T12:06:12.444947634Z netopeer2-server|ERROR "netopeer2-server-log" [ERR]: LY: Unexpected XPath token "NameTest" ("hb-mgmt:hb"), expected "Operator(Path)". (Schema location "/ietf-netconf-notifications:netconf-config-change/edit/target".)
2023-07-27T12:06:12.444957681Z netopeer2-server|WARNING "netopeer2-server-log" [WRN]: LY: Invalid value "hb-mgmt:hb" which does not fit the type (Invalid instance-identifier "hb-mgmt:hb" value - syntax error.).2023-07-27T12:06:12.444962887Z netopeer2-server|WARNING "netopeer2-server-log" [WRN]: LY: Previous warning generated by XPath subexpression[55] "target="hb-mgmt:hb"" with context node "/".
Hi Team,
On netopeer2-cli, subscribing for notifications with following xpath filter is throwing error at netopeer-server. Though netopeer2-cli outputs "OK" but no notification comes on edit-config. unable to find where "instance-identifier" type is defined and its supported pattern. Please help in how to subscribe for specific xpath edit-config notifications.
sysrepo : 2.2.7 netopeer2 : 2.1.41 libyang : 2.0.263 libnetconf2 : 2.1.25
server side logs: 2023-07-27T11:52:20.186501793Z netopeer2-server|INFO "netopeer2-server-log" [INF]: SR: Published event "rpc" "/notifications:create-subscription" with ID 1 priority 0 for 1 subscribers. 2023-07-27T11:52:20.186521542Z netopeer2-server|INFO "netopeer2-server-log" [INF]: SR: Processing "/notifications:create-subscription" "rpc" event with ID 1 priority 0 (remaining 1 subscribers). 2023-07-27T11:52:20.186526198Z netopeer2-server|ERROR "netopeer2-server-log" [ERR]: LY: Invalid character ':'[13] of expression '/urn:hb-mgmt:1.0:hb'. (Schema location "/ietf-netconf-notifications:netconf-config-change/edit/target".) 2023-07-27T11:52:20.186530416Z netopeer2-server|WARNING "netopeer2-server-log" [WRN]: LY: Invalid value "/urn:hb-mgmt:1.0:hb" which does not fit the type (Invalid instance-identifier "/urn:hb-mgmt:1.0:hb" value - syntax error.). 2023-07-27T11:52:20.186534670Z netopeer2-server|WARNING "netopeer2-server-log" [WRN]: LY: Previous warning generated by XPath subexpression[55] "target="/urn:hb-mgmt:1.0:hb"" with context node "/".
Tried below as well but same error.
Server side log: 2023-07-27T12:06:12.444928449Z netopeer2-server|INFO "netopeer2-server-log" [INF]: SR: Published event "rpc" "/notifications:create-subscription" with ID 4 priority 0 for 1 subscribers. 2023-07-27T12:06:12.444943313Z netopeer2-server|INFO "netopeer2-server-log" [INF]: SR: Processing "/notifications:create-subscription" "rpc" event with ID 4 priority 0 (remaining 1 subscribers). 2023-07-27T12:06:12.444947634Z netopeer2-server|ERROR "netopeer2-server-log" [ERR]: LY: Unexpected XPath token "NameTest" ("hb-mgmt:hb"), expected "Operator(Path)". (Schema location "/ietf-netconf-notifications:netconf-config-change/edit/target".) 2023-07-27T12:06:12.444957681Z netopeer2-server|WARNING "netopeer2-server-log" [WRN]: LY: Invalid value "hb-mgmt:hb" which does not fit the type (Invalid instance-identifier "hb-mgmt:hb" value - syntax error.).2023-07-27T12:06:12.444962887Z netopeer2-server|WARNING "netopeer2-server-log" [WRN]: LY: Previous warning generated by XPath subexpression[55] "target="hb-mgmt:hb"" with context node "/".
sample edit-xml `
`
Attached yang for reference: hb-mgmt.zip