Skip to content

Commit 6b627e4

Browse files
author
Shiyue Cheng
committed
updated w/ release 1.2.0b1
1 parent d88b5a2 commit 6b627e4

3 files changed

Lines changed: 83 additions & 1 deletion

File tree

meraki/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
SUPPRESS_LOGGING, SIMULATE_API_CALLS, BE_GEO_ID, MERAKI_PYTHON_SDK_CALLER
2121
)
2222

23-
__version__ = '1.2.0'
23+
__version__ = '1.2.0b1'
2424

2525
class DashboardAPI(object):
2626
"""

meraki/aio/api/appliance.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,47 @@ def deleteNetworkApplianceVlan(self, networkId: str, vlanId: str):
12801280

12811281
return self._session.delete(metadata, resource)
12821282

1283+
def getNetworkApplianceVpnBgp(self, networkId: str):
1284+
"""
1285+
**Return a Hub BGP Configuration**
1286+
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vpn-bgp
1287+
1288+
- networkId (string): (required)
1289+
"""
1290+
1291+
metadata = {
1292+
'tags': ['appliance', 'configure', 'vpn', 'bgp'],
1293+
'operation': 'getNetworkApplianceVpnBgp'
1294+
}
1295+
resource = f'/networks/{networkId}/appliance/vpn/bgp'
1296+
1297+
return self._session.get(metadata, resource)
1298+
1299+
def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs):
1300+
"""
1301+
**Update a Hub BGP Configuration**
1302+
https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vpn-bgp
1303+
1304+
- networkId (string): (required)
1305+
- enabled (boolean): Boolean value to enable or disable the BGP configuration.
1306+
- asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512.
1307+
- ibgpHoldTimer (integer): The IBGP holdtimer in seconds. The IBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240.
1308+
- neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated.
1309+
"""
1310+
1311+
kwargs.update(locals())
1312+
1313+
metadata = {
1314+
'tags': ['appliance', 'configure', 'vpn', 'bgp'],
1315+
'operation': 'updateNetworkApplianceVpnBgp'
1316+
}
1317+
resource = f'/networks/{networkId}/appliance/vpn/bgp'
1318+
1319+
body_params = ['enabled', 'asNumber', 'ibgpHoldTimer', 'neighbors', ]
1320+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
1321+
1322+
return self._session.put(metadata, resource, payload)
1323+
12831324
def getNetworkApplianceVpnSiteToSiteVpn(self, networkId: str):
12841325
"""
12851326
**Return the site-to-site VPN settings of a network**

meraki/api/appliance.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,47 @@ def deleteNetworkApplianceVlan(self, networkId: str, vlanId: str):
12801280

12811281
return self._session.delete(metadata, resource)
12821282

1283+
def getNetworkApplianceVpnBgp(self, networkId: str):
1284+
"""
1285+
**Return a Hub BGP Configuration**
1286+
https://developer.cisco.com/meraki/api-v1/#!get-network-appliance-vpn-bgp
1287+
1288+
- networkId (string): (required)
1289+
"""
1290+
1291+
metadata = {
1292+
'tags': ['appliance', 'configure', 'vpn', 'bgp'],
1293+
'operation': 'getNetworkApplianceVpnBgp'
1294+
}
1295+
resource = f'/networks/{networkId}/appliance/vpn/bgp'
1296+
1297+
return self._session.get(metadata, resource)
1298+
1299+
def updateNetworkApplianceVpnBgp(self, networkId: str, enabled: bool, **kwargs):
1300+
"""
1301+
**Update a Hub BGP Configuration**
1302+
https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-vpn-bgp
1303+
1304+
- networkId (string): (required)
1305+
- enabled (boolean): Boolean value to enable or disable the BGP configuration.
1306+
- asNumber (integer): An Autonomous System Number (ASN) is required if you are to run BGP and peer with another BGP Speaker outside of the Auto VPN domain. This ASN will be applied to the entire Auto VPN domain. The entire 4-byte ASN range is supported. So, the ASN must be an integer between 1 and 4294967295. When absent, this field is not updated. If no value exists then it defaults to 64512.
1307+
- ibgpHoldTimer (integer): The IBGP holdtimer in seconds. The IBGP holdtimer must be an integer between 12 and 240. When absent, this field is not updated. If no value exists then it defaults to 240.
1308+
- neighbors (array): List of BGP neighbors. This list replaces the existing set of neighbors. When absent, this field is not updated.
1309+
"""
1310+
1311+
kwargs.update(locals())
1312+
1313+
metadata = {
1314+
'tags': ['appliance', 'configure', 'vpn', 'bgp'],
1315+
'operation': 'updateNetworkApplianceVpnBgp'
1316+
}
1317+
resource = f'/networks/{networkId}/appliance/vpn/bgp'
1318+
1319+
body_params = ['enabled', 'asNumber', 'ibgpHoldTimer', 'neighbors', ]
1320+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
1321+
1322+
return self._session.put(metadata, resource, payload)
1323+
12831324
def getNetworkApplianceVpnSiteToSiteVpn(self, networkId: str):
12841325
"""
12851326
**Return the site-to-site VPN settings of a network**

0 commit comments

Comments
 (0)