Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
Given a Maagic "Node" object, I need to automatically generate an xpath to it. I know NSO can already do this, as it generates xpaths when running "show full-configuration foo bar | display xpath". Is there any way to do this using NSO's Python API? ...
That sounds ideal, but there is one issue: It requires a HKeypathRef object, but all I get from node._path is a string. Is there some way to convert a string to a HKeypathRef object, or can I get a HKeypathRef from a Maagic node somehow?