@@ -69,7 +69,7 @@ class AIREOSDevice(BaseDevice):
69
69
vendor = "cisco"
70
70
active_redundancy_states = {None , "active" }
71
71
72
- def __init__ (self , host , username , password , secret = "" , port = 22 , confirm_active = True , ** kwargs ):
72
+ def __init__ (self , host , username , password , secret = "" , port = 22 , confirm_active = True , ** kwargs ): # noqa: D403
73
73
"""
74
74
PyNTC Device implementation for Cisco WLC.
75
75
@@ -388,7 +388,7 @@ def ap_boot_options(self):
388
388
@property
389
389
def ap_image_stats (self ):
390
390
"""
391
- The stats of downloading the the image to all APs.
391
+ Stats of downloading the the image to all APs.
392
392
393
393
Returns:
394
394
dict: The AP count, and the downloaded, unsupported, and failed APs.
@@ -417,12 +417,21 @@ def ap_image_stats(self):
417
417
}
418
418
419
419
def backup_running_config (self , filename ):
420
+ """
421
+ Create backup of running config.
422
+
423
+ Args:
424
+ filename (str): Name of backup file.
425
+
426
+ Raises:
427
+ NotImplementedError: Function currently not implemented
428
+ """
420
429
raise NotImplementedError
421
430
422
431
@property
423
432
def boot_options (self ):
424
433
"""
425
- The images that are candidates for booting on reload.
434
+ Images that are candidates for booting on reload.
426
435
427
436
Returns:
428
437
dict: The boot options on the device. The "sys" key is the expected image on reload.
@@ -458,6 +467,16 @@ def boot_options(self):
458
467
return result
459
468
460
469
def checkpoint (self , filename ):
470
+ """
471
+ Create a checkpoint file of the current config.
472
+
473
+ Args:
474
+ checkpoint_file (str): Saves a checkpoint file with the name provided to the function.
475
+
476
+ Raises:
477
+ NotImplementedError: Function currently not implemented
478
+
479
+ """
461
480
raise NotImplementedError
462
481
463
482
def close (self ):
@@ -467,7 +486,7 @@ def close(self):
467
486
self ._connected = False
468
487
469
488
def config (self , command , ** netmiko_args ):
470
- """
489
+ r """
471
490
Send config commands to device.
472
491
473
492
By default, entering and exiting config mode is handled automatically.
@@ -535,7 +554,7 @@ def config(self, command, **netmiko_args):
535
554
536
555
return command_responses
537
556
538
- def config_list (self , commands , ** netmiko_args ):
557
+ def config_list (self , commands , ** netmiko_args ): # noqa: D401
539
558
"""
540
559
DEPRECATED - Use the `config` method.
541
560
@@ -602,7 +621,7 @@ def confirm_is_active(self):
602
621
@property
603
622
def connected (self ):
604
623
"""
605
- The connection status of the device.
624
+ Get connection status of the device.
606
625
607
626
Returns:
608
627
bool: True if the device is connected, else False.
@@ -657,9 +676,9 @@ def disable_wlans(self, wlan_ids):
657
676
raise WLANDisableError (self .host , desired_wlans , post_disabled_wlans )
658
677
659
678
@property
660
- def disabled_wlans (self ):
679
+ def disabled_wlans (self ): # noqa: D403
661
680
"""
662
- The IDs for all disabled WLANs.
681
+ IDs for all disabled WLANs.
663
682
664
683
Returns:
665
684
list: Disabled WLAN IDs.
@@ -741,9 +760,9 @@ def enable_wlans(self, wlan_ids):
741
760
raise WLANEnableError (self .host , desired_wlans , post_enabled_wlans )
742
761
743
762
@property
744
- def enabled_wlans (self ):
763
+ def enabled_wlans (self ): # noqa: D403
745
764
"""
746
- The IDs for all enabled WLANs.
765
+ IDs for all enabled WLANs.
747
766
748
767
Returns:
749
768
list: Enabled WLAN IDs.
@@ -768,6 +787,12 @@ def enabled_wlans(self):
768
787
769
788
@property
770
789
def facts (self ):
790
+ """
791
+ Get facts from device.
792
+
793
+ Raises:
794
+ NotImplementedError: Function currently not implemented.
795
+ """
771
796
raise NotImplementedError
772
797
773
798
def file_copy (
@@ -851,6 +876,17 @@ def file_copy(
851
876
return True
852
877
853
878
def file_copy_remote_exists (self , src , dest = None , ** kwargs ):
879
+ """
880
+ Copy 'src' file to remote device.
881
+
882
+ Args:
883
+ src (str): The path to the file to be copied to the device.
884
+ dest (str, optional): The name to use for storing the file on the device.
885
+ Defaults to use the name of the ``src`` file.
886
+
887
+ Raises:
888
+ NotImplementedError: Function currently not implemented.
889
+ """
854
890
raise NotImplementedError
855
891
856
892
def install_os (self , image_name , controller = "both" , save_config = True , disable_wlans = None , ** vendor_specifics ):
@@ -1056,7 +1092,7 @@ def handler(signum, frame):
1056
1092
@property
1057
1093
def redundancy_mode (self ):
1058
1094
"""
1059
- The oprating redundancy mode of the controller.
1095
+ Get operating redundancy mode of the controller.
1060
1096
1061
1097
Returns:
1062
1098
str: The redundancy mode the device is operating in.
@@ -1097,10 +1133,22 @@ def redundancy_state(self):
1097
1133
return redundancy_state
1098
1134
1099
1135
def rollback (self ):
1136
+ """
1137
+ Rollback to stored file config.
1138
+
1139
+ Raises:
1140
+ NotImplementedError: Function currently not implemented.
1141
+ """
1100
1142
raise NotImplementedError
1101
1143
1102
1144
@property
1103
1145
def running_config (self ):
1146
+ """
1147
+ Show running config.
1148
+
1149
+ Raises:
1150
+ NotImplementedError: Function currently not implemented.
1151
+ """
1104
1152
raise NotImplementedError
1105
1153
1106
1154
def save (self ):
@@ -1222,9 +1270,10 @@ def show(self, command, expect_string=None, **netmiko_args):
1222
1270
1223
1271
return command_responses
1224
1272
1225
- def show_list (self , commands , ** netmiko_args ):
1273
+ def show_list (self , commands , ** netmiko_args ): # noqa: D401
1226
1274
"""
1227
1275
DEPRECATED - Use the `show` method.
1276
+
1228
1277
Send operational commands to the device.
1229
1278
1230
1279
Args:
@@ -1255,6 +1304,12 @@ def show_list(self, commands, **netmiko_args):
1255
1304
1256
1305
@property
1257
1306
def startup_config (self ):
1307
+ """
1308
+ Get startup config.
1309
+
1310
+ Raises:
1311
+ NotImplementedError: Function currently not implemented.
1312
+ """
1258
1313
raise NotImplementedError
1259
1314
1260
1315
def transfer_image_to_ap (self , image , timeout = None ):
@@ -1334,7 +1389,7 @@ def transfer_image_to_ap(self, image, timeout=None):
1334
1389
@property
1335
1390
def uptime (self ):
1336
1391
"""
1337
- The uptime of the device in seconds.
1392
+ Get uptime of the device in seconds.
1338
1393
1339
1394
Returns:
1340
1395
int: The number of seconds the device has been up.
@@ -1354,8 +1409,7 @@ def uptime(self):
1354
1409
@property
1355
1410
def uptime_string (self ):
1356
1411
"""
1357
- The uptime of the device as a string.
1358
- The format is dd::hh::mm
1412
+ Get uptime of the device as a string in the format is dd::hh::mm.
1359
1413
1360
1414
Returns:
1361
1415
str: The uptime of the device.
0 commit comments