Steve Pfister
Steve Pfister

Reputation: 11

Deleing usernames from a Cisco switch with Netmiko

I have written dozens of scripts successfully with Netmiko, but have recently come across a situation I hadn't encountered before. I'm trying to remove a certain username from a list of switches. It looks like some switches prompt you for a 'yes' before deleting, and some have no prompt.

Is it possible to have multiple expects? If 'confirm' then send a 'y' but also expect a '#' and in either case continue on to saving the config?

I've tried:

I've seen solution similar to this situation but none seem to fit all cases.

Upvotes: 1

Views: 30

Answers (0)

Related Questions