XPath Formatting Rules for gnmic Subscription
OcNOS enforces specific formatting rules for XPath in gNMIc subscription commands.
• | Xpath with string keys must be enclosed in double quotes ("" ). |
Here is an example for the Xpath with string keys:
Copy
--path '/components/component[name="TEMPERATURE-MAC"]/state'
--path /components/component[name=\"TEMPERATURE-MAC\"]/state
• | Xpath with integer keys must be provided without double quotes. |
Here is an example for the Xpath with integer keys:
Copy
--path ipi:/bgp/bgp-instances/bgp-instance[bgp-as=100]/peers/peer[peer-address=\"1.1.1.1\"]/state
--path 'ipi:/bgp/bgp-instances/bgp-instance[bgp-as=100]/peers/peer[peer-address="1.1.1.1"]/state'
• | Xpath with implicit wildcard keys can be provided with or without single quotes. |
Here is an example for the Xpath with implicit wildcard keys:
Copy
--path '/components/component/state'
--path /components/component/state