Template Site to Site VPN settings...

Fastburner
Here to help

Template Site to Site VPN settings...

Hi Everyone,

 

I'm currently undergoing some technical work to migrate networks to new templates... I am writing some compatibility checks to ensure that configuration can me migrated safely. However I have stumbled across an issue where you cannot retrieve Site to Site VPN settings from an existing template...

 

meraki.exceptions.APIError: appliance, getNetworkApplianceVpnSiteToSiteVpn - 400 Bad Request, {'errors': ['Unsupported for configuration templates']}

 

Is there any plans from Meraki to support this going forward? It's configurable via the UI for under templates but not networks bound to a template...

 

Fastburner_0-1754913446568.png

 

1 Reply 1
PhilipDAth
Kind of a big deal
Kind of a big deal

Try selecting the template instead.

 

Here is sample sample code I used to get the ID of a network or template.

 

def getNetId(orgId, netName):
    """
    Finds the Network ID inside an Organisation using its name and the ID of the Organisation.
    :param orgId: Meraki API Organisation ID
    :param netName: String, Name of Network
    :return netId: Meraki API Network ID
    """
    netId = None

    # Search for the network
    for net in dashboard.organizations.getOrganizationNetworks(orgId):
        if net['name'] == netName:
            netId = net['id']
            break

    # If no network, search for a template
    if netId is None:
        for net in dashboard.organizations.getOrganizationConfigTemplates(orgId):
            if net['name'] == netName:
                netId = net['id']
                break

    # Nothing found matching at all
    if netId is None:
        print("Invalid network name supplied: " + netName)
        exit(-1)

    return netId

 

Get notified when there are additional replies to this discussion.