Skip to content

Commit 8ccebd9

Browse files
author
Shiyue Cheng
committed
updated w/ release 1.0.0b15
1 parent 14cc426 commit 8ccebd9

9 files changed

Lines changed: 385 additions & 417 deletions

File tree

meraki_v1/__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.0.0b14'
23+
__version__ = '1.0.0b15'
2424

2525
class DashboardAPI(object):
2626
"""

meraki_v1/aio/api/appliance.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ def updateNetworkApplianceContentFiltering(self, networkId: str, **kwargs):
130130
https://developer.cisco.com/meraki/api-v1/#!update-network-appliance-content-filtering
131131
132132
- networkId (string): (required)
133-
- allowedUrlPatterns (array): A whitelist of URL patterns to allow
134-
- blockedUrlPatterns (array): A blacklist of URL patterns to block
133+
- allowedUrlPatterns (array): A list of URL patterns that are allowed
134+
- blockedUrlPatterns (array): A list of URL patterns that are blocked
135135
- blockedUrlCategories (array): A list of URL categories to block
136136
- urlCategoryListSize (string): URL category list size which is either 'topSites' or 'fullList'
137137
"""
@@ -247,8 +247,8 @@ def updateNetworkApplianceFirewallFirewalledService(self, networkId: str, servic
247247
248248
- networkId (string): (required)
249249
- service (string): (required)
250-
- access (string): A string indicating the rule for which IPs are allowed to use the specified service. Acceptable values are "blocked" (no remote IPs can access the service), "restricted" (only whitelisted IPs can access the service), and "unrestriced" (any remote IP can access the service). This field is required
251-
- allowedIps (array): An array of whitelisted IPs that can access the service. This field is required if "access" is set to "restricted". Otherwise this field is ignored
250+
- access (string): A string indicating the rule for which IPs are allowed to use the specified service. Acceptable values are "blocked" (no remote IPs can access the service), "restricted" (only allowed IPs can access the service), and "unrestriced" (any remote IP can access the service). This field is required
251+
- allowedIps (array): An array of allowed IPs that can access the service. This field is required if "access" is set to "restricted". Otherwise this field is ignored
252252
"""
253253

254254
kwargs.update(locals())
@@ -679,8 +679,8 @@ def updateNetworkApplianceSecurityMalware(self, networkId: str, mode: str, **kwa
679679
680680
- networkId (string): (required)
681681
- mode (string): Set mode to 'enabled' to enable malware prevention, otherwise 'disabled'
682-
- allowedUrls (array): The urls that should be permitted by the malware detection engine. If omitted, the current config will remain unchanged. This is available only if your network supports AMP whitelisting
683-
- allowedFiles (array): The sha256 digests of files that should be permitted by the malware detection engine. If omitted, the current config will remain unchanged. This is available only if your network supports AMP whitelisting
682+
- allowedUrls (array): The urls that should be permitted by the malware detection engine. If omitted, the current config will remain unchanged. This is available only if your network supports AMP allow listing
683+
- allowedFiles (array): The sha256 digests of files that should be permitted by the malware detection engine. If omitted, the current config will remain unchanged. This is available only if your network supports AMP allow listing
684684
"""
685685

686686
kwargs.update(locals())

meraki_v1/aio/api/devices.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -196,20 +196,4 @@ def rebootDevice(self, serial: str):
196196
}
197197
resource = f'/devices/{serial}/reboot'
198198

199-
return self._session.post(metadata, resource)
200-
201-
def getDeviceUplink(self, serial: str):
202-
"""
203-
**Return the uplink information for a device.**
204-
https://developer.cisco.com/meraki/api-v1/#!get-device-uplink
205-
206-
- serial (string): (required)
207-
"""
208-
209-
metadata = {
210-
'tags': ['devices', 'monitor', 'uplink'],
211-
'operation': 'getDeviceUplink'
212-
}
213-
resource = f'/devices/{serial}/uplink'
214-
215-
return self._session.get(metadata, resource)
199+
return self._session.post(metadata, resource)

meraki_v1/aio/api/networks.py

Lines changed: 142 additions & 142 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def provisionNetworkClients(self, networkId: str, clients: list, devicePolicy: s
226226
227227
- networkId (string): (required)
228228
- clients (array): The array of clients to provision
229-
- devicePolicy (string): The policy to apply to the specified client. Can be 'Group policy', 'Whitelisted', 'Blocked', 'Per connection' or 'Normal'. Required.
229+
- devicePolicy (string): The policy to apply to the specified client. Can be 'Group policy', 'Allowed', 'Blocked', 'Per connection' or 'Normal'. Required.
230230
- groupPolicyId (string): The ID of the desired group policy to apply to the client. Required if 'devicePolicy' is set to "Group policy". Otherwise this is ignored.
231231
- policiesBySecurityAppliance (object): An object, describing what the policy-connection association is for the security appliance. (Only relevant if the security appliance is actually within the network)
232232
- policiesBySsid (object): An object, describing the policy-connection associations for each active SSID within the network. Keys should be the number of enabled SSIDs, mapping to an object describing the client's policy
@@ -235,7 +235,7 @@ def provisionNetworkClients(self, networkId: str, clients: list, devicePolicy: s
235235
kwargs.update(locals())
236236

237237
if 'devicePolicy' in kwargs:
238-
options = ['Group policy', 'Whitelisted', 'Blocked', 'Per connection', 'Normal']
238+
options = ['Group policy', 'Allowed', 'Blocked', 'Per connection', 'Normal']
239239
assert kwargs['devicePolicy'] in options, f'''"devicePolicy" cannot be "{kwargs['devicePolicy']}", & must be set to one of: {options}'''
240240

241241
metadata = {
@@ -778,145 +778,6 @@ def deleteNetworkGroupPolicy(self, networkId: str, groupPolicyId: str):
778778

779779
return self._session.delete(metadata, resource)
780780

781-
def getNetworkHttpServers(self, networkId: str):
782-
"""
783-
**List the HTTP servers for a network**
784-
https://developer.cisco.com/meraki/api-v1/#!get-network-http-servers
785-
786-
- networkId (string): (required)
787-
"""
788-
789-
metadata = {
790-
'tags': ['networks', 'configure', 'httpServers'],
791-
'operation': 'getNetworkHttpServers'
792-
}
793-
resource = f'/networks/{networkId}/httpServers'
794-
795-
return self._session.get(metadata, resource)
796-
797-
def createNetworkHttpServer(self, networkId: str, name: str, url: str, **kwargs):
798-
"""
799-
**Add an HTTP server to a network**
800-
https://developer.cisco.com/meraki/api-v1/#!create-network-http-server
801-
802-
- networkId (string): (required)
803-
- name (string): A name for easy reference to the HTTP server
804-
- url (string): The URL of the HTTP server
805-
- sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki.
806-
"""
807-
808-
kwargs.update(locals())
809-
810-
metadata = {
811-
'tags': ['networks', 'configure', 'httpServers'],
812-
'operation': 'createNetworkHttpServer'
813-
}
814-
resource = f'/networks/{networkId}/httpServers'
815-
816-
body_params = ['name', 'url', 'sharedSecret', ]
817-
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
818-
819-
return self._session.post(metadata, resource, payload)
820-
821-
def createNetworkHttpServersWebhookTest(self, networkId: str, url: str, **kwargs):
822-
"""
823-
**Send a test webhook for a network**
824-
https://developer.cisco.com/meraki/api-v1/#!create-network-http-servers-webhook-test
825-
826-
- networkId (string): (required)
827-
- url (string): The URL where the test webhook will be sent
828-
- sharedSecret (string): The shared secret the test webhook will send. Optional. Defaults to an empty string.
829-
"""
830-
831-
kwargs.update(locals())
832-
833-
metadata = {
834-
'tags': ['networks', 'configure', 'httpServers', 'webhookTests'],
835-
'operation': 'createNetworkHttpServersWebhookTest'
836-
}
837-
resource = f'/networks/{networkId}/httpServers/webhookTests'
838-
839-
body_params = ['url', 'sharedSecret', ]
840-
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
841-
842-
return self._session.post(metadata, resource, payload)
843-
844-
def getNetworkHttpServersWebhookTest(self, networkId: str, id: str):
845-
"""
846-
**Return the status of a webhook test for a network**
847-
https://developer.cisco.com/meraki/api-v1/#!get-network-http-servers-webhook-test
848-
849-
- networkId (string): (required)
850-
- id (string): (required)
851-
"""
852-
853-
metadata = {
854-
'tags': ['networks', 'configure', 'httpServers', 'webhookTests'],
855-
'operation': 'getNetworkHttpServersWebhookTest'
856-
}
857-
resource = f'/networks/{networkId}/httpServers/webhookTests/{id}'
858-
859-
return self._session.get(metadata, resource)
860-
861-
def getNetworkHttpServer(self, networkId: str, id: str):
862-
"""
863-
**Return an HTTP server for a network**
864-
https://developer.cisco.com/meraki/api-v1/#!get-network-http-server
865-
866-
- networkId (string): (required)
867-
- id (string): (required)
868-
"""
869-
870-
metadata = {
871-
'tags': ['networks', 'configure', 'httpServers'],
872-
'operation': 'getNetworkHttpServer'
873-
}
874-
resource = f'/networks/{networkId}/httpServers/{id}'
875-
876-
return self._session.get(metadata, resource)
877-
878-
def updateNetworkHttpServer(self, networkId: str, id: str, **kwargs):
879-
"""
880-
**Update an HTTP server**
881-
https://developer.cisco.com/meraki/api-v1/#!update-network-http-server
882-
883-
- networkId (string): (required)
884-
- id (string): (required)
885-
- name (string): A name for easy reference to the HTTP server
886-
- url (string): The URL of the HTTP server
887-
- sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki.
888-
"""
889-
890-
kwargs.update(locals())
891-
892-
metadata = {
893-
'tags': ['networks', 'configure', 'httpServers'],
894-
'operation': 'updateNetworkHttpServer'
895-
}
896-
resource = f'/networks/{networkId}/httpServers/{id}'
897-
898-
body_params = ['name', 'url', 'sharedSecret', ]
899-
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
900-
901-
return self._session.put(metadata, resource, payload)
902-
903-
def deleteNetworkHttpServer(self, networkId: str, id: str):
904-
"""
905-
**Delete an HTTP server from a network**
906-
https://developer.cisco.com/meraki/api-v1/#!delete-network-http-server
907-
908-
- networkId (string): (required)
909-
- id (string): (required)
910-
"""
911-
912-
metadata = {
913-
'tags': ['networks', 'configure', 'httpServers'],
914-
'operation': 'deleteNetworkHttpServer'
915-
}
916-
resource = f'/networks/{networkId}/httpServers/{id}'
917-
918-
return self._session.delete(metadata, resource)
919-
920781
def getNetworkMerakiAuthUsers(self, networkId: str):
921782
"""
922783
**List the splash or RADIUS users configured under Meraki Authentication for a network**
@@ -1640,4 +1501,143 @@ def unbindNetwork(self, networkId: str):
16401501
}
16411502
resource = f'/networks/{networkId}/unbind'
16421503

1643-
return self._session.post(metadata, resource)
1504+
return self._session.post(metadata, resource)
1505+
1506+
def getNetworkWebhooksHttpServers(self, networkId: str):
1507+
"""
1508+
**List the HTTP servers for a network**
1509+
https://developer.cisco.com/meraki/api-v1/#!get-network-webhooks-http-servers
1510+
1511+
- networkId (string): (required)
1512+
"""
1513+
1514+
metadata = {
1515+
'tags': ['networks', 'configure', 'webhooks', 'httpServers'],
1516+
'operation': 'getNetworkWebhooksHttpServers'
1517+
}
1518+
resource = f'/networks/{networkId}/webhooks/httpServers'
1519+
1520+
return self._session.get(metadata, resource)
1521+
1522+
def createNetworkWebhooksHttpServer(self, networkId: str, name: str, url: str, **kwargs):
1523+
"""
1524+
**Add an HTTP server to a network**
1525+
https://developer.cisco.com/meraki/api-v1/#!create-network-webhooks-http-server
1526+
1527+
- networkId (string): (required)
1528+
- name (string): A name for easy reference to the HTTP server
1529+
- url (string): The URL of the HTTP server
1530+
- sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki.
1531+
"""
1532+
1533+
kwargs.update(locals())
1534+
1535+
metadata = {
1536+
'tags': ['networks', 'configure', 'webhooks', 'httpServers'],
1537+
'operation': 'createNetworkWebhooksHttpServer'
1538+
}
1539+
resource = f'/networks/{networkId}/webhooks/httpServers'
1540+
1541+
body_params = ['name', 'url', 'sharedSecret', ]
1542+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
1543+
1544+
return self._session.post(metadata, resource, payload)
1545+
1546+
def getNetworkWebhooksHttpServer(self, networkId: str, httpServerId: str):
1547+
"""
1548+
**Return an HTTP server for a network**
1549+
https://developer.cisco.com/meraki/api-v1/#!get-network-webhooks-http-server
1550+
1551+
- networkId (string): (required)
1552+
- httpServerId (string): (required)
1553+
"""
1554+
1555+
metadata = {
1556+
'tags': ['networks', 'configure', 'webhooks', 'httpServers'],
1557+
'operation': 'getNetworkWebhooksHttpServer'
1558+
}
1559+
resource = f'/networks/{networkId}/webhooks/httpServers/{httpServerId}'
1560+
1561+
return self._session.get(metadata, resource)
1562+
1563+
def updateNetworkWebhooksHttpServer(self, networkId: str, httpServerId: str, **kwargs):
1564+
"""
1565+
**Update an HTTP server**
1566+
https://developer.cisco.com/meraki/api-v1/#!update-network-webhooks-http-server
1567+
1568+
- networkId (string): (required)
1569+
- httpServerId (string): (required)
1570+
- name (string): A name for easy reference to the HTTP server
1571+
- url (string): The URL of the HTTP server
1572+
- sharedSecret (string): A shared secret that will be included in POSTs sent to the HTTP server. This secret can be used to verify that the request was sent by Meraki.
1573+
"""
1574+
1575+
kwargs.update(locals())
1576+
1577+
metadata = {
1578+
'tags': ['networks', 'configure', 'webhooks', 'httpServers'],
1579+
'operation': 'updateNetworkWebhooksHttpServer'
1580+
}
1581+
resource = f'/networks/{networkId}/webhooks/httpServers/{httpServerId}'
1582+
1583+
body_params = ['name', 'url', 'sharedSecret', ]
1584+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
1585+
1586+
return self._session.put(metadata, resource, payload)
1587+
1588+
def deleteNetworkWebhooksHttpServer(self, networkId: str, httpServerId: str):
1589+
"""
1590+
**Delete an HTTP server from a network**
1591+
https://developer.cisco.com/meraki/api-v1/#!delete-network-webhooks-http-server
1592+
1593+
- networkId (string): (required)
1594+
- httpServerId (string): (required)
1595+
"""
1596+
1597+
metadata = {
1598+
'tags': ['networks', 'configure', 'webhooks', 'httpServers'],
1599+
'operation': 'deleteNetworkWebhooksHttpServer'
1600+
}
1601+
resource = f'/networks/{networkId}/webhooks/httpServers/{httpServerId}'
1602+
1603+
return self._session.delete(metadata, resource)
1604+
1605+
def createNetworkWebhooksWebhookTest(self, networkId: str, url: str, **kwargs):
1606+
"""
1607+
**Send a test webhook for a network**
1608+
https://developer.cisco.com/meraki/api-v1/#!create-network-webhooks-webhook-test
1609+
1610+
- networkId (string): (required)
1611+
- url (string): The URL where the test webhook will be sent
1612+
- sharedSecret (string): The shared secret the test webhook will send. Optional. Defaults to an empty string.
1613+
"""
1614+
1615+
kwargs.update(locals())
1616+
1617+
metadata = {
1618+
'tags': ['networks', 'configure', 'webhooks', 'webhookTests'],
1619+
'operation': 'createNetworkWebhooksWebhookTest'
1620+
}
1621+
resource = f'/networks/{networkId}/webhooks/webhookTests'
1622+
1623+
body_params = ['url', 'sharedSecret', ]
1624+
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
1625+
1626+
return self._session.post(metadata, resource, payload)
1627+
1628+
def getNetworkWebhooksWebhookTest(self, networkId: str, webhookTestId: str):
1629+
"""
1630+
**Return the status of a webhook test for a network**
1631+
https://developer.cisco.com/meraki/api-v1/#!get-network-webhooks-webhook-test
1632+
1633+
- networkId (string): (required)
1634+
- webhookTestId (string): (required)
1635+
"""
1636+
1637+
metadata = {
1638+
'tags': ['networks', 'configure', 'webhooks', 'webhookTests'],
1639+
'operation': 'getNetworkWebhooksWebhookTest'
1640+
}
1641+
resource = f'/networks/{networkId}/webhooks/webhookTests/{webhookTestId}'
1642+
1643+
return self._session.get(metadata, resource)

0 commit comments

Comments
 (0)