Control ID Number for Group Policies/Access Policies etc or reference by name

Mloraditch
Building a reputation

Control ID Number for Group Policies/Access Policies etc or reference by name

I don't think this exists so it's more of a feature request but I would really love if we could control the ID number for things that generate those OR be able to use the name when specifying them in related calls.

 

When I have to roll out new things to an existing org I have no way of controlling this. Thus when I have to add something complimentary or update down the road I have to keep track of the ID number as I create the policy when created or doing a get and matching my name against an ID number in my scripts. 

 

I love that SSIDs have slots numbers essentially so I can just pick slot numbers I know are open globally and use them.  I think my preference would be to be able to use an exact name match, but I'll take anything to improve efficiency.

2 Replies 2
PhilipDAth
Kind of a big deal
Kind of a big deal

Personally, I don't really see the issue with just fetching the group policy by name to get the ID ...

 

It is a single API call per group policy and a loop.  Example I use:

def getGPId(dashboard,templateId,gpName):
	# Search for the group policy name
	for gp in dashboard.networks.getNetworkGroupPolicies(templateId):
		if gp['name']==gpName:
			return(gp['groupPolicyId'])

	raise SystemExit("Invalid group policy name supplied: "+gpName)			

 

You could also record all the group policies return by the API call for later lookup.

Mloraditch
Building a reputation

It's certainly not hard, but not everyone has the same skill level in coding. And when you need to address large numbers of networks (we manage nearly 1000) at times it would help optimize the code and make it more efficient.

Get notified when there are additional replies to this discussion.
Welcome to the Meraki Community!
To start contributing, simply sign in with your Cisco account. If you don't yet have a Cisco account, you can sign up.