cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1437
Views
0
Helpful
1
Replies

CUCM AXL: Verify a Successful Connection using Python Zeep Module?

For reference of how Zeep works, see the first section of boilerplate code here: https://paultursan.com/2016/04/getting-started-with-python-cucm-axl-api-programming/

 

The code 

except requests.exceptions.ConnectionError

works if the IP / FQDN doesn't even exist or if the session.verify is set to true and there is a certificate error (as expected). However, it does NOT capture errors due to incorrect credentials for the CUCM session object.

 

Is there a simple way using Python / Zeep to verify the connection was successful (e.g. actually logged in and actually able to execute commands)?

 

I could just try a get command with a user / device that should always exist, but that approach seems a bit hacky (what if the device is renamed / removed or the command syntax changes in a later version). I am using CUCM 12.5, for reference.

1 Reply 1

thedd
Level 1
Level 1
You will never be "logged in" you use a SOAP Client to post a request to AXL API and wait for a response where CUCM "tells" you if it worked or not.

I always have a look in the response to see the error code and text returend from cucm.

AXL SOAP is not a session you start, every request is a new start of communication so there is no Connection Session you can check if active or not