Skip to content

Commit

Permalink
Added USAGE column
Browse files Browse the repository at this point in the history
  • Loading branch information
Edsall committed Mar 23, 2015
1 parent 25da8cb commit f86a38e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions samples/aci-show-interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@
interface.attributes['adminstatus'],
interface.attributes['operSt'],
interface.attributes['speed'],
interface.attributes['mtu']))
interface.attributes['mtu'],
interface.attributes['usage']))

# Display the data downloaded
template = "{0:17} {1:6} {2:^6} {3:^6} {4:7} {5:6}"
print template.format("INTERFACE", "TYPE", "ADMIN", "OPER", "SPEED", "MTU")
print template.format("---------", "----", "------", "------", "-----", "___")
template = "{0:17} {1:6} {2:^6} {3:^6} {4:7} {5:6} {6:9} "
print template.format("INTERFACE", "TYPE", "ADMIN", "OPER","SPEED", "MTU", "USAGE")
print template.format("---------", "----", "------", "------", "-----", "___", "---------")
for rec in data:
print template.format(*rec)

0 comments on commit f86a38e

Please sign in to comment.