cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
755
Views
0
Helpful
5
Replies

Updating the Secure Shell Password field in CUCM using AXL updatePhone

Hi - I'm trying to 'blank' out both the  'sshUserId' and 'sshPwd' fields using the updatePhone method but this only works on the former (sshUserId) and not with sshPwd.
Using Python 3.7.x - here's my snippet: 

resp = service.updatePhone(name = 'SEP12345678901112', sshUserId='', sshPwd='')

Can anyone confirm if this should work? Much appreciated!

1 Accepted Solution

Accepted Solutions

I also can't seem to clear the sshpassword field via <updatePhone> - this would likely be a defect.

I think I was successfully able to use <executeSqlUpdate> as a workaround, hope it helps:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/14.0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:executeSQLUpdate sequence="1">
         <sql>UPDATE device SET (sshuserid, sshpassword) = ("", "") WHERE name="SEP886100000000"</sql>
      </ns:executeSQLUpdate>
   </soapenv:Body>
</soapenv:Envelope>

Note, it wouldn't let me set the fields to NULL, but it seems an empty string is acceptable.

View solution in original post

5 Replies 5

dstaudt
Cisco Employee
Cisco Employee

For a database an empty string is not logically equivalent to a no/Null value.
Can you try setting the sshUserId/sshPwd keys to 'xsd.Nil' (you'll first need to import zeep.xsd?)

This sample demonstrates the usage: https://github.com/CiscoDevNet/axl-python-zeep-samples/blob/master/axl_list_Sip_Trunk.py

Hi David - thanks for your response. after importing  zeep.xsd, I attempted the following:

resp1 = service.updatePhone(name='SEP12345678901112', sshUserId=xsd.Nil, sshPwd=xsd.Nil)


But this failed to update the fields correctly. Is there a step that I'm missing?

I also can't seem to clear the sshpassword field via <updatePhone> - this would likely be a defect.

I think I was successfully able to use <executeSqlUpdate> as a workaround, hope it helps:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.cisco.com/AXL/API/14.0">
   <soapenv:Header/>
   <soapenv:Body>
      <ns:executeSQLUpdate sequence="1">
         <sql>UPDATE device SET (sshuserid, sshpassword) = ("", "") WHERE name="SEP886100000000"</sql>
      </ns:executeSQLUpdate>
   </soapenv:Body>
</soapenv:Envelope>

Note, it wouldn't let me set the fields to NULL, but it seems an empty string is acceptable.

FYI this defect has been opened for tracking: CSCwb05685 - Unable to clear Secure Shell Password using <updatePhone>

Hi David, SQLUpdate method works and I can used that as a workaround - thank you. I appreciate you opening the defect!

Getting Started

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: