cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
702
Views
15
Helpful
2
Replies

Failing to clear primary and IPCC extension using Python - CUCM

I am working on a python script to migrate CUCM 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,
    homeCluster = False,
    imAndPresenceEnable = False,
    primaryExtension = None,
    ipccExtension = None
)

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

1 Accepted Solution

Accepted Solutions

BjoernMartin
Spotlight
Spotlight

Hello Eliot,
that's easy

I think that you are using the python "zeep" module....
then the request should look like this.

updateUser(**{'userid': userid,
                       'homeCluster': 'false',
                       'imAndPresenceEnable': 'false',
                       'primaryExtension': {
                           'pattern': '',
                           'routePartitionName': ''
                       },
                       'ipccExtension': {
                            '_value_1': '',
                       },
                      'ipccRoutePartition': {
                          '_value_1': '',
                      },
                  }
            )

If you have further questions, please get in touch

https://developer.cisco.com/docs/axl-schema-reference/

View solution in original post

2 Replies 2

BjoernMartin
Spotlight
Spotlight

Hello Eliot,
that's easy

I think that you are using the python "zeep" module....
then the request should look like this.

updateUser(**{'userid': userid,
                       'homeCluster': 'false',
                       'imAndPresenceEnable': 'false',
                       'primaryExtension': {
                           'pattern': '',
                           'routePartitionName': ''
                       },
                       'ipccExtension': {
                            '_value_1': '',
                       },
                      'ipccRoutePartition': {
                          '_value_1': '',
                      },
                  }
            )

If you have further questions, please get in touch

https://developer.cisco.com/docs/axl-schema-reference/

Perfect, thanks! Yes, I am using 'zeep'. I was looking at the AXL schema reference, but I was having trouble interpreting it. Here is exactly what I did, and it worked.

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