02-01-2023 09:18 PM - last edited on 05-08-2023 12:01 PM by Paul Zimmerman
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
02-02-2023 08:20 AM - edited 02-02-2023 08:20 AM
What API do you have in mind?
02-02-2023 08:38 AM
Try this from CLI:
show running-config services l3vpn | display xpath
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide