in this repo you will find some python examples for working with cisco ISE and the pxgrid REST API/websocket interface. the examples are basic but should give an idea of how to use python with the cisco ISE and pxgrid interface.
- program_1.py
this example shows you how to put a set device into a cisco ISE policy group using command "ANCApplyByIP".
- program_2.py
an example that lists the endpoints on a cisco ISE w/ command "ANCGetEndpoints"
- install PIP requirements
pip install -r requirements.txt
- set up authentication
openssl pkcs12 -in mycert.p12 -out ./keys/file.key.pem -nocerts -nodes
openssl pkcs12 -in mycert.p12 -out ./keys/file.crt.pem -clcerts -nokeys
- for info on how to export a PKCS in ISE please see link Cisco Identity Services Engine Administrator Guide, Release 2.2 - Manage Certificates [Cisco Identity Services Engine] - Cisco
- enable pxGrid in cisco ISE click here for instructions
in the examples below i am assuming the ISE is running on "ise24198.acme.local" please replace with your own ISE IP.
- example 1
python ./program_1.py -a ise24198.acme.local:8910 -w ise24198 -n xRqoa9zHF3YdCXkb -c ./keys/file.crt.pem -k ./keys/file.key.pem -s ./keys/file.crt.pem -p Testtest10
- example 2
python ./program_2.py -a ise24198.acme.local:8910 -w ise24198 -n xRqoa9zHF3YdCXkb -c ./keys/file.crt.pem -k ./keys/file.key.pem -s ./keys/file.crt.pem -p Testtest10