Simple CLI tester for IOS XE / CSR1000v REST API
Python
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
rest.py

README.md

Simple CLI tester for the CSR1000v REST API. Error handling is a work in progress.

Examples

Get host name:

>python rest.py --device 10.1.1.1 --user someuser --resource /global/host-name
Password:
{u'host-name': u'my-CSR1000v', u'kind': u'object#host-name'}

Add static route:

>python rest.py --device 10.1.1.1 --user someuser --password somepassword --resource /routing-svc/static-routes --method post --json '{"destination-network":"1.1.1.5/32","outgoing-interface":"null0"}'
True

Delete static route:

 python rest.py --device 10.1.1.1 --user someuser --password somepassword --resource /routing-svc/static-routes/1.1.1.5_32_null0 --method delete
True