datacenter / acitoolkit

A basic toolkit for accessing the Cisco APIC
Other
347 stars 266 forks source link

Create aci-spine-leaf-optics.py #364

Closed scotttyso closed 4 years ago

scotttyso commented 4 years ago

This is a sample script to get the optics from leaf and spine fabric ports. Output as shown below

[tyscott@cdc-lnx1 acitoolkit]$ python aci-spine-leaf-optics.py APIC login username: APIC URL: APIC Password: Node_ID Hostname Interface Local Optic Remote Optic Neighbor Interface LLDP Neighbor


  101  CDC-R6-LEAF-01  eth1/36      QSFP-100G-SR4  QSFP-100G-SR4   Eth1/27               CDC-R6-SPINE-02
  101  CDC-R6-LEAF-01  eth1/35      QSFP-100G-SR4  QSFP-100G-SR4   Eth1/27               CDC-R6-SPINE-01
  102  CDC-R6-LEAF-02  eth1/36      QSFP-100G-SR4  QSFP-100G-SR4   Eth1/28               CDC-R6-SPINE-02
  102  CDC-R6-LEAF-02  eth1/35      QSFP-100G-SR4  QSFP-100G-SR4   Eth1/28               CDC-R6-SPINE-01

[tyscott@cdc-lnx1 acitoolkit]$