cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4709
Views
15
Helpful
4
Replies

Pyats / Genie handling of device prompt

RichardD2
Level 1
Level 1
genie parse "show version" --testbed-file tb.yaml --devices leaf1

gives me 

Failed while bringing device to "any" state

my leaf1 device is an ncs-5501 running ios-xr. We use custom prompt to include <hostname> before the #, wonder if this could be messing up genie / pyats?

4 Replies 4

RichardD2
Level 1
Level 1
With help from pyats support team, it was pointed out that my prompt for the device didn't match the hostname configured in the testbed file (and it has to). Fixed that and problem resolved. Thanks @jean-Benoit

AdamLowery
Level 1
Level 1

look slike i have the same problem too. No response from the PyATS team either.

To be clear, pyATS support team was very helpful and did help me by pointing out what needed to be fixed in my testbed file.

@ AdamLowery

do you want to share the error message and testbed file?

make sure the testbed file if formatted correctly and have all the details to connect to the device. 

you can also validate the testbed file .. some of the warnings can be ignored .. 

pyats validate testbed TESTBED_FILENAME.yaml

pyats validate testbed tb.yaml
Loading testbed file: tb.yaml
--------------------------------------------------------------------------------

Testbed Name:
tb

Testbed Devices:
.
`-- csr1000v-1 [router/iosxe]

Warning Messages
----------------
- Device 'csr1000v-1' missing 'platform' definition
- Device 'csr1000v-1' has no interface definitions

YAML Lint Messages
------------------

%

 

https://developer.cisco.com/docs/pyats/#!connection-to-devices/device-connections

 

 

# a simpe testbed yaml containing a single device

devices:                # all device definition goes under devices block
  csr1000v-1:           # start a device definition with its HOSTNAME
    type: router
    os: iosxe           # this tells the engine what type of OS its connected to
    credentials:
        default:                         # login credentials
            username: admin
            password: Cisco123
    connections:        # give the block on how to connect to its mgmt interface
      mgmt:
        protocol: ssh
        ip: 172.25.192.90

devices:

  csr1000v-1: <<< hostname should match device prompt 

 

for long device names or to target specific devices .. you use an alias

devices:
  csr1000v-1:
    alias: node1

genie parse "show version" --testbed-file tb.yaml --devices node1

 

HTH