on 01-24-2014 01:38 AM
Any chance you could share that sqlUpdate you used?
Any progress on this? I can use 'updateAppUser' to add device to the AppUser's Controlled Device list but it erases all other devices except the one added just now. any help is much appreciated
<updateAppUser><associatedDevices> replaces the current set of devices with whatever you pass in.
If you want to just add a new device, you would first retrieve the current set of associated devices via <getAppUser>, modify the <associatedDevices> list to add your new device, then submit that updated list via <updateAppUser>.
buddy, thanks for the reply. yes I read the same on another post. I am able to use the approach if I am doing it manually and it works perfectly. how to do it if we have to use automation using Python+SoapUI? Refering to documentations and other blogs I have reached the point where I can do POST Request to make changes on the CUCM but finding no help on how to use GET the data. I am keeping my baby steps into all these things. any guidance is much appreciated
This set of samples may be helpful for that: https://github.dev/CiscoDevNet/axl-python-zeep-samples
There isn't a sample covering your specific scenario, but this one does show using a <getXXX> request and then parsing out data from it: https://github.dev/CiscoDevNet/axl-python-zeep-samples/blob/master/axl_add_update_User.py
Thanks sir for guiding into correct direction. I am trying to explore Zeep now. This seems to be very different than what i have been doing all these while. All these while i was using regular SOAP request using the AXL provided in the WSDL file. at first glance, i didn't see specific 'GET request' rather I see 'append' option is being used here. I will continue to explore.
hmm, one more hurdle
TypeError: list.append() takes exactly one argument (2 given)
By the error i got it looks like it doesn't allow more then one device to be added using ".append " function.
Correct list.append() accepts a single item: https://docs.python.org/3/tutorial/datastructures.html
You should be able to use list.extend() with a list, e.g.:
devices['device'].extend(["TESTPhone1", "TESTPhone2"])
or just add the items one at a time in a loop:
for newDevice in ["TESTPhone1", "TESTPhone2"]:
devices['device'].append(newDevice)
Thanks a lot @dstaudt your guidance defiantly gave me the confidence and assurance that this is possible!!
however as i was not much comfortable using Zeep i used regular post requests and achieved what i was planning to implement. i had to make few tweaks on the script and added few loops to complete it.
i think i need some more help
Good to hear your progress
For contact center questions, I would suggest posting here to get the best visibility for experts in that area (I'm not a big CC guy...): https://community.cisco.com/t5/contact-center/bd-p/j-disc-dev-contact-center
thanks again buddy, i just posted the query there, hoping to move on with PCCE/UCCE automation things
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: