Help with XML api device configuration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Help with XML api device configuration

L0 Member

I'm looking for a solution to automate sdwan deployments so I'm trying to do a couple of things with this api call:

 

1 - create the layer3 subinterface interface

2 - give the subinterface an ip and next hop ip

3 - enable sdwan on the interface and give it an sd wan profile

 

Here is the url:

api_url = f"https://192.168.1.1/api/?type=config&action=set&xpath=/config/devices/entry[@name='localhost.localdo...}"

 

element = """
<entry name="ethernet1/1.1851">
<ipv6>
<neighbor-discovery>
<router-advertisement>
<enable>no</enable>
</router-advertisement>
</neighbor-discovery>
</ipv6>
<sdwan-link-settings>
<upstream-nat>
<enable>no</enable>
</upstream-nat>
<enable>yes</enable>
<sdwan-interface-profile>sdwan_dia_1</sdwan-interface-profile>
</sdwan-link-settings>
<ndp-proxy>
<enabled>no</enabled>
</ndp-proxy>
<adjust-tcp-mss>
<enable>no</enable>
</adjust-tcp-mss>
<ip>
<entry name="209.56.139.18/29">
<sdwan-gateway>209.56.139.17</sdwan-gateway>
</entry>
</ip>
<interface-management-profile>internet</interface-management-profile>
<tag>1851</tag>
<comment>Windstream DIA</comment>
</entry>
"""

 

This is the response i see:

{'response': {'@status': 'error', '@code': '13', 'msg': {'line': 'set failed, may need to override template object first'}}}

 

Any suggestions are welcomed.  Thanks.

0 REPLIES 0
  • 190 Views
  • 0 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!