10-13-2021 09:07 AM
We have over 400 servers that are "managed" by our field IT. We need to reset all of the SNMP strings on all pub/sub. I am attempting to do it via Python and the addSNMPCommunityString API.
1) In version 12.5 I can set the SNMP string on the publisher. CUCM has an option on the GUI to Apply to All Nodes, but there is no option like that in the API. My API call will just set the Publisher because that is the server I create the Zeep client service with. Question: is it possible to set pub SNMP with API and somehow invoke an Apply to All Nodes
2) In version 14.0, using the 14.0 WSDL, the exact same code that works on 12.5 yields: /usr/local/Snmpri/conf/temp.cnf (Read-only file system). Has anyone run into something like this?
Thanks.
Mark
10-13-2021 11:27 AM
Hi Mark!
I believe you are right.
I've checked the scheme and haven't found a way to "apply Config" to all nodes.
Workaround:
In your place I would query the list of nodes and save the result in a LIST "nodes"
Then use a for loop (for node in nodes) to POST your snmp community (addSNMPCommunityString) to each node(s).
REQUEST:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/12.5">
<soapenv:Header/>
<soapenv:Body>
<ns:listProcessNode sequence="?">
<searchCriteria>
<name>%</name>
</searchCriteria>
<returnedTags uuid="?">
<name></name>
</returnedTags>
</ns:listProcessNode>
</soapenv:Body>
</soapenv:Envelope>
RESPONSE:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns:listProcessNodeResponse xmlns:ns="http://www.cisco.com/AXL/API/12.5">
<return>
<processNode uuid="{00000000-1111-0000-0000-000000000000}">
<name>EnterpriseWideData</name>
</processNode>
<processNode uuid="{5F8D4458-73BE-4607-9064-74ADF2866AF4}">
<name>cucm12pub</name>
</processNode>
<processNode uuid="{EA334084-6D3F-442C-2383-BBB61E3C43A8}">
<name>cucm12sub</name>
</processNode>
<processNode uuid="{DC90AA3A-D8A0-0D19-B66E-0DC994973968}">
<name>imp12pub</name>
</processNode>
<processNode uuid="{8293ED77-EFF3-03E2-336C-4F7EE9ECD594}">
<name>imp12sub</name>
</processNode>
</return>
</ns:listProcessNodeResponse>
</soapenv:Body>
</soapenv:Envelope>
If you need an example of this in python, please let me know
10-13-2021 12:00 PM
BjeornMartin has the right idea
# Create the Zeep client with the specified settings client = Client( WSDL_FILE, settings = settings, transport = transport, plugins = plugin ) service = client.create_service( "{http://www.cisco.com/AXLAPIService/}AXLAPIBinding", f'https://{os.getenv( "CUCM_ADDRESS" )}:8443/axl/' )
The error seen on v14 seems to be a defect, I've opened this to track the issue: CSCvz94894
10-19-2021 10:34 AM
FYI it looks like there is a known issue around AXL SNMP operations in general with v14: https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvy78363
This defect is internal at the moment (not publically viewable), but looks to have been fixed/verified and assume it will appear in the next v14 Service Release. It may be possible to request the fix in an interim 'Engineering Special' release from TAC if required.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: