Add type, add a few more switches
This commit is contained in:
17
config.yaml
17
config.yaml
@ -2,10 +2,16 @@ types:
|
|||||||
srlinux:
|
srlinux:
|
||||||
commands:
|
commands:
|
||||||
- show version
|
- show version
|
||||||
- show platform fan-tray
|
|
||||||
- show platform linecard
|
- show platform linecard
|
||||||
|
- show platform fan-tray
|
||||||
- show platform power-supply
|
- show platform power-supply
|
||||||
- info flat from running
|
- info flat from running
|
||||||
|
eos:
|
||||||
|
commands:
|
||||||
|
- show version
|
||||||
|
- show inventory
|
||||||
|
- show env power
|
||||||
|
- show running-config
|
||||||
|
|
||||||
devices:
|
devices:
|
||||||
asw100:
|
asw100:
|
||||||
@ -17,3 +23,12 @@ devices:
|
|||||||
asw121:
|
asw121:
|
||||||
user: pim
|
user: pim
|
||||||
type: srlinux
|
type: srlinux
|
||||||
|
asw110:
|
||||||
|
user: pim
|
||||||
|
type: eos
|
||||||
|
asw111:
|
||||||
|
user: pim
|
||||||
|
type: eos
|
||||||
|
asw112:
|
||||||
|
user: pim
|
||||||
|
type: eos
|
||||||
|
@ -254,7 +254,7 @@ func main() {
|
|||||||
totalCount := len(config.Devices)
|
totalCount := len(config.Devices)
|
||||||
|
|
||||||
for hostname, deviceConfig := range 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
|
user := deviceConfig.User
|
||||||
commands := deviceConfig.Commands
|
commands := deviceConfig.Commands
|
||||||
|
Reference in New Issue
Block a user