From a72fcb007e34d74301a4db9926e9c16cbe92c125 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sat, 5 Jul 2025 23:54:52 +0000 Subject: [PATCH] Add type, add a few more switches --- config.yaml | 17 ++++++++++++++++- src/router_backup.go | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/config.yaml b/config.yaml index c5fc5d2..031b85b 100644 --- a/config.yaml +++ b/config.yaml @@ -2,10 +2,16 @@ types: srlinux: commands: - show version - - show platform fan-tray - show platform linecard + - show platform fan-tray - show platform power-supply - info flat from running + eos: + commands: + - show version + - show inventory + - show env power + - show running-config devices: asw100: @@ -17,3 +23,12 @@ devices: asw121: user: pim type: srlinux + asw110: + user: pim + type: eos + asw111: + user: pim + type: eos + asw112: + user: pim + type: eos diff --git a/src/router_backup.go b/src/router_backup.go index 08bd4fc..45f3b76 100644 --- a/src/router_backup.go +++ b/src/router_backup.go @@ -254,7 +254,7 @@ func main() { totalCount := len(config.Devices) for hostname, deviceConfig := range config.Devices { - fmt.Printf("\nProcessing device: %s\n", hostname) + fmt.Printf("\nProcessing device: %s (type: %s)\n", hostname, deviceConfig.Type) user := deviceConfig.User commands := deviceConfig.Commands