02-25-2020 08:37 AM
Hi Guys
I want to configure a new PWE3 via action packages.
I found a xpath and keypath on show running devices device ....
/devices/device{9K1}/config/cisco-ios-xr:l2vpn/xconnect/group{TEST}/p2p{TEST_P2P}/neighbor{172.16.12.8 123456789}/ip-version ipv4
For configure new entry similar this, i created this path
_PYTHON n = devicePointer.config.cisco_ios_xr__l2vpn.xconnect.group[PW.group].p2p[PW.p2p].neighbor[PW.neighbor][PW.pwIdNew]
When action package starting, nso logging this message
Error: Python cb_action error. badly formatted or nonexistent path (8): Bad key "172.16.12.8" (wrong number of identifiers) at: /devices/device/config/l2vpn/xconnect/group/p2p/neighbor
Question is
When xpath have parameters trough graph par { }, what method i can use to migrate on python section.
4 example
neighbor{172.16.12.8 123456789}/
???
Thanks
Maurizio
Solved! Go to Solution.
02-25-2020 03:04 PM
This seems like a list with multiple keys, have you tried this?
neighbor[PW.neighbor, PW.pwIdNew]
02-25-2020 03:04 PM
This seems like a list with multiple keys, have you tried this?
neighbor[PW.neighbor, PW.pwIdNew]
02-27-2020 02:27 AM
Hi rslaski
Correct with double parenthesis
n = devicePointer.config.cisco_ios_xr__l2vpn.xconnect.group[PW.group].p2p[PW.p2p].neighbor[[PW.neighbor][PW.pwIdNew]]
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: