Skip to content

0.2

Compare
Choose a tag to compare
@ipcjk ipcjk released this 06 Jul 12:11

Readme @
https://github.com/ipcjk/mlxsh/blob/master/README.md

New features:

  • hosts config file in YAML:

  • Hostname: frankfurt-rt1
    Username: frankfurt
    Password: password
    EnablePassword: enable
    DeviceType: mlx
    KeyFile: /Users/joerg/.ssh/id_rsa2
    Labels:
    location: frankfurt
    environment: production
    type: mlx
    sweetrouter: yes

  • ssh key auth for login

  • one-liners on command line:

mlxsh -hostname frankfurt-rt1 -script "show uptime"
mlxsh -hostname frankfurt-rt1 -username operator -password foo -enable foo -script "show ip bgp summ"

  • several commands on command line:
    mlxsh -hostname frankfurt-rt1 -script 'show uptime; show module | include NI-XMR; show version'

  • grep-able output:

mlxsh -hostname frankfurt-rt1 -script "show uptime" | grep MP

  • label-based execution and configuration on router-groups, also great for scheduled maintenance within cron, reloading IX-configs at night, reload the router for testing HA, ….

mlxsh -label "location=frankfurt,type=mlx" -script 'show ip cache'
mlxsh -label "location=munich" -config scripts/bgp_neighbor
mlxsh -label "mission=DECIX" -routerdb='/home/mlxsh/mlxsh.yaml' -config /home/ixgen/decix

  • mass / parallel execution in background on router-groups with the -c flag, defaults to two
    mlxsh -c10 -label "location=munich" -script 'show ip bgp 8.8.8.8'

  • docker image ready:
    docker run -ti joerg/mlxsh /bin/sh