axl-python-zeep-samples
axl-python-zeep-samples copied to clipboard
Create axl_add_Jabber_Bulk.py
Retrieves list of all SEP Devices from CUCM, reads their Owner User ID and creates Jabber Devices (Android, iPhone, Desktop) for every user and update the user's Associated Devices with these new Jabber Devices.
Thanks for contributing - this is the kind of sample that can save hours/days of time :)
A few questions/thoughts:
- Is this script something you used yourself in production?
- In general, I've been trying to build samples that don't can't accidentally modify any existing data - i.e. any samples that do create/update, be sure to have the script create sample objects first ('testUser') and remove them when finished. Could you modify this sample to follow that pattern, e.g. create a user and associated device, then do your main operation, then remove all the targets?
- The script doesn't seem to check if the user already has one or more Jabber devices already, which could results in them having too many/duplicate
- Operations like listPhone() with broad search criteria can return huge data sets for large sites, possibly triggering AXL's data throttling - it would be good to add handling for that, or at least some discussion in comments
- At the end, if the addPhone() doesn't work, probably shouldn't try the subsequent updateUser()
Sorry for delay answering questions :D
- Yes, I used it to create 1k+ devices and that's why I started writing that script
- Just did it that way and updated the flow
- If the naming convention is standard then there would be no duplicates (that was my case, only CUCM return it cannot add device cause it's duplicate). If you think it's necessary I can work on it.
- I update the searchCriteria to only return the Test Device and also added a comment mentioning that with a simple workaround to split returned data based on first character of MAC Address, is there anything more you consider?
- Moved updateUser() right after addPhone() and will try them in a row so failure in adding phone causes discarding updateUser() line.
Hello... Any comments? Is there any problems which keeps us prevented from merging this PR? Or this is no more a maintained repo?