cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
804
Views
0
Helpful
1
Replies

Genie Config Python Script Failing?

NetworkDude255
Level 1
Level 1

Hey All!

 

First time Network Developer here. I've had some great fun with pyATS up until today where I keep getting issues trying to make a configuration change to a router on the DevNet sandbox. Here is what I'm trying to do:

 

1. Make a connection to the csr1000v router thats in the alwayson sandbox on devote 

2. Create a new Loopback interface

 

I can make a connection successfully to the csr100v then the following line of code fails:

testbed.devices[device].configure(change.configuration)
 
This is the error I get:
File "src/pyats/topology/bases.py", line 100, in pyats.topology.bases.TopologyDict.__getitem__
KeyError: <Device csr1000v-1 at 0x107b5be80>
 
Has anybody come across this before??
 
1 Reply 1

Seb Rupik
VIP Alumni
VIP Alumni

Hi there,

What is the output of:

print(testbed.devices.keys())

...placed just before the statement which is causing the error.

It looks like the csr1000v has a different key to what you are expecting.

 

cheers,

Seb.