forked from meraki/dashboard-api-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmg_subnet_pool_settings.py
More file actions
44 lines (33 loc) · 1.71 KB
/
Copy pathmg_subnet_pool_settings.py
File metadata and controls
44 lines (33 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
class MGSubnetPoolSettings(object):
def __init__(self, session):
super(MGSubnetPoolSettings, self).__init__()
self._session = session
def getNetworkCellularGatewaySettingsSubnetPool(self, networkId: str):
"""
**Return the subnet pool and mask configured for MGs in the network.**
https://developer.cisco.com/meraki/api/#!get-network-cellular-gateway-settings-subnet-pool
- networkId (string)
"""
metadata = {
'tags': ['MG subnet pool settings'],
'operation': 'getNetworkCellularGatewaySettingsSubnetPool',
}
resource = f'/networks/{networkId}/cellularGateway/settings/subnetPool'
return self._session.get(metadata, resource)
def updateNetworkCellularGatewaySettingsSubnetPool(self, networkId: str, **kwargs):
"""
**Update the subnet pool and mask configuration for MGs in the network.**
https://developer.cisco.com/meraki/api/#!update-network-cellular-gateway-settings-subnet-pool
- networkId (string)
- mask (integer): Mask used for the subnet of all MGs in this network.
- cidr (string): CIDR of the pool of subnets. Each MG in this network will automatically pick a subnet from this pool.
"""
kwargs.update(locals())
metadata = {
'tags': ['MG subnet pool settings'],
'operation': 'updateNetworkCellularGatewaySettingsSubnetPool',
}
resource = f'/networks/{networkId}/cellularGateway/settings/subnetPool'
body_params = ['mask', 'cidr']
payload = {k: v for (k, v) in kwargs.items() if k in body_params}
return self._session.put(metadata, resource, payload)