forked from meraki/dashboard-api-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwireless.py
More file actions
1701 lines (1223 loc) · 73.7 KB
/
Copy pathwireless.py
File metadata and controls
1701 lines (1223 loc) · 73.7 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import urllib
class ActionBatchWireless(object):
def __init__(self):
super(ActionBatchWireless, self).__init__()
def updateDeviceWirelessAlternateManagementInterfaceIpv6(self, serial: str, **kwargs):
"""
**Update alternate management interface IPv6 address**
https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-alternate-management-interface-ipv-6
- serial (string): Serial
- addresses (array): configured alternate management interface addresses
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'alternateManagementInterface', 'ipv6'],
'operation': 'updateDeviceWirelessAlternateManagementInterfaceIpv6'
}
resource = f'/devices/{serial}/wireless/alternateManagementInterface/ipv6'
body_params = ['addresses', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateDeviceWirelessBluetoothSettings(self, serial: str, **kwargs):
"""
**Update the bluetooth settings for a wireless device**
https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-bluetooth-settings
- serial (string): Serial
- uuid (string): Desired UUID of the beacon. If the value is set to null it will reset to Dashboard's
automatically generated value.
- major (integer): Desired major value of the beacon. If the value is set to null it will reset to
Dashboard's automatically generated value.
- minor (integer): Desired minor value of the beacon. If the value is set to null it will reset to
Dashboard's automatically generated value.
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'bluetooth', 'settings'],
'operation': 'updateDeviceWirelessBluetoothSettings'
}
resource = f'/devices/{serial}/wireless/bluetooth/settings'
body_params = ['uuid', 'major', 'minor', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateDeviceWirelessElectronicShelfLabel(self, serial: str, **kwargs):
"""
**Update the ESL settings of a device**
https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-electronic-shelf-label
- serial (string): Serial
- channel (string): Desired ESL channel for the device, or 'Auto' (case insensitive) to use the recommended channel
- enabled (boolean): Turn ESL features on and off for this device
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'electronicShelfLabel'],
'operation': 'updateDeviceWirelessElectronicShelfLabel'
}
resource = f'/devices/{serial}/wireless/electronicShelfLabel'
body_params = ['channel', 'enabled', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateDeviceWirelessRadioSettings(self, serial: str, **kwargs):
"""
**Update the radio settings overrides of a device, which take precedence over RF profiles.**
https://developer.cisco.com/meraki/api-v1/#!update-device-wireless-radio-settings
- serial (string): Serial
- rfProfileId (string): The ID of an RF profile to assign to the device. If the value of this parameter is null, the appropriate basic RF profile (indoor or outdoor) will be assigned to the device. Assigning an RF profile will clear ALL manually configured overrides on the device (channel width, channel, power).
- twoFourGhzSettings (object): Manual radio settings for 2.4 GHz.
- fiveGhzSettings (object): Manual radio settings for 5 GHz.
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'radio', 'settings'],
'operation': 'updateDeviceWirelessRadioSettings'
}
resource = f'/devices/{serial}/wireless/radio/settings'
body_params = ['rfProfileId', 'twoFourGhzSettings', 'fiveGhzSettings', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def createNetworkWirelessAirMarshalRule(self, networkId: str, type: str, match: dict):
"""
**Creates a new rule**
https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-air-marshal-rule
- networkId (string): Network ID
- type (string): Indicates if this rule will allow, block, or alert.
- match (object): Object describing the rule specification.
"""
kwargs = locals()
if 'type' in kwargs:
options = ['alert', 'allow', 'block']
assert kwargs['type'] in options, f'''"type" cannot be "{kwargs['type']}", & must be set to one of: {options}'''
metadata = {
'tags': ['wireless', 'configure', 'airMarshal', 'rules'],
'operation': 'createNetworkWirelessAirMarshalRule'
}
resource = f'/networks/{networkId}/wireless/airMarshal/rules'
body_params = ['type', 'match', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessAirMarshalRule(self, networkId: str, ruleId: str, **kwargs):
"""
**Update a rule**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-air-marshal-rule
- networkId (string): Network ID
- ruleId (string): Rule ID
- type (string): Indicates if this rule will allow, block, or alert.
- match (object): Object describing the rule specification.
"""
kwargs.update(locals())
if 'type' in kwargs:
options = ['alert', 'allow', 'block']
assert kwargs['type'] in options, f'''"type" cannot be "{kwargs['type']}", & must be set to one of: {options}'''
metadata = {
'tags': ['wireless', 'configure', 'airMarshal', 'rules'],
'operation': 'updateNetworkWirelessAirMarshalRule'
}
resource = f'/networks/{networkId}/wireless/airMarshal/rules/{ruleId}'
body_params = ['type', 'match', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def deleteNetworkWirelessAirMarshalRule(self, networkId: str, ruleId: str):
"""
**Delete an Air Marshal rule.**
https://developer.cisco.com/meraki/api-v1/#!delete-network-wireless-air-marshal-rule
- networkId (string): Network ID
- ruleId (string): Rule ID
"""
metadata = {
'tags': ['wireless', 'configure', 'airMarshal', 'rules'],
'operation': 'deleteNetworkWirelessAirMarshalRule'
}
resource = f'/networks/{networkId}/wireless/airMarshal/rules/{ruleId}'
action = {
"resource": resource,
"operation": "destroy",
}
return action
def updateNetworkWirelessAirMarshalSettings(self, networkId: str, defaultPolicy: str):
"""
**Updates Air Marshal settings.**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-air-marshal-settings
- networkId (string): Network ID
- defaultPolicy (string): Allows clients to access rogue networks. Blocked by default.
"""
kwargs = locals()
if 'defaultPolicy' in kwargs:
options = ['allow', 'block']
assert kwargs['defaultPolicy'] in options, f'''"defaultPolicy" cannot be "{kwargs['defaultPolicy']}", & must be set to one of: {options}'''
metadata = {
'tags': ['wireless', 'configure', 'airMarshal', 'settings'],
'operation': 'updateNetworkWirelessAirMarshalSettings'
}
resource = f'/networks/{networkId}/wireless/airMarshal/settings'
body_params = ['defaultPolicy', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessAlternateManagementInterface(self, networkId: str, **kwargs):
"""
**Update alternate management interface and device static IP**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-alternate-management-interface
- networkId (string): Network ID
- enabled (boolean): Boolean value to enable or disable alternate management interface
- vlanId (integer): Alternate management interface VLAN, must be between 1 and 4094
- protocols (array): Can be one or more of the following values: 'radius', 'snmp', 'syslog' or 'ldap'
- accessPoints (array): Array of access point serial number and IP assignment. Note: accessPoints IP assignment is not applicable for template networks, in other words, do not put 'accessPoints' in the body when updating template networks. Also, an empty 'accessPoints' array will remove all previous static IP assignments
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'alternateManagementInterface'],
'operation': 'updateNetworkWirelessAlternateManagementInterface'
}
resource = f'/networks/{networkId}/wireless/alternateManagementInterface'
body_params = ['enabled', 'vlanId', 'protocols', 'accessPoints', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessBilling(self, networkId: str, **kwargs):
"""
**Update the billing settings**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-billing
- networkId (string): Network ID
- currency (string): The currency code of this node group's billing plans
- plans (array): Array of billing plans in the node group. (Can configure a maximum of 5)
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'billing'],
'operation': 'updateNetworkWirelessBilling'
}
resource = f'/networks/{networkId}/wireless/billing'
body_params = ['currency', 'plans', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessElectronicShelfLabel(self, networkId: str, **kwargs):
"""
**Update the ESL settings of a wireless network**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-electronic-shelf-label
- networkId (string): Network ID
- hostname (string): Desired ESL hostname of the network
- enabled (boolean): Turn ESL features on and off for this network
- mode (string): Electronic shelf label mode of the network. Valid options are 'Bluetooth', 'high frequency'
"""
kwargs.update(locals())
if 'mode' in kwargs:
options = ['Bluetooth', 'high frequency']
assert kwargs['mode'] in options, f'''"mode" cannot be "{kwargs['mode']}", & must be set to one of: {options}'''
metadata = {
'tags': ['wireless', 'configure', 'electronicShelfLabel'],
'operation': 'updateNetworkWirelessElectronicShelfLabel'
}
resource = f'/networks/{networkId}/wireless/electronicShelfLabel'
body_params = ['hostname', 'enabled', 'mode', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def createNetworkWirelessEthernetPortsProfile(self, networkId: str, name: str, ports: list, **kwargs):
"""
**Create an AP port profile**
https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-ethernet-ports-profile
- networkId (string): Network ID
- name (string): AP port profile name
- ports (array): AP ports configuration
- usbPorts (array): AP usb ports configuration
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'ethernet', 'ports', 'profiles'],
'operation': 'createNetworkWirelessEthernetPortsProfile'
}
resource = f'/networks/{networkId}/wireless/ethernet/ports/profiles'
body_params = ['name', 'ports', 'usbPorts', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "create",
"body": payload
}
return action
def assignNetworkWirelessEthernetPortsProfiles(self, networkId: str, serials: list, profileId: str):
"""
**Assign AP port profile to list of APs**
https://developer.cisco.com/meraki/api-v1/#!assign-network-wireless-ethernet-ports-profiles
- networkId (string): Network ID
- serials (array): List of AP serials
- profileId (string): AP profile ID
"""
kwargs = locals()
metadata = {
'tags': ['wireless', 'configure', 'ethernet', 'ports', 'profiles'],
'operation': 'assignNetworkWirelessEthernetPortsProfiles'
}
resource = f'/networks/{networkId}/wireless/ethernet/ports/profiles/assign'
body_params = ['serials', 'profileId', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "aps",
"body": payload
}
return action
def setNetworkWirelessEthernetPortsProfilesDefault(self, networkId: str, profileId: str):
"""
**Set the AP port profile to be default for this network**
https://developer.cisco.com/meraki/api-v1/#!set-network-wireless-ethernet-ports-profiles-default
- networkId (string): Network ID
- profileId (string): AP profile ID
"""
kwargs = locals()
metadata = {
'tags': ['wireless', 'configure', 'ethernet', 'ports', 'profiles'],
'operation': 'setNetworkWirelessEthernetPortsProfilesDefault'
}
resource = f'/networks/{networkId}/wireless/ethernet/ports/profiles/setDefault'
body_params = ['profileId', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "default",
"body": payload
}
return action
def updateNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: str, **kwargs):
"""
**Update the AP port profile by ID for this network**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ethernet-ports-profile
- networkId (string): Network ID
- profileId (string): Profile ID
- name (string): AP port profile name
- ports (array): AP ports configuration
- usbPorts (array): AP usb ports configuration
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'ethernet', 'ports', 'profiles'],
'operation': 'updateNetworkWirelessEthernetPortsProfile'
}
resource = f'/networks/{networkId}/wireless/ethernet/ports/profiles/{profileId}'
body_params = ['name', 'ports', 'usbPorts', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def deleteNetworkWirelessEthernetPortsProfile(self, networkId: str, profileId: str):
"""
**Delete an AP port profile**
https://developer.cisco.com/meraki/api-v1/#!delete-network-wireless-ethernet-ports-profile
- networkId (string): Network ID
- profileId (string): Profile ID
"""
metadata = {
'tags': ['wireless', 'configure', 'ethernet', 'ports', 'profiles'],
'operation': 'deleteNetworkWirelessEthernetPortsProfile'
}
resource = f'/networks/{networkId}/wireless/ethernet/ports/profiles/{profileId}'
action = {
"resource": resource,
"operation": "destroy",
}
return action
def updateNetworkWirelessLocationScanning(self, networkId: str, **kwargs):
"""
**Change scanning API settings**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-location-scanning
- networkId (string): Network ID
- enabled (boolean): Collect location and scanning analytics
- api (object): Enable push API for scanning events, analytics must be enabled
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'location', 'scanning'],
'operation': 'updateNetworkWirelessLocationScanning'
}
resource = f'/networks/{networkId}/wireless/location/scanning'
body_params = ['enabled', 'api', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def createNetworkWirelessRfProfile(self, networkId: str, name: str, bandSelectionType: str, **kwargs):
"""
**Creates new RF profile for this network**
https://developer.cisco.com/meraki/api-v1/#!create-network-wireless-rf-profile
- networkId (string): Network ID
- name (string): The name of the new profile. Must be unique. This param is required on creation.
- bandSelectionType (string): Band selection can be set to either 'ssid' or 'ap'. This param is required on creation.
- clientBalancingEnabled (boolean): Steers client to best available access point. Can be either true or false. Defaults to true.
- minBitrateType (string): Minimum bitrate can be set to either 'band' or 'ssid'. Defaults to band.
- apBandSettings (object): Settings that will be enabled if selectionType is set to 'ap'.
- twoFourGhzSettings (object): Settings related to 2.4Ghz band
- fiveGhzSettings (object): Settings related to 5Ghz band
- sixGhzSettings (object): Settings related to 6Ghz band. Only applicable to networks with 6Ghz capable APs
- transmission (object): Settings related to radio transmission.
- perSsidSettings (object): Per-SSID radio settings by number.
- flexRadios (object): Flex radio settings.
"""
kwargs.update(locals())
if 'minBitrateType' in kwargs:
options = ['band', 'ssid']
assert kwargs['minBitrateType'] in options, f'''"minBitrateType" cannot be "{kwargs['minBitrateType']}", & must be set to one of: {options}'''
if 'bandSelectionType' in kwargs:
options = ['ap', 'ssid']
assert kwargs['bandSelectionType'] in options, f'''"bandSelectionType" cannot be "{kwargs['bandSelectionType']}", & must be set to one of: {options}'''
metadata = {
'tags': ['wireless', 'configure', 'rfProfiles'],
'operation': 'createNetworkWirelessRfProfile'
}
resource = f'/networks/{networkId}/wireless/rfProfiles'
body_params = ['name', 'clientBalancingEnabled', 'minBitrateType', 'bandSelectionType', 'apBandSettings', 'twoFourGhzSettings', 'fiveGhzSettings', 'sixGhzSettings', 'transmission', 'perSsidSettings', 'flexRadios', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "create",
"body": payload
}
return action
def updateNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str, **kwargs):
"""
**Updates specified RF profile for this network**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-rf-profile
- networkId (string): Network ID
- rfProfileId (string): Rf profile ID
- name (string): The name of the new profile. Must be unique.
- isIndoorDefault (boolean): Set this profile as the default indoor rf profile. If the profile ID is one of 'indoor' or 'outdoor', then a new profile will be created from the respective ID and set as the default
- isOutdoorDefault (boolean): Set this profile as the default outdoor rf profile. If the profile ID is one of 'indoor' or 'outdoor', then a new profile will be created from the respective ID and set as the default
- clientBalancingEnabled (boolean): Steers client to best available access point. Can be either true or false.
- minBitrateType (string): Minimum bitrate can be set to either 'band' or 'ssid'.
- bandSelectionType (string): Band selection can be set to either 'ssid' or 'ap'.
- apBandSettings (object): Settings that will be enabled if selectionType is set to 'ap'.
- twoFourGhzSettings (object): Settings related to 2.4Ghz band
- fiveGhzSettings (object): Settings related to 5Ghz band
- sixGhzSettings (object): Settings related to 6Ghz band. Only applicable to networks with 6Ghz capable APs
- transmission (object): Settings related to radio transmission.
- perSsidSettings (object): Per-SSID radio settings by number.
- flexRadios (object): Flex radio settings.
"""
kwargs.update(locals())
if 'minBitrateType' in kwargs:
options = ['band', 'ssid']
assert kwargs['minBitrateType'] in options, f'''"minBitrateType" cannot be "{kwargs['minBitrateType']}", & must be set to one of: {options}'''
if 'bandSelectionType' in kwargs:
options = ['ap', 'ssid']
assert kwargs['bandSelectionType'] in options, f'''"bandSelectionType" cannot be "{kwargs['bandSelectionType']}", & must be set to one of: {options}'''
metadata = {
'tags': ['wireless', 'configure', 'rfProfiles'],
'operation': 'updateNetworkWirelessRfProfile'
}
resource = f'/networks/{networkId}/wireless/rfProfiles/{rfProfileId}'
body_params = ['name', 'isIndoorDefault', 'isOutdoorDefault', 'clientBalancingEnabled', 'minBitrateType', 'bandSelectionType', 'apBandSettings', 'twoFourGhzSettings', 'fiveGhzSettings', 'sixGhzSettings', 'transmission', 'perSsidSettings', 'flexRadios', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def deleteNetworkWirelessRfProfile(self, networkId: str, rfProfileId: str):
"""
**Delete a RF Profile**
https://developer.cisco.com/meraki/api-v1/#!delete-network-wireless-rf-profile
- networkId (string): Network ID
- rfProfileId (string): Rf profile ID
"""
metadata = {
'tags': ['wireless', 'configure', 'rfProfiles'],
'operation': 'deleteNetworkWirelessRfProfile'
}
resource = f'/networks/{networkId}/wireless/rfProfiles/{rfProfileId}'
action = {
"resource": resource,
"operation": "destroy",
}
return action
def updateNetworkWirelessSettings(self, networkId: str, **kwargs):
"""
**Update the wireless settings for a network**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-settings
- networkId (string): Network ID
- meshingEnabled (boolean): Toggle for enabling or disabling meshing in a network
- ipv6BridgeEnabled (boolean): Toggle for enabling or disabling IPv6 bridging in a network (Note: if enabled, SSIDs must also be configured to use bridge mode)
- locationAnalyticsEnabled (boolean): Toggle for enabling or disabling location analytics for your network
- upgradeStrategy (string): The default strategy that network devices will use to perform an upgrade. Requires firmware version MR 26.8 or higher.
- ledLightsOn (boolean): Toggle for enabling or disabling LED lights on all APs in the network (making them run dark)
- namedVlans (object): Named VLAN settings for wireless networks.
"""
kwargs.update(locals())
if 'upgradeStrategy' in kwargs:
options = ['minimizeClientDowntime', 'minimizeUpgradeTime']
assert kwargs['upgradeStrategy'] in options, f'''"upgradeStrategy" cannot be "{kwargs['upgradeStrategy']}", & must be set to one of: {options}'''
metadata = {
'tags': ['wireless', 'configure', 'settings'],
'operation': 'updateNetworkWirelessSettings'
}
resource = f'/networks/{networkId}/wireless/settings'
body_params = ['meshingEnabled', 'ipv6BridgeEnabled', 'locationAnalyticsEnabled', 'upgradeStrategy', 'ledLightsOn', 'namedVlans', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessSsid(self, networkId: str, number: str, **kwargs):
"""
**Update the attributes of an MR SSID**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid
- networkId (string): Network ID
- number (string): Number
- name (string): The name of the SSID
- enabled (boolean): Whether or not the SSID is enabled
- authMode (string): The association control method for the SSID ('open', 'open-enhanced', 'psk', 'open-with-radius', 'open-with-nac', '8021x-meraki', '8021x-nac', '8021x-radius', '8021x-google', '8021x-entra', '8021x-localradius', 'ipsk-with-radius', 'ipsk-without-radius', 'ipsk-with-nac' or 'ipsk-with-radius-easy-psk')
- enterpriseAdminAccess (string): Whether or not an SSID is accessible by 'enterprise' administrators ('access disabled' or 'access enabled')
- encryptionMode (string): The psk encryption mode for the SSID ('wep' or 'wpa'). This param is only valid if the authMode is 'psk'
- psk (string): The passkey for the SSID. This param is only valid if the authMode is 'psk'
- wpaEncryptionMode (string): The types of WPA encryption. ('WPA1 only', 'WPA1 and WPA2', 'WPA2 only', 'WPA3 Transition Mode', 'WPA3 only' or 'WPA3 192-bit Security')
- dot11w (object): The current setting for Protected Management Frames (802.11w).
- dot11r (object): The current setting for 802.11r
- splashPage (string): The type of splash page for the SSID ('None', 'Click-through splash page', 'Billing', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'SMS authentication', 'Systems Manager Sentry', 'Facebook Wi-Fi', 'Google OAuth', 'Microsoft Entra ID', 'Sponsored guest', 'Cisco ISE' or 'Google Apps domain').This attribute is not supported for template children.
- splashGuestSponsorDomains (array): Array of valid sponsor email domains for sponsored guest splash type.
- oauth (object): The OAuth settings of this SSID. Only valid if splashPage is 'Google OAuth'.
- localRadius (object): The current setting for Local Authentication, a built-in RADIUS server on the access point. Only valid if authMode is '8021x-localradius'.
- ldap (object): The current setting for LDAP. Only valid if splashPage is 'Password-protected with LDAP'.
- activeDirectory (object): The current setting for Active Directory. Only valid if splashPage is 'Password-protected with Active Directory'
- radiusServers (array): The RADIUS 802.1X servers to be used for authentication. This param is only valid if the authMode is 'open-with-radius', '8021x-radius' or 'ipsk-with-radius'
- radiusProxyEnabled (boolean): If true, Meraki devices will proxy RADIUS messages through the Meraki cloud to the configured RADIUS auth and accounting servers.
- radiusTestingEnabled (boolean): If true, Meraki devices will periodically send Access-Request messages to configured RADIUS servers using identity 'meraki_8021x_test' to ensure that the RADIUS servers are reachable.
- radiusCalledStationId (string): The template of the called station identifier to be used for RADIUS (ex. $NODE_MAC$:$VAP_NUM$).
- radiusAuthenticationNasId (string): The template of the NAS identifier to be used for RADIUS authentication (ex. $NODE_MAC$:$VAP_NUM$).
- radiusServerTimeout (integer): The amount of time for which a RADIUS client waits for a reply from the RADIUS server (must be between 1-10 seconds).
- radiusServerAttemptsLimit (integer): The maximum number of transmit attempts after which a RADIUS server is failed over (must be between 1-5).
- radiusFallbackEnabled (boolean): Whether or not higher priority RADIUS servers should be retried after 60 seconds.
- radiusRadsec (object): The current settings for RADIUS RADSec
- radiusCoaEnabled (boolean): If true, Meraki devices will act as a RADIUS Dynamic Authorization Server and will respond to RADIUS Change-of-Authorization and Disconnect messages sent by the RADIUS server.
- radiusFailoverPolicy (string): This policy determines how authentication requests should be handled in the event that all of the configured RADIUS servers are unreachable ('Deny access' or 'Allow access')
- radiusLoadBalancingPolicy (string): This policy determines which RADIUS server will be contacted first in an authentication attempt and the ordering of any necessary retry attempts ('Strict priority order' or 'Round robin')
- radiusAccountingEnabled (boolean): Whether or not RADIUS accounting is enabled. This param is only valid if the authMode is 'open-with-radius', '8021x-radius' or 'ipsk-with-radius'
- radiusAccountingServers (array): The RADIUS accounting 802.1X servers to be used for authentication. This param is only valid if the authMode is 'open-with-radius', '8021x-radius' or 'ipsk-with-radius' and radiusAccountingEnabled is 'true'
- radiusAccountingInterimInterval (integer): The interval (in seconds) in which accounting information is updated and sent to the RADIUS accounting server.
- radiusAttributeForGroupPolicies (string): Specify the RADIUS attribute used to look up group policies ('Filter-Id', 'Reply-Message', 'Airespace-ACL-Name' or 'Aruba-User-Role'). Access points must receive this attribute in the RADIUS Access-Accept message
- ipAssignmentMode (string): The client IP assignment mode ('NAT mode', 'Bridge mode', 'Layer 3 roaming', 'Ethernet over GRE', 'Layer 3 roaming with a concentrator', 'VPN' or 'Campus Gateway')
- useVlanTagging (boolean): Whether or not traffic should be directed to use specific VLANs. This param is only valid if the ipAssignmentMode is 'Bridge mode' or 'Layer 3 roaming'
- concentratorNetworkId (string): The concentrator to use when the ipAssignmentMode is 'Layer 3 roaming with a concentrator' or 'VPN'.
- secondaryConcentratorNetworkId (string): The secondary concentrator to use when the ipAssignmentMode is 'VPN'. If configured, the APs will switch to using this concentrator if the primary concentrator is unreachable. This param is optional. ('disabled' represents no secondary concentrator.)
- disassociateClientsOnVpnFailover (boolean): Disassociate clients when 'VPN' concentrator failover occurs in order to trigger clients to re-associate and generate new DHCP requests. This param is only valid if ipAssignmentMode is 'VPN'.
- vlanId (integer): The VLAN ID used for VLAN tagging. This param is only valid when the ipAssignmentMode is 'Layer 3 roaming with a concentrator' or 'VPN'
- defaultVlanId (integer): The default VLAN ID used for 'all other APs'. This param is only valid when the ipAssignmentMode is 'Bridge mode' or 'Layer 3 roaming'
- apTagsAndVlanIds (array): The list of tags and VLAN IDs used for VLAN tagging. This param is only valid when the ipAssignmentMode is 'Bridge mode' or 'Layer 3 roaming'
- walledGardenEnabled (boolean): Allow access to a configurable list of IP ranges, which users may access prior to sign-on.
- walledGardenRanges (array): Specify your walled garden by entering an array of addresses, ranges using CIDR notation, domain names, and domain wildcards (e.g. '192.168.1.1/24', '192.168.37.10/32', 'www.yahoo.com', '*.google.com']). Meraki's splash page is automatically included in your walled garden.
- gre (object): Ethernet over GRE settings
- radiusOverride (boolean): If true, the RADIUS response can override VLAN tag. This is not valid when ipAssignmentMode is 'NAT mode'.
- radiusGuestVlanEnabled (boolean): Whether or not RADIUS Guest VLAN is enabled. This param is only valid if the authMode is 'open-with-radius' and addressing mode is not set to 'isolated' or 'nat' mode
- radiusGuestVlanId (integer): VLAN ID of the RADIUS Guest VLAN. This param is only valid if the authMode is 'open-with-radius' and addressing mode is not set to 'isolated' or 'nat' mode
- minBitrate (number): The minimum bitrate in Mbps of this SSID in the default indoor RF profile. ('1', '2', '5.5', '6', '9', '11', '12', '18', '24', '36', '48' or '54')
- bandSelection (string): The client-serving radio frequencies of this SSID in the default indoor RF profile. ('Dual band operation', '5 GHz band only' or 'Dual band operation with Band Steering')
- perClientBandwidthLimitUp (integer): The upload bandwidth limit in Kbps. (0 represents no limit.)
- perClientBandwidthLimitDown (integer): The download bandwidth limit in Kbps. (0 represents no limit.)
- perSsidBandwidthLimitUp (integer): The total upload bandwidth limit in Kbps. (0 represents no limit.)
- perSsidBandwidthLimitDown (integer): The total download bandwidth limit in Kbps. (0 represents no limit.)
- lanIsolationEnabled (boolean): Boolean indicating whether Layer 2 LAN isolation should be enabled or disabled. Only configurable when ipAssignmentMode is 'Bridge mode'.
- visible (boolean): Boolean indicating whether APs should advertise or hide this SSID. APs will only broadcast this SSID if set to true
- availableOnAllAps (boolean): Boolean indicating whether all APs should broadcast the SSID or if it should be restricted to APs matching any availability tags. Can only be false if the SSID has availability tags.
- availabilityTags (array): Accepts a list of tags for this SSID. If availableOnAllAps is false, then the SSID will only be broadcast by APs with tags matching any of the tags in this list.
- adaptivePolicyGroupId (string): Adaptive policy group ID this SSID is assigned to.
- mandatoryDhcpEnabled (boolean): If true, Mandatory DHCP will enforce that clients connecting to this SSID must use the IP address assigned by the DHCP server. Clients who use a static IP address won't be able to associate.
- adultContentFilteringEnabled (boolean): Boolean indicating whether or not adult content will be blocked
- dnsRewrite (object): DNS servers rewrite settings
- speedBurst (object): The SpeedBurst setting for this SSID'
- namedVlans (object): Named VLAN settings.
- localAuthFallback (object): The current configuration for Local Authentication Fallback. Enables the Access Point (AP) to store client authentication data for a specified duration that can be adjusted as needed.
- radiusAccountingStartDelay (integer): The delay (in seconds) before sending the first RADIUS accounting start message. Must be between 0 and 60 seconds.
"""
kwargs.update(locals())
if 'authMode' in kwargs:
options = ['8021x-entra', '8021x-google', '8021x-localradius', '8021x-meraki', '8021x-nac', '8021x-radius', 'ipsk-with-nac', 'ipsk-with-radius', 'ipsk-with-radius-easy-psk', 'ipsk-without-radius', 'open', 'open-enhanced', 'open-with-nac', 'open-with-radius', 'psk']
assert kwargs['authMode'] in options, f'''"authMode" cannot be "{kwargs['authMode']}", & must be set to one of: {options}'''
if 'enterpriseAdminAccess' in kwargs:
options = ['access disabled', 'access enabled']
assert kwargs['enterpriseAdminAccess'] in options, f'''"enterpriseAdminAccess" cannot be "{kwargs['enterpriseAdminAccess']}", & must be set to one of: {options}'''
if 'encryptionMode' in kwargs:
options = ['open', 'wep', 'wpa', 'wpa-eap']
assert kwargs['encryptionMode'] in options, f'''"encryptionMode" cannot be "{kwargs['encryptionMode']}", & must be set to one of: {options}'''
if 'wpaEncryptionMode' in kwargs:
options = ['WPA1 and WPA2', 'WPA1 only', 'WPA2 only', 'WPA3 192-bit Security', 'WPA3 Transition Mode', 'WPA3 only']
assert kwargs['wpaEncryptionMode'] in options, f'''"wpaEncryptionMode" cannot be "{kwargs['wpaEncryptionMode']}", & must be set to one of: {options}'''
if 'splashPage' in kwargs:
options = ['Billing', 'Cisco ISE', 'Click-through splash page', 'Facebook Wi-Fi', 'Google Apps domain', 'Google OAuth', 'Microsoft Entra ID', 'None', 'Password-protected with Active Directory', 'Password-protected with LDAP', 'Password-protected with Meraki RADIUS', 'Password-protected with custom RADIUS', 'SMS authentication', 'Sponsored guest', 'Systems Manager Sentry']
assert kwargs['splashPage'] in options, f'''"splashPage" cannot be "{kwargs['splashPage']}", & must be set to one of: {options}'''
if 'radiusFailoverPolicy' in kwargs:
options = ['Allow access', 'Deny access']
assert kwargs['radiusFailoverPolicy'] in options, f'''"radiusFailoverPolicy" cannot be "{kwargs['radiusFailoverPolicy']}", & must be set to one of: {options}'''
if 'radiusLoadBalancingPolicy' in kwargs:
options = ['Round robin', 'Strict priority order']
assert kwargs['radiusLoadBalancingPolicy'] in options, f'''"radiusLoadBalancingPolicy" cannot be "{kwargs['radiusLoadBalancingPolicy']}", & must be set to one of: {options}'''
if 'radiusAttributeForGroupPolicies' in kwargs:
options = ['Airespace-ACL-Name', 'Aruba-User-Role', 'Filter-Id', 'Reply-Message']
assert kwargs['radiusAttributeForGroupPolicies'] in options, f'''"radiusAttributeForGroupPolicies" cannot be "{kwargs['radiusAttributeForGroupPolicies']}", & must be set to one of: {options}'''
metadata = {
'tags': ['wireless', 'configure', 'ssids'],
'operation': 'updateNetworkWirelessSsid'
}
resource = f'/networks/{networkId}/wireless/ssids/{number}'
body_params = ['name', 'enabled', 'authMode', 'enterpriseAdminAccess', 'encryptionMode', 'psk', 'wpaEncryptionMode', 'dot11w', 'dot11r', 'splashPage', 'splashGuestSponsorDomains', 'oauth', 'localRadius', 'ldap', 'activeDirectory', 'radiusServers', 'radiusProxyEnabled', 'radiusTestingEnabled', 'radiusCalledStationId', 'radiusAuthenticationNasId', 'radiusServerTimeout', 'radiusServerAttemptsLimit', 'radiusFallbackEnabled', 'radiusRadsec', 'radiusCoaEnabled', 'radiusFailoverPolicy', 'radiusLoadBalancingPolicy', 'radiusAccountingEnabled', 'radiusAccountingServers', 'radiusAccountingInterimInterval', 'radiusAttributeForGroupPolicies', 'ipAssignmentMode', 'useVlanTagging', 'concentratorNetworkId', 'secondaryConcentratorNetworkId', 'disassociateClientsOnVpnFailover', 'vlanId', 'defaultVlanId', 'apTagsAndVlanIds', 'walledGardenEnabled', 'walledGardenRanges', 'gre', 'radiusOverride', 'radiusGuestVlanEnabled', 'radiusGuestVlanId', 'minBitrate', 'bandSelection', 'perClientBandwidthLimitUp', 'perClientBandwidthLimitDown', 'perSsidBandwidthLimitUp', 'perSsidBandwidthLimitDown', 'lanIsolationEnabled', 'visible', 'availableOnAllAps', 'availabilityTags', 'adaptivePolicyGroupId', 'mandatoryDhcpEnabled', 'adultContentFilteringEnabled', 'dnsRewrite', 'speedBurst', 'namedVlans', 'localAuthFallback', 'radiusAccountingStartDelay', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessSsidBonjourForwarding(self, networkId: str, number: str, **kwargs):
"""
**Update the bonjour forwarding setting and rules for the SSID**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-bonjour-forwarding
- networkId (string): Network ID
- number (string): Number
- enabled (boolean): If true, Bonjour forwarding is enabled on this SSID.
- rules (array): List of bonjour forwarding rules.
- exception (object): Bonjour forwarding exception
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'ssids', 'bonjourForwarding'],
'operation': 'updateNetworkWirelessSsidBonjourForwarding'
}
resource = f'/networks/{networkId}/wireless/ssids/{number}/bonjourForwarding'
body_params = ['enabled', 'rules', 'exception', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessSsidDeviceTypeGroupPolicies(self, networkId: str, number: str, **kwargs):
"""
**Update the device type group policies for the SSID**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-device-type-group-policies
- networkId (string): Network ID
- number (string): Number
- enabled (boolean): If true, the SSID device type group policies are enabled.
- deviceTypePolicies (array): List of device type policies.
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'ssids', 'deviceTypeGroupPolicies'],
'operation': 'updateNetworkWirelessSsidDeviceTypeGroupPolicies'
}
resource = f'/networks/{networkId}/wireless/ssids/{number}/deviceTypeGroupPolicies'
body_params = ['enabled', 'deviceTypePolicies', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessSsidEapOverride(self, networkId: str, number: str, **kwargs):
"""
**Update the EAP overridden parameters for an SSID.**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-eap-override
- networkId (string): Network ID
- number (string): Number
- timeout (integer): General EAP timeout in seconds.
- identity (object): EAP settings for identity requests.
- maxRetries (integer): Maximum number of general EAP retries.
- eapolKey (object): EAPOL Key settings.
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'ssids', 'eapOverride'],
'operation': 'updateNetworkWirelessSsidEapOverride'
}
resource = f'/networks/{networkId}/wireless/ssids/{number}/eapOverride'
body_params = ['timeout', 'identity', 'maxRetries', 'eapolKey', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessSsidFirewallL3FirewallRules(self, networkId: str, number: str, **kwargs):
"""
**Update the L3 firewall rules of an SSID on an MR network**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-firewall-l-3-firewall-rules
- networkId (string): Network ID
- number (string): Number
- rules (array): An ordered array of the firewall rules for this SSID.
- allowLanAccess (boolean): Allow wireless client access to local LAN (boolean value - true allows access and false denies access) (optional)
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'ssids', 'firewall', 'l3FirewallRules'],
'operation': 'updateNetworkWirelessSsidFirewallL3FirewallRules'
}
resource = f'/networks/{networkId}/wireless/ssids/{number}/firewall/l3FirewallRules'
body_params = ['rules', 'allowLanAccess', ]
payload = {k.strip(): v for k, v in kwargs.items() if k.strip() in body_params}
action = {
"resource": resource,
"operation": "update",
"body": payload
}
return action
def updateNetworkWirelessSsidFirewallL7FirewallRules(self, networkId: str, number: str, **kwargs):
"""
**Update the L7 firewall rules of an SSID on an MR network**
https://developer.cisco.com/meraki/api-v1/#!update-network-wireless-ssid-firewall-l-7-firewall-rules
- networkId (string): Network ID
- number (string): Number
- rules (array): An array of L7 firewall rules for this SSID. Rules will get applied in the same order user has specified in request. Empty array will clear the L7 firewall rule configuration.
"""
kwargs.update(locals())
metadata = {
'tags': ['wireless', 'configure', 'ssids', 'firewall', 'l7FirewallRules'],
'operation': 'updateNetworkWirelessSsidFirewallL7FirewallRules'