cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
525
Views
2
Helpful
2
Replies

How do i get absolute path to an element ?

rohitspostowl
Level 1
Level 1

How do i get the service configs output like below using an API:

=====================================================

 

/services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/customer vrf1 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/rd 3:3 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/rt-import 4:4 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/rt-export 5:5 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/endpoints[interface-name='0/0/0/1'][vlan-id='1234']/ip-address 10.10.1.1 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/endpoints[interface-name='0/0/0/1'][vlan-id='1234']/bgp/router-id 172.16.17.131 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/endpoints[interface-name='0/0/0/1'][vlan-id='1234']/bgp/as-number 65530 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/endpoints[interface-name='0/0/0/1'][vlan-id='1234']/bgp/bgp-neighbors/bgp-neighbor[neighbor='10.10.1.2']/remote-as 200 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/endpoints[interface-name='0/0/0/1'][vlan-id='1234']/bgp/bgp-neighbors/bgp-neighbor[neighbor='10.10.1.2']/route-policy-in test /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/endpoints[interface-name='0/0/0/1'][vlan-id='1234']/bgp/bgp-neighbors/bgp-neighbor[neighbor='10.10.1.2']/route-policy-out test /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.131']/endpoints[interface-name='0/0/0/1'][vlan-id='1234']/bgp/bgp-neighbors/bgp-neighbor[neighbor='10.10.1.2']/as-override true /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/rd 3:3 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/rt-import 4:4 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/rt-export 5:5 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/endpoints[interface-name='0/0/0/2'][vlan-id='1234']/ip-address 10.10.2.1 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/endpoints[interface-name='0/0/0/2'][vlan-id='1234']/bgp/router-id 172.16.17.132 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/endpoints[interface-name='0/0/0/2'][vlan-id='1234']/bgp/as-number 65530 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/endpoints[interface-name='0/0/0/2'][vlan-id='1234']/bgp/bgp-neighbors/bgp-neighbor[neighbor='10.10.2.2']/remote-as 200 /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/endpoints[interface-name='0/0/0/2'][vlan-id='1234']/bgp/bgp-neighbors/bgp-neighbor[neighbor='10.10.2.2']/route-policy-in test /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/endpoints[interface-name='0/0/0/2'][vlan-id='1234']/bgp/bgp-neighbors/bgp-neighbor[neighbor='10.10.2.2']/route-policy-out test /services/l3vpn:l3vpn/connections[service-name='testvrf1nso']/nodes[device-id='172.16.17.132']/endpoints[interface-name='0/0/0/2'][vlan-id='1234']/bgp/bgp-neighbors/bgp-neighbor[neighbor='10.10.2.2']/as-override true

2 Replies 2

u.avsec
Spotlight
Spotlight

What API do you have in mind?

ygorelik
Cisco Employee
Cisco Employee

Try this from CLI:

show running-config services l3vpn | display xpath