cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
245
Views
0
Helpful
2
Replies
Highlighted
Beginner

NSO - Xpath with space on Python section

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

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Beginner

This seems like a list with multiple keys, have you tried this?

neighbor[PW.neighbor, PW.pwIdNew]

View solution in original post

2 REPLIES 2
Highlighted
Beginner

This seems like a list with multiple keys, have you tried this?

neighbor[PW.neighbor, PW.pwIdNew]

View solution in original post

Highlighted

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]]