I wrote a Python Class for ISE to find/add/remove devices. It works great when I call it from another python program. To help my Network Engineers, I want to embed this into a php page/form which will get information like Hostname and IP address so that I can create the device in ISE. This is just a simple start of more to come.
However, I am running into issues when I try to call my python application from an PHP page run on Apache. The issue I run into is with the requests module. My python script, quits running when it gets to the get command. Any help that anyone could provide would be greatly appreciated. I am banging my head on the wall trying to figure out what is wrong.
I have simplified my python script in order to figure what what is going wrong. If someone has a better recommendation on how to call Python scripts from the web, I am open to suggestions.
The python script doesn't expect anything when it is called, I just removed the user and password from the script.
Here is what is returned when I run it from a command line:
$ python test.py
(u'172.18.251.225', u'25502760-d9a5-11e6-80af-00505684337f', u'MNIT LAN Device')
Just reread and it looks like a possible issue with your permissions on the python modules you are calling. If you didn't install them for everyone, it could be causing you issues. Go look at what user is calling python (I suspect www-data or httpd) and make sure they are listed as being able to read the libraries.
Hi, how to execute linux-commands (which are executeable directly in the guestshell) from IOS-XE sample :[guestshell@guestshell ~]$ cat test.txt | grep SmartSmart Licensing Status: Smart Licensing is DISABLED[guestshell@guestshell ~]$ exit ...
Hi Everybody! I am trying to get the configuration from a nexus 9000v virtualized in my home lab, I am always getting this error. Exception has occurred: RPCError
File "C:\4_4 Modernizing_Netwo...
I'm able to pull the topology using the API GEThttps://n.n.n.n/api/node/mo/topology/pod-1.json?query-target=children&target-subtree-class=fabricNode(after authenticating and getting a cookie, of course) But the version field is empty. I don't see...