File: simple.py

package info (click to toggle)
pyeapi 1.0.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,564 kB
  • sloc: python: 10,906; makefile: 197
file content (10 lines) | stat: -rw-r--r-- 260 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env python
from __future__ import print_function
import pyeapi

connection = pyeapi.connect(host='192.168.1.16')
output = connection.execute(['enable', 'show version'])

print(('My system MAC address is', output['result'][1]['systemMacAddress']))