productTypes field - Can't update on existing network

Solved
NJNetworkGuy100
Getting noticed

productTypes field - Can't update on existing network

So, we have a bunch of networks where the list for 'productTypes' does not match the actual devices in the network.  So, there are networks where 'switch' is listed in 'productTypes', but the network never had any MS switch device in it.

 

We think this may have happened when we started copying networks when creating a new network in the console, and we assume that copied over the 'productTypes' field as well to the new network.    

 

I want to fix this, but I don't know of a way in the API to do this.  It seems 'productType' is not a field that can be updated by the updateNetwork API call.  

 

Is there any other way of fixing this programmatically?  

1 Accepted Solution
PhilipDAth
Kind of a big deal
Kind of a big deal

You can't remove or change it.

 

It also has no operational impact.

View solution in original post

3 Replies 3
PhilipDAth
Kind of a big deal
Kind of a big deal

You can't remove or change it.

 

It also has no operational impact.

NJNetworkGuy100
Getting noticed

It does have an impact for me when I have networks that aren't full stack Meraki, and I try to use "productTypes" to filter for MS or MR devices in my Python code. 

 

Now, I'm forced to do an extra API call to pull in the network devices, and run a line of code similar to this:

 

if any([n for n in netDevices if 'MR' in n['model']]):
 
Not the end of the world, just adds complexity to simple scripts. 
John_on_API
Meraki Employee
Meraki Employee

Hi @NJNetworkGuy100 you could do this a few ways, but it sounds like https://developer.cisco.com/meraki/api-v1/#!split-network is the simplest/easiest way.

 

After doing this, you can delete whichever switch networks are empty.

 

You could even re-combine the remaining networks (if desired) via https://developer.cisco.com/meraki/api-v1/#!combine-organization-networks

 

Hope this helps!

Get notified when there are additional replies to this discussion.