Python wrapper for cisco's olt boxes commands executed via ssh
Get global dhcp config:
>>> from cisco_olt_client.client import OltClient
>>> from cisco_olt_client.command import Command
>>>
>>> with OltClient('host', 'username', 'password') as client:
... cmd = client.execute('/dhcp/global/show')
... print(cmd.output)
...
Global DHCP circuit ID Template String:
"$accessnodeid PON $rack/$subrack/$slot/$port:$onuid.$svid"Get type for each of configured services:
>>> with OltClient('host', 'username', 'password') as client:
... cmd = client.execute('/services/showconfig')
... for config_command in map(Command, cmd.output.splitlines()):
... print(config_command.args['type'])
...
mac bridge
unicast
multicast
unicast
multicast
mac bridge| TODO: | Upload to pypi :) |
|---|
$ pip install -r https://raw.githubusercontent.com/Vnet-as/cisco-olt-client/master/requirements.txt
$ pip install -e git+https://github.com/Vnet-as/cisco-olt-client.git#egg=cisco_olt_clientCreate and activate virtualenv then proceed with:
$ pip install -r requirements.txtFor running tests you will need tox and everything in test-requirements.txt:
$ pip install tox
$ pip install -r test-requirements.txtRun tests:
$ toxTests run against Python versions:
- 2.7
- 3.4
- 3.5
- 3.5-dev
- 3.6-dev
MIT