Interactive commands

Redirecting from -devel as advised...

I am considering managing some network equipment (switches) with the
'raw' module. This requires sending commands to the switch in an
interactive session (command streamed before receiving the switch's
prompt are ignored), performing successive 'wait for prompt/send
command' steps [over a 'raw' ssh session]. Is there any existing support
for such interactive processing (generalizing the circuitry providing
optional stdin data)? If not, would there be interest in it?

(I am willing to prototype this if that's of interest).

I guess this could apply to the 'raw', but also possibly 'shell' and
'command' modules.

Thomas.

Basically this isn’t going to end well.

The ‘raw’ module is useful for sending to devices that look like Unix shells, but some things are too weird to work this way.

The right way to go with Cisco is going to be to get modules speaking to OnePK or NXOS APIs - similar to what has happened with Juniper or Arista. (things like Cumulus don’t need them, because it’s got a real SSH environment we can use like Linux).

In any case, I don’t want to go down the ‘parse CLI’ path for Cisco, and we’re in touch with Cisco about modules for Ansible – but it’s been slow going.

If this is something people would like to work on instead, I’d be quite interested.

They should strive for something close to what the Juniper and Arista modules can do, I’d think.

* Michael DeHaan, 2014-11-17 :

Basically this isn't going to end well.

Can you elaborate?

The 'raw' module is useful for sending to devices that look like Unix
shells, but some things are too weird to work this way.

Right, hence the proposal to extend it to offer a chat-script-style
facility.

The right way to go with Cisco is going to be to get modules speaking to
OnePK or NXOS APIs - similar to what has happened with Juniper or Arista.
(things like Cumulus don't need them, because it's got a real SSH
environment we can use like Linux).

In any case, I don't want to go down the 'parse CLI' path for Cisco, and
we're in touch with Cisco about modules for Ansible -- but it's been slow
going.

We're not talking Cisco hardware here but Brocade switches, and various
other devices with limited interactive access over SSH. This is for very
specialized cases, and I doubt it would be worthwhile to create a
specific module for each such niche device.

Thomas.