cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1504
Views
10
Helpful
10
Replies

RESTconf errors while changing interface parameters

DaleSchulz2814
Level 1
Level 1

I'm trying to run a script from the devnet python code samples and continue to get the following errrors while trying to modify an ip address on an interface:


What IP address do you want to set? 192.168.40.1
What Subnet Mask do you want to set? 255.255.255.0
{
"errors": {
"error": [
{
"error-message": "/if:interfaces/interface{Loopback100}/type: Runtime mapping error.",
"error-path": "/ietf-interfaces:interfaces/interface=Loopback100",
"error-tag": "malformed-message",
"error-type": "application"
}
]
}
}

Ending Interface Configuration
Name: Loopback100
IP Address: 172.16.100.1 / 255.255.255.0

 

Any help in what I'm doing wrong?

 

2 Accepted Solutions

Accepted Solutions

omz
VIP Alumni
VIP Alumni

Hi 

Can you provide a link to the devnet code or lab you are working on?

Have a look here for some sample code that you can run on the sandbox.

https://github.com/CiscoDevNet/restconf-examples

View solution in original post

10 Replies 10

balaji.bandi
Hall of Fame
Hall of Fame

omz
VIP Alumni
VIP Alumni

Hi 

Can you provide a link to the devnet code or lab you are working on?

Have a look here for some sample code that you can run on the sandbox.

https://github.com/CiscoDevNet/restconf-examples

I marked this open case as solved and closed so that your all not working on it and prioritizing anything here.  I was just trying to learn some new tech and there is plenty of other code to learn the same thing on all your sites.

 

Thanks for your help on a Sunday and stay safe during this virus problem

 

Dale

Hey Dale, I thought the issue was due to the sandbox being under maintenance yesterday. I see the same issue as you, however, I think this only works on interfaces other than loopback

 

(venv) STUACLAR-M-R6EU:restconf_update_ipaddress stuaclar$ python updateip.py
The router has the following interfaces:

  * GigabitEthernet1
  * GigabitEthernet2
  * GigabitEthernet3
  * Loopback5
  * Loopback22
  * Loopback72
  * Loopback100
  * Loopback103
  * Loopback678
  * Loopback1069
  * Loopback1245
  * Loopback1246
  * VirtualPortGroup0

Which Interface do you want to configure? GigabitEthernet3
GigabitEthernet3
Starting Interface Configuration
Name:  GigabitEthernet3
IP Address:  192.168.40.1 / 255.255.255.0

What IP address do you want to set? 192.168.50.1
What Subnet Mask do you want to set? 255.255.255.0

Ending Interface Configuration
Name:  GigabitEthernet3
IP Address:  192.168.50.1 / 255.255.255.0
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

Wow! I'm flattered that the man, the myth, the "big evil beard responded to my open ticket!!😎 (I actually follow you and hpresto on twitter).

Actually no worries, there's lots of tools Cisco has out there to learn REST. I just jumped to a different lab.

Stay home and keep you and your family safe!
Dale

Thanks, buddy, the money is in the mail. :p
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

hello bigevilbeard

can you please share the link for this lab?

thank you 

 

Sure Omar, i am not sure if this is learning lab - I know the repo from while back https://github.com/CiscoDevNet/python_code_samples_network
Please mark this as helpful or solution accepted to help others
Connect with me https://bigevilbeard.github.io

He's correct that it does work with a physical interface and not with a loopback though!

thank you! :)