cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
174
Views
5
Helpful
1
Replies

Failing to clear primary and IPCC extension using Python

I am working on a python script to migrate users from one cluster to another. I am able to change the value of home cluster and the IM&P enable user value, but I haven't figured out how to clear the primary and IPCC extensions. This is what I was trying.

 

            # Execute the updateUser request
            resp = source_axl.updateUser(
                userid = userid,
                #associatedDevices = None,
                homeCluster = False,
                imAndPresenceEnable = False,
                primaryExtension = None,
                ipccExtension = None
            )

 

 It tried setting the extensions to {} or [], but no joy.

1 Accepted Solution

Accepted Solutions

I opened a thread in one of the DevNet forums and got the answer I needed.

https://community.cisco.com/t5/management/failing-to-clear-primary-and-ipcc-extension-using-python-cucm/td-p/4756727 

Here is the solution in python.

            resp = source_axl.updateUser(
                **{ 'userid': userid,
                'homeCluster': 'false',
                'imAndPresenceEnable': 'false',
                'primaryExtension': {
                    'pattern': '',
                    'routePartitionName': '',
                },
                'ipccExtension': {
                    '_value_1': '',
                    'uuid': '',
                },
                }
            )

View solution in original post

1 Reply 1

I opened a thread in one of the DevNet forums and got the answer I needed.

https://community.cisco.com/t5/management/failing-to-clear-primary-and-ipcc-extension-using-python-cucm/td-p/4756727 

Here is the solution in python.

            resp = source_axl.updateUser(
                **{ 'userid': userid,
                'homeCluster': 'false',
                'imAndPresenceEnable': 'false',
                'primaryExtension': {
                    'pattern': '',
                    'routePartitionName': '',
                },
                'ipccExtension': {
                    '_value_1': '',
                    'uuid': '',
                },
                }
            )