You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat: Implement scenario-based stateful command responses
Add scenario support to transcript_map.yaml — a scenario defines an
ordered sequence of (command, transcript) pairs layered on top of a
platform. Each SSH session gets its own sequence pointer that advances
as commands match the next expected step; non-matching commands fall
through to normal command_transcripts behavior.
Schema:
scenarios:
csr1000v-add-interface:
platform: csr1000v
sequence:
- command: show running-config
transcript: transcripts/scenarios/.../before.txt
- command: interface GigabitEthernet0/0/2
transcript: transcripts/generic_empty_return.txt
- command: show running-config
transcript: transcripts/scenarios/.../after.txt
Inventory entries can now reference either platform or scenario
(mutually exclusive). Validation checks scenario paths and platform
references at startup. Sequence pointer resets on every new SSH
connection.
Closes#27
* fix: Extract resolveListeners helper to reduce run() cyclomatic complexity
Extracts inventory/platform resolution into resolveListeners() to bring
run() complexity below the gocyclo threshold of 15. Renames listenerSpec
to listenerConfig for clarity. Also fixes gofmt formatting in
ciscohandlers_test.go.
0 commit comments