Campus Gateway
CampusGateway
CampusGateway class.
create_network_campus_gateway_cluster
Create a cluster and add campus gateways to it.
API documentation: createNetworkCampusGatewayCluster
Parameters:
-
network_id(str) –Network ID.
-
name(str) –Name of the new cluster.
-
uplinks(list[CreateNetworkCampusGatewayClusterUplinksItem]) –Uplink interface settings of the cluster.
-
tunnels(list[CreateNetworkCampusGatewayClusterTunnelsItem]) –Tunnel interface settings of the cluster: Reuse uplink or specify tunnel interface.
-
nameservers(CreateNetworkCampusGatewayClusterNameservers) –Nameservers of the cluster.
-
port_channels(list[CreateNetworkCampusGatewayClusterPortChannelsItem]) –Port channel settings of the cluster.
-
devices(list[CreateNetworkCampusGatewayClusterDevicesItem] | None, default:None) –Devices to be added to the cluster.
-
notes(str | None, default:None) –Notes about cluster with max size of 511 characters allowed.
Returns:
-
NetworkCampusGatewayClusterResponse–Successful operation.
Example API response
{
"clusterId": "1284392014818",
"name": "North Campus",
"uplinks": [
{
"interface": "man1",
"vlan": 5,
"addresses": [
{
"assignmentMode": "static",
"protocol": "ipv4",
"gateway": "1.2.3.5",
"subnetMask": "255.255.255.0"
}
]
}
],
"tunnels": [
{
"uplink": {
"interface": "man1"
},
"interface": "tun1",
"vlan": 6,
"addresses": [
{
"protocol": "ipv4",
"gateway": "2.3.5.6",
"subnetMask": "255.255.255.0"
}
]
}
],
"nameservers": {
"addresses": [
"8.8.8.8",
"8.8.4.4"
]
},
"portChannels": [
{
"id": "1284392014830",
"name": "Port-channel1",
"vlan": 25,
"allowedVlans": "10-20"
}
],
"devices": [
{
"serial": "Q234-ABCD-0001",
"memberId": "1",
"uplinks": [
{
"interface": "man1",
"addresses": [
{
"protocol": "ipv4",
"address": "5.1.2.3"
}
]
}
],
"tunnels": [
{
"interface": "tun1",
"addresses": [
{
"protocol": "ipv4",
"address": "6.2.6.7"
}
]
}
]
}
],
"notes": "This cluster is for New York Office",
"url": "https://n123.meraki.com/networkName/n/abc123/manage/campus_gateways/clusters"
}
get_organization_campus_gateway_clusters
Get the details of campus gateway clusters.
API documentation: getOrganizationCampusGatewayClusters
Parameters:
-
organization_id(str) –Organization ID.
-
network_ids(list[str] | None, default:None) –Networks for which information should be gathered.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 100. Default is 50.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetOrganizationCampusGatewayClustersResponseItemsItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
{
"items": [
{
"network": {
"id": "N_2313"
},
"clusterId": "1284392014818",
"name": "North Campus",
"uplinks": [
{
"interface": "man1",
"vlan": 5,
"addresses": [
{
"assignmentMode": "static",
"protocol": "ipv4",
"gateway": "1.2.3.5",
"subnetMask": "255.255.255.0"
}
]
}
],
"tunnels": [
{
"uplink": {
"interface": "man1"
},
"interface": "tun1",
"vlan": 6,
"addresses": [
{
"protocol": "ipv4",
"gateway": "2.3.5.6",
"subnetMask": "255.255.255.0"
}
]
}
],
"nameservers": {
"addresses": [
"8.8.8.8",
"8.8.4.4"
]
},
"portChannels": [
{
"id": "1284392014830",
"name": "Port-channel1",
"vlan": 25,
"allowedVlans": "10-20"
}
],
"devices": [
{
"serial": "Q234-ABCD-0001",
"memberId": "1",
"uplinks": [
{
"interface": "man1",
"addresses": [
{
"protocol": "ipv4",
"address": "5.1.2.3"
}
]
}
],
"tunnels": [
{
"interface": "tun1",
"addresses": [
{
"protocol": "ipv4",
"address": "6.2.6.7"
}
]
}
]
}
],
"notes": "This cluster is for New York Office",
"url": "https://n123.meraki.com/networkName/n/abc123/manage/campus_gateways/clusters"
}
],
"meta": {
"counts": {
"items": {
"total": 2,
"remaining": 0
}
}
}
}
get_organization_campus_gateway_devices_uplinks_local_overrides_by_device
Uplink overrides configured locally on Campus Gateway devices in an organization.
API documentation: getOrganizationCampusGatewayDevicesUplinksLocalOverridesByDevice
Parameters:
-
organization_id(str) –Organization ID.
-
serials(list[str] | None, default:None) –A list of serial numbers. The returned devices will be filtered to only include these serials.
-
per_page(int | None, default:None) –The number of entries per page returned. Acceptable range is 3 - 1000. Default is 1000.
-
starting_after(str | None, default:None) –A token used by the server to indicate the start of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
ending_before(str | None, default:None) –A token used by the server to indicate the end of the page. Often this is a timestamp or an ID but it is not limited to those. This parameter should not be defined by client applications. The link for the first, last, prev, or next page in the HTTP Link header should define it.
-
total_pages(int | Literal['all'], default:'all') –use with per_page to get total results up to total_pages * per_page; -1 or "all" for all pages.
-
direction(Literal['prev', 'next'], default:'next') –direction to paginate, either "next" (default) or "prev" page.
Returns:
-
PaginatedResponse[GetOrganizationCampusGatewayDevicesUplinksLocalOverridesByDeviceResponseItemsItem]–Successful operation.
Note
Returns a lazy PaginatedResponse
that can be iterated or collected with .collect().
Page metadata is available on .meta and .meta_pages.
Example API response
{
"items": [
{
"serial": "Q234-ABCD-0001",
"uplink": {
"interface": "man1",
"vlan": 5,
"addresses": [
{
"assignmentMode": "static",
"protocol": "ipv4",
"gateway": "1.2.3.5",
"subnetMask": "255.255.255.0",
"address": "121.12.12.1"
}
]
},
"nameservers": {
"addresses": [
"8.8.8.8",
"8.8.4.4"
]
},
"sgt": 300
}
],
"meta": {
"counts": {
"items": {
"total": 10,
"remaining": 0
}
}
}
}
update_network_campus_gateway_cluster
Update a cluster and add/remove campus gateways to/from it.
API documentation: updateNetworkCampusGatewayCluster
Parameters:
-
network_id(str) –Network ID.
-
cluster_id(str) –Cluster ID.
-
name(str | None, default:None) –Name of the cluster.
-
uplinks(list[UpdateNetworkCampusGatewayClusterUplinksItem] | None, default:None) –Uplink interface settings of the cluster.
-
tunnels(list[UpdateNetworkCampusGatewayClusterTunnelsItem] | None, default:None) –Tunnel interface settings of the cluster: Reuse uplink or specify tunnel interface.
-
nameservers(UpdateNetworkCampusGatewayClusterNameservers | None, default:None) –Nameservers of the cluster.
-
port_channels(list[UpdateNetworkCampusGatewayClusterPortChannelsItem] | None, default:None) –Port channel settings of the cluster.
-
devices(list[UpdateNetworkCampusGatewayClusterDevicesItem] | None, default:None) –Devices in the cluster.
-
notes(str | None, default:None) –Notes about cluster with max size of 511 characters allowed.
Returns:
-
NetworkCampusGatewayClusterResponse–Successful operation.
Example API response
{
"clusterId": "1284392014818",
"name": "North Campus",
"uplinks": [
{
"interface": "man1",
"vlan": 5,
"addresses": [
{
"assignmentMode": "static",
"protocol": "ipv4",
"gateway": "1.2.3.5",
"subnetMask": "255.255.255.0"
}
]
}
],
"tunnels": [
{
"uplink": {
"interface": "man1"
},
"interface": "tun1",
"vlan": 6,
"addresses": [
{
"protocol": "ipv4",
"gateway": "2.3.5.6",
"subnetMask": "255.255.255.0"
}
]
}
],
"nameservers": {
"addresses": [
"8.8.8.8",
"8.8.4.4"
]
},
"portChannels": [
{
"id": "1284392014830",
"name": "Port-channel1",
"vlan": 25,
"allowedVlans": "10-20"
}
],
"devices": [
{
"serial": "Q234-ABCD-0001",
"memberId": "1",
"uplinks": [
{
"interface": "man1",
"addresses": [
{
"protocol": "ipv4",
"address": "5.1.2.3"
}
]
}
],
"tunnels": [
{
"interface": "tun1",
"addresses": [
{
"protocol": "ipv4",
"address": "6.2.6.7"
}
]
}
]
}
],
"notes": "This cluster is for New York Office",
"url": "https://n123.meraki.com/networkName/n/abc123/manage/campus_gateways/clusters"
}