AR7
AR7

Reputation: 376

Updating a User with Device in CUCM

I am working on a project that's automating the CUCM activities.Presently what I am trying to do is update an existing user and make an association to a new device and remove an existing association. I am trying to achieve that using Python. The following is the XML structure for that:

<SOAP-ENV:Envelope xmlns:SOAP- 
ENV="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
<SOAP-ENV:Body>    
  <axl:updateAppUser xmlns:axl="http://www.cisco.com/AXL/API/1.0" 
   sequence="12055">         
  <userid>atest</userid>         
  <associatedDevices>
  <device>TCTVINU</device>      
 </associatedDevices>    
 </axl:updateAppUser >
 </SOAP-ENV:Body>
 </SOAP-ENV:Envelope>

But when I run the code, it'showing that the user does not exist, but the user is there in the CUCM. is there any other alternate way to achieve that.

Upvotes: 0

Views: 478

Answers (1)

AR7
AR7

Reputation: 376

Got what mistake I was making, there two types of user AppUser and EndUser, what I was trying to do was to associate a device with EndUser. AppUser cannot be associated with the device. Hence the correct XML will be as follows:

 <SOAP-ENV:Envelope xmlns:SOAP- 
  ENV="http://schemas.xmlsoap.org/soap/envelope/" 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">  
 <SOAP-ENV:Body>    
  <axl:updateUser xmlns:axl="http://www.cisco.com/AXL/API/1.0" 
 sequence="12055">         
 <userid>atest</userid>         
 <associatedDevices>
 <device>TCTVINU</device>      
 </associatedDevices>    
 </axl:updateUser >
 </SOAP-ENV:Body>

Upvotes: 0

Related Questions