From b6a6cde047d71305492111c5873aad66b38a6e27 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 27 Apr 2022 12:28:55 -0700 Subject: [PATCH 01/34] Update performance graphs for Netmiko 4.1.0 (#2768) * Update license dependencies file * Updates performance graphs --- license-dependencies.txt | 8 +++----- tests/performance/graphs/netmiko_arista_eos.svg | 6 +++--- tests/performance/graphs/netmiko_cisco_ios.svg | 6 +++--- tests/performance/graphs/netmiko_cisco_nxos.svg | 6 +++--- tests/performance/graphs/netmiko_cisco_xe.svg | 6 +++--- tests/performance/graphs/netmiko_cisco_xr.svg | 6 +++--- tests/performance/graphs/netmiko_hp_procurve.svg | 6 +++--- .../performance/graphs/netmiko_juniper_junos.svg | 6 +++--- tests/performance/netmiko_performance.csv | 16 ++++++++-------- 9 files changed, 32 insertions(+), 34 deletions(-) diff --git a/license-dependencies.txt b/license-dependencies.txt index 9f568fab4..b93a2158d 100644 --- a/license-dependencies.txt +++ b/license-dependencies.txt @@ -3,12 +3,12 @@ Name Version License ------------- ------- ------- -netmiko 4.0.0 MIT License +netmiko 4.1.0 MIT License ##### Direct dependencies Name Version License ------------- ------- ------- -paramiko 2.10.3 GNU Library or Lesser General Public License (LGPL) +paramiko 2.10.4 GNU Library or Lesser General Public License (LGPL) scp 0.14.4 GNU Library or Lesser General Public License (LGPL) tenacity 8.0.1 Apache Software License ntc-templates 3.0.0 Apache Software License @@ -21,10 +21,8 @@ Name Version License PyNaCl 1.5.0 Apache License 2.0 bcrypt 3.2.0 Apache Software License textfsm 1.1.2 Apache Software License -cryptography 36.0.2 Apache Software License; BSD License +cryptography 37.0.0 Apache Software License; BSD License pycparser 2.21 BSD License cffi 1.15.0 MIT License future 0.18.2 MIT License six 1.16.0 MIT License - -With assistance from `pip-licenses -o license` diff --git a/tests/performance/graphs/netmiko_arista_eos.svg b/tests/performance/graphs/netmiko_arista_eos.svg index cf5bbca2a..db0c5dede 100644 --- a/tests/performance/graphs/netmiko_arista_eos.svg +++ b/tests/performance/graphs/netmiko_arista_eos.svg @@ -1,4 +1,4 @@ -Netmiko: Arista EOS Performance (vEOS)00101020203030404050502.4.23.0.03.1.03.3.33.4.03.2.04.0.04.0.1a1Netmiko: Arista EOS Performance (vEOS)5.60085111.669230769230769455.27317052090252.4.26.2156595.0208791208791449.91181661538463.0.06.25804178.37252747252745449.542154673750253.1.01.904317261.7241758241758487.508790614265543.3.32.280802345.0758241758241484.225653645729663.4.08.236209428.4274725274725432.29153439960483.2.01.687836511.77912087912074489.396612902233474.0.01.841382595.1307692307691488.057615202535434.0.1a16.61593711.669230769230769446.421114335813572.4.26.97108895.0208791208791443.324020487419943.0.06.7046178.37252747252745445.64792875593313.1.02.497181261.7241758241758482.33872084863333.3.32.81286345.0758241758241479.58584252654763.4.08.897231428.4274725274725426.527092880777963.2.02.167681511.77912087912074485.212125183819474.0.01.905576595.1307692307691487.49781150635054.0.1a18.65136811.669230769230769428.67114086275642.4.27.13095995.0208791208791441.929865633184533.0.07.223195178.37252747252745441.12552171130223.1.03.357669261.7241758241758474.834836327917973.3.32.930811345.0758241758241478.557250979538373.4.017.371332428.4274725274725352.62870577848493.2.03.117634511.77912087912074476.928061243233344.0.03.065721595.1307692307691477.38076849437914.0.1a117.73959411.669230769230769349.4172774710972.4.234.85695295.0208791208791200.145378581464573.0.034.630821178.37252747252745202.117353682283983.1.032.008313261.7241758241758224.986931394758763.3.330.11219345.0758241758241241.522069629193483.4.056.674599428.42747252747259.8846153846154153.2.021.231472511.77912087912074318.966359768088644.0.023.224994595.1307692307691301.58185367677144.0.1a1ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Arista EOS Performance (vEOS)00101020203030404050502.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Arista EOS Performance (vEOS)5.60085111.669230769230769455.27317052090252.4.26.2156595.0208791208791449.91181661538463.0.06.25804178.37252747252745449.542154673750253.1.01.904317261.7241758241758487.508790614265543.3.32.280802345.0758241758241484.225653645729663.4.08.236209428.4274725274725432.29153439960483.2.01.687836511.77912087912074489.396612902233474.0.01.845158595.1307692307691488.02468659928914.1.06.61593711.669230769230769446.421114335813572.4.26.97108895.0208791208791443.324020487419943.0.06.7046178.37252747252745445.64792875593313.1.02.497181261.7241758241758482.33872084863333.3.32.81286345.0758241758241479.58584252654763.4.08.897231428.4274725274725426.527092880777963.2.02.167681511.77912087912074485.212125183819474.0.02.576814595.1307692307691481.64428137238484.1.08.65136811.669230769230769428.67114086275642.4.27.13095995.0208791208791441.929865633184533.0.07.223195178.37252747252745441.12552171130223.1.03.357669261.7241758241758474.834836327917973.3.32.930811345.0758241758241478.557250979538373.4.017.371332428.4274725274725352.62870577848493.2.03.117634511.77912087912074476.928061243233344.0.03.017803595.1307692307691477.798637353054234.1.017.73959411.669230769230769349.4172774710972.4.234.85695295.0208791208791200.145378581464573.0.034.630821178.37252747252745202.117353682283983.1.032.008313261.7241758241758224.986931394758763.3.330.11219345.0758241758241241.522069629193483.4.056.674599428.42747252747259.8846153846154153.2.021.231472511.77912087912074318.966359768088644.0.022.508998595.1307692307691307.82569589339044.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_cisco_ios.svg b/tests/performance/graphs/netmiko_cisco_ios.svg index 0c1ec4a86..e14ea9d5f 100644 --- a/tests/performance/graphs/netmiko_cisco_ios.svg +++ b/tests/performance/graphs/netmiko_cisco_ios.svg @@ -1,4 +1,4 @@ -Netmiko: Cisco IOS Performance (Cisco 881)0022446688101012121414161618182.4.23.0.03.1.03.3.33.2.04.0.04.0.1a1Netmiko: Cisco IOS Performance (Cisco 881)5.01569911.669230769230769369.84056107192772.4.25.692225108.91282051282049351.72934481422153.0.07.7883206.15641025641023295.61551087824343.1.03.047461303.4422.53208226200043.3.37.71581400.64358974358964297.556134101181043.2.03.050436497.88717948717954422.45243880651364.0.01.06331595.1307692307691475.649608933472054.0.1a15.43730211.669230769230769358.55386535306742.4.26.039594108.91282051282049342.42996078430523.0.08.142923206.15641025641023286.12193067148633.1.03.134423303.4420.204030438119843.3.38.145355400.64358974358964286.05682381980773.2.03.110452497.88717948717954420.8457559075234.0.01.119291595.1307692307691474.15094665394014.0.1a17.71222111.669230769230769297.6522148950442.4.25.965445108.91282051282049344.414996945949673.0.08.065553206.15641025641023288.193195932331833.1.03.140944303.4420.02945733787463.3.38.06323400.64358974358964288.2553847548853.2.03.111018497.88717948717954420.83060357279854.0.01.125631595.1307692307691473.981219088297564.0.1a112.72949511.669230769230769163.335227169270522.4.216.356528108.9128205128204966.236255308858863.0.018.461486206.156410256410239.8846153846154153.1.05.528239303.4356.119399164292643.3.318.446518400.6435897435896410.2853223566243063.2.06.266658497.88717948717954336.35125101063834.0.04.039539595.1307692307691395.97325199899114.0.1a1ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Cisco IOS Performance (Cisco 881)0022446688101012121414161618182.4.23.0.03.1.03.3.33.2.04.0.04.1.0Netmiko: Cisco IOS Performance (Cisco 881)5.01569911.669230769230769369.84056107192772.4.25.692225108.91282051282049351.72934481422153.0.07.7883206.15641025641023295.61551087824343.1.03.047461303.4422.53208226200043.3.37.71581400.64358974358964297.556134101181043.2.03.050436497.88717948717954422.45243880651364.0.00.865331595.1307692307691480.94968680702674.1.05.43730211.669230769230769358.55386535306742.4.26.039594108.91282051282049342.42996078430523.0.08.142923206.15641025641023286.12193067148633.1.03.134423303.4420.204030438119843.3.38.145355400.64358974358964286.05682381980773.2.03.110452497.88717948717954420.8457559075234.0.01.122718595.1307692307691474.05920274740114.1.07.71222111.669230769230769297.6522148950442.4.25.965445108.91282051282049344.414996945949673.0.08.065553206.15641025641023288.193195932331833.1.03.140944303.4420.02945733787463.3.38.06323400.64358974358964288.2553847548853.2.03.111018497.88717948717954420.83060357279854.0.01.12615595.1307692307691473.96732498631524.1.012.72949511.669230769230769163.335227169270522.4.216.356528108.9128205128204966.236255308858863.0.018.461486206.156410256410239.8846153846154153.1.05.528239303.4356.119399164292643.3.318.446518400.6435897435896410.2853223566243063.2.06.266658497.88717948717954336.35125101063834.0.04.050238595.1307692307691395.6868300392424.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_cisco_nxos.svg b/tests/performance/graphs/netmiko_cisco_nxos.svg index 4c0951b90..ae1af07ef 100644 --- a/tests/performance/graphs/netmiko_cisco_nxos.svg +++ b/tests/performance/graphs/netmiko_cisco_nxos.svg @@ -1,4 +1,4 @@ -Netmiko: Cisco NX-OS Performance (nx9k virtual)002244668810101212141416161818202022222.4.23.0.03.1.03.3.33.4.03.2.04.0.04.0.1a1Netmiko: Cisco NX-OS Performance (nx9k virtual)4.98773411.669230769230769397.115740564210852.4.25.70400395.0208791208791381.74993957223933.0.07.65255178.37252747252745339.94862550517353.1.07.945623261.7241758241758333.66146049577053.3.37.719243345.0758241758241338.51789017311593.4.07.812037428.4274725274725336.52722167112993.2.05.363876511.77912087912074389.04653316207264.0.03.239731595.1307692307691434.61487319646114.0.1a15.3627611.669230769230769389.07047421481542.4.26.28916695.0208791208791369.196697416198733.0.08.914154178.37252747252745312.883994766337543.1.07.960268261.7241758241758333.34728780991163.3.38.21612345.0758241758241327.858608395616333.4.08.36903428.4274725274725324.57829802383933.2.04.947016511.77912087912074397.98924574842394.0.03.440601595.1307692307691430.30569822831744.0.1a17.67416711.669230769230769339.484885597340742.4.25.93520995.0208791208791376.78997985857063.0.07.975704178.37252747252745333.01614615208193.1.08.498077261.7241758241758321.80991000116773.3.38.309425345.0758241758241325.85697763740133.4.08.20709428.4274725274725328.052324978293373.2.05.532515511.77912087912074385.4287955334934.0.04.322041595.1307692307691411.39655707274124.0.1a115.17274111.669230769230769178.62130528383842.4.217.16278295.0208791208791135.929838848931873.0.021.243036178.3725274725274548.397960517333163.1.022.775075261.724175824175815.5318077368287963.3.322.034908345.075824175824131.410281917373543.4.021.62422428.427472527472540.220589326727863.2.023.038316511.779120879120749.8846153846154154.0.020.021282595.130769230769174.607706890756054.0.1a1ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Cisco NX-OS Performance (nx9k virtual)002244668810101212141416161818202022222.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Cisco NX-OS Performance (nx9k virtual)4.98773411.669230769230769397.115740564210852.4.25.70400395.0208791208791381.74993957223933.0.07.65255178.37252747252745339.94862550517353.1.07.945623261.7241758241758333.66146049577053.3.37.719243345.0758241758241338.51789017311593.4.07.812037428.4274725274725336.52722167112993.2.05.363876511.77912087912074389.04653316207264.0.02.8512595.1307692307691442.949856317623244.1.05.3627611.669230769230769389.07047421481542.4.26.28916695.0208791208791369.196697416198733.0.08.914154178.37252747252745312.883994766337543.1.07.960268261.7241758241758333.34728780991163.3.38.21612345.0758241758241327.858608395616333.4.08.36903428.4274725274725324.57829802383933.2.04.947016511.77912087912074397.98924574842394.0.03.118518595.1307692307691437.21520189369614.1.07.67416711.669230769230769339.484885597340742.4.25.93520995.0208791208791376.78997985857063.0.07.975704178.37252747252745333.01614615208193.1.08.498077261.7241758241758321.80991000116773.3.38.309425345.0758241758241325.85697763740133.4.08.20709428.4274725274725328.052324978293373.2.05.532515511.77912087912074385.4287955334934.0.03.981228595.1307692307691418.70786711614224.1.015.17274111.669230769230769178.62130528383842.4.217.16278295.0208791208791135.929838848931873.0.021.243036178.3725274725274548.397960517333163.1.022.775075261.724175824175815.5318077368287963.3.322.034908345.075824175824131.410281917373543.4.021.62422428.427472527472540.220589326727863.2.023.038316511.779120879120749.8846153846154154.0.021.426055595.130769230769144.4717351302933254.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_cisco_xe.svg b/tests/performance/graphs/netmiko_cisco_xe.svg index 5f1d8686c..52d57e71f 100644 --- a/tests/performance/graphs/netmiko_cisco_xe.svg +++ b/tests/performance/graphs/netmiko_cisco_xe.svg @@ -1,4 +1,4 @@ -Netmiko: Cisco IOS-XE Performance (Cisco C1111-4P)0022446688101012121414161618182.4.23.0.03.1.03.3.33.4.03.2.04.0.04.0.1a1Netmiko: Cisco IOS-XE Performance (Cisco C1111-4P)4.82433811.669230769230769375.79041728981432.4.25.34021395.0208791208791362.068401436223843.0.07.53684178.37252747252745303.639226697334153.1.03.070582261.7241758241758422.439445902034833.3.33.067946345.0758241758241422.509562177857563.4.07.527892428.4274725274725303.87723900236533.2.03.077292511.77912087912074422.26096327275914.0.00.878103595.1307692307691480.7582859246454.0.1a15.34378211.669230769230769361.97346782908752.4.25.96110895.0208791208791345.55290633873893.0.07.961087178.37252747252745292.35446961502133.1.03.149141261.7241758241758420.34981596563123.3.32.977177345.0758241758241424.923971980648053.4.07.963046428.4274725274725292.302361199111943.2.02.965434511.77912087912074425.236329881629334.0.00.778386595.1307692307691483.410708032466634.0.1a17.5380311.669230769230769303.607573295122852.4.25.81018295.0208791208791349.56746212205663.0.07.810232178.37252747252745296.367136834005243.1.03.024375261.7241758241758423.66852889025263.3.33.222384345.0758241758241418.401588958770053.4.07.80769428.4274725274725296.43475275704833.2.03.015565511.77912087912074423.90287046460714.0.01.018125595.1307692307691477.03377106377484.0.1a115.06086611.669230769230769103.503914742255122.4.216.61302795.020879120879162.217211860113713.0.018.580455178.372527472527459.8846153846154153.1.08.902653261.7241758241758267.30928700450183.3.310.138406345.0758241758241234.438877976884843.4.018.531863428.427472527472511.177138174744133.2.010.685372511.77912087912074219.889857141653644.0.08.635855595.1307692307691274.40597978028324.0.1a1ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Cisco IOS-XE Performance (Cisco C1111-4P)0022446688101012121414161618182.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Cisco IOS-XE Performance (Cisco C1111-4P)4.82433811.669230769230769375.79041728981432.4.25.34021395.0208791208791362.068401436223843.0.07.53684178.37252747252745303.639226697334153.1.03.070582261.7241758241758422.439445902034833.3.33.067946345.0758241758241422.509562177857563.4.07.527892428.4274725274725303.87723900236533.2.03.077292511.77912087912074422.26096327275914.0.00.887664595.1307692307691480.50396812755044.1.05.34378211.669230769230769361.97346782908752.4.25.96110895.0208791208791345.55290633873893.0.07.961087178.37252747252745292.35446961502133.1.03.149141261.7241758241758420.34981596563123.3.32.977177345.0758241758241424.923971980648053.4.07.963046428.4274725274725292.302361199111943.2.02.965434511.77912087912074425.236329881629334.0.00.993696595.1307692307691477.683570192027454.1.07.5380311.669230769230769303.607573295122852.4.25.81018295.0208791208791349.56746212205663.0.07.810232178.37252747252745296.367136834005243.1.03.024375261.7241758241758423.66852889025263.3.33.222384345.0758241758241418.401588958770053.4.07.80769428.4274725274725296.43475275704833.2.03.015565511.77912087912074423.90287046460714.0.01.092964595.1307692307691475.043091258653654.1.015.06086611.669230769230769103.503914742255122.4.216.61302795.020879120879162.217211860113713.0.018.580455178.372527472527459.8846153846154153.1.08.902653261.7241758241758267.30928700450183.3.310.138406345.0758241758241234.438877976884843.4.018.531863428.427472527472511.177138174744133.2.010.685372511.77912087912074219.889857141653644.0.07.97049595.1307692307691292.104354538556444.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_cisco_xr.svg b/tests/performance/graphs/netmiko_cisco_xr.svg index 7d9b07869..fb80e10e3 100644 --- a/tests/performance/graphs/netmiko_cisco_xr.svg +++ b/tests/performance/graphs/netmiko_cisco_xr.svg @@ -1,4 +1,4 @@ -Netmiko: Cisco IOS-XR Performance (cisco IOS-XRv 9000)00224466881010121214141616181820202.4.23.0.03.1.03.3.33.4.03.2.04.0.04.0.1a1Netmiko: Cisco IOS-XR Performance (cisco IOS-XRv 9000)5.73379111.669230769230769363.85217273268252.4.26.26668195.0208791208791350.81631862147183.0.06.264205178.37252747252745350.87688792241453.1.08.140628261.7241758241758304.97477589381493.3.38.07315345.0758241758241306.62546058243043.4.06.273295428.4274725274725350.6545232432673.2.02.767007511.77912087912074436.42730719471834.0.02.079637595.1307692307691453.24213772338824.0.1a16.082411.669230769230769355.32430381816912.4.26.90005795.0208791208791335.322319609401353.0.06.999404178.37252747252745332.89203756547773.1.08.500045261.7241758241758296.182515620420763.3.38.433702345.0758241758241297.8054353023443.4.06.88443428.4274725274725335.704596049559543.2.02.512359511.77912087912074442.656649418651174.0.02.49603595.1307692307691443.05609857660494.0.1a113.66281911.669230769230769169.887841910739722.4.211.73262495.0208791208791217.105354767405173.0.012.024759178.37252747252745209.95898452067783.1.09.143244261.7241758241758280.44822087201753.3.39.295759345.0758241758241276.717313386849243.4.011.881486428.4274725274725213.463809017432253.2.03.235152511.77912087912074424.975281593012944.0.03.151455595.1307692307691427.022724557876244.0.1a118.55698911.66923076923076950.163909925781812.4.219.81228795.020879120879119.4561060749033463.0.019.590199178.3725274725274524.888947313903093.1.016.494184261.7241758241758100.62540299166043.3.317.251342345.075824175824182.103379258552143.4.020.203558428.42747252747259.8846153846153583.2.011.773506511.77912087912074216.105276350143584.0.011.866821595.1307692307691213.822552473944654.0.1a1ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Cisco IOS-XR Performance (cisco IOS-XRv 9000)00224466881010121214141616181820202.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Cisco IOS-XR Performance (cisco IOS-XRv 9000)5.73379111.669230769230769363.85217273268252.4.26.26668195.0208791208791350.81631862147183.0.06.264205178.37252747252745350.87688792241453.1.08.140628261.7241758241758304.97477589381493.3.38.07315345.0758241758241306.62546058243043.4.06.273295428.4274725274725350.6545232432673.2.02.767007511.77912087912074436.42730719471834.0.02.066334595.1307692307691453.567563171869954.1.06.082411.669230769230769355.32430381816912.4.26.90005795.0208791208791335.322319609401353.0.06.999404178.37252747252745332.89203756547773.1.08.500045261.7241758241758296.182515620420763.3.38.433702345.0758241758241297.8054353023443.4.06.88443428.4274725274725335.704596049559543.2.02.512359511.77912087912074442.656649418651174.0.02.454185595.1307692307691444.079734440073144.1.013.66281911.669230769230769169.887841910739722.4.211.73262495.0208791208791217.105354767405173.0.012.024759178.37252747252745209.95898452067783.1.09.143244261.7241758241758280.44822087201753.3.39.295759345.0758241758241276.717313386849243.4.011.881486428.4274725274725213.463809017432253.2.03.235152511.77912087912074424.975281593012944.0.03.092633595.1307692307691428.46166131880184.1.018.55698911.66923076923076950.163909925781812.4.219.81228795.020879120879119.4561060749033463.0.019.590199178.3725274725274524.888947313903093.1.016.494184261.7241758241758100.62540299166043.3.317.251342345.075824175824182.103379258552143.4.020.203558428.42747252747259.8846153846153583.2.011.773506511.77912087912074216.105276350143584.0.012.339936595.1307692307691202.248947944256664.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_hp_procurve.svg b/tests/performance/graphs/netmiko_hp_procurve.svg index 9c2e2a6a9..376a7d821 100644 --- a/tests/performance/graphs/netmiko_hp_procurve.svg +++ b/tests/performance/graphs/netmiko_hp_procurve.svg @@ -1,4 +1,4 @@ -Netmiko: HPE ProCurve Performance0010102020303040402.4.23.0.03.1.03.2.03.3.33.4.04.0.1a1Netmiko: HPE ProCurve Performance11.25826911.669230769230769373.595712950305942.4.217.901763108.91282051282049296.576176857419973.0.018.419321206.15641025641023290.576009315888033.1.018.353988303.4291.33342963591193.2.018.020695400.64358974358964295.197371146660033.3.318.010017497.88717948717954295.321163627905553.4.02.028994595.1307692307691480.592795957180164.0.1a121.83115511.669230769230769251.02184220052142.4.222.221532108.91282051282049246.496112901852263.0.022.93706206.15641025641023238.200834149215383.1.022.718488303.4240.734789029417583.2.022.391657400.64358974358964244.523815105270783.3.322.410676497.88717948717954244.30332351500963.4.02.139018595.1307692307691479.31726271532234.0.1a132.21674111.669230769230769130.619382926414742.4.230.53423108.91282051282049150.125115405615823.0.031.002139206.15641025641023144.700540006934663.1.030.893432303.4145.960804968421663.2.030.752905400.64358974358964147.589966423000423.3.330.529921497.88717948717954150.175070622106433.4.02.222841595.1307692307691478.345483622285664.0.1a142.48894511.66923076923076911.5313869514821482.4.242.045111108.9128205128204916.676855402609023.0.042.630991206.156410256410239.8846153846154153.1.042.584148303.410.4276769316265363.2.042.227986400.6435897435896414.5567439577899343.3.342.211889497.8871794871795414.7433601378432973.4.010.582982595.1307692307691381.42446864265054.0.1a1ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: HPE ProCurve Performance0010102020303040402.4.23.0.03.1.03.2.03.3.33.4.04.1.0Netmiko: HPE ProCurve Performance11.25826911.669230769230769373.595712950305942.4.217.901763108.91282051282049296.576176857419973.0.018.419321206.15641025641023290.576009315888033.1.018.353988303.4291.33342963591193.2.018.020695400.64358974358964295.197371146660033.3.318.010017497.88717948717954295.321163627905553.4.02.080718595.1307692307691479.99314786765554.1.021.83115511.669230769230769251.02184220052142.4.222.221532108.91282051282049246.496112901852263.0.022.93706206.15641025641023238.200834149215383.1.022.718488303.4240.734789029417583.2.022.391657400.64358974358964244.523815105270783.3.322.410676497.88717948717954244.30332351500963.4.02.143245595.1307692307691479.268258143471264.1.032.21674111.669230769230769130.619382926414742.4.230.53423108.91282051282049150.125115405615823.0.031.002139206.15641025641023144.700540006934663.1.030.893432303.4145.960804968421663.2.030.752905400.64358974358964147.589966423000423.3.330.529921497.88717948717954150.175070622106433.4.02.165055595.1307692307691479.01540985578024.1.042.48894511.66923076923076911.5313869514821482.4.242.045111108.9128205128204916.676855402609023.0.042.630991206.156410256410239.8846153846154153.1.042.584148303.410.4276769316265363.2.042.227986400.6435897435896414.5567439577899343.3.342.211889497.8871794871795414.7433601378432973.4.010.575428595.1307692307691381.512043881771044.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_juniper_junos.svg b/tests/performance/graphs/netmiko_juniper_junos.svg index 5b8b3ffea..6c5eafcba 100644 --- a/tests/performance/graphs/netmiko_juniper_junos.svg +++ b/tests/performance/graphs/netmiko_juniper_junos.svg @@ -1,4 +1,4 @@ -Netmiko: Juniper Junos Performance00448812121616202024242828323236362.4.23.0.03.1.03.3.33.4.03.2.04.0.04.0.1a1Netmiko: Juniper Junos Performance6.95582711.669230769230769413.133807933398432.4.28.24596695.0208791208791396.25890860670143.0.07.763991178.37252747252745402.56309722745063.1.03.517362261.7241758241758458.108613526726973.3.33.991287345.0758241758241451.909718164750533.4.07.762834428.4274725274725402.57823068091653.2.05.92602511.77912087912074426.603588670921974.0.03.435827595.1307692307691459.175083819154574.0.1a17.79519311.669230769230769402.15497794046562.4.28.63810495.0208791208791391.12977967394893.0.08.640627178.37252747252745391.09677906626153.1.04.262974261.7241758241758448.35607722112173.3.34.1622345.0758241758241449.67419186206243.4.08.832251428.4274725274725388.5903547905993.2.06.641656511.77912087912074417.243135685189264.0.03.882981595.1307692307691453.32635067216044.0.1a120.18372611.669230769230769240.11410701069452.4.218.75418795.0208791208791258.81234550173093.0.018.747711178.37252747252745258.897050985434363.1.014.697604261.7241758241758311.872077620045733.3.316.79162345.0758241758241284.482541152662863.4.018.852219428.4274725274725257.530095968312543.2.017.185611511.77912087912074279.32917515053084.0.03.512782595.1307692307691458.16851950501014.0.1a135.18357611.66923076923076943.917450165535572.4.237.20446995.020879120879117.4843558051397853.0.037.257378178.3725274725274516.7923109568899353.1.029.58927261.7241758241758117.090457533530243.3.327.660851345.0758241758241142.31400048873873.4.037.785493428.42747252747259.8846153846154153.2.032.165569511.7791208791207483.392703833758164.0.019.214745595.1307692307691252.788289268949034.0.1a1ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Juniper Junos Performance00448812121616202024242828323236362.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Juniper Junos Performance6.95582711.669230769230769413.133807933398432.4.28.24596695.0208791208791396.25890860670143.0.07.763991178.37252747252745402.56309722745063.1.03.517362261.7241758241758458.108613526726973.3.33.991287345.0758241758241451.909718164750533.4.07.762834428.4274725274725402.57823068091653.2.05.92602511.77912087912074426.603588670921974.0.03.299235595.1307692307691460.96169460204864.1.07.79519311.669230769230769402.15497794046562.4.28.63810495.0208791208791391.12977967394893.0.08.640627178.37252747252745391.09677906626153.1.04.262974261.7241758241758448.35607722112173.3.34.1622345.0758241758241449.67419186206243.4.08.832251428.4274725274725388.5903547905993.2.06.641656511.77912087912074417.243135685189264.0.03.809282595.1307692307691454.29032680611054.1.020.18372611.669230769230769240.11410701069452.4.218.75418795.0208791208791258.81234550173093.0.018.747711178.37252747252745258.897050985434363.1.014.697604261.7241758241758311.872077620045733.3.316.79162345.0758241758241284.482541152662863.4.018.852219428.4274725274725257.530095968312543.2.017.185611511.77912087912074279.32917515053084.0.03.704911595.1307692307691455.65548987584694.1.035.18357611.66923076923076943.917450165535572.4.237.20446995.020879120879117.4843558051397853.0.037.257378178.3725274725274516.7923109568899353.1.029.58927261.7241758241758117.090457533530243.3.327.660851345.0758241758241142.31400048873873.4.037.785493428.42747252747259.8846153846154153.2.032.165569511.7791208791207483.392703833758164.0.017.438025595.1307692307691276.02762327228444.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/netmiko_performance.csv b/tests/performance/netmiko_performance.csv index 192b1793e..83effdadc 100644 --- a/tests/performance/netmiko_performance.csv +++ b/tests/performance/netmiko_performance.csv @@ -60,11 +60,11 @@ date,netmiko_version,device_name,connect,send_command_simple,send_config_simple, 2022-3-23 14:33:38,4.0.0,arista1,0:00:01.687836,0:00:02.167681,0:00:03.117634,0:00:21.231472 2022-3-23 14:34:57,4.0.0,juniper_vmx,0:00:05.926020,0:00:06.641656,0:00:17.185611,0:00:32.165569 2022-3-23 14:35:27,4.0.0,cisco_asa,0:00:05.193105,0:00:04.572510,0:00:05.568892,0:00:09.710037 -2022-4-26 14:2:11,4.0.1a1,cisco1,0:00:01.063310,0:00:01.119291,0:00:01.125631,0:00:04.039539 -2022-4-26 14:2:24,4.0.1a1,cisco3,0:00:00.878103,0:00:00.778386,0:00:01.018125,0:00:08.635855 -2022-4-26 14:2:42,4.0.1a1,cisco5,0:00:01.356996,0:00:01.121357,0:00:01.593118,0:00:13.054712 -2022-4-26 14:3:17,4.0.1a1,nxos1,0:00:03.239731,0:00:03.440601,0:00:04.322041,0:00:20.021282 -2022-4-26 14:3:40,4.0.1a1,cisco_xr_azure,0:00:02.079637,0:00:02.496030,0:00:03.151455,0:00:11.866821 -2022-4-26 14:4:12,4.0.1a1,arista1,0:00:01.841382,0:00:01.905576,0:00:03.065721,0:00:23.224994 -2022-4-26 14:4:46,4.0.1a1,juniper_vmx,0:00:03.435827,0:00:03.882981,0:00:03.512782,0:00:19.214745 -2022-4-26 14:7:33,4.0.1a1,hp_procurve,0:00:02.028994,0:00:02.139018,0:00:02.222841,0:00:10.582982 +2022-4-27 12:1:20,4.1.0,cisco1,0:00:00.865331,0:00:01.122718,0:00:01.126150,0:00:04.050238 +2022-4-27 12:1:32,4.1.0,cisco3,0:00:00.887664,0:00:00.993696,0:00:01.092964,0:00:07.970490 +2022-4-27 12:1:49,4.1.0,cisco5,0:00:01.214161,0:00:01.248053,0:00:01.518771,0:00:11.536051 +2022-4-27 12:2:25,4.1.0,nxos1,0:00:02.851200,0:00:03.118518,0:00:03.981228,0:00:21.426055 +2022-4-27 12:2:48,4.1.0,cisco_xr_azure,0:00:02.066334,0:00:02.454185,0:00:03.092633,0:00:12.339936 +2022-4-27 12:3:21,4.1.0,arista1,0:00:01.845158,0:00:02.576814,0:00:03.017803,0:00:22.508998 +2022-4-27 12:3:53,4.1.0,juniper_vmx,0:00:03.299235,0:00:03.809282,0:00:03.704911,0:00:17.438025 +2022-4-27 12:6:40,4.1.0,hp_procurve,0:00:02.080718,0:00:02.143245,0:00:02.165055,0:00:10.575428 From d699f529042c342d0756d68df23d5b3b3f26e74d Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 27 Apr 2022 14:42:16 -0700 Subject: [PATCH 02/34] Minor performance graph fixes (#2769) --- .../performance/graphs/netmiko_arista_eos.svg | 6 ++-- .../performance/graphs/netmiko_cisco_ios.svg | 6 ++-- .../performance/graphs/netmiko_cisco_nxos.svg | 6 ++-- tests/performance/graphs/netmiko_cisco_xe.svg | 6 ++-- tests/performance/graphs/netmiko_cisco_xr.svg | 6 ++-- .../graphs/netmiko_hp_procurve.svg | 6 ++-- .../graphs/netmiko_juniper_junos.svg | 6 ++-- tests/performance/netmiko_performance.csv | 32 +++++++++---------- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/tests/performance/graphs/netmiko_arista_eos.svg b/tests/performance/graphs/netmiko_arista_eos.svg index db0c5dede..d2b08c962 100644 --- a/tests/performance/graphs/netmiko_arista_eos.svg +++ b/tests/performance/graphs/netmiko_arista_eos.svg @@ -1,4 +1,4 @@ -Netmiko: Arista EOS Performance (vEOS)00101020203030404050502.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Arista EOS Performance (vEOS)5.60085111.669230769230769455.27317052090252.4.26.2156595.0208791208791449.91181661538463.0.06.25804178.37252747252745449.542154673750253.1.01.904317261.7241758241758487.508790614265543.3.32.280802345.0758241758241484.225653645729663.4.08.236209428.4274725274725432.29153439960483.2.01.687836511.77912087912074489.396612902233474.0.01.845158595.1307692307691488.02468659928914.1.06.61593711.669230769230769446.421114335813572.4.26.97108895.0208791208791443.324020487419943.0.06.7046178.37252747252745445.64792875593313.1.02.497181261.7241758241758482.33872084863333.3.32.81286345.0758241758241479.58584252654763.4.08.897231428.4274725274725426.527092880777963.2.02.167681511.77912087912074485.212125183819474.0.02.576814595.1307692307691481.64428137238484.1.08.65136811.669230769230769428.67114086275642.4.27.13095995.0208791208791441.929865633184533.0.07.223195178.37252747252745441.12552171130223.1.03.357669261.7241758241758474.834836327917973.3.32.930811345.0758241758241478.557250979538373.4.017.371332428.4274725274725352.62870577848493.2.03.117634511.77912087912074476.928061243233344.0.03.017803595.1307692307691477.798637353054234.1.017.73959411.669230769230769349.4172774710972.4.234.85695295.0208791208791200.145378581464573.0.034.630821178.37252747252745202.117353682283983.1.032.008313261.7241758241758224.986931394758763.3.330.11219345.0758241758241241.522069629193483.4.056.674599428.42747252747259.8846153846154153.2.021.231472511.77912087912074318.966359768088644.0.022.508998595.1307692307691307.82569589339044.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Arista EOS Performance (vEOS)00101020203030404050502.4.23.0.03.1.03.2.03.3.33.4.04.0.04.1.0Netmiko: Arista EOS Performance (vEOS)5.60085111.669230769230769455.27317052090252.4.26.2156595.0208791208791449.91181661538463.0.06.25804178.37252747252745449.542154673750253.1.08.236209261.7241758241758432.29153439960483.2.01.904317345.0758241758241487.508790614265543.3.32.280802428.4274725274725484.225653645729663.4.01.687836511.77912087912074489.396612902233474.0.01.788259595.1307692307691488.52087425715794.1.06.61593711.669230769230769446.421114335813572.4.26.97108895.0208791208791443.324020487419943.0.06.7046178.37252747252745445.64792875593313.1.08.897231261.7241758241758426.527092880777963.2.02.497181345.0758241758241482.33872084863333.3.32.81286428.4274725274725479.58584252654763.4.02.167681511.77912087912074485.212125183819474.0.02.563968595.1307692307691481.75630489921274.1.08.65136811.669230769230769428.67114086275642.4.27.13095995.0208791208791441.929865633184533.0.07.223195178.37252747252745441.12552171130223.1.017.371332261.7241758241758352.62870577848493.2.03.357669345.0758241758241474.834836327917973.3.32.930811428.4274725274725478.557250979538373.4.03.117634511.77912087912074476.928061243233344.0.02.715299595.1307692307691480.436623104226164.1.017.73959411.669230769230769349.4172774710972.4.234.85695295.0208791208791200.145378581464573.0.034.630821178.37252747252745202.117353682283983.1.056.674599261.72417582417589.8846153846154153.2.032.008313345.0758241758241224.986931394758763.3.330.11219428.4274725274725241.522069629193483.4.021.231472511.77912087912074318.966359768088644.0.028.07229595.1307692307691259.311015011124544.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_cisco_ios.svg b/tests/performance/graphs/netmiko_cisco_ios.svg index e14ea9d5f..3f3d86a6f 100644 --- a/tests/performance/graphs/netmiko_cisco_ios.svg +++ b/tests/performance/graphs/netmiko_cisco_ios.svg @@ -1,4 +1,4 @@ -Netmiko: Cisco IOS Performance (Cisco 881)0022446688101012121414161618182.4.23.0.03.1.03.3.33.2.04.0.04.1.0Netmiko: Cisco IOS Performance (Cisco 881)5.01569911.669230769230769369.84056107192772.4.25.692225108.91282051282049351.72934481422153.0.07.7883206.15641025641023295.61551087824343.1.03.047461303.4422.53208226200043.3.37.71581400.64358974358964297.556134101181043.2.03.050436497.88717948717954422.45243880651364.0.00.865331595.1307692307691480.94968680702674.1.05.43730211.669230769230769358.55386535306742.4.26.039594108.91282051282049342.42996078430523.0.08.142923206.15641025641023286.12193067148633.1.03.134423303.4420.204030438119843.3.38.145355400.64358974358964286.05682381980773.2.03.110452497.88717948717954420.8457559075234.0.01.122718595.1307692307691474.05920274740114.1.07.71222111.669230769230769297.6522148950442.4.25.965445108.91282051282049344.414996945949673.0.08.065553206.15641025641023288.193195932331833.1.03.140944303.4420.02945733787463.3.38.06323400.64358974358964288.2553847548853.2.03.111018497.88717948717954420.83060357279854.0.01.12615595.1307692307691473.96732498631524.1.012.72949511.669230769230769163.335227169270522.4.216.356528108.9128205128204966.236255308858863.0.018.461486206.156410256410239.8846153846154153.1.05.528239303.4356.119399164292643.3.318.446518400.6435897435896410.2853223566243063.2.06.266658497.88717948717954336.35125101063834.0.04.050238595.1307692307691395.6868300392424.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Cisco IOS Performance (Cisco 881)0022446688101012121414161618182.4.23.0.03.1.03.2.03.3.34.0.04.1.0Netmiko: Cisco IOS Performance (Cisco 881)5.01569911.669230769230769369.84056107192772.4.25.692225108.91282051282049351.72934481422153.0.07.7883206.15641025641023295.61551087824343.1.07.71581303.4297.556134101181043.2.03.047461400.64358974358964422.53208226200043.3.33.050436497.88717948717954422.45243880651364.0.01.055904595.1307692307691475.847874288542764.1.05.43730211.669230769230769358.55386535306742.4.26.039594108.91282051282049342.42996078430523.0.08.142923206.15641025641023286.12193067148633.1.08.145355303.4286.05682381980773.2.03.134423400.64358974358964420.204030438119843.3.33.110452497.88717948717954420.8457559075234.0.00.927821595.1307692307691479.27677267816244.1.07.71222111.669230769230769297.6522148950442.4.25.965445108.91282051282049344.414996945949673.0.08.065553206.15641025641023288.193195932331833.1.08.06323303.4288.2553847548853.2.03.140944400.64358974358964420.02945733787463.3.33.111018497.88717948717954420.83060357279854.0.00.930841595.1307692307691479.19592453175224.1.012.72949511.669230769230769163.335227169270522.4.216.356528108.9128205128204966.236255308858863.0.018.461486206.156410256410239.8846153846154153.1.018.446518303.410.2853223566243063.2.05.528239400.64358974358964356.119399164292643.3.36.266658497.88717948717954336.35125101063834.0.04.036946595.1307692307691396.04266896708434.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_cisco_nxos.svg b/tests/performance/graphs/netmiko_cisco_nxos.svg index ae1af07ef..69b0a37c9 100644 --- a/tests/performance/graphs/netmiko_cisco_nxos.svg +++ b/tests/performance/graphs/netmiko_cisco_nxos.svg @@ -1,4 +1,4 @@ -Netmiko: Cisco NX-OS Performance (nx9k virtual)002244668810101212141416161818202022222.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Cisco NX-OS Performance (nx9k virtual)4.98773411.669230769230769397.115740564210852.4.25.70400395.0208791208791381.74993957223933.0.07.65255178.37252747252745339.94862550517353.1.07.945623261.7241758241758333.66146049577053.3.37.719243345.0758241758241338.51789017311593.4.07.812037428.4274725274725336.52722167112993.2.05.363876511.77912087912074389.04653316207264.0.02.8512595.1307692307691442.949856317623244.1.05.3627611.669230769230769389.07047421481542.4.26.28916695.0208791208791369.196697416198733.0.08.914154178.37252747252745312.883994766337543.1.07.960268261.7241758241758333.34728780991163.3.38.21612345.0758241758241327.858608395616333.4.08.36903428.4274725274725324.57829802383933.2.04.947016511.77912087912074397.98924574842394.0.03.118518595.1307692307691437.21520189369614.1.07.67416711.669230769230769339.484885597340742.4.25.93520995.0208791208791376.78997985857063.0.07.975704178.37252747252745333.01614615208193.1.08.498077261.7241758241758321.80991000116773.3.38.309425345.0758241758241325.85697763740133.4.08.20709428.4274725274725328.052324978293373.2.05.532515511.77912087912074385.4287955334934.0.03.981228595.1307692307691418.70786711614224.1.015.17274111.669230769230769178.62130528383842.4.217.16278295.0208791208791135.929838848931873.0.021.243036178.3725274725274548.397960517333163.1.022.775075261.724175824175815.5318077368287963.3.322.034908345.075824175824131.410281917373543.4.021.62422428.427472527472540.220589326727863.2.023.038316511.779120879120749.8846153846154154.0.021.426055595.130769230769144.4717351302933254.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Cisco NX-OS Performance (nx9k virtual)002244668810101212141416161818202022222.4.23.0.03.1.03.2.03.3.33.4.04.0.04.1.0Netmiko: Cisco NX-OS Performance (nx9k virtual)4.98773411.669230769230769400.14917640346182.4.25.70400395.0208791208791385.21899528519333.0.07.65255178.37252747252745344.602746882067273.1.07.812037261.7241758241758341.27833971658993.2.07.945623345.0758241758241338.49382276155623.3.37.719243428.4274725274725343.212572842257263.4.05.363876511.77912087912074392.308730724271754.0.03.346325595.1307692307691434.36332452261254.1.05.3627611.669230769230769392.33199304907992.4.26.28916695.0208791208791373.02163706682933.0.08.914154178.37252747252745318.30539739530743.1.08.36903261.7241758241758329.66816760023733.2.07.960268345.0758241758241338.188556859392353.3.38.21612428.4274725274725332.85548129773713.4.04.947016511.77912087912074400.99791774892514.0.02.827452595.1307692307691445.178908985124964.1.07.67416711.669230769230769344.15215398298382.4.25.93520995.0208791208791380.399650240761163.0.07.975704178.37252747252745337.86680305496753.1.08.20709261.7241758241758333.0437060226633.2.08.498077345.0758241758241326.97826327271633.3.38.309425428.4274725274725330.910596695387943.4.05.532515511.77912087912074388.79355581986624.0.03.765265595.1307692307691425.63078119365734.1.015.17274111.669230769230769187.849050053120832.4.217.16278295.0208791208791146.367885067926583.0.021.243036178.3725274725274561.317532157861423.1.021.62422261.724175824175853.37198912949353.2.022.775075345.075824175824129.383133558660633.3.322.034908428.427472527472544.811453600105153.4.023.038316511.7791208791207423.8960388948485164.0.023.710508595.13076923076919.8846153846153584.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_cisco_xe.svg b/tests/performance/graphs/netmiko_cisco_xe.svg index 52d57e71f..7d28a82ae 100644 --- a/tests/performance/graphs/netmiko_cisco_xe.svg +++ b/tests/performance/graphs/netmiko_cisco_xe.svg @@ -1,4 +1,4 @@ -Netmiko: Cisco IOS-XE Performance (Cisco C1111-4P)0022446688101012121414161618182.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Cisco IOS-XE Performance (Cisco C1111-4P)4.82433811.669230769230769375.79041728981432.4.25.34021395.0208791208791362.068401436223843.0.07.53684178.37252747252745303.639226697334153.1.03.070582261.7241758241758422.439445902034833.3.33.067946345.0758241758241422.509562177857563.4.07.527892428.4274725274725303.87723900236533.2.03.077292511.77912087912074422.26096327275914.0.00.887664595.1307692307691480.50396812755044.1.05.34378211.669230769230769361.97346782908752.4.25.96110895.0208791208791345.55290633873893.0.07.961087178.37252747252745292.35446961502133.1.03.149141261.7241758241758420.34981596563123.3.32.977177345.0758241758241424.923971980648053.4.07.963046428.4274725274725292.302361199111943.2.02.965434511.77912087912074425.236329881629334.0.00.993696595.1307692307691477.683570192027454.1.07.5380311.669230769230769303.607573295122852.4.25.81018295.0208791208791349.56746212205663.0.07.810232178.37252747252745296.367136834005243.1.03.024375261.7241758241758423.66852889025263.3.33.222384345.0758241758241418.401588958770053.4.07.80769428.4274725274725296.43475275704833.2.03.015565511.77912087912074423.90287046460714.0.01.092964595.1307692307691475.043091258653654.1.015.06086611.669230769230769103.503914742255122.4.216.61302795.020879120879162.217211860113713.0.018.580455178.372527472527459.8846153846154153.1.08.902653261.7241758241758267.30928700450183.3.310.138406345.0758241758241234.438877976884843.4.018.531863428.427472527472511.177138174744133.2.010.685372511.77912087912074219.889857141653644.0.07.97049595.1307692307691292.104354538556444.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Cisco IOS-XE Performance (Cisco C1111-4P)0022446688101012121414161618182.4.23.0.03.1.03.2.03.3.33.4.04.0.04.1.0Netmiko: Cisco IOS-XE Performance (Cisco C1111-4P)4.82433811.669230769230769375.79041728981432.4.25.34021395.0208791208791362.068401436223843.0.07.53684178.37252747252745303.639226697334153.1.07.527892261.7241758241758303.87723900236533.2.03.070582345.0758241758241422.439445902034833.3.33.067946428.4274725274725422.509562177857563.4.03.077292511.77912087912074422.26096327275914.0.00.883392595.1307692307691480.61760118153934.1.05.34378211.669230769230769361.97346782908752.4.25.96110895.0208791208791345.55290633873893.0.07.961087178.37252747252745292.35446961502133.1.07.963046261.7241758241758292.302361199111943.2.03.149141345.0758241758241420.34981596563123.3.32.977177428.4274725274725424.923971980648053.4.02.965434511.77912087912074425.236329881629334.0.00.982203595.1307692307691477.989278218594564.1.07.5380311.669230769230769303.607573295122852.4.25.81018295.0208791208791349.56746212205663.0.07.810232178.37252747252745296.367136834005243.1.07.80769261.7241758241758296.43475275704833.2.03.024375345.0758241758241423.66852889025263.3.33.222384428.4274725274725418.401588958770053.4.03.015565511.77912087912074423.90287046460714.0.01.027332595.1307692307691476.78886948885064.1.015.06086611.669230769230769103.503914742255122.4.216.61302795.020879120879162.217211860113713.0.018.580455178.372527472527459.8846153846154153.1.018.531863261.724175824175811.177138174744133.2.08.902653345.0758241758241267.30928700450183.3.310.138406428.4274725274725234.438877976884843.4.010.685372511.77912087912074219.889857141653644.0.07.759537595.1307692307691297.715598367705754.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_cisco_xr.svg b/tests/performance/graphs/netmiko_cisco_xr.svg index fb80e10e3..cf60993ca 100644 --- a/tests/performance/graphs/netmiko_cisco_xr.svg +++ b/tests/performance/graphs/netmiko_cisco_xr.svg @@ -1,4 +1,4 @@ -Netmiko: Cisco IOS-XR Performance (cisco IOS-XRv 9000)00224466881010121214141616181820202.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Cisco IOS-XR Performance (cisco IOS-XRv 9000)5.73379111.669230769230769363.85217273268252.4.26.26668195.0208791208791350.81631862147183.0.06.264205178.37252747252745350.87688792241453.1.08.140628261.7241758241758304.97477589381493.3.38.07315345.0758241758241306.62546058243043.4.06.273295428.4274725274725350.6545232432673.2.02.767007511.77912087912074436.42730719471834.0.02.066334595.1307692307691453.567563171869954.1.06.082411.669230769230769355.32430381816912.4.26.90005795.0208791208791335.322319609401353.0.06.999404178.37252747252745332.89203756547773.1.08.500045261.7241758241758296.182515620420763.3.38.433702345.0758241758241297.8054353023443.4.06.88443428.4274725274725335.704596049559543.2.02.512359511.77912087912074442.656649418651174.0.02.454185595.1307692307691444.079734440073144.1.013.66281911.669230769230769169.887841910739722.4.211.73262495.0208791208791217.105354767405173.0.012.024759178.37252747252745209.95898452067783.1.09.143244261.7241758241758280.44822087201753.3.39.295759345.0758241758241276.717313386849243.4.011.881486428.4274725274725213.463809017432253.2.03.235152511.77912087912074424.975281593012944.0.03.092633595.1307692307691428.46166131880184.1.018.55698911.66923076923076950.163909925781812.4.219.81228795.020879120879119.4561060749033463.0.019.590199178.3725274725274524.888947313903093.1.016.494184261.7241758241758100.62540299166043.3.317.251342345.075824175824182.103379258552143.4.020.203558428.42747252747259.8846153846153583.2.011.773506511.77912087912074216.105276350143584.0.012.339936595.1307692307691202.248947944256664.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Cisco IOS-XR Performance (cisco IOS-XRv 9000)00224466881010121214141616181820202.4.23.0.03.1.03.2.03.3.33.4.04.0.04.1.0Netmiko: Cisco IOS-XR Performance (cisco IOS-XRv 9000)5.73379111.669230769230769363.85217273268252.4.26.26668195.0208791208791350.81631862147183.0.06.264205178.37252747252745350.87688792241453.1.06.273295261.7241758241758350.6545232432673.2.08.140628345.0758241758241304.97477589381493.3.38.07315428.4274725274725306.62546058243043.4.02.767007511.77912087912074436.42730719471834.0.02.700028595.1307692307691438.06578506541354.1.06.082411.669230769230769355.32430381816912.4.26.90005795.0208791208791335.322319609401353.0.06.999404178.37252747252745332.89203756547773.1.06.88443261.7241758241758335.704596049559543.2.08.500045345.0758241758241296.182515620420763.3.38.433702428.4274725274725297.8054353023443.4.02.512359511.77912087912074442.656649418651174.0.02.412279595.1307692307691445.104862519760164.1.013.66281911.669230769230769169.887841910739722.4.211.73262495.0208791208791217.105354767405173.0.012.024759178.37252747252745209.95898452067783.1.011.881486261.7241758241758213.463809017432253.2.09.143244345.0758241758241280.44822087201753.3.39.295759428.4274725274725276.717313386849243.4.03.235152511.77912087912074424.975281593012944.0.03.156762595.1307692307691426.892901746849254.1.018.55698911.66923076923076950.163909925781812.4.219.81228795.020879120879119.4561060749033463.0.019.590199178.3725274725274524.888947313903093.1.020.203558261.72417582417589.8846153846153583.2.016.494184345.0758241758241100.62540299166043.3.317.251342428.427472527472582.103379258552143.4.011.773506511.77912087912074216.105276350143584.0.012.579465595.1307692307691196.389455179513054.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_hp_procurve.svg b/tests/performance/graphs/netmiko_hp_procurve.svg index 376a7d821..04f367988 100644 --- a/tests/performance/graphs/netmiko_hp_procurve.svg +++ b/tests/performance/graphs/netmiko_hp_procurve.svg @@ -1,4 +1,4 @@ -Netmiko: HPE ProCurve Performance0010102020303040402.4.23.0.03.1.03.2.03.3.33.4.04.1.0Netmiko: HPE ProCurve Performance11.25826911.669230769230769373.595712950305942.4.217.901763108.91282051282049296.576176857419973.0.018.419321206.15641025641023290.576009315888033.1.018.353988303.4291.33342963591193.2.018.020695400.64358974358964295.197371146660033.3.318.010017497.88717948717954295.321163627905553.4.02.080718595.1307692307691479.99314786765554.1.021.83115511.669230769230769251.02184220052142.4.222.221532108.91282051282049246.496112901852263.0.022.93706206.15641025641023238.200834149215383.1.022.718488303.4240.734789029417583.2.022.391657400.64358974358964244.523815105270783.3.322.410676497.88717948717954244.30332351500963.4.02.143245595.1307692307691479.268258143471264.1.032.21674111.669230769230769130.619382926414742.4.230.53423108.91282051282049150.125115405615823.0.031.002139206.15641025641023144.700540006934663.1.030.893432303.4145.960804968421663.2.030.752905400.64358974358964147.589966423000423.3.330.529921497.88717948717954150.175070622106433.4.02.165055595.1307692307691479.01540985578024.1.042.48894511.66923076923076911.5313869514821482.4.242.045111108.9128205128204916.676855402609023.0.042.630991206.156410256410239.8846153846154153.1.042.584148303.410.4276769316265363.2.042.227986400.6435897435896414.5567439577899343.3.342.211889497.8871794871795414.7433601378432973.4.010.575428595.1307692307691381.512043881771044.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: HPE ProCurve Performance0010102020303040402.4.23.0.03.1.03.2.03.3.33.4.04.1.0Netmiko: HPE ProCurve Performance11.25826911.669230769230769373.595712950305942.4.217.901763108.91282051282049296.576176857419973.0.018.419321206.15641025641023290.576009315888033.1.018.353988303.4291.33342963591193.2.018.020695400.64358974358964295.197371146660033.3.318.010017497.88717948717954295.321163627905553.4.01.873823595.1307692307691482.39172863252684.1.021.83115511.669230769230769251.02184220052142.4.222.221532108.91282051282049246.496112901852263.0.022.93706206.15641025641023238.200834149215383.1.022.718488303.4240.734789029417583.2.022.391657400.64358974358964244.523815105270783.3.322.410676497.88717948717954244.30332351500963.4.02.322253595.1307692307691477.192977708670644.1.032.21674111.669230769230769130.619382926414742.4.230.53423108.91282051282049150.125115405615823.0.031.002139206.15641025641023144.700540006934663.1.030.893432303.4145.960804968421663.2.030.752905400.64358974358964147.589966423000423.3.330.529921497.88717948717954150.175070622106433.4.02.099819595.1307692307691479.771705632754734.1.042.48894511.66923076923076911.5313869514821482.4.242.045111108.9128205128204916.676855402609023.0.042.630991206.156410256410239.8846153846154153.1.042.584148303.410.4276769316265363.2.042.227986400.6435897435896414.5567439577899343.3.342.211889497.8871794871795414.7433601378432973.4.010.649204595.1307692307691380.65674194354564.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/graphs/netmiko_juniper_junos.svg b/tests/performance/graphs/netmiko_juniper_junos.svg index 6c5eafcba..bc04f966e 100644 --- a/tests/performance/graphs/netmiko_juniper_junos.svg +++ b/tests/performance/graphs/netmiko_juniper_junos.svg @@ -1,4 +1,4 @@ -Netmiko: Juniper Junos Performance00448812121616202024242828323236362.4.23.0.03.1.03.3.33.4.03.2.04.0.04.1.0Netmiko: Juniper Junos Performance6.95582711.669230769230769413.133807933398432.4.28.24596695.0208791208791396.25890860670143.0.07.763991178.37252747252745402.56309722745063.1.03.517362261.7241758241758458.108613526726973.3.33.991287345.0758241758241451.909718164750533.4.07.762834428.4274725274725402.57823068091653.2.05.92602511.77912087912074426.603588670921974.0.03.299235595.1307692307691460.96169460204864.1.07.79519311.669230769230769402.15497794046562.4.28.63810495.0208791208791391.12977967394893.0.08.640627178.37252747252745391.09677906626153.1.04.262974261.7241758241758448.35607722112173.3.34.1622345.0758241758241449.67419186206243.4.08.832251428.4274725274725388.5903547905993.2.06.641656511.77912087912074417.243135685189264.0.03.809282595.1307692307691454.29032680611054.1.020.18372611.669230769230769240.11410701069452.4.218.75418795.0208791208791258.81234550173093.0.018.747711178.37252747252745258.897050985434363.1.014.697604261.7241758241758311.872077620045733.3.316.79162345.0758241758241284.482541152662863.4.018.852219428.4274725274725257.530095968312543.2.017.185611511.77912087912074279.32917515053084.0.03.704911595.1307692307691455.65548987584694.1.035.18357611.66923076923076943.917450165535572.4.237.20446995.020879120879117.4843558051397853.0.037.257378178.3725274725274516.7923109568899353.1.029.58927261.7241758241758117.090457533530243.3.327.660851345.0758241758241142.31400048873873.4.037.785493428.42747252747259.8846153846154153.2.032.165569511.7791208791207483.392703833758164.0.017.438025595.1307692307691276.02762327228444.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file +Netmiko: Juniper Junos Performance00448812121616202024242828323236362.4.23.0.03.1.03.2.03.3.33.4.04.0.04.1.0Netmiko: Juniper Junos Performance6.95582711.669230769230769413.133807933398432.4.28.24596695.0208791208791396.25890860670143.0.07.763991178.37252747252745402.56309722745063.1.07.762834261.7241758241758402.57823068091653.2.03.517362345.0758241758241458.108613526726973.3.33.991287428.4274725274725451.909718164750533.4.05.92602511.77912087912074426.603588670921974.0.03.491516595.1307692307691458.44667682688134.1.07.79519311.669230769230769402.15497794046562.4.28.63810495.0208791208791391.12977967394893.0.08.640627178.37252747252745391.09677906626153.1.08.832251261.7241758241758388.5903547905993.2.04.262974345.0758241758241448.35607722112173.3.34.1622428.4274725274725449.67419186206243.4.06.641656511.77912087912074417.243135685189264.0.03.979298595.1307692307691452.066533180828464.1.020.18372611.669230769230769240.11410701069452.4.218.75418795.0208791208791258.81234550173093.0.018.747711178.37252747252745258.897050985434363.1.018.852219261.7241758241758257.530095968312543.2.014.697604345.0758241758241311.872077620045733.3.316.79162428.4274725274725284.482541152662863.4.017.185611511.77912087912074279.32917515053084.0.03.606049595.1307692307691456.948595732840544.1.035.18357611.66923076923076943.917450165535572.4.237.20446995.020879120879117.4843558051397853.0.037.257378178.3725274725274516.7923109568899353.1.037.785493261.72417582417589.8846153846154153.2.029.58927345.0758241758241117.090457533530243.3.327.660851428.4274725274725142.31400048873873.4.032.165569511.7791208791207483.392703833758164.0.017.841704595.1307692307691270.74753912220314.1.0ConnectShow CommandSimple ConfigLarge ACL \ No newline at end of file diff --git a/tests/performance/netmiko_performance.csv b/tests/performance/netmiko_performance.csv index 83effdadc..ef76c7d67 100644 --- a/tests/performance/netmiko_performance.csv +++ b/tests/performance/netmiko_performance.csv @@ -23,6 +23,14 @@ date,netmiko_version,device_name,connect,send_command_simple,send_config_simple, 2021-9-5 2:43:52,3.1.0,arista1,0:00:06.258040,0:00:06.704600,0:00:07.223195,0:00:34.630821 2021-9-5 2:45:24,3.1.0,juniper_vmx,0:00:07.763991,0:00:08.640627,0:00:18.747711,0:00:37.257378 2021-9-5 2:47:33,3.1.0,cisco_asa,0:00:18.258663,0:00:18.908106,0:00:27.182697,0:00:37.982340 +2021-9-5 2:52:20,3.2.0,cisco1,0:00:07.715810,0:00:08.145355,0:00:08.063230,0:00:18.446518 +2021-9-5 2:53:10,3.2.0,cisco3,0:00:07.527892,0:00:07.963046,0:00:07.807690,0:00:18.531863 +2021-9-5 2:54:7,3.2.0,cisco5,0:00:08.203857,0:00:08.116193,0:00:08.307243,0:00:23.778882 +2021-9-5 2:55:1,3.2.0,nxos1,0:00:07.812037,0:00:08.369030,0:00:08.207090,0:00:21.624220 +2021-9-5 2:55:59,3.2.0,cisco_xr_azure,0:00:06.273295,0:00:06.884430,0:00:11.881486,0:00:20.203558 +2021-9-5 2:57:50,3.2.0,arista1,0:00:08.236209,0:00:08.897231,0:00:17.371332,0:00:56.674599 +2021-9-5 2:59:22,3.2.0,juniper_vmx,0:00:07.762834,0:00:08.832251,0:00:18.852219,0:00:37.785493 +2021-9-5 3:1:32,3.2.0,cisco_asa,0:00:18.131249,0:00:19.274312,0:00:27.334803,0:00:37.721248 2021-9-5 7:4:42,3.3.3,cisco1,0:00:03.047461,0:00:03.134423,0:00:03.140944,0:00:05.528239 2021-9-5 7:5:3,3.3.3,cisco3,0:00:03.070582,0:00:03.149141,0:00:03.024375,0:00:08.902653 2021-9-5 7:5:33,3.3.3,cisco5,0:00:03.792198,0:00:03.464545,0:00:03.491411,0:00:14.720161 @@ -38,14 +46,6 @@ date,netmiko_version,device_name,connect,send_command_simple,send_config_simple, 2021-9-5 7:15:43,3.4.0,arista1,0:00:02.280802,0:00:02.812860,0:00:02.930811,0:00:30.112190 2021-9-5 7:16:51,3.4.0,juniper_vmx,0:00:03.991287,0:00:04.162200,0:00:16.791620,0:00:27.660851 2021-9-5 7:17:20,3.4.0,cisco_asa,0:00:04.767506,0:00:04.783185,0:00:05.082772,0:00:10.640835 -2021-9-5 2:52:20,3.2.0,cisco1,0:00:07.715810,0:00:08.145355,0:00:08.063230,0:00:18.446518 -2021-9-5 2:53:10,3.2.0,cisco3,0:00:07.527892,0:00:07.963046,0:00:07.807690,0:00:18.531863 -2021-9-5 2:54:7,3.2.0,cisco5,0:00:08.203857,0:00:08.116193,0:00:08.307243,0:00:23.778882 -2021-9-5 2:55:1,3.2.0,nxos1,0:00:07.812037,0:00:08.369030,0:00:08.207090,0:00:21.624220 -2021-9-5 2:55:59,3.2.0,cisco_xr_azure,0:00:06.273295,0:00:06.884430,0:00:11.881486,0:00:20.203558 -2021-9-5 2:57:50,3.2.0,arista1,0:00:08.236209,0:00:08.897231,0:00:17.371332,0:00:56.674599 -2021-9-5 2:59:22,3.2.0,juniper_vmx,0:00:07.762834,0:00:08.832251,0:00:18.852219,0:00:37.785493 -2021-9-5 3:1:32,3.2.0,cisco_asa,0:00:18.131249,0:00:19.274312,0:00:27.334803,0:00:37.721248 2021-10-2 14:27:36,2.4.2,hp_procurve,0:00:11.258269,0:00:21.831155,0:00:32.216741,0:00:42.488945 2021-10-2 14:29:32,3.0.0,hp_procurve,0:00:17.901763,0:00:22.221532,0:00:30.534230,0:00:42.045111 2021-10-2 14:31:31,3.1.0,hp_procurve,0:00:18.419321,0:00:22.937060,0:00:31.002139,0:00:42.630991 @@ -60,11 +60,11 @@ date,netmiko_version,device_name,connect,send_command_simple,send_config_simple, 2022-3-23 14:33:38,4.0.0,arista1,0:00:01.687836,0:00:02.167681,0:00:03.117634,0:00:21.231472 2022-3-23 14:34:57,4.0.0,juniper_vmx,0:00:05.926020,0:00:06.641656,0:00:17.185611,0:00:32.165569 2022-3-23 14:35:27,4.0.0,cisco_asa,0:00:05.193105,0:00:04.572510,0:00:05.568892,0:00:09.710037 -2022-4-27 12:1:20,4.1.0,cisco1,0:00:00.865331,0:00:01.122718,0:00:01.126150,0:00:04.050238 -2022-4-27 12:1:32,4.1.0,cisco3,0:00:00.887664,0:00:00.993696,0:00:01.092964,0:00:07.970490 -2022-4-27 12:1:49,4.1.0,cisco5,0:00:01.214161,0:00:01.248053,0:00:01.518771,0:00:11.536051 -2022-4-27 12:2:25,4.1.0,nxos1,0:00:02.851200,0:00:03.118518,0:00:03.981228,0:00:21.426055 -2022-4-27 12:2:48,4.1.0,cisco_xr_azure,0:00:02.066334,0:00:02.454185,0:00:03.092633,0:00:12.339936 -2022-4-27 12:3:21,4.1.0,arista1,0:00:01.845158,0:00:02.576814,0:00:03.017803,0:00:22.508998 -2022-4-27 12:3:53,4.1.0,juniper_vmx,0:00:03.299235,0:00:03.809282,0:00:03.704911,0:00:17.438025 -2022-4-27 12:6:40,4.1.0,hp_procurve,0:00:02.080718,0:00:02.143245,0:00:02.165055,0:00:10.575428 +2022-4-27 14:23:54,4.1.0,cisco1,0:00:01.055904,0:00:00.927821,0:00:00.930841,0:00:04.036946 +2022-4-27 14:24:6,4.1.0,cisco3,0:00:00.883392,0:00:00.982203,0:00:01.027332,0:00:07.759537 +2022-4-27 14:24:22,4.1.0,cisco5,0:00:01.357916,0:00:01.132046,0:00:01.422688,0:00:11.043181 +2022-4-27 14:25:0,4.1.0,nxos1,0:00:03.346325,0:00:02.827452,0:00:03.765265,0:00:23.710508 +2022-4-27 14:25:24,4.1.0,cisco_xr_azure,0:00:02.700028,0:00:02.412279,0:00:03.156762,0:00:12.579465 +2022-4-27 14:26:2,4.1.0,arista1,0:00:01.788259,0:00:02.563968,0:00:02.715299,0:00:28.072290 +2022-4-27 14:26:34,4.1.0,juniper_vmx,0:00:03.491516,0:00:03.979298,0:00:03.606049,0:00:17.841704 +2022-4-27 14:29:21,4.1.0,hp_procurve,0:00:01.873823,0:00:02.322253,0:00:02.099819,0:00:10.649204 From 6dccabc943af02259686c91a6d4a532aa7d90709 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 13 May 2022 17:30:34 -0700 Subject: [PATCH 03/34] Python version checking (#2779) * Version check * Python version checking * Move logging back to top of __init__ --- netmiko/__init__.py | 76 ++++++++++++++++++++++++++++++++------------- 1 file changed, 54 insertions(+), 22 deletions(-) diff --git a/netmiko/__init__.py b/netmiko/__init__.py index 9e68d2070..00ff2dc7b 100644 --- a/netmiko/__init__.py +++ b/netmiko/__init__.py @@ -1,37 +1,69 @@ -import logging +import sys + +__version__ = "4.1.1-a1" +PY_MAJ_VER = 3 +PY_MIN_VER = 7 +MIN_PYTHON_VER = "3.7" + + +# Make sure user is using a valid Python version (for Netmiko) +def check_python_version(): # type: ignore + python_snake = "\U0001F40D" + + # Use old-school .format() method in case someone tries to use Netmiko with very old Python + msg = """ + +Netmiko Version {net_ver} requires Python Version {py_ver} or higher. + +""".format( + net_ver=__version__, py_ver=MIN_PYTHON_VER + ) + if sys.version_info.major != PY_MAJ_VER: + raise ValueError(msg) + elif sys.version_info.minor < PY_MIN_VER: + # Why not :-) + msg = msg.rstrip() + " {snake}\n\n".format(snake=python_snake) + raise ValueError(msg) + + +check_python_version() # type: ignore + + +import logging # noqa + # Logging configuration -log = logging.getLogger(__name__) # noqa -log.addHandler(logging.NullHandler()) # noqa - -from netmiko.ssh_dispatcher import ConnectHandler -from netmiko.ssh_dispatcher import ConnLogOnly -from netmiko.ssh_dispatcher import ConnUnify -from netmiko.ssh_dispatcher import ssh_dispatcher -from netmiko.ssh_dispatcher import redispatch -from netmiko.ssh_dispatcher import platforms -from netmiko.ssh_dispatcher import FileTransfer -from netmiko.scp_handler import SCPConn -from netmiko.cisco.cisco_ios import InLineTransfer -from netmiko.exceptions import ( +log = logging.getLogger(__name__) +log.addHandler(logging.NullHandler()) + + +from netmiko.ssh_dispatcher import ConnectHandler # noqa +from netmiko.ssh_dispatcher import ConnLogOnly # noqa +from netmiko.ssh_dispatcher import ConnUnify # noqa +from netmiko.ssh_dispatcher import ssh_dispatcher # noqa +from netmiko.ssh_dispatcher import redispatch # noqa +from netmiko.ssh_dispatcher import platforms # noqa +from netmiko.ssh_dispatcher import FileTransfer # noqa +from netmiko.scp_handler import SCPConn # noqa +from netmiko.cisco.cisco_ios import InLineTransfer # noqa +from netmiko.exceptions import ( # noqa NetmikoTimeoutException, NetMikoTimeoutException, ) -from netmiko.exceptions import ( +from netmiko.exceptions import ( # noqa NetmikoAuthenticationException, NetMikoAuthenticationException, ) -from netmiko.exceptions import ConfigInvalidException -from netmiko.exceptions import ReadException, ReadTimeout -from netmiko.exceptions import NetmikoBaseException, ConnectionException -from netmiko.ssh_autodetect import SSHDetect -from netmiko.base_connection import BaseConnection -from netmiko.scp_functions import file_transfer, progress_bar +from netmiko.exceptions import ConfigInvalidException # noqa +from netmiko.exceptions import ReadException, ReadTimeout # noqa +from netmiko.exceptions import NetmikoBaseException, ConnectionException # noqa +from netmiko.ssh_autodetect import SSHDetect # noqa +from netmiko.base_connection import BaseConnection # noqa +from netmiko.scp_functions import file_transfer, progress_bar # noqa # Alternate naming Netmiko = ConnectHandler -__version__ = "4.1.0" __all__ = ( "ConnectHandler", "ConnLogOnly", From faa27884ab1514e792ebefa4e4ea94ef05acb0f2 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 15 May 2022 18:55:17 -0700 Subject: [PATCH 04/34] Fix disconnect on huawei (#2780) --- netmiko/hp/hp_comware.py | 3 +++ netmiko/huawei/huawei.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/netmiko/hp/hp_comware.py b/netmiko/hp/hp_comware.py index 3cfcf0a9c..e26f2c369 100644 --- a/netmiko/hp/hp_comware.py +++ b/netmiko/hp/hp_comware.py @@ -120,6 +120,9 @@ def check_enable_mode(self, check_string: str = "]") -> bool: """enable mode on Comware is system-view.""" return self.check_config_mode(check_string=check_string) + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + def save_config( self, cmd: str = "save force", confirm: bool = False, confirm_response: str = "" ) -> str: diff --git a/netmiko/huawei/huawei.py b/netmiko/huawei/huawei.py index 326038a24..091495415 100644 --- a/netmiko/huawei/huawei.py +++ b/netmiko/huawei/huawei.py @@ -232,6 +232,9 @@ def commit( raise ValueError(f"Commit failed with following errors:\n\n{output}") return output + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + def save_config(self, *args: Any, **kwargs: Any) -> str: """Not Implemented""" raise NotImplementedError From ffe51ee65d1011bcf7fc06a9ecf0246138c25ac1 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 17 May 2022 10:40:12 -0700 Subject: [PATCH 05/34] Fixing cleanup() method bound to wrong class on Huawei (#2784) --- netmiko/huawei/huawei.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/netmiko/huawei/huawei.py b/netmiko/huawei/huawei.py index 091495415..02189c6c5 100644 --- a/netmiko/huawei/huawei.py +++ b/netmiko/huawei/huawei.py @@ -93,6 +93,9 @@ def save_config( cmd=cmd, confirm=confirm, confirm_response=confirm_response ) + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + class HuaweiSSH(HuaweiBase): """Huawei SSH driver.""" @@ -232,9 +235,6 @@ def commit( raise ValueError(f"Commit failed with following errors:\n\n{output}") return output - def cleanup(self, command: str = "quit") -> None: - return super().cleanup(command=command) - def save_config(self, *args: Any, **kwargs: Any) -> str: """Not Implemented""" raise NotImplementedError From 8d9e4c3eeb953585b24227f3eb39a075eea1f07a Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 17 May 2022 15:01:46 -0700 Subject: [PATCH 06/34] Baseline performance testing Netmiko v Scrapli (#2785) --- tests/performance/gen_scrapli_graph.py | 137 ++++++++++ .../netmiko_scrapli_arista_eos.svg | 4 + .../netmiko_scrapli_cisco_ios.svg | 4 + .../netmiko_scrapli_cisco_nxos.svg | 4 + .../netmiko_scrapli_cisco_xe.svg | 4 + .../netmiko_scrapli_juniper_junos.svg | 4 + .../netmiko_scrapli_performance.csv | 15 ++ .../performance_netmiko_scrapli.md | 10 + tests/performance/test_devices_scrapli.yml | 59 +++++ tests/performance/test_scrapli_new.py | 241 ++++++++++++++++++ 10 files changed, 482 insertions(+) create mode 100644 tests/performance/gen_scrapli_graph.py create mode 100644 tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_arista_eos.svg create mode 100644 tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_ios.svg create mode 100644 tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_nxos.svg create mode 100644 tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_xe.svg create mode 100644 tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_juniper_junos.svg create mode 100644 tests/performance/netmiko_scrapli_performance.csv create mode 100644 tests/performance/performance_netmiko_scrapli.md create mode 100644 tests/performance/test_devices_scrapli.yml create mode 100644 tests/performance/test_scrapli_new.py diff --git a/tests/performance/gen_scrapli_graph.py b/tests/performance/gen_scrapli_graph.py new file mode 100644 index 000000000..6dffcb38a --- /dev/null +++ b/tests/performance/gen_scrapli_graph.py @@ -0,0 +1,137 @@ +#!/usr/bin/env python +import os +import pygal +import csv +import yaml +import jinja2 +from rich import print +from typing import Dict + +from pathlib import Path + + +netmiko_scrapli_platform = { + "IOSXEDriver": "cisco_xe", + "NXOSDriver": "cisco_nxos", + "IOSXRDriver": "cisco_xr", + "EOSDriver": "arista_eos", + "JunosDriver": "juniper_junos", +} + + +def convert_time(time_str): + """Convert time_str to seconds (float).""" + results = time_str.split(":") + hours, mins, secs = [float(my_time) for my_time in results] + if hours != 0 or mins != 0: + raise ValueError("Invalid Time Received") + return secs + + +def read_csv(device): + csv_file = "netmiko_scrapli_performance.csv" + entries = [] + with open(csv_file) as f: + read_csv = csv.DictReader(f) + for entry in read_csv: + entry = dict(entry) + if entry["device_name"] == device: + entries.append(entry) + + return entries + + +def filter_versions(entries): + patches = dict() + for entry in entries: + version = entry["version"] + dot_pos = version.rfind(".") + minor_version = version[:dot_pos] + dot_pos += 1 + patch_version = version[dot_pos:] + current_patch = patches.get(minor_version, "0") + patches[minor_version] = max(patch_version, current_patch) + + last_versions = [f"{minor}.{patch}" for minor, patch in patches.items()] + entries = filter(lambda x: x["version"] in last_versions, entries) + return sorted(entries, key=lambda x: x["version"]) + + +def generate_graph(device_name: str, params: Dict) -> None: + device = device_name + title = params["graph"]["title"] + device_dict = params["device"] + driver = device_dict.pop("driver") + device_type = netmiko_scrapli_platform[str(driver)] + + if device_name == "cisco1": + device_type = "cisco_ios" + outfile = f"netmiko_scrapli_{device_type}.svg" + entries = read_csv(device) + # entries = filter_versions(entries) + + # Create relevant lists + netmiko_version = "4.1.0" + netmiko_results = [] + scrapli_version = "2022.1.30.post1" + scrapli_results = [] + for v in entries: + if v["version"] == netmiko_version: + netmiko_results.append(convert_time(v["connect"])) + netmiko_results.append(convert_time(v["send_command_simple"])) + netmiko_results.append(convert_time(v["send_config_simple"])) + netmiko_results.append(convert_time(v["send_config_large_acl"])) + if v["version"] == scrapli_version: + scrapli_results.append(convert_time(v["connect"])) + scrapli_results.append(convert_time(v["send_command_simple"])) + scrapli_results.append(convert_time(v["send_config_simple"])) + scrapli_results.append(convert_time(v["send_config_large_acl"])) + + print(netmiko_results) + print(scrapli_results) + + # Graph It + line_chart = pygal.Line(include_x_axis=True) + line_chart.title = title + line_chart.x_labels = ["Connect", "Show Command", "Simple Config", "Large ACL"] + line_chart.add(f"Netmiko {netmiko_version}", netmiko_results) + line_chart.add(f"Scrapli {scrapli_version}", scrapli_results) + dir_path = Path.cwd() / "graphs_netmiko_scrapli" + if not dir_path.exists(): + dir_path.mkdir() + line_chart.render_to_file(str(dir_path / outfile)) + + +perf_report_template = """ +# Netmiko-Scrapli Performance Comparison +# Netmiko Version: {{netmiko_version}} +# Scrapli Version: {{scrapli_version}} +{%- for graph in graphs %} +![]({{graph}})\n +{%- endfor %} +""" + + +def generate_report(): + template = jinja2.Template(perf_report_template) + graphs_path = Path.cwd() / "graphs_netmiko_scrapli" + graph_files = [ + "graphs_netmiko_scrapli/" + item.name for item in graphs_path.iterdir() + ] + report_file = Path.cwd() / "performance_netmiko_scrapli.md" + with report_file.open("w") as out_file: + j2_vars = {} + j2_vars["graphs"] = graph_files + j2_vars["netmiko_version"] = "4.1.0" + j2_vars["scrapli_version"] = "2022.1.30.post1" + out_file.writelines(template.render(**j2_vars)) + + +if __name__ == "__main__": + f_name = os.environ.get("TEST_DEVICES", "test_devices_scrapli.yml") + with open(f_name) as f: + devices = yaml.safe_load(f) + for device_name, device in devices.items(): + if "graph" in device: + generate_graph(device_name, device) + generate_report() diff --git a/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_arista_eos.svg b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_arista_eos.svg new file mode 100644 index 000000000..d2d367dd7 --- /dev/null +++ b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_arista_eos.svg @@ -0,0 +1,4 @@ + +Arista EOS Performance (vEOS)00224466881010121214141616181820202222242426262828ConnectShow CommandSimple ConfigLarge ACLArista EOS Performance (vEOS)1.78825911.346153846153847472.63193167464317Connect2.563968200.44871794871796458.9750744759882Show Command2.715299389.55128205128204456.3107946278368Simple Config28.07229578.65384615384619.884615384615415Large ACL4.85594111.346153846153847418.6234117207889Connect4.724871200.44871794871796420.9309835976496Show Command5.701742389.55128205128204403.73253965990057Simple Config22.928455578.6538461538461100.44514781165122Large ACLNetmiko 4.1.0Scrapli 2022.1…Scrapli 2022.1.30.post1 \ No newline at end of file diff --git a/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_ios.svg b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_ios.svg new file mode 100644 index 000000000..4ad464302 --- /dev/null +++ b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_ios.svg @@ -0,0 +1,4 @@ + +Cisco IOS Performance (Cisco 881)001122334455667788991010ConnectShow CommandSimple ConfigLarge ACLCisco IOS Performance (Cisco 881)1.05590411.346153846153847453.5821945280573Connect0.927821200.44871794871796459.71195877362806Show Command0.930841389.55128205128204459.56742836739437Simple Config4.036946578.6538461538461310.91623053482834Large ACL7.5363811.346153846153847143.4411915918409Connect7.765548200.44871794871796132.47372664622782Show Command7.606047389.55128205128204140.10708569413254Simple Config10.327079578.65384615384619.884615384615358Large ACLNetmiko 4.1.0Scrapli 2022.1…Scrapli 2022.1.30.post1 \ No newline at end of file diff --git a/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_nxos.svg b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_nxos.svg new file mode 100644 index 000000000..908f728e8 --- /dev/null +++ b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_nxos.svg @@ -0,0 +1,4 @@ + +Cisco NX-OS Performance (nx9k virtual)002244668810101212141416161818202022222424ConnectShow CommandSimple ConfigLarge ACLCisco NX-OS Performance (nx9k virtual)3.34632511.346153846153847438.813163778573Connect2.827452200.44871794871796448.93876700965757Show Command3.765265389.55128205128204430.63771387535866Simple Config23.710508578.653846153846141.4141139471177Large ACL5.02919811.346153846153847405.97255675854126Connect5.031621200.44871794871796405.9252728631971Show Command6.425476389.55128205128204378.72473883721517Simple Config25.326195578.65384615384619.884615384615415Large ACLNetmiko 4.1.0Scrapli 2022.1…Scrapli 2022.1.30.post1 \ No newline at end of file diff --git a/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_xe.svg b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_xe.svg new file mode 100644 index 000000000..68b90eec1 --- /dev/null +++ b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_cisco_xe.svg @@ -0,0 +1,4 @@ + +Cisco IOS-XE Performance (Cisco C1111-4P)00112233445566778899101011111212ConnectShow CommandSimple ConfigLarge ACLCisco IOS-XE Performance (Cisco C1111-4P)0.88339211.346153846153847467.8608532968809Connect0.982203200.44871794871796463.8056360274097Show Command1.027332389.55128205128204461.95353555120806Simple Config7.759537578.6538461538461185.66290011972671Large ACL5.74493611.346153846153847268.34240712090946Connect6.02118200.44871794871796257.00531469812466Show Command6.117979389.55128205128204253.03267019025066Simple Config12.042619578.65384615384619.884615384615415Large ACLNetmiko 4.1.0Scrapli 2022.1…Scrapli 2022.1.30.post1 \ No newline at end of file diff --git a/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_juniper_junos.svg b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_juniper_junos.svg new file mode 100644 index 000000000..499b812e3 --- /dev/null +++ b/tests/performance/graphs_netmiko_scrapli/netmiko_scrapli_juniper_junos.svg @@ -0,0 +1,4 @@ + +Juniper Junos Performance0022446688101012121414161618182020ConnectShow CommandSimple ConfigLarge ACLJuniper Junos Performance3.49151611.346153846153847421.05456756103246Connect3.979298200.44871794871796409.4505618900271Show Command3.606049389.55128205128204418.329904532226Simple Config17.841704578.653846153846179.67324776654777Large ACL6.68848811.346153846153847345.0007541401899Connect7.204068200.44871794871796332.73545274764786Show Command6.879293389.55128205128204340.4616315361246Simple Config20.775315578.65384615384619.884615384615415Large ACLNetmiko 4.1.0Scrapli 2022.1…Scrapli 2022.1.30.post1 \ No newline at end of file diff --git a/tests/performance/netmiko_scrapli_performance.csv b/tests/performance/netmiko_scrapli_performance.csv new file mode 100644 index 000000000..bd554d377 --- /dev/null +++ b/tests/performance/netmiko_scrapli_performance.csv @@ -0,0 +1,15 @@ +date,version,device_name,connect,send_command_simple,send_config_simple,send_config_large_acl +2022-5-17 13:59:1,2022.1.30.post1,cisco1,0:00:07.536380,0:00:07.765548,0:00:07.606047,0:00:10.327079 +2022-5-17 13:59:31,2022.1.30.post1,cisco3,0:00:05.744936,0:00:06.021180,0:00:06.117979,0:00:12.042619 +2022-5-17 14:0:17,2022.1.30.post1,cisco5,0:00:07.255220,0:00:07.575676,0:00:07.937005,0:00:22.923033 +2022-5-17 14:0:58,2022.1.30.post1,nxos1,0:00:05.029198,0:00:05.031621,0:00:06.425476,0:00:25.326195 +2022-5-17 14:1:8,2022.1.30.post1,iosxr3,0:00:04.794370,0:00:04.954222,0:00:00.000011,0:00:00.000017 +2022-5-17 14:1:46,2022.1.30.post1,arista1,0:00:04.855941,0:00:04.724871,0:00:05.701742,0:00:22.928455 +2022-5-17 14:2:28,2022.1.30.post1,juniper_vmx,0:00:06.688488,0:00:07.204068,0:00:06.879293,0:00:20.775315 +2022-4-27 14:23:54,4.1.0,cisco1,0:00:01.055904,0:00:00.927821,0:00:00.930841,0:00:04.036946 +2022-4-27 14:24:6,4.1.0,cisco3,0:00:00.883392,0:00:00.982203,0:00:01.027332,0:00:07.759537 +2022-4-27 14:24:22,4.1.0,cisco5,0:00:01.357916,0:00:01.132046,0:00:01.422688,0:00:11.043181 +2022-4-27 14:25:0,4.1.0,nxos1,0:00:03.346325,0:00:02.827452,0:00:03.765265,0:00:23.710508 +2022-4-27 14:25:24,4.1.0,cisco_xr_azure,0:00:02.700028,0:00:02.412279,0:00:03.156762,0:00:12.579465 +2022-4-27 14:26:2,4.1.0,arista1,0:00:01.788259,0:00:02.563968,0:00:02.715299,0:00:28.072290 +2022-4-27 14:26:34,4.1.0,juniper_vmx,0:00:03.491516,0:00:03.979298,0:00:03.606049,0:00:17.841704 diff --git a/tests/performance/performance_netmiko_scrapli.md b/tests/performance/performance_netmiko_scrapli.md new file mode 100644 index 000000000..c5599fc82 --- /dev/null +++ b/tests/performance/performance_netmiko_scrapli.md @@ -0,0 +1,10 @@ + +# Netmiko-Scrapli Performance Comparison +# Netmiko Version: 4.1.0 +# Scrapli Version: 2022.1.30.post1 +![](graphs_netmiko_scrapli/netmiko_scrapli_cisco_xr.svg) +![](graphs_netmiko_scrapli/netmiko_scrapli_cisco_ios.svg) +![](graphs_netmiko_scrapli/netmiko_scrapli_cisco_nxos.svg) +![](graphs_netmiko_scrapli/netmiko_scrapli_cisco_xe.svg) +![](graphs_netmiko_scrapli/netmiko_scrapli_juniper_junos.svg) +![](graphs_netmiko_scrapli/netmiko_scrapli_arista_eos.svg) \ No newline at end of file diff --git a/tests/performance/test_devices_scrapli.yml b/tests/performance/test_devices_scrapli.yml new file mode 100644 index 000000000..3a56e7927 --- /dev/null +++ b/tests/performance/test_devices_scrapli.yml @@ -0,0 +1,59 @@ +--- +cisco1: + device: + driver: IOSXEDriver + host: cisco1.lasthop.io + auth_username: pyclass + auth_strict_key: False + graph: + title: "Cisco IOS Performance (Cisco 881)" + +cisco3: + device: + driver: IOSXEDriver + host: cisco3.lasthop.io + auth_username: pyclass + auth_strict_key: False + graph: + title: "Cisco IOS-XE Performance (Cisco C1111-4P)" + +cisco5: + device: + driver: IOSXEDriver + host: cisco5.lasthop.io + auth_username: pyclass + auth_strict_key: False + +nxos1: + device: + driver: NXOSDriver + host: nxos1.lasthop.io + auth_username: pyclass + auth_strict_key: False + graph: + title: "Cisco NX-OS Performance (nx9k virtual)" + +iosxr3: + device: + driver: IOSXRDriver + host: iosxr3.lasthop.io + auth_username: pyclass + auth_strict_key: False + +arista1: + device: + driver: EOSDriver + host: arista1.lasthop.io + auth_username: pyclass + auth_strict_key: False + graph: + title: "Arista EOS Performance (vEOS)" + +juniper_vmx: + device: + driver: JunosDriver + host: vmx1.lasthop.io + auth_username: pyclass + auth_strict_key: False + graph: + title: "Juniper Junos Performance" diff --git a/tests/performance/test_scrapli_new.py b/tests/performance/test_scrapli_new.py new file mode 100644 index 000000000..374db21ca --- /dev/null +++ b/tests/performance/test_scrapli_new.py @@ -0,0 +1,241 @@ +import functools +import os +from os import path +import time +from datetime import datetime +import csv +import yaml +from rich import print +from test_utils import parse_yaml +import network_utilities + +from scrapli.driver.core import IOSXEDriver # noqa +from scrapli.driver.core import NXOSDriver # noqa +from scrapli.driver.core import IOSXRDriver # noqa +from scrapli.driver.core import EOSDriver # noqa +from scrapli.driver.core import JunosDriver # noqa + +SCRAPLI_VERSION = "2022.1.30.post1" +PRINT_DEBUG = True + +PWD = path.dirname(path.realpath(__file__)) + +netmiko_scrapli_platform = { + "IOSXEDriver": "cisco_xe", + "NXOSDriver": "cisco_nxos", + "IOSXRDriver": "cisco_xr", + "EOSDriver": "arista_eos", + "JunosDriver": "juniper_junos", +} + + +def f_exec_time(func): + @functools.wraps(func) + def wrapper_decorator(*args, **kwargs): + start_time = datetime.now() + result = func(*args, **kwargs) + end_time = datetime.now() + time_delta = end_time - start_time + print(f"{str(func)}: Elapsed time: {time_delta}") + return (time_delta, result) + + return wrapper_decorator + + +def read_devices(): + f_name = "test_devices_scrapli.yml" + with open(f_name) as f: + return yaml.safe_load(f) + + +def commands(platform): + """Parse the commands.yml file to get a commands dictionary.""" + test_platform = platform + commands_yml = parse_yaml(PWD + "/../etc/commands.yml") + return commands_yml[test_platform] + + +def generate_csv_timestamp(): + """yyyy-MM-dd HH:mm:ss""" + now = datetime.now() + t_stamp = f"{now.year}-{now.month}-{now.day} {now.hour}:{now.minute}:{now.second}" + return t_stamp + + +def write_csv(device_name, results): + results_file = "netmiko_scrapli_performance.csv" + file_exists = os.path.isfile(results_file) + with open(results_file, "a") as csv_file: + field_names = ["date", "version", "device_name"] + list(results.keys()) + t_stamp = generate_csv_timestamp() + csv_write = csv.DictWriter(csv_file, fieldnames=field_names) + + # Write the header only once + if not file_exists: + csv_write.writeheader() + + entry = { + "date": t_stamp, + "version": SCRAPLI_VERSION, + "device_name": device_name, + } + + for func_name, exec_time in results.items(): + entry[func_name] = exec_time + csv_write.writerow(entry) + + +# +# +# +# # --------------- HERE ------ +# import yaml +# from datetime import datetime +# +# from netmiko import ConnectHandler, __version__ +# +# +# + + +@f_exec_time +def connect(driver, device): + ScrapliClass = globals()[driver] + with ScrapliClass(**device) as conn: + conn.open() + prompt = conn.get_prompt() + PRINT_DEBUG and print(prompt) + + +@f_exec_time +def send_command_simple(driver, device): + ScrapliClass = globals()[driver] + with ScrapliClass(**device) as conn: + platform = netmiko_scrapli_platform[str(driver)] + cmd = commands(platform)["basic"] + conn.open() + output = conn.send_command(cmd) + PRINT_DEBUG and print(output.result) + + +@f_exec_time +def send_config_simple(driver, device): + ScrapliClass = globals()[driver] + if "IOSXR" in str(ScrapliClass): + # IOSXR is failing on disconnect (maybe due to no-commit?) + return None + with ScrapliClass(**device) as conn: + platform = netmiko_scrapli_platform[str(driver)] + cmd = commands(platform)["config"][0] + conn.open() + response = conn.send_config(cmd) + PRINT_DEBUG and print(response.result) + + +@f_exec_time +def send_config_large_acl(driver, device): + ScrapliClass = globals()[driver] + device_type = netmiko_scrapli_platform[str(driver)] + + # Results will be marginally distorted by generating the ACL here. + func_name = f"generate_{device_type}_acl" + func = getattr(network_utilities, func_name) + + if "IOSXR" in str(ScrapliClass): + # IOSXR is failing on disconnect (maybe due to no-commit?) + return None + with ScrapliClass(**device) as conn: + cfg = func(entries=100) + conn.open() + response = conn.send_configs(cfg) + PRINT_DEBUG and print(response.result) + + +@f_exec_time +def cleanup(driver, device): + + # Results will be marginally distorted by generating the ACL here. + platform = netmiko_scrapli_platform[str(driver)] + if "juniper_junos" in platform: + remove_acl_cmd = "rollback 0" + elif "hp_procurve" in platform: + remove_acl_cmd = None + elif "cisco_asa" in platform: + remove_acl_cmd = "clear configure access-list netmiko_test_large_acl" + else: + base_acl_cmd = commands(platform)["config_long_acl"]["base_cmd"] + remove_acl_cmd = f"no {base_acl_cmd}" + cleanup_generic(driver, device, remove_acl_cmd) + + +def cleanup_generic(driver, device, command): + + ScrapliClass = globals()[driver] + + if command is None: + return + if "IOSXR" in str(ScrapliClass): + # IOSXR is failing on disconnect (maybe due to no-commit?) + return None + + with ScrapliClass(**device) as conn: + conn.open() + response = conn.send_configs(command) + PRINT_DEBUG and print(response.result) + + +def main(): + PASSWORD = os.environ["NETMIKO_PASSWORD"] + HP_PASSWORD = os.environ["HPE_PASSWORD"] + + devices = read_devices() + print("\n\n") + for dev_name, params in devices.items(): + # if dev_name != "iosxr3": + # continue + dev_dict = params["device"] + print("-" * 80) + print(f"Device name: {dev_name}") + print("-" * 12) + + dev_dict["auth_password"] = PASSWORD + # if dev_name == "cisco_asa": + # dev_dict["secret"] = PASSWORD + if dev_name == "hp_procurve": + dev_dict["auth_password"] = HP_PASSWORD + + # Run tests + operations = [ + "connect", + "send_command_simple", + "send_config_simple", + "send_config_large_acl", + # "cleanup", + ] + results = {} + driver = dev_dict.pop("driver") + platform = netmiko_scrapli_platform[str(driver)] + for op in operations: + func = globals()[op] + time_delta, result = func(driver, dev_dict) + if op != "cleanup": + results[op] = time_delta + # Some platforms have an issue where the last test affects the next test? + if "procurve" in platform: + print("Sleeping 30 seconds...") + time.sleep(30) + print("Done") + print("-" * 80) + print() + + write_csv(dev_name, results) + + print("\n\n") + + +def test_performance(): + main() + + +if __name__ == "__main__": + main() From 77718066617f9e545c9baf56593ccb31b947222a Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Thu, 19 May 2022 13:31:10 -0700 Subject: [PATCH 07/34] HP ProCurve improvements; fix enable() bug (#2793) --- netmiko/hp/hp_procurve.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/netmiko/hp/hp_procurve.py b/netmiko/hp/hp_procurve.py index fce90cff0..63d9c6274 100644 --- a/netmiko/hp/hp_procurve.py +++ b/netmiko/hp/hp_procurve.py @@ -2,7 +2,7 @@ import time import socket from os import path -from typing import Optional +from typing import Optional, Any from paramiko import SSHClient from netmiko.ssh_auth import SSHClient_noauth @@ -12,6 +12,19 @@ class HPProcurveBase(CiscoSSHConnection): + def __init__(self, *args: Any, **kwargs: Any) -> None: + # ProCurve's seem to fail more on connection than they should? + # increase conn_timeout to try to improve this. + conn_timeout = kwargs.get("conn_timeout") + kwargs["conn_timeout"] = 20 if conn_timeout is None else conn_timeout + + disabled_algorithms = kwargs.get("disabled_algorithms") + if disabled_algorithms is None: + disabled_algorithms = {"pubkeys": ["rsa-sha2-256", "rsa-sha2-512"]} + kwargs["disabled_algorithms"] = disabled_algorithms + + super().__init__(*args, **kwargs) + def session_preparation(self) -> None: """ Prepare the session after the connection has been established. @@ -43,6 +56,8 @@ def session_preparation(self) -> None: if len(self.base_prompt) >= 25: self.set_base_prompt() + # ProCurve requires elevated privileges to disable output paging :-( + self.enable() self.set_terminal_width(command="terminal width 511", pattern="terminal") command = self.RETURN + "no page" self.disable_paging(command=command) @@ -63,12 +78,14 @@ def enable( pattern: str = "password", enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE, - default_username: str = "manager", + default_username: str = "", ) -> str: """Enter enable mode""" if self.check_enable_mode(): return "" + if not default_username: + default_username = self.username output = "" username_pattern = r"(username|login|user name)" @@ -86,7 +103,7 @@ def enable( if re.search(username_pattern, new_output, flags=re_flags): output += new_output self.write_channel(default_username + self.RETURN) - full_pattern = rf"{pwd_pattern}|{prompt_pattern})" + full_pattern = rf"({pwd_pattern}|{prompt_pattern})" new_output = self.read_until_pattern( full_pattern, read_timeout=15, re_flags=re_flags ) From 978ffbec0d5691d4b38ba6b0d455893d357591b7 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 20 May 2022 13:28:00 -0700 Subject: [PATCH 08/34] Improve Linux Driver Performance (#2794) Improve the reliability of some of the enable-mode/config-mode state changes on Linux (which are 'sudo -s' calls). --- netmiko/base_connection.py | 5 +- netmiko/linux/linux_ssh.py | 65 ++++++++++++++--------- tests/network_utilities.py | 29 ++++++++++ tests/performance/netmiko_performance.csv | 2 + tests/performance/perf_utils.py | 10 ++++ tests/performance/test_devices.yml | 8 +++ tests/performance/test_netmiko.py | 17 +++--- tests/performance/test_performance.sh | 4 +- tests/performance/test_scrapli_new.py | 12 +---- 9 files changed, 99 insertions(+), 53 deletions(-) create mode 100644 tests/performance/perf_utils.py diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index c78fd4d50..0fd0eefda 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -1305,10 +1305,7 @@ def find_prompt( self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) diff --git a/netmiko/linux/linux_ssh.py b/netmiko/linux/linux_ssh.py index 7c839971f..ea045e64f 100644 --- a/netmiko/linux/linux_ssh.py +++ b/netmiko/linux/linux_ssh.py @@ -1,15 +1,13 @@ from typing import Any, Optional, TYPE_CHECKING, Union, Sequence, TextIO import os import re -import socket -import time if TYPE_CHECKING: from netmiko.base_connection import BaseConnection from netmiko.cisco_base_connection import CiscoSSHConnection from netmiko.cisco_base_connection import CiscoFileTransfer -from netmiko.exceptions import NetmikoTimeoutException +from netmiko.exceptions import ReadTimeout LINUX_PROMPT_PRI = os.getenv("NETMIKO_LINUX_PROMPT_PRI", "$") LINUX_PROMPT_ALT = os.getenv("NETMIKO_LINUX_PROMPT_ALT", "#") @@ -17,10 +15,13 @@ class LinuxSSH(CiscoSSHConnection): + prompt_pattern = rf"[{re.escape(LINUX_PROMPT_PRI)}{re.escape(LINUX_PROMPT_ALT)}]" + def session_preparation(self) -> None: """Prepare the session after the connection has been established.""" self.ansi_escape_codes = True - return super().session_preparation() + self._test_channel_read(pattern=self.prompt_pattern) + self.set_base_prompt() def _enter_shell(self) -> str: """Already in shell.""" @@ -34,6 +35,13 @@ def disable_paging(self, *args: Any, **kwargs: Any) -> str: """Linux doesn't have paging by default.""" return "" + def find_prompt( + self, delay_factor: float = 1.0, pattern: Optional[str] = None + ) -> str: + if pattern is None: + pattern = self.prompt_pattern + return super().find_prompt(delay_factor=delay_factor, pattern=pattern) + def set_base_prompt( self, pri_prompt_terminator: str = LINUX_PROMPT_PRI, @@ -42,6 +50,8 @@ def set_base_prompt( pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -86,15 +96,13 @@ def check_enable_mode(self, check_string: str = LINUX_PROMPT_ROOT) -> bool: def exit_enable_mode(self, exit_command: str = "exit") -> str: """Exit enable mode.""" - delay_factor = self.select_delay_factor(delay_factor=0) - # You can run into a timing issue here if the time.sleep is too small - if delay_factor < 1: - delay_factor = 1 output = "" if self.check_enable_mode(): self.write_channel(self.normalize_cmd(exit_command)) - time.sleep(0.3 * delay_factor) - self.set_base_prompt() + output += self.read_until_pattern(pattern=exit_command) + output += self.read_until_pattern(pattern=self.prompt_pattern) + # Nature of prompt might change with the privilege deescalation + self.set_base_prompt(pattern=self.prompt_pattern) if self.check_enable_mode(): raise ValueError("Failed to exit enable mode.") return output @@ -107,25 +115,32 @@ def enable( re_flags: int = re.IGNORECASE, ) -> str: """Attempt to become root.""" - delay_factor = self.select_delay_factor(delay_factor=0) + msg = """ + +Netmiko failed to elevate privileges. + +Please ensure you pass the sudo password into ConnectHandler +using the 'secret' argument and that the user has sudo +permissions. + +""" + output = "" if not self.check_enable_mode(): self.write_channel(self.normalize_cmd(cmd)) - time.sleep(0.3 * delay_factor) - try: - output += self.read_channel() - if re.search(pattern, output, flags=re_flags): - self.write_channel(self.normalize_cmd(self.secret)) - self.set_base_prompt() - except socket.timeout: - raise NetmikoTimeoutException( - "Timed-out reading channel, data not available." - ) + # Failed "sudo -s" will put "#" in output so have to delineate further + root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)" + prompt_or_password = rf"({root_prompt}|{pattern})" + output += self.read_until_pattern(pattern=prompt_or_password) + if re.search(pattern, output, flags=re_flags): + self.write_channel(self.normalize_cmd(self.secret)) + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) if not self.check_enable_mode(): - msg = ( - "Failed to enter enable mode. Please ensure you pass " - "the 'secret' argument to ConnectHandler." - ) raise ValueError(msg) return output diff --git a/tests/network_utilities.py b/tests/network_utilities.py index 24f21bc87..e79296aa2 100644 --- a/tests/network_utilities.py +++ b/tests/network_utilities.py @@ -123,6 +123,20 @@ def generate_cisco_asa_acl( return acl +def generate_linux_acl( + acl_name="", + entries=100, + base_cmd=None, + base_addr="", +): + """Well, not really an ACL, but you get the idea.""" + acl = [] + for i in range(1, entries + 1): + cmd = "head /var/log/messages" + acl.append(cmd) + return acl + + if __name__ == "__main__": # Test code acl = generate_ios_acl(entries=10) @@ -213,3 +227,18 @@ def generate_cisco_asa_acl( "access-list netmiko_test_large_acl extended permit ip host 192.168.0.10 any", ] assert acl == ref_acl + + acl = generate_linux_acl(entries=10) + ref_acl = [ + "head /var/log/messages", + "head /var/log/messages", + "head /var/log/messages", + "head /var/log/messages", + "head /var/log/messages", + "head /var/log/messages", + "head /var/log/messages", + "head /var/log/messages", + "head /var/log/messages", + "head /var/log/messages", + ] + assert acl == ref_acl diff --git a/tests/performance/netmiko_performance.csv b/tests/performance/netmiko_performance.csv index ef76c7d67..6e3288e81 100644 --- a/tests/performance/netmiko_performance.csv +++ b/tests/performance/netmiko_performance.csv @@ -68,3 +68,5 @@ date,netmiko_version,device_name,connect,send_command_simple,send_config_simple, 2022-4-27 14:26:2,4.1.0,arista1,0:00:01.788259,0:00:02.563968,0:00:02.715299,0:00:28.072290 2022-4-27 14:26:34,4.1.0,juniper_vmx,0:00:03.491516,0:00:03.979298,0:00:03.606049,0:00:17.841704 2022-4-27 14:29:21,4.1.0,hp_procurve,0:00:01.873823,0:00:02.322253,0:00:02.099819,0:00:10.649204 +2022-5-20 11:38:5,4.1.0,linux_srv1,0:00:03.349217,0:00:03.523378,0:00:04.188625,0:00:10.252565 +2022-5-20 13:8:5,4.1.1-a1,linux_srv1,0:00:01.082305,0:00:01.244256,0:00:01.651606,0:00:07.775715 diff --git a/tests/performance/perf_utils.py b/tests/performance/perf_utils.py new file mode 100644 index 000000000..20cb84d8d --- /dev/null +++ b/tests/performance/perf_utils.py @@ -0,0 +1,10 @@ +from test_utils import parse_yaml +from os import path + + +def commands(platform): + """Parse the commands.yml file to get a commands dictionary.""" + PWD = path.dirname(path.realpath(__file__)) + test_platform = platform + commands_yml = parse_yaml(PWD + "/../etc/commands.yml") + return commands_yml[test_platform] diff --git a/tests/performance/test_devices.yml b/tests/performance/test_devices.yml index 565bce1f4..9e792525e 100644 --- a/tests/performance/test_devices.yml +++ b/tests/performance/test_devices.yml @@ -74,3 +74,11 @@ hp_procurve: session_log: hpe.out graph: title: "Netmiko: HPE ProCurve Performance" + +linux_srv1: + device: + device_type: linux + host: 3.15.148.177 + username: gituser + use_keys: True + key_file: ~/.ssh/test_rsa diff --git a/tests/performance/test_netmiko.py b/tests/performance/test_netmiko.py index 3c6bf118d..433bba473 100644 --- a/tests/performance/test_netmiko.py +++ b/tests/performance/test_netmiko.py @@ -1,5 +1,4 @@ import os -from os import path import yaml import time import functools @@ -7,7 +6,7 @@ import csv from netmiko import ConnectHandler, __version__ -from test_utils import parse_yaml +from perf_utils import commands import network_utilities @@ -18,15 +17,6 @@ PRINT_DEBUG = False -PWD = path.dirname(path.realpath(__file__)) - - -def commands(platform): - """Parse the commands.yml file to get a commands dictionary.""" - test_platform = platform - commands_yml = parse_yaml(PWD + "/../etc/commands.yml") - return commands_yml[test_platform] - def generate_csv_timestamp(): """yyyy-MM-dd HH:mm:ss""" @@ -140,6 +130,9 @@ def cleanup(device): remove_acl_cmd = None elif "cisco_asa" in platform: remove_acl_cmd = "clear configure access-list netmiko_test_large_acl" + elif "linux" in platform: + # Do nothing i.e. no cleanup + return else: base_acl_cmd = commands(platform)["config_long_acl"]["base_cmd"] remove_acl_cmd = f"no {base_acl_cmd}" @@ -183,6 +176,8 @@ def main(): for dev_name, params in devices.items(): remove_old_data(dev_name) dev_dict = params["device"] + if dev_name != "linux_srv1": + continue # if dev_name != "cisco_xr_azure": # continue print("-" * 80) diff --git a/tests/performance/test_performance.sh b/tests/performance/test_performance.sh index 70c035c6f..a318610e4 100755 --- a/tests/performance/test_performance.sh +++ b/tests/performance/test_performance.sh @@ -1,6 +1,6 @@ #!/bin/sh -export PYTHONPATH=/home/kbyers/netmiko/tests +export PYTHONPATH=~/netmiko/tests pip show pyaml pygal jinja2 if [ $? -eq 0 ]; then @@ -35,4 +35,4 @@ else echo "Generating graphs ... [FAIL]" echo "Ensure that your current directory is {NETMIKO_REPO}/tests/performance" exit 1 -fi \ No newline at end of file +fi diff --git a/tests/performance/test_scrapli_new.py b/tests/performance/test_scrapli_new.py index 374db21ca..0d37bb91b 100644 --- a/tests/performance/test_scrapli_new.py +++ b/tests/performance/test_scrapli_new.py @@ -1,12 +1,11 @@ import functools import os -from os import path import time from datetime import datetime import csv import yaml from rich import print -from test_utils import parse_yaml +from perf_utils import commands import network_utilities from scrapli.driver.core import IOSXEDriver # noqa @@ -18,8 +17,6 @@ SCRAPLI_VERSION = "2022.1.30.post1" PRINT_DEBUG = True -PWD = path.dirname(path.realpath(__file__)) - netmiko_scrapli_platform = { "IOSXEDriver": "cisco_xe", "NXOSDriver": "cisco_nxos", @@ -48,13 +45,6 @@ def read_devices(): return yaml.safe_load(f) -def commands(platform): - """Parse the commands.yml file to get a commands dictionary.""" - test_platform = platform - commands_yml = parse_yaml(PWD + "/../etc/commands.yml") - return commands_yml[test_platform] - - def generate_csv_timestamp(): """yyyy-MM-dd HH:mm:ss""" now = datetime.now() From f915b16776e8af8998584b6ede071bd090cf0f19 Mon Sep 17 00:00:00 2001 From: dmulyalin Date: Thu, 2 Jun 2022 04:05:40 +1000 Subject: [PATCH 09/34] Changed Huawei VRPv8 SSH send_config_set behaviour to not exit configuration mode as it needs to commit configuration #2625 (#2803) --- netmiko/huawei/huawei.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/netmiko/huawei/huawei.py b/netmiko/huawei/huawei.py index 02189c6c5..e1aca68db 100644 --- a/netmiko/huawei/huawei.py +++ b/netmiko/huawei/huawei.py @@ -1,4 +1,4 @@ -from typing import Optional, Any +from typing import Optional, Any, Union, Sequence, TextIO import time import re import warnings @@ -192,6 +192,17 @@ def telnet_login( class HuaweiVrpv8SSH(HuaweiSSH): + def send_config_set( + self, + config_commands: Union[str, Sequence[str], TextIO, None] = None, + exit_config_mode: bool = False, + **kwargs: Any, + ) -> str: + """Huawei VRPv8 requires you not exit from configuration mode.""" + return super().send_config_set( + config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs + ) + def commit( self, comment: str = "", From 3289bc02a8ba7f56085af61013e3281025e5b5fd Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Thu, 2 Jun 2022 09:41:20 -0700 Subject: [PATCH 10/34] Improving Junos context stripping patterns (#2787) --- netmiko/juniper/juniper.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/netmiko/juniper/juniper.py b/netmiko/juniper/juniper.py index 45ee1b573..96658eb59 100644 --- a/netmiko/juniper/juniper.py +++ b/netmiko/juniper/juniper.py @@ -222,8 +222,8 @@ def strip_context_items(self, a_string: str) -> str: """ strings_to_strip = [ r"\[edit.*\]", - r"\{master:.*\}", - r"\{backup:.*\}", + r"\{master:?.*\}", + r"\{backup:?.*\}", r"\{line.*\}", r"\{primary.*\}", r"\{secondary.*\}", @@ -231,9 +231,8 @@ def strip_context_items(self, a_string: str) -> str: response_list = a_string.split(self.RESPONSE_RETURN) last_line = response_list[-1] - for pattern in strings_to_strip: - if re.search(pattern, last_line): + if re.search(pattern, last_line, flags=re.I): return self.RESPONSE_RETURN.join(response_list[:-1]) return a_string From 757a29caed85aacd1635728bba42c73052bb755b Mon Sep 17 00:00:00 2001 From: elavaud Date: Thu, 2 Jun 2022 23:50:06 +0700 Subject: [PATCH 11/34] Directly call send_command_timing using super() (#2807) Co-authored-by: Edouard Lavaud --- netmiko/mikrotik/mikrotik_ssh.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netmiko/mikrotik/mikrotik_ssh.py b/netmiko/mikrotik/mikrotik_ssh.py index 203c31906..a74f8130c 100644 --- a/netmiko/mikrotik/mikrotik_ssh.py +++ b/netmiko/mikrotik/mikrotik_ssh.py @@ -102,7 +102,7 @@ def send_command_timing( # type: ignore **kwargs: Any, ) -> Union[str, List[Any], Dict[str, Any]]: """Force cmd_verify to be True due to all of the line repainting""" - return super()._send_command_timing_str( + return super().send_command_timing( command_string=command_string, cmd_verify=cmd_verify, **kwargs ) From 89c9b9649f578e6f5d3b6247cff49f10a7962503 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Thu, 2 Jun 2022 13:46:04 -0700 Subject: [PATCH 12/34] Mikrotik duplicate command echo (#2810) * Mikrotik - Supercharge method strip_command to remove potential additional command printed * Mikrotik duplicate command echo issue Co-authored-by: Edouard Lavaud --- netmiko/mikrotik/mikrotik_ssh.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/netmiko/mikrotik/mikrotik_ssh.py b/netmiko/mikrotik/mikrotik_ssh.py index a74f8130c..aefe1c82e 100644 --- a/netmiko/mikrotik/mikrotik_ssh.py +++ b/netmiko/mikrotik/mikrotik_ssh.py @@ -1,4 +1,5 @@ from typing import Any, Union, List, Dict, Optional +import re from netmiko.no_enable import NoEnable from netmiko.cisco_base_connection import CiscoSSHConnection @@ -77,6 +78,28 @@ def strip_prompt(self, a_string: str) -> str: # Unexpected just return the original string return a_string + def strip_command(self, command_string: str, output: str) -> str: + """ + Mikrotik can echo the command multiple times :-( + + Example: + system routerboard print + [admin@MikroTik] > system routerboard print + """ + output = super().strip_command(command_string, output) + cmd = command_string.strip() + + output = output.lstrip() + # '[admin@MikroTik] > cmd' then the first newline should be matched + pattern = rf"^\[.*\] > {re.escape(cmd)}.*${self.RESPONSE_RETURN}" + if re.search(pattern, output, flags=re.M): + output_lines = re.split(pattern, output, flags=re.M) + new_output = output_lines[1:] + return self.RESPONSE_RETURN.join(new_output) + else: + # command_string isn't there; do nothing + return output + def set_base_prompt( self, pri_prompt_terminator: str = ">", From cb58cb97d233b8f63cefdbbddfc1f3cc9cbd3618 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Fri, 3 Jun 2022 09:07:38 -0700 Subject: [PATCH 13/34] Mikrotik filetransfer support (#2809) * Fix Mikrotik endless look with send_command_timing * Add support for file transfer on mikrotik router * Minor updates to Mikrotik file transfer Co-authored-by: Edouard Lavaud --- netmiko/mikrotik/__init__.py | 3 +- netmiko/mikrotik/mikrotik_ssh.py | 157 ++++++++++++++++++++++++- netmiko/ssh_dispatcher.py | 3 +- tests/conftest.py | 13 ++ tests/test_mikrotik_routeros/test9.txt | 1 + tests/test_mikrotik_routeros/testx.txt | 1 + tests/test_netmiko_scp.py | 8 +- 7 files changed, 181 insertions(+), 5 deletions(-) create mode 100644 tests/test_mikrotik_routeros/test9.txt create mode 100644 tests/test_mikrotik_routeros/testx.txt diff --git a/netmiko/mikrotik/__init__.py b/netmiko/mikrotik/__init__.py index 11eb945ca..d6aff8a3e 100644 --- a/netmiko/mikrotik/__init__.py +++ b/netmiko/mikrotik/__init__.py @@ -1,4 +1,5 @@ from netmiko.mikrotik.mikrotik_ssh import MikrotikRouterOsSSH from netmiko.mikrotik.mikrotik_ssh import MikrotikSwitchOsSSH +from netmiko.mikrotik.mikrotik_ssh import MikrotikRouterOsFileTransfer -__all__ = ["MikrotikRouterOsSSH", "MikrotikSwitchOsSSH"] +__all__ = ["MikrotikRouterOsSSH", "MikrotikSwitchOsSSH", "MikrotikRouterOsFileTransfer"] diff --git a/netmiko/mikrotik/mikrotik_ssh.py b/netmiko/mikrotik/mikrotik_ssh.py index aefe1c82e..362f49323 100644 --- a/netmiko/mikrotik/mikrotik_ssh.py +++ b/netmiko/mikrotik/mikrotik_ssh.py @@ -1,7 +1,11 @@ -from typing import Any, Union, List, Dict, Optional +from typing import Any, Union, List, Dict, Optional, Callable import re +import os + from netmiko.no_enable import NoEnable from netmiko.cisco_base_connection import CiscoSSHConnection +from netmiko.base_connection import BaseConnection +from netmiko.scp_handler import BaseFileTransfer class MikrotikBase(NoEnable, CiscoSSHConnection): @@ -140,3 +144,154 @@ class MikrotikSwitchOsSSH(MikrotikBase): """Mikrotik SwitchOS SSH driver.""" pass + + +class MikrotikRouterOsFileTransfer(BaseFileTransfer): + """Mikrotik Router Os File Transfer driver.""" + + def __init__( + self, + ssh_conn: BaseConnection, + source_file: str, + dest_file: str, + file_system: Optional[str] = "flash", + direction: str = "put", + socket_timeout: float = 10.0, + progress: Optional[Callable[..., Any]] = None, + progress4: Optional[Callable[..., Any]] = None, + hash_supported: bool = False, + ) -> None: + super().__init__( + ssh_conn=ssh_conn, + source_file=source_file, + dest_file=dest_file, + file_system=file_system, + direction=direction, + socket_timeout=socket_timeout, + progress=progress, + progress4=progress4, + hash_supported=hash_supported, + ) + + def check_file_exists(self, remote_cmd: str = "") -> bool: + """Check if the dest_file already exists on the file system.""" + if self.direction == "put": + if not remote_cmd: + remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"' + remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd) + # Output will look like + # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun... + # fail case will be blank line (all whitespace) + if ( + "size" in remote_out + and f"{self.file_system}/{self.dest_file}" in remote_out + ): + return True + elif not remote_out.strip(): + return False + raise ValueError("Unexpected output from check_file_exists") + elif self.direction == "get": + return os.path.exists(self.dest_file) + else: + raise ValueError("Unexpected value for self.direction") + + def remote_space_available(self, search_pattern: str = "") -> int: + """Return space available on remote device.""" + remote_cmd = "system resource print without-paging" + sys_res = self.ssh_ctl_chan._send_command_timing_str(remote_cmd).splitlines() + for res in sys_res: + if "free-memory" in res: + spaceMib = res.strip().replace("free-memory: ", "").replace("MiB", "") + return int(float(spaceMib) * 1048576) + raise ValueError("Unexpected output from remote_space_available") + + def remote_file_size( + self, remote_cmd: str = "", remote_file: Optional[str] = None + ) -> int: + """Get the file size of the remote file.""" + if remote_file is None: + if self.direction == "put": + remote_file = self.dest_file + elif self.direction == "get": + remote_file = self.source_file + else: + raise ValueError("Invalid value for file transfer direction.") + + if not remote_cmd: + remote_cmd = ( + f'/file print detail where name="{self.file_system}/{remote_file}"' + ) + remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd) + try: + size = remote_out.split("size=")[1].split(" ")[0] + return self._format_to_bytes(size) + except (KeyError, IndexError): + raise ValueError("Unable to find file on remote system") + + def file_md5(self, file_name: str, add_newline: bool = False) -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + @staticmethod + def process_md5(md5_output: str, pattern: str = "") -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def compare_md5(self) -> bool: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def remote_md5(self, base_cmd: str = "", remote_file: Optional[str] = None) -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def verify_file(self) -> bool: + """ + Verify the file has been transferred correctly based on filesize. + This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB... + Therefore multiple conversions from/to bytes are needed + """ + if self.direction == "put": + local_size = self._format_bytes(os.stat(self.source_file).st_size) + remote_size = self._format_bytes( + self.remote_file_size(remote_file=self.dest_file) + ) + return local_size == remote_size + elif self.direction == "get": + local_size = self._format_bytes(os.stat(self.dest_file).st_size) + remote_size = self._format_bytes( + self.remote_file_size(remote_file=self.source_file) + ) + return local_size == remote_size + else: + raise ValueError("Unexpected value of self.direction") + + @staticmethod + def _format_to_bytes(size: str) -> int: + """ + Internal function to convert Mikrotik size to bytes + """ + if size.endswith("KiB"): + return round(int(float(size.replace("KiB", "")) * 1024)) + if size.endswith("MiB"): + return round(int(float(size.replace("MiB", "")) * 1048576)) + if size.endswith("GiB"): + return round(int(float(size.replace("GiB", "")) * 1073741824)) + return round(int(size)) + + @staticmethod + def _format_bytes(size: int) -> str: + """ + Internal function to convert bytes to KiB, MiB or GiB + Extremely approximate + """ + n = 0 + levels = {0: "", 1: "Ki", 2: "Mi", 3: "Gi"} + while size > 4096 and n < 3: + size = round(size / 1024) + n += 1 + return f"{size}{levels[n]}B" diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index 40e86ed74..78cb98a25 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -71,7 +71,7 @@ from netmiko.juniper import JuniperFileTransfer from netmiko.keymile import KeymileSSH, KeymileNOSSSH from netmiko.linux import LinuxSSH, LinuxFileTransfer -from netmiko.mikrotik import MikrotikRouterOsSSH +from netmiko.mikrotik import MikrotikRouterOsSSH, MikrotikRouterOsFileTransfer from netmiko.mikrotik import MikrotikSwitchOsSSH from netmiko.mellanox import MellanoxMlnxosSSH from netmiko.mrv import MrvLxSSH @@ -248,6 +248,7 @@ "juniper_junos": JuniperFileTransfer, "linux": LinuxFileTransfer, "nokia_sros": NokiaSrosFileTransfer, + "mikrotik_routeros": MikrotikRouterOsFileTransfer, } # Also support keys that end in _ssh diff --git a/tests/conftest.py b/tests/conftest.py index b97dc7902..a6410e12e 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -292,6 +292,14 @@ def delete_file_extreme_exos(ssh_conn, dest_file_system, dest_file): return output +def delete_file_mikrotik_routeros(ssh_conn, dest_file_system, dest_file): + """Delete a remote file for an Extreme EXOS device.""" + full_file_name = "{}/{}".format(dest_file_system, dest_file) + cmd = "/file remove {}".format(full_file_name) + output = ssh_conn.send_command(cmd, strip_command=False, strip_prompt=False) + return output + + @pytest.fixture(scope="module") def scp_fixture(request): """ @@ -565,4 +573,9 @@ def get_platform_args(): "enable_scp": False, "delete_file": delete_file_extreme_exos, }, + "mikrotik_routeros": { + "file_system": "flash", + "enable_scp": True, + "delete_file": delete_file_mikrotik_routeros, + }, } diff --git a/tests/test_mikrotik_routeros/test9.txt b/tests/test_mikrotik_routeros/test9.txt new file mode 100644 index 000000000..acc8e3dd5 --- /dev/null +++ b/tests/test_mikrotik_routeros/test9.txt @@ -0,0 +1 @@ +no logging console diff --git a/tests/test_mikrotik_routeros/testx.txt b/tests/test_mikrotik_routeros/testx.txt new file mode 100644 index 000000000..acc8e3dd5 --- /dev/null +++ b/tests/test_mikrotik_routeros/testx.txt @@ -0,0 +1 @@ +no logging console diff --git a/tests/test_netmiko_scp.py b/tests/test_netmiko_scp.py index b843095d4..8651a68c3 100755 --- a/tests/test_netmiko_scp.py +++ b/tests/test_netmiko_scp.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +import re import pytest from netmiko import file_transfer @@ -42,7 +43,9 @@ def test_remote_file_size(scp_fixture): def test_md5_methods(scp_fixture): ssh_conn, scp_transfer = scp_fixture - if "nokia_sros" in ssh_conn.device_type or "extreme_exos" in ssh_conn.device_type: + + pattern = r"(?:nokia_sros|extreme_exos|mikrotik_routeros)" + if re.search(pattern, ssh_conn.device_type): pytest.skip("MD5 not supported on this platform") md5_value = "d8df36973ff832b564ad84642d07a261" @@ -82,7 +85,8 @@ def test_scp_get(scp_fixture_get): def test_md5_methods_get(scp_fixture_get): ssh_conn, scp_transfer = scp_fixture_get platform = ssh_conn.device_type - if "nokia_sros" in ssh_conn.device_type or "extreme_exos" in ssh_conn.device_type: + pattern = r"(?:nokia_sros|extreme_exos|mikrotik_routeros)" + if re.search(pattern, platform): pytest.skip("MD5 not supported on this platform") md5_value = "d8df36973ff832b564ad84642d07a261" local_md5 = scp_transfer.file_md5(f"test_{platform}/test9.txt") From 82c2d3707ead2451e73dfcabbd6a5c42d36aa2c6 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 13 Jun 2022 11:24:50 -0700 Subject: [PATCH 14/34] Fix for Extreme ERS login issues (#2814) --- netmiko/extreme/extreme_ers_ssh.py | 60 +++++++++++++++++++----------- 1 file changed, 38 insertions(+), 22 deletions(-) diff --git a/netmiko/extreme/extreme_ers_ssh.py b/netmiko/extreme/extreme_ers_ssh.py index bc94564ab..186f52ad5 100644 --- a/netmiko/extreme/extreme_ers_ssh.py +++ b/netmiko/extreme/extreme_ers_ssh.py @@ -1,6 +1,7 @@ """Netmiko support for Extreme Ethernet Routing Switch.""" -import time +import re from netmiko.cisco_base_connection import CiscoSSHConnection +from netmiko.exceptions import NetmikoAuthenticationException # Extreme ERS presents Enter Ctrl-Y to begin. CTRL_Y = "\x19" @@ -9,8 +10,10 @@ class ExtremeErsSSH(CiscoSSHConnection): """Netmiko support for Extreme Ethernet Routing Switch.""" + prompt_pattern = r"(?m:[>#]\s*$)" # force re.Multiline + def session_preparation(self) -> None: - self._test_channel_read(pattern=r"[>#]") + # special_login_handler() will always ensure self.prompt_pattern self.set_base_prompt() self.set_terminal_width() self.disable_paging() @@ -19,30 +22,43 @@ def special_login_handler(self, delay_factor: float = 1.0) -> None: """ Extreme ERS presents the following as part of the login process: - Enter Ctrl-Y to begin. + Enter Ctrl-Y to begin + + Older devices the Ctrl-Y is before SSH-login (not 100% sure of this). + + Newer devices this is after SSH-login. """ - delay_factor = self.select_delay_factor(delay_factor) - # Handle 'Enter Ctrl-Y to begin' output = "" - i = 0 - while i <= 12: - output = self.read_channel() - if output: - if "Ctrl-Y" in output: - self.write_channel(CTRL_Y) - if "sername" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "ssword" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(0.5 * delay_factor) + uname = "sername" + password = "ssword" + cntl_y = "Ctrl-Y" + pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})" + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if cntl_y in new_data: + self.write_channel(CTRL_Y) + elif uname in new_data: + assert isinstance(self.username, str) + self.write_channel(self.username + self.RETURN) + elif password in new_data: + assert isinstance(self.password, str) + self.write_channel(self.password + self.RETURN) else: - self.write_channel(self.RETURN) - time.sleep(1 * delay_factor) - i += 1 + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) def save_config( self, From ee1d5523045395ce8f401019a54dae674a12ef04 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 20 Jun 2022 02:09:36 +0300 Subject: [PATCH 15/34] Replace deprecated threading.currentThread with threading.current_thread (#2816) --- .github/workflows/commit.yaml | 17 +++++++++-------- docs/netmiko/cli_tools/netmiko_cfg.html | 4 ++-- docs/netmiko/cli_tools/netmiko_grep.html | 4 ++-- docs/netmiko/cli_tools/netmiko_show.html | 4 ++-- .../case16_concurrency/threads_netmiko.py | 2 +- netmiko/cli_tools/netmiko_cfg.py | 2 +- netmiko/cli_tools/netmiko_grep.py | 2 +- netmiko/cli_tools/netmiko_show.py | 2 +- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/commit.yaml b/.github/workflows/commit.yaml index 3ec16bfbd..dde11c354 100644 --- a/.github/workflows/commit.yaml +++ b/.github/workflows/commit.yaml @@ -3,20 +3,21 @@ name: build on: [push, pull_request] env: environment: gh_actions + FORCE_COLOR: 1 jobs: std_tests: runs-on: ubuntu-latest strategy: max-parallel: 4 matrix: - python-version: [3.7, 3.8, 3.9, 3.10.0] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} @@ -41,8 +42,8 @@ jobs: - name: Run Tests run: | - py.test -v -s tests/test_import_netmiko.py - py.test -v -s tests/unit/test_base_connection.py - py.test -v -s tests/unit/test_utilities.py - py.test -v -s tests/unit/test_ssh_autodetect.py - py.test -v -s tests/unit/test_connection.py + pytest -v -s tests/test_import_netmiko.py + pytest -v -s tests/unit/test_base_connection.py + pytest -v -s tests/unit/test_utilities.py + pytest -v -s tests/unit/test_ssh_autodetect.py + pytest -v -s tests/unit/test_connection.py diff --git a/docs/netmiko/cli_tools/netmiko_cfg.html b/docs/netmiko/cli_tools/netmiko_cfg.html index b7ed0ee13..88e04c3da 100644 --- a/docs/netmiko/cli_tools/netmiko_cfg.html +++ b/docs/netmiko/cli_tools/netmiko_cfg.html @@ -218,7 +218,7 @@

Module netmiko.cli_tools.netmiko_cfg

) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() @@ -369,7 +369,7 @@

Functions

) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() diff --git a/docs/netmiko/cli_tools/netmiko_grep.html b/docs/netmiko/cli_tools/netmiko_grep.html index b4124e155..96da6a9ee 100644 --- a/docs/netmiko/cli_tools/netmiko_grep.html +++ b/docs/netmiko/cli_tools/netmiko_grep.html @@ -197,7 +197,7 @@

Module netmiko.cli_tools.netmiko_grep

) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() @@ -352,7 +352,7 @@

Functions

) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() diff --git a/docs/netmiko/cli_tools/netmiko_show.html b/docs/netmiko/cli_tools/netmiko_show.html index ed1299e5a..6aa29cb55 100644 --- a/docs/netmiko/cli_tools/netmiko_show.html +++ b/docs/netmiko/cli_tools/netmiko_show.html @@ -196,7 +196,7 @@

Module netmiko.cli_tools.netmiko_show

) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() @@ -351,7 +351,7 @@

Functions

) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() diff --git a/examples_old/case16_concurrency/threads_netmiko.py b/examples_old/case16_concurrency/threads_netmiko.py index 35c649e3c..745cd990d 100644 --- a/examples_old/case16_concurrency/threads_netmiko.py +++ b/examples_old/case16_concurrency/threads_netmiko.py @@ -26,7 +26,7 @@ def main(): my_thread = threading.Thread(target=show_version, args=(a_device,)) my_thread.start() - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: print(some_thread) diff --git a/netmiko/cli_tools/netmiko_cfg.py b/netmiko/cli_tools/netmiko_cfg.py index f10336e3f..b753c227b 100755 --- a/netmiko/cli_tools/netmiko_cfg.py +++ b/netmiko/cli_tools/netmiko_cfg.py @@ -193,7 +193,7 @@ def main(args): ) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() diff --git a/netmiko/cli_tools/netmiko_grep.py b/netmiko/cli_tools/netmiko_grep.py index 2f101c277..d65620441 100755 --- a/netmiko/cli_tools/netmiko_grep.py +++ b/netmiko/cli_tools/netmiko_grep.py @@ -172,7 +172,7 @@ def main(args): ) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() diff --git a/netmiko/cli_tools/netmiko_show.py b/netmiko/cli_tools/netmiko_show.py index 4dc546e60..4dc987def 100755 --- a/netmiko/cli_tools/netmiko_show.py +++ b/netmiko/cli_tools/netmiko_show.py @@ -171,7 +171,7 @@ def main(args): ) my_thread.start() # Make sure all threads have finished - main_thread = threading.currentThread() + main_thread = threading.current_thread() for some_thread in threading.enumerate(): if some_thread != main_thread: some_thread.join() From 75de0cee5acc139a8dbf52eee3efc392663947c0 Mon Sep 17 00:00:00 2001 From: sguay Date: Mon, 20 Jun 2022 16:17:31 -0400 Subject: [PATCH 16/34] Add Nokia SR Linux support in netmiko (#2799) --- PLATFORMS.md | 3 + netmiko/adtran/adtran.py | 4 +- netmiko/arista/arista.py | 5 +- netmiko/aruba/aruba_ssh.py | 5 +- netmiko/base_connection.py | 15 +- netmiko/broadcom/broadcom_icos_ssh.py | 4 +- netmiko/calix/calix_b6.py | 4 +- netmiko/cdot/cdot_cros_ssh.py | 5 +- netmiko/cisco/cisco_asa_ssh.py | 5 +- netmiko/cisco/cisco_ftd_ssh.py | 4 +- netmiko/cisco/cisco_ios.py | 5 +- netmiko/cisco/cisco_nxos_ssh.py | 5 +- netmiko/cisco/cisco_viptela.py | 4 +- netmiko/cisco/cisco_wlc_ssh.py | 2 +- netmiko/cisco/cisco_xr.py | 5 +- netmiko/cisco_base_connection.py | 4 +- netmiko/dell/dell_isilon_ssh.py | 4 +- netmiko/dell/dell_powerconnect.py | 5 +- netmiko/eltex/eltex_esr_ssh.py | 5 +- netmiko/endace/endace_ssh.py | 5 +- netmiko/ericsson/ericsson_ipos.py | 4 +- netmiko/flexvnf/flexvnf_ssh.py | 4 +- netmiko/hp/hp_comware.py | 4 +- netmiko/hp/hp_procurve.py | 5 +- netmiko/huawei/huawei.py | 4 +- netmiko/huawei/huawei_smartax.py | 4 +- netmiko/juniper/juniper.py | 5 +- netmiko/linux/linux_ssh.py | 5 +- netmiko/mellanox/mellanox_mlnxos_ssh.py | 5 +- netmiko/mikrotik/mikrotik_ssh.py | 4 +- netmiko/netapp/netapp_cdot_ssh.py | 4 +- netmiko/netgear/netgear_prosafe_ssh.py | 5 +- netmiko/no_config.py | 4 +- netmiko/nokia/__init__.py | 4 +- netmiko/nokia/nokia_srl.py | 180 ++++++++++++++++++++++ netmiko/nokia/nokia_sros.py | 5 +- netmiko/paloalto/paloalto_panos.py | 4 +- netmiko/rad/rad_etx.py | 5 +- netmiko/raisecom/raisecom_roap.py | 4 +- netmiko/sixwind/sixwind_os.py | 4 +- netmiko/ssh_dispatcher.py | 8 +- netmiko/tplink/tplink_jetstream.py | 5 +- netmiko/ubiquiti/edge_ssh.py | 4 +- netmiko/vyos/vyos_ssh.py | 4 +- netmiko/watchguard/fireware_ssh.py | 4 +- netmiko/yamaha/yamaha.py | 4 +- netmiko/zte/zte_zxros.py | 4 +- tests/etc/commands.yml.example | 11 ++ tests/etc/responses.yml.example | 13 +- tests/etc/test_devices.yml.example | 6 + tests/test_nokia_srl/README.md | 26 ++++ tests/test_nokia_srl/containerlabTest.yml | 9 ++ tests/test_nokia_srl/test_srl.sh | 12 ++ tests/test_nokia_srl/testoutput.txt | 74 +++++++++ 54 files changed, 498 insertions(+), 47 deletions(-) create mode 100644 netmiko/nokia/nokia_srl.py create mode 100644 tests/test_nokia_srl/README.md create mode 100644 tests/test_nokia_srl/containerlabTest.yml create mode 100644 tests/test_nokia_srl/test_srl.sh create mode 100644 tests/test_nokia_srl/testoutput.txt diff --git a/PLATFORMS.md b/PLATFORMS.md index 0bd98207a..167ed0542 100644 --- a/PLATFORMS.md +++ b/PLATFORMS.md @@ -44,6 +44,7 @@ - NetApp cDOT - Netgear ProSafe - Nokia/Alcatel SR OS +- Nokia SR Linux - NVIDIA-Mellanox - OneAccess - Palo Alto PAN-OS @@ -85,6 +86,7 @@ - MRV Communications OptiSwitch - MRV LX - Nokia/Alcatel SR-OS +- Nokia SR Linux - QuantaMesh - Rad ETX - Raisecom ROAP @@ -188,6 +190,7 @@ - netgear_prosafe - netscaler - nokia_sros +- nokia_srl - oneaccess_oneos - ovs_linux - paloalto_panos diff --git a/netmiko/adtran/adtran.py b/netmiko/adtran/adtran.py index 225edb87e..6f0d8e058 100644 --- a/netmiko/adtran/adtran.py +++ b/netmiko/adtran/adtran.py @@ -33,7 +33,9 @@ def enable( def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( diff --git a/netmiko/arista/arista.py b/netmiko/arista/arista.py index ece8859ed..da76f0240 100644 --- a/netmiko/arista/arista.py +++ b/netmiko/arista/arista.py @@ -29,7 +29,10 @@ def enable( ) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. diff --git a/netmiko/aruba/aruba_ssh.py b/netmiko/aruba/aruba_ssh.py index 527fcbb44..5664e37e9 100644 --- a/netmiko/aruba/aruba_ssh.py +++ b/netmiko/aruba/aruba_ssh.py @@ -29,7 +29,10 @@ def session_preparation(self) -> None: self.disable_paging(command="no paging") def check_config_mode( - self, check_string: str = "(config) #", pattern: str = r"[>#]" + self, + check_string: str = "(config) #", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 0fd0eefda..de5512f6d 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -1928,7 +1928,9 @@ def exit_enable_mode(self, exit_command: str = "") -> str: raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not. :param check_string: Identification of configuration mode from the device @@ -1943,7 +1945,15 @@ def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output + + config_mode = False + if force_regex: + matches = re.search(check_string, output) + config_mode = True if matches else False + else: + config_mode = True if check_string in output else False + + return config_mode def config_mode( self, config_command: str = "", pattern: str = "", re_flags: int = 0 @@ -1961,6 +1971,7 @@ def config_mode( """ output = "" if not self.check_config_mode(): + self.write_channel(self.RETURN) self.write_channel(self.normalize_cmd(config_command)) # Make sure you read until you detect the command echo (avoid getting out of sync) if self.global_cmd_verify is not False: diff --git a/netmiko/broadcom/broadcom_icos_ssh.py b/netmiko/broadcom/broadcom_icos_ssh.py index 216838914..964309f6f 100644 --- a/netmiko/broadcom/broadcom_icos_ssh.py +++ b/netmiko/broadcom/broadcom_icos_ssh.py @@ -15,7 +15,9 @@ def session_preparation(self) -> None: self.set_terminal_width() self.disable_paging() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/calix/calix_b6.py b/netmiko/calix/calix_b6.py index cfb2f83bf..593c5d592 100644 --- a/netmiko/calix/calix_b6.py +++ b/netmiko/calix/calix_b6.py @@ -62,7 +62,9 @@ def special_login_handler(self, delay_factor: float = 1.0) -> None: """ raise NetmikoTimeoutException(msg) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string) diff --git a/netmiko/cdot/cdot_cros_ssh.py b/netmiko/cdot/cdot_cros_ssh.py index 6c523a32b..9f1da9d0b 100644 --- a/netmiko/cdot/cdot_cros_ssh.py +++ b/netmiko/cdot/cdot_cros_ssh.py @@ -39,7 +39,10 @@ def send_config_set( ) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/cisco/cisco_asa_ssh.py b/netmiko/cisco/cisco_asa_ssh.py index 6ed9aa15a..fb95d6d8a 100644 --- a/netmiko/cisco/cisco_asa_ssh.py +++ b/netmiko/cisco/cisco_asa_ssh.py @@ -42,7 +42,10 @@ def session_preparation(self) -> None: self.set_base_prompt() def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/cisco/cisco_ftd_ssh.py b/netmiko/cisco/cisco_ftd_ssh.py index 939e9dbc8..6cc94a0c1 100644 --- a/netmiko/cisco/cisco_ftd_ssh.py +++ b/netmiko/cisco/cisco_ftd_ssh.py @@ -17,6 +17,8 @@ def send_config_set(self, *args: Any, **kwargs: Any) -> str: """Canot change config on FTD via ssh""" raise NotImplementedError - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Canot change config on FTD via ssh""" return False diff --git a/netmiko/cisco/cisco_ios.py b/netmiko/cisco/cisco_ios.py index 9c4b90148..3f002993e 100644 --- a/netmiko/cisco/cisco_ios.py +++ b/netmiko/cisco/cisco_ios.py @@ -42,7 +42,10 @@ def set_base_prompt( return self.base_prompt def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. diff --git a/netmiko/cisco/cisco_nxos_ssh.py b/netmiko/cisco/cisco_nxos_ssh.py index 7a78b06f4..ff8e8c48f 100644 --- a/netmiko/cisco/cisco_nxos_ssh.py +++ b/netmiko/cisco/cisco_nxos_ssh.py @@ -25,7 +25,10 @@ def normalize_linefeeds(self, a_string: str) -> str: return newline.sub(self.RESPONSE_RETURN, a_string).replace("\r", "\n") def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/cisco/cisco_viptela.py b/netmiko/cisco/cisco_viptela.py index a06dcd35e..45eae20fd 100644 --- a/netmiko/cisco/cisco_viptela.py +++ b/netmiko/cisco/cisco_viptela.py @@ -14,7 +14,9 @@ def session_preparation(self) -> None: self.set_base_prompt() self.disable_paging(command="paginate false") - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/cisco/cisco_wlc_ssh.py b/netmiko/cisco/cisco_wlc_ssh.py index 3b6660775..20e9466ba 100644 --- a/netmiko/cisco/cisco_wlc_ssh.py +++ b/netmiko/cisco/cisco_wlc_ssh.py @@ -198,7 +198,7 @@ def cleanup(self, command: str = "logout") -> None: count += 1 def check_config_mode( - self, check_string: str = "config", pattern: str = "" + self, check_string: str = "config", pattern: str = "", force_regex: bool = False ) -> bool: """Checks if the device is in configuration mode or not.""" if not pattern: diff --git a/netmiko/cisco/cisco_xr.py b/netmiko/cisco/cisco_xr.py index 2dd4c84f7..b5e5e5f42 100644 --- a/netmiko/cisco/cisco_xr.py +++ b/netmiko/cisco/cisco_xr.py @@ -160,7 +160,10 @@ def commit( return output def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not. diff --git a/netmiko/cisco_base_connection.py b/netmiko/cisco_base_connection.py index 48627e9ad..317df7dac 100644 --- a/netmiko/cisco_base_connection.py +++ b/netmiko/cisco_base_connection.py @@ -30,7 +30,9 @@ def exit_enable_mode(self, exit_command: str = "disable") -> str: """Exits enable (privileged exec) mode.""" return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. diff --git a/netmiko/dell/dell_isilon_ssh.py b/netmiko/dell/dell_isilon_ssh.py index dd99b5be6..364cd94c7 100644 --- a/netmiko/dell/dell_isilon_ssh.py +++ b/netmiko/dell/dell_isilon_ssh.py @@ -84,7 +84,9 @@ def enable( def exit_enable_mode(self, exit_command: str = "exit") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Use equivalent enable method.""" return self.check_enable_mode(check_string=check_string) diff --git a/netmiko/dell/dell_powerconnect.py b/netmiko/dell/dell_powerconnect.py index 63f2578ec..8614b4c03 100644 --- a/netmiko/dell/dell_powerconnect.py +++ b/netmiko/dell/dell_powerconnect.py @@ -37,7 +37,10 @@ def set_base_prompt( return self.base_prompt def check_config_mode( - self, check_string: str = "(config)#", pattern: str = "" + self, + check_string: str = "(config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/eltex/eltex_esr_ssh.py b/netmiko/eltex/eltex_esr_ssh.py index ddee932f9..e5a48f456 100644 --- a/netmiko/eltex/eltex_esr_ssh.py +++ b/netmiko/eltex/eltex_esr_ssh.py @@ -26,7 +26,10 @@ def config_mode( ) def check_config_mode( - self, check_string: str = "(config", pattern: str = "" + self, + check_string: str = "(config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/endace/endace_ssh.py b/netmiko/endace/endace_ssh.py index 07cb0a8d5..9ef60f5e2 100644 --- a/netmiko/endace/endace_ssh.py +++ b/netmiko/endace/endace_ssh.py @@ -22,7 +22,10 @@ def enable( ) def check_config_mode( - self, check_string: str = "(config) #", pattern: str = "" + self, + check_string: str = "(config) #", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/ericsson/ericsson_ipos.py b/netmiko/ericsson/ericsson_ipos.py index 03b17b4c8..aac21a32a 100644 --- a/netmiko/ericsson/ericsson_ipos.py +++ b/netmiko/ericsson/ericsson_ipos.py @@ -32,7 +32,9 @@ def enable( def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( diff --git a/netmiko/flexvnf/flexvnf_ssh.py b/netmiko/flexvnf/flexvnf_ssh.py index 2ed387c8b..98e0bf1b3 100644 --- a/netmiko/flexvnf/flexvnf_ssh.py +++ b/netmiko/flexvnf/flexvnf_ssh.py @@ -41,7 +41,9 @@ def enter_cli_mode(self) -> None: break count += 1 - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string) diff --git a/netmiko/hp/hp_comware.py b/netmiko/hp/hp_comware.py index e26f2c369..c7726397b 100644 --- a/netmiko/hp/hp_comware.py +++ b/netmiko/hp/hp_comware.py @@ -36,7 +36,9 @@ def exit_config_mode(self, exit_config: str = "return", pattern: str = r">") -> """Exit config mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string) diff --git a/netmiko/hp/hp_procurve.py b/netmiko/hp/hp_procurve.py index 63d9c6274..facd05ac0 100644 --- a/netmiko/hp/hp_procurve.py +++ b/netmiko/hp/hp_procurve.py @@ -63,7 +63,10 @@ def session_preparation(self) -> None: self.disable_paging(command=command) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ The pattern is needed as it is not in the parent class. diff --git a/netmiko/huawei/huawei.py b/netmiko/huawei/huawei.py index e1aca68db..f80cd1a42 100644 --- a/netmiko/huawei/huawei.py +++ b/netmiko/huawei/huawei.py @@ -46,7 +46,9 @@ def exit_config_mode(self, exit_config: str = "return", pattern: str = r">") -> """Exit configuration mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string) diff --git a/netmiko/huawei/huawei_smartax.py b/netmiko/huawei/huawei_smartax.py index 053e4cc5e..982d02344 100644 --- a/netmiko/huawei/huawei_smartax.py +++ b/netmiko/huawei/huawei_smartax.py @@ -73,7 +73,9 @@ def config_mode( config_command=config_command, pattern=pattern, re_flags=re_flags ) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string) def exit_config_mode( diff --git a/netmiko/juniper/juniper.py b/netmiko/juniper/juniper.py index 96658eb59..77a03c776 100644 --- a/netmiko/juniper/juniper.py +++ b/netmiko/juniper/juniper.py @@ -68,7 +68,10 @@ def enter_cli_mode(self) -> None: return def check_config_mode( - self, check_string: str = "]", pattern: str = r"(?m:[>#] $)" + self, + check_string: str = "]", + pattern: str = r"(?m:[>#] $)", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. diff --git a/netmiko/linux/linux_ssh.py b/netmiko/linux/linux_ssh.py index ea045e64f..b782c6499 100644 --- a/netmiko/linux/linux_ssh.py +++ b/netmiko/linux/linux_ssh.py @@ -73,7 +73,10 @@ def send_config_set( ) def check_config_mode( - self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = "" + self, + check_string: str = LINUX_PROMPT_ROOT, + pattern: str = "", + force_regex: bool = False, ) -> bool: """Verify root""" return self.check_enable_mode(check_string=check_string) diff --git a/netmiko/mellanox/mellanox_mlnxos_ssh.py b/netmiko/mellanox/mellanox_mlnxos_ssh.py index f4f5c1d13..5798a1d92 100644 --- a/netmiko/mellanox/mellanox_mlnxos_ssh.py +++ b/netmiko/mellanox/mellanox_mlnxos_ssh.py @@ -38,7 +38,10 @@ def config_mode( ) def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/mikrotik/mikrotik_ssh.py b/netmiko/mikrotik/mikrotik_ssh.py index 362f49323..9712ac33c 100644 --- a/netmiko/mikrotik/mikrotik_ssh.py +++ b/netmiko/mikrotik/mikrotik_ssh.py @@ -50,7 +50,9 @@ def config_mode( self._in_config_mode = True return "" - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return self._in_config_mode diff --git a/netmiko/netapp/netapp_cdot_ssh.py b/netmiko/netapp/netapp_cdot_ssh.py index 9fc15e63f..cf8dfc924 100644 --- a/netmiko/netapp/netapp_cdot_ssh.py +++ b/netmiko/netapp/netapp_cdot_ssh.py @@ -19,7 +19,9 @@ def send_command_with_y(self, *args: Any, **kwargs: Any) -> str: ) return output - def check_config_mode(self, check_string: str = "*>", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "*>", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( diff --git a/netmiko/netgear/netgear_prosafe_ssh.py b/netmiko/netgear/netgear_prosafe_ssh.py index 3d7285b8b..437a0648b 100644 --- a/netmiko/netgear/netgear_prosafe_ssh.py +++ b/netmiko/netgear/netgear_prosafe_ssh.py @@ -25,7 +25,10 @@ def session_preparation(self) -> None: self.clear_buffer() def check_config_mode( - self, check_string: str = "(Config)#", pattern: str = "" + self, + check_string: str = "(Config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/no_config.py b/netmiko/no_config.py index d6718054b..799fd81a9 100644 --- a/netmiko/no_config.py +++ b/netmiko/no_config.py @@ -10,7 +10,9 @@ class NoConfig: overwrite check_config_mode in the platform specific driver and return False. """ - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: return True def config_mode( diff --git a/netmiko/nokia/__init__.py b/netmiko/nokia/__init__.py index 41f573d2d..c75a92295 100755 --- a/netmiko/nokia/__init__.py +++ b/netmiko/nokia/__init__.py @@ -4,4 +4,6 @@ NokiaSrosFileTransfer, ) -__all__ = ["NokiaSrosSSH", "NokiaSrosFileTransfer", "NokiaSrosTelnet"] +from netmiko.nokia.nokia_srl import NokiaSrlSSH + +__all__ = ["NokiaSrosSSH", "NokiaSrosFileTransfer", "NokiaSrosTelnet", "NokiaSrlSSH"] diff --git a/netmiko/nokia/nokia_srl.py b/netmiko/nokia/nokia_srl.py new file mode 100644 index 000000000..c739ebcfd --- /dev/null +++ b/netmiko/nokia/nokia_srl.py @@ -0,0 +1,180 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# Copyright (c) 2014 - 2022 Kirk Byers +# Copyright (c) 2014 - 2022 Twin Bridges Technology +# Copyright (c) 2019 - 2020 NOKIA Inc. +# MIT License - See License file at: +# https://github.com/ktbyers/netmiko/blob/develop/LICENSE + +import re +from typing import Any, Optional, Sequence, TextIO, Union +from netmiko import log +from netmiko.no_enable import NoEnable +from netmiko.base_connection import BaseConnection + + +class NokiaSrlSSH(BaseConnection, NoEnable): + """ + Implement methods for interacting with Nokia SRL devices for SSH. + + Not applicable in Nokia SRL: + - check_enable_mode() + - enable() + - exit_enable_mode() + + Overriden methods to adapt Nokia SR OS behavior (changed): + - session_preparation() + - set_base_prompt() + - config_mode() + - exit_config_mode() + - check_config_mode() + - save_config() + - commit() + - strip_prompt() + - enable() + - check_enable_mode() + + By default, the SR Linux CLI prompt consists of two lines of text, + indicating with an asterisk whether the configuration has been modified or + a plus sign whether the configuration has been saved, the current mode and + session type, the current CLI context, and the host name of the SR Linux device. + + Examples: + + --{ running }--[ interface ethernet-1/1 subinterface 1 ]-- + A:ams01# + + --{ * candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]-- + A:ams01# + + --{ + candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]-- + A:ams01# + + This class support the default prompt configuration. + """ + + def session_preparation(self) -> None: + self._test_channel_read(pattern=r"#") + self.ansi_escape_codes = True + # Bottom toolbar text not required + commands = [ + "environment cli-engine type basic", + "environment complete-on-space false", + ] + for command in commands: + self.disable_paging(command=command, cmd_verify=False, pattern=r"#") + self.set_base_prompt() + + def set_base_prompt( + self, + pri_prompt_terminator: str = "#", + alt_prompt_terminator: str = "", + delay_factor: float = 1.0, + pattern: Optional[str] = r"#", + ) -> str: + return super().set_base_prompt( + pri_prompt_terminator=pri_prompt_terminator, + alt_prompt_terminator=alt_prompt_terminator, + delay_factor=delay_factor, + pattern=pattern, + ) + + def config_mode( + self, + config_command: str = "enter candidate private", + pattern: str = r"#", + re_flags: int = 0, + ) -> str: + + output = super().config_mode( + config_command=config_command, pattern=pattern, re_flags=re_flags + ) + return output + + def check_config_mode( + self, + check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", + pattern: str = r"#", + force_regex: bool = True, + ) -> bool: + + return super().check_config_mode( + check_string=check_string, pattern=pattern, force_regex=force_regex + ) + + def commit(self) -> str: + """Commit changes by using 'commit stay'.""" + cmd = "commit stay" + output = self._send_command_str( + command_string=cmd, strip_prompt=False, strip_command=False + ) + return output + + def save_config( + self, + cmd: str = "save startup", + confirm: bool = False, + confirm_response: str = "", + ) -> str: + """Save current running configuration as initial (startup) configuration""" + output = self._send_command_str( + command_string=cmd, strip_prompt=False, strip_command=False + ) + return output + + def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str: + """Exit the candidate private mode""" + output = "" + self.write_channel(self.RETURN) + prompt = self.read_until_pattern(pattern="#") + + if self._has_uncommitted_changes(prompt): + # Changes were made but not committed. Discarding changes + output += self._discard() + # Switch to 'running' mode + output += self._running_mode() + return output + + def send_config_set( + self, + config_commands: Union[str, Sequence[str], TextIO, None] = None, + exit_config_mode: bool = False, + **kwargs: Any, + ) -> str: + """Nokia SRL requires you not exit from configuration mode.""" + return super().send_config_set( + config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs + ) + + def _discard(self) -> str: + """Discard changes made in candidate private mode""" + log.warning("Uncommitted changes will be discarted!") + cmd = "discard stay" + output = self._send_command_str( + command_string=cmd, strip_prompt=False, strip_command=False + ) + return output + + def _running_mode(self) -> str: + """Enter running mode""" + cmd = "enter running" + output = self._send_command_str( + command_string=cmd, strip_prompt=False, strip_command=False + ) + return output + + def _has_uncommitted_changes(self, prompt: str) -> bool: + """ + The asterix (*) next to the mode name indicates that the candidate configuration + has changes that have not yet been committed. + + The plus sign (+) in the prompt indicates that the running configuration differs + from the startup configuration. After you enter the save startup command, + the running configuration is synchronized with the startup configuration, + and the plus sign is removed from the prompt. + + The exclamation mark (!) in the prompt indicates that another user has commited + changes to the running datastore. + """ + matches = re.search(r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", prompt) + return True if matches and "*" in matches.group() else False diff --git a/netmiko/nokia/nokia_sros.py b/netmiko/nokia/nokia_sros.py index 521531e84..c9b3e84cd 100644 --- a/netmiko/nokia/nokia_sros.py +++ b/netmiko/nokia/nokia_sros.py @@ -153,7 +153,10 @@ def exit_config_mode(self, *args: Any, **kwargs: Any) -> str: return output def check_config_mode( - self, check_string: str = r"(ex)[", pattern: str = r"@" + self, + check_string: str = r"(ex)[", + pattern: str = r"@", + force_regex: bool = False, ) -> bool: """Check config mode for Nokia SR OS""" if "@" not in self.base_prompt: diff --git a/netmiko/paloalto/paloalto_panos.py b/netmiko/paloalto/paloalto_panos.py index 99adf98af..0b829d508 100644 --- a/netmiko/paloalto/paloalto_panos.py +++ b/netmiko/paloalto/paloalto_panos.py @@ -86,7 +86,9 @@ def find_prompt( """PA devices can be very slow to respond (in certain situations)""" return super().find_prompt(delay_factor=delay_factor, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/rad/rad_etx.py b/netmiko/rad/rad_etx.py index 400c7a0a9..04208c173 100644 --- a/netmiko/rad/rad_etx.py +++ b/netmiko/rad/rad_etx.py @@ -44,7 +44,10 @@ def config_mode( ) def check_config_mode( - self, check_string: str = ">config", pattern: str = "" + self, + check_string: str = ">config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. diff --git a/netmiko/raisecom/raisecom_roap.py b/netmiko/raisecom/raisecom_roap.py index c94aea1e0..2278a0446 100644 --- a/netmiko/raisecom/raisecom_roap.py +++ b/netmiko/raisecom/raisecom_roap.py @@ -18,7 +18,9 @@ def session_preparation(self) -> None: time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ diff --git a/netmiko/sixwind/sixwind_os.py b/netmiko/sixwind/sixwind_os.py index 600db7bf9..da3f55a4c 100644 --- a/netmiko/sixwind/sixwind_os.py +++ b/netmiko/sixwind/sixwind_os.py @@ -87,7 +87,9 @@ def exit_config_mode(self, exit_config: str = "exit", pattern: str = r">") -> st return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index 78cb98a25..36ff538a4 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -77,7 +77,12 @@ from netmiko.mrv import MrvLxSSH from netmiko.mrv import MrvOptiswitchSSH from netmiko.netapp import NetAppcDotSSH -from netmiko.nokia import NokiaSrosSSH, NokiaSrosFileTransfer, NokiaSrosTelnet +from netmiko.nokia import ( + NokiaSrosSSH, + NokiaSrosFileTransfer, + NokiaSrosTelnet, + NokiaSrlSSH, +) from netmiko.netgear import NetgearProSafeSSH from netmiko.oneaccess import OneaccessOneOSTelnet, OneaccessOneOSSSH from netmiko.ovs import OvsLinuxSSH @@ -210,6 +215,7 @@ "netgear_prosafe": NetgearProSafeSSH, "netscaler": NetscalerSSH, "nokia_sros": NokiaSrosSSH, + "nokia_srl": NokiaSrlSSH, "oneaccess_oneos": OneaccessOneOSSSH, "ovs_linux": OvsLinuxSSH, "paloalto_panos": PaloAltoPanosSSH, diff --git a/netmiko/tplink/tplink_jetstream.py b/netmiko/tplink/tplink_jetstream.py index 659d3538d..4e43834ef 100644 --- a/netmiko/tplink/tplink_jetstream.py +++ b/netmiko/tplink/tplink_jetstream.py @@ -109,7 +109,10 @@ def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#") -> st return output def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/ubiquiti/edge_ssh.py b/netmiko/ubiquiti/edge_ssh.py index 7ec08c41c..704ba46b0 100644 --- a/netmiko/ubiquiti/edge_ssh.py +++ b/netmiko/ubiquiti/edge_ssh.py @@ -23,7 +23,9 @@ def session_preparation(self) -> None: time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/vyos/vyos_ssh.py b/netmiko/vyos/vyos_ssh.py index ab6c2ded5..37420124b 100644 --- a/netmiko/vyos/vyos_ssh.py +++ b/netmiko/vyos/vyos_ssh.py @@ -20,7 +20,9 @@ def session_preparation(self) -> None: time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/watchguard/fireware_ssh.py b/netmiko/watchguard/fireware_ssh.py index f4bcaab3e..1ef7585cb 100644 --- a/netmiko/watchguard/fireware_ssh.py +++ b/netmiko/watchguard/fireware_ssh.py @@ -21,7 +21,9 @@ def session_preparation(self) -> None: time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ diff --git a/netmiko/yamaha/yamaha.py b/netmiko/yamaha/yamaha.py index 986ababf7..a81502ca8 100644 --- a/netmiko/yamaha/yamaha.py +++ b/netmiko/yamaha/yamaha.py @@ -46,7 +46,9 @@ def exit_enable_mode(self, exit_command: str = "exit") -> str: raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in administrator mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) diff --git a/netmiko/zte/zte_zxros.py b/netmiko/zte/zte_zxros.py index bd641b979..2ae8f8759 100644 --- a/netmiko/zte/zte_zxros.py +++ b/netmiko/zte/zte_zxros.py @@ -16,7 +16,9 @@ def session_preparation(self) -> None: time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ diff --git a/tests/etc/commands.yml.example b/tests/etc/commands.yml.example index c3cd94cb9..a67ab8534 100644 --- a/tests/etc/commands.yml.example +++ b/tests/etc/commands.yml.example @@ -499,3 +499,14 @@ zyxel_os: - "cfg wlan edit --Band 2.4GHz --MainSSID 1 --SSID 'NetmikoTest'" - "cfg wlan edit --Band 2.4GHz --MainSSID 1 --SSID 'magic2000'" config_verification: "cfg intf_group get" + +nokia_srl: + version: "info system banner" + basic: "show version" + wide_command: "show interface myverybiglongaccesslistthatdoesntexistandwherethisexceeds80characterssolinewrappingoccurs" + extended_output: "show interface all" + support_commit: True + config: + - "interface ethernet-1/1 admin-state disable" + - "interface ethernet-1/1 admin-state enable" + config_verification: "show interface ethernet-1/1 brief" diff --git a/tests/etc/responses.yml.example b/tests/etc/responses.yml.example index d119af365..bc0585244 100644 --- a/tests/etc/responses.yml.example +++ b/tests/etc/responses.yml.example @@ -351,4 +351,15 @@ zyxel: cmd_response_final: "magic2000" extreme_exos: - scp_remote_space: 1000 \ No newline at end of file + scp_remote_space: 1000 + +nokia_srl: + base_prompt: "A:srl1" + router_prompt: "A:srl1#" + enable_prompt: "A:srl1#" + interface_ip: "srl1" + version_banner: "Welcome to Nokia SR Linux" + multiple_line_output: "Summary" + cmd_response_init: "disable" + cmd_response_final: "enable" + save_config: "Saved current running configuration as initial" \ No newline at end of file diff --git a/tests/etc/test_devices.yml.example b/tests/etc/test_devices.yml.example index 96bd730e0..1b0466dd6 100644 --- a/tests/etc/test_devices.yml.example +++ b/tests/etc/test_devices.yml.example @@ -262,4 +262,10 @@ extreme_exos: device_type: extreme_exos ip: 192.0.2.1 username: admin + password: 'admin' + +nokia_srl: + device_type: nokia_srl + ip: clab-srltest-srl1 + username: admin password: 'admin' \ No newline at end of file diff --git a/tests/test_nokia_srl/README.md b/tests/test_nokia_srl/README.md new file mode 100644 index 000000000..f90c599be --- /dev/null +++ b/tests/test_nokia_srl/README.md @@ -0,0 +1,26 @@ +This explains how to run Nokia SR Linux tests with containerlab + +## Install containerlab and Docker +See [containerlab](https://containerlab.dev/install/) + +## Deploy containerlab Node Running SR Linux +To deploy the containerlab node defined in containerlabTest.yml run: + +``` +sudo clab deploy --topo containerlabTest.yml +``` + +The containerlab node hostname is clab-srltest-srl1. + +## Run the test + +``` +sudo sh test_srl.sh +``` + +## Destroy containerlab Node +To destroy the containerlab node defined in containerlabTest.yml run: + +``` +sudo clab destroy --topo containerlabTest.yml +``` diff --git a/tests/test_nokia_srl/containerlabTest.yml b/tests/test_nokia_srl/containerlabTest.yml new file mode 100644 index 000000000..f51287240 --- /dev/null +++ b/tests/test_nokia_srl/containerlabTest.yml @@ -0,0 +1,9 @@ +name: srltest + +topology: + kinds: + srl: + image: ghcr.io/nokia/srlinux + nodes: + srl1: + kind: srl diff --git a/tests/test_nokia_srl/test_srl.sh b/tests/test_nokia_srl/test_srl.sh new file mode 100644 index 000000000..7e00f17e6 --- /dev/null +++ b/tests/test_nokia_srl/test_srl.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +RETURN_CODE=0 + +echo "Starting tests...:" \ +&& echo "Nokia SR Linux" \ +&& cd .. \ +&& py.test -s -x -v test_netmiko_show.py --test_device nokia_srl \ +&& py.test -s -x -v test_netmiko_config.py --test_device nokia_srl \ +|| RETURN_CODE=1 + +exit $RETURN_CODE diff --git a/tests/test_nokia_srl/testoutput.txt b/tests/test_nokia_srl/testoutput.txt new file mode 100644 index 000000000..c1d0d6081 --- /dev/null +++ b/tests/test_nokia_srl/testoutput.txt @@ -0,0 +1,74 @@ +Starting tests...: +Nokia SR Linux +============================= test session starts ============================== +platform linux -- Python 3.8.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /usr/bin/python3 +cachedir: .pytest_cache +rootdir: /home/sguay/work/project/mygithub/netmiko, configfile: setup.cfg +plugins: pylama-7.7.1 +collecting ... collected 24 items + +test_netmiko_show.py::test_disable_paging PASSED +test_netmiko_show.py::test_terminal_width PASSED +test_netmiko_show.py::test_ssh_connect PASSED +test_netmiko_show.py::test_ssh_connect_cm PASSED +test_netmiko_show.py::test_send_command_timing PASSED +test_netmiko_show.py::test_send_command_timing_no_cmd_verify SKIPPED +test_netmiko_show.py::test_send_command PASSED +test_netmiko_show.py::test_send_command_no_cmd_verify SKIPPED +test_netmiko_show.py::test_complete_on_space_disabled SKIPPED +test_netmiko_show.py::test_send_command_textfsm SKIPPED (TextFSM/ntc...) +test_netmiko_show.py::test_send_command_ttp SKIPPED (TTP template no...) +test_netmiko_show.py::test_send_command_genie SKIPPED (Genie not sup...) +test_netmiko_show.py::test_send_multiline_timing SKIPPED +test_netmiko_show.py::test_send_multiline SKIPPED +test_netmiko_show.py::test_send_multiline_prompt SKIPPED +test_netmiko_show.py::test_send_multiline_simple SKIPPED +test_netmiko_show.py::test_base_prompt PASSED +test_netmiko_show.py::test_strip_prompt PASSED +test_netmiko_show.py::test_strip_command PASSED +test_netmiko_show.py::test_normalize_linefeeds PASSED +test_netmiko_show.py::test_clear_buffer PASSED +test_netmiko_show.py::test_enable_mode PASSED +test_netmiko_show.py::test_disconnect PASSED +test_netmiko_show.py::test_disconnect_no_enable SKIPPED + +=========================== short test summary info ============================ +SKIPPED [1] test_netmiko_show.py:70: Skipped +SKIPPED [1] test_netmiko_show.py:88: Skipped +SKIPPED [1] test_netmiko_show.py:110: Skipped +SKIPPED [1] test_netmiko_show.py:131: TextFSM/ntc-templates not supported on this platform +SKIPPED [1] test_netmiko_show.py:153: TTP template not existing for this platform +SKIPPED [1] test_netmiko_show.py:193: Genie not supported on this platform +SKIPPED [1] test_netmiko_show.py:213: Skipped +SKIPPED [1] test_netmiko_show.py:229: Skipped +SKIPPED [1] test_netmiko_show.py:254: Skipped +SKIPPED [1] test_netmiko_show.py:278: Skipped +SKIPPED [1] test_netmiko_show.py:380: Skipped +======================= 13 passed, 11 skipped in 39.03s ======================== +============================= test session starts ============================== +platform linux -- Python 3.8.10, pytest-6.2.5, py-1.11.0, pluggy-1.0.0 -- /usr/bin/python3 +cachedir: .pytest_cache +rootdir: /home/sguay/work/project/mygithub/netmiko, configfile: setup.cfg +plugins: pylama-7.7.1 +collecting ... collected 12 items + +test_netmiko_config.py::test_ssh_connect PASSED +test_netmiko_config.py::test_enable_mode SKIPPED +test_netmiko_config.py::test_config_mode PASSED +test_netmiko_config.py::test_exit_config_mode PASSED +test_netmiko_config.py::test_config_set PASSED +test_netmiko_config.py::test_config_set_longcommand PASSED +test_netmiko_config.py::test_config_hostname PASSED +test_netmiko_config.py::test_config_from_file SKIPPED +test_netmiko_config.py::test_config_error_pattern SKIPPED (No error_...) +test_netmiko_config.py::test_banner SKIPPED (No banner defined.) +test_netmiko_config.py::test_global_cmd_verify SKIPPED (No banner de...) +test_netmiko_config.py::test_disconnect PASSED + +=========================== short test summary info ============================ +SKIPPED [1] test_netmiko_config.py:24: Skipped +SKIPPED [1] test_netmiko_config.py:118: Skipped +SKIPPED [1] test_netmiko_config.py:130: No error_pattern defined. +SKIPPED [1] test_netmiko_config.py:164: No banner defined. +SKIPPED [1] test_netmiko_config.py:197: No banner defined. +========================= 7 passed, 5 skipped in 8.37s ========================= From ef46947c4d960d8d7e13655f86c800b30dbcc4b3 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 20 Jun 2022 13:33:51 -0700 Subject: [PATCH 17/34] Nokia SRL updates (to fix some commit/contributor history issues) (#2821) --- netmiko/base_connection.py | 9 ++------- netmiko/nokia/nokia_srl.py | 27 ++++++--------------------- 2 files changed, 8 insertions(+), 28 deletions(-) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index de5512f6d..c2813bdd6 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -1946,14 +1946,10 @@ def check_config_mode( else: output = self.read_until_pattern(pattern=pattern) - config_mode = False if force_regex: - matches = re.search(check_string, output) - config_mode = True if matches else False + return bool(re.search(check_string, output)) else: - config_mode = True if check_string in output else False - - return config_mode + return check_string in output def config_mode( self, config_command: str = "", pattern: str = "", re_flags: int = 0 @@ -1971,7 +1967,6 @@ def config_mode( """ output = "" if not self.check_config_mode(): - self.write_channel(self.RETURN) self.write_channel(self.normalize_cmd(config_command)) # Make sure you read until you detect the command echo (avoid getting out of sync) if self.global_cmd_verify is not False: diff --git a/netmiko/nokia/nokia_srl.py b/netmiko/nokia/nokia_srl.py index c739ebcfd..a3bee5330 100644 --- a/netmiko/nokia/nokia_srl.py +++ b/netmiko/nokia/nokia_srl.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # Copyright (c) 2014 - 2022 Kirk Byers # Copyright (c) 2014 - 2022 Twin Bridges Technology -# Copyright (c) 2019 - 2020 NOKIA Inc. +# Copyright (c) 2019 - 2022 NOKIA Inc. # MIT License - See License file at: # https://github.com/ktbyers/netmiko/blob/develop/LICENSE @@ -22,18 +22,6 @@ class NokiaSrlSSH(BaseConnection, NoEnable): - enable() - exit_enable_mode() - Overriden methods to adapt Nokia SR OS behavior (changed): - - session_preparation() - - set_base_prompt() - - config_mode() - - exit_config_mode() - - check_config_mode() - - save_config() - - commit() - - strip_prompt() - - enable() - - check_enable_mode() - By default, the SR Linux CLI prompt consists of two lines of text, indicating with an asterisk whether the configuration has been modified or a plus sign whether the configuration has been saved, the current mode and @@ -58,17 +46,17 @@ def session_preparation(self) -> None: self.ansi_escape_codes = True # Bottom toolbar text not required commands = [ - "environment cli-engine type basic", "environment complete-on-space false", + "environment cli-engine type basic", ] for command in commands: - self.disable_paging(command=command, cmd_verify=False, pattern=r"#") + self.disable_paging(command=command, cmd_verify=True, pattern=r"#") self.set_base_prompt() def set_base_prompt( self, pri_prompt_terminator: str = "#", - alt_prompt_terminator: str = "", + alt_prompt_terminator: str = "#", delay_factor: float = 1.0, pattern: Optional[str] = r"#", ) -> str: @@ -85,11 +73,9 @@ def config_mode( pattern: str = r"#", re_flags: int = 0, ) -> str: - - output = super().config_mode( + return super().config_mode( config_command=config_command, pattern=pattern, re_flags=re_flags ) - return output def check_config_mode( self, @@ -117,10 +103,9 @@ def save_config( confirm_response: str = "", ) -> str: """Save current running configuration as initial (startup) configuration""" - output = self._send_command_str( + return self._send_command_str( command_string=cmd, strip_prompt=False, strip_command=False ) - return output def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str: """Exit the candidate private mode""" From b34f4a95f0b8430e488afcd113367d899c9aa2f7 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Thu, 23 Jun 2022 11:05:47 -0700 Subject: [PATCH 18/34] Increase save_config default timeout for Cisco-based platforms (#2830) --- netmiko/cisco_base_connection.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/netmiko/cisco_base_connection.py b/netmiko/cisco_base_connection.py index 317df7dac..896f60ec0 100644 --- a/netmiko/cisco_base_connection.py +++ b/netmiko/cisco_base_connection.py @@ -252,7 +252,10 @@ def save_config( else: # Some devices are slow so match on trailing-prompt if you can output = self._send_command_str( - command_string=cmd, strip_prompt=False, strip_command=False + command_string=cmd, + strip_prompt=False, + strip_command=False, + read_timeout=100.0, ) return output From 8117075df557df856a33ffa9630cd804fc9443f1 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 26 Jun 2022 19:51:50 -0700 Subject: [PATCH 19/34] Update tooling (#2831) --- netmiko/snmp_autodetect.py | 1 + netmiko/utilities.py | 2 +- requirements-dev.txt | 14 +++++++------- requirements-genie.txt | 4 ++-- requirements-ttp.txt | 2 +- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/netmiko/snmp_autodetect.py b/netmiko/snmp_autodetect.py index e21381eca..099e1ab0f 100644 --- a/netmiko/snmp_autodetect.py +++ b/netmiko/snmp_autodetect.py @@ -344,6 +344,7 @@ def autodetect(self) -> Optional[str]: self._response_cache[oid] = snmp_response # See if we had a match + assert isinstance(snmp_response, str) if re.search(regex, snmp_response): assert isinstance(device_type, str) return device_type diff --git a/netmiko/utilities.py b/netmiko/utilities.py index ac36afa82..da7d000fa 100644 --- a/netmiko/utilities.py +++ b/netmiko/utilities.py @@ -298,7 +298,7 @@ def get_template_dir(_skip_ntc_package: bool = False) -> str: else: # Try 'pip installed' ntc-templates try: - with pkg_resources.path( # type: ignore + with pkg_resources.path( package="ntc_templates", resource="parse.py" ) as posix_path: # Example: /opt/venv/netmiko/lib/python3.8/site-packages/ntc_templates/templates diff --git a/requirements-dev.txt b/requirements-dev.txt index e9746140f..3b21b292c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,13 +1,13 @@ -black==21.6b0 -mypy==0.902 +black==22.3.0 +mypy==0.961 mypy-extensions==0.4.3 -PyYAML==5.4 -pytest==6.2.5 -pylama==7.7.1 -twine==1.13.0 +PyYAML==5.4.1 +pytest==7.1.2 +pylama==8.3.8 +twine==1.15.0 pysnmp==4.4.12 # Black/click issue (can go away when black is upgraded to >= 22.3.0) -click==8.0.0 +# click==8.0.0 types-paramiko types-PyYAML -r requirements.txt diff --git a/requirements-genie.txt b/requirements-genie.txt index 2e55f1ba6..97ad60ce4 100644 --- a/requirements-genie.txt +++ b/requirements-genie.txt @@ -1,2 +1,2 @@ -pyats==22.2 -genie==22.2 +pyats==22.5 +genie==22.5 diff --git a/requirements-ttp.txt b/requirements-ttp.txt index 806325661..a1d239b4e 100644 --- a/requirements-ttp.txt +++ b/requirements-ttp.txt @@ -1 +1 @@ -ttp>=0.4.0 +ttp>=0.9.0 From 2fafc8761f0d57385c131a1de0ec963c9ea1b7d0 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Sun, 26 Jun 2022 20:05:38 -0700 Subject: [PATCH 20/34] Minor testing update (#2836) --- tests/SLOG/cisco881_slog_append.log | 1 - tests/SLOG/netmiko.log | 11 ++++------- tests/test_arista_eos/testx.txt | 0 tests/test_suite_alt.sh | 14 +++++++------- tests/test_timeout_read_timing.py | 2 +- 5 files changed, 12 insertions(+), 16 deletions(-) mode change 100755 => 100644 tests/test_arista_eos/testx.txt diff --git a/tests/SLOG/cisco881_slog_append.log b/tests/SLOG/cisco881_slog_append.log index 215ba1dd0..d12914df3 100644 --- a/tests/SLOG/cisco881_slog_append.log +++ b/tests/SLOG/cisco881_slog_append.log @@ -21,7 +21,6 @@ cisco1> Testing password and secret replacement This is my password ******** This is my secret ******** - cisco1>terminal width 511 cisco1>terminal length 0 cisco1> diff --git a/tests/SLOG/netmiko.log b/tests/SLOG/netmiko.log index a74094652..79adf1d71 100644 --- a/tests/SLOG/netmiko.log +++ b/tests/SLOG/netmiko.log @@ -16,7 +16,6 @@ write_channel: b'********\n' read_channel: read_channel: read_channel: -read_channel: cisco1# Pattern found: (cisco1) : cisco1 @@ -36,19 +35,17 @@ cisco1# write_channel: b'exit\n' write_channel: b'terminal width 511\n' read_channel: -read_channel: -cisco1>terminal width +read_channel: cisco1>terminal width read_channel: 511 cisco1> -Pattern found: (terminal width 511) -cisco1>terminal width 511 +Pattern found: (terminal width 511) cisco1>terminal width 511 In disable_paging Command: terminal length 0 write_channel: b'terminal length 0\n' read_channel: -read_channel: terminal lengt -read_channel: h 0 +read_channel: terminal length +read_channel: 0 cisco1> Pattern found: (terminal\ length\ 0) cisco1>terminal length 0 diff --git a/tests/test_arista_eos/testx.txt b/tests/test_arista_eos/testx.txt old mode 100755 new mode 100644 diff --git a/tests/test_suite_alt.sh b/tests/test_suite_alt.sh index 8b5b4d1e6..a630494ea 100755 --- a/tests/test_suite_alt.sh +++ b/tests/test_suite_alt.sh @@ -79,12 +79,6 @@ echo "Starting tests...good luck:" \ && $PYTEST test_netmiko_config.py --test_device juniper_srx \ && $PYTEST test_netmiko_commit.py --test_device juniper_srx \ \ -&& echo "Cisco ASA" \ -&& $PYTEST test_netmiko_show.py --test_device cisco_asa \ -&& $PYTEST test_netmiko_config.py --test_device cisco_asa \ -&& $PYTEST test_netmiko_show.py --test_device cisco_asa_login \ -&& $PYTEST test_netmiko_config.py --test_device cisco_asa_login \ -\ && echo "Cisco IOS-XR" \ && $PYTEST test_netmiko_scp.py --test_device cisco_xrv \ && $PYTEST test_netmiko_show.py --test_device cisco_xrv \ @@ -128,8 +122,8 @@ exit $RETURN_CODE # \ # Can't get Cisco IOS and SCP get to run reliably--IOS bug? # && py.test -v test_netmiko_scp.py --test_device cisco881_key \ -# && py.test -v test_netmiko_scp.py --test_device cisco881 \ # && py.test -v test_netmiko_scp.py --test_device cisco881_fast \ +# && $PYTEST test_netmiko_scp.py --test_device cisco881_key \ # # #&& echo "Nokia SR-OS CLI" \ @@ -143,3 +137,9 @@ exit $RETURN_CODE #&& py.test -x -s -v test_netmiko_scp.py --test_device sros1_md \ #&& py.test -x -s -v test_netmiko_commit.py --test_device sros1_md \ #\ +# && echo "Cisco ASA" \ +# && $PYTEST test_netmiko_show.py --test_device cisco_asa \ +# && $PYTEST test_netmiko_config.py --test_device cisco_asa \ +# && $PYTEST test_netmiko_show.py --test_device cisco_asa_login \ +# && $PYTEST test_netmiko_config.py --test_device cisco_asa_login \ +#\ diff --git a/tests/test_timeout_read_timing.py b/tests/test_timeout_read_timing.py index 956fff366..ab74cd73c 100644 --- a/tests/test_timeout_read_timing.py +++ b/tests/test_timeout_read_timing.py @@ -34,7 +34,7 @@ def test_read_show_tech(net_connect_newconn): read_timeout = 0 output, exec_time = execute_cmd( - net_connect_newconn, read_timeout=read_timeout, last_read=4.0 + net_connect_newconn, read_timeout=read_timeout, last_read=8.0 ) assert "show interface" in output From 22c166e2366396479f0beb8d0cfaa320da99b355 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 28 Jun 2022 15:09:29 -0700 Subject: [PATCH 21/34] Netmiko Release 4 1 1 (#2839) --- docs/netmiko/a10/a10_ssh.html | 60 +- docs/netmiko/a10/index.html | 62 +- docs/netmiko/accedian/accedian_ssh.html | 60 +- docs/netmiko/accedian/index.html | 62 +- docs/netmiko/adtran/adtran.html | 112 +- docs/netmiko/adtran/index.html | 68 +- docs/netmiko/alcatel/alcatel_aos_ssh.html | 52 +- docs/netmiko/alcatel/index.html | 54 +- .../allied_telesis/allied_telesis_awplus.html | 84 +- docs/netmiko/allied_telesis/index.html | 46 +- docs/netmiko/apresia/apresia_aeos.html | 96 +- docs/netmiko/apresia/index.html | 68 +- docs/netmiko/arista/arista.html | 137 ++- docs/netmiko/arista/index.html | 76 +- docs/netmiko/aruba/aruba_ssh.html | 85 +- docs/netmiko/aruba/index.html | 82 +- docs/netmiko/base_connection.html | 562 +++++---- docs/netmiko/broadcom/broadcom_icos_ssh.html | 96 +- docs/netmiko/broadcom/index.html | 94 +- docs/netmiko/brocade/brocade_fos_ssh.html | 30 +- docs/netmiko/brocade/index.html | 32 +- docs/netmiko/calix/calix_b6.html | 126 ++- docs/netmiko/calix/index.html | 68 +- docs/netmiko/cdot/cdot_cros_ssh.html | 101 +- docs/netmiko/cdot/index.html | 98 +- docs/netmiko/centec/centec_os.html | 104 +- docs/netmiko/centec/index.html | 68 +- docs/netmiko/channel.html | 95 +- .../checkpoint/checkpoint_gaia_ssh.html | 54 +- docs/netmiko/checkpoint/index.html | 56 +- docs/netmiko/ciena/ciena_saos.html | 114 +- docs/netmiko/ciena/index.html | 86 +- docs/netmiko/cisco/cisco_asa_ssh.html | 126 ++- docs/netmiko/cisco/cisco_ftd_ssh.html | 80 +- docs/netmiko/cisco/cisco_ios.html | 182 +-- docs/netmiko/cisco/cisco_nxos_ssh.html | 101 +- docs/netmiko/cisco/cisco_s300.html | 96 +- docs/netmiko/cisco/cisco_tp_tcce.html | 104 +- docs/netmiko/cisco/cisco_viptela.html | 90 +- docs/netmiko/cisco/cisco_wlc_ssh.html | 120 +- docs/netmiko/cisco/cisco_xr.html | 201 ++-- docs/netmiko/cisco/index.html | 782 +++++++------ docs/netmiko/cisco_base_connection.html | 193 ++-- docs/netmiko/citrix/index.html | 72 +- docs/netmiko/citrix/netscaler_ssh.html | 70 +- docs/netmiko/cli_tools/index.html | 24 +- docs/netmiko/cli_tools/netmiko_cfg.html | 52 +- docs/netmiko/cli_tools/netmiko_grep.html | 52 +- docs/netmiko/cli_tools/netmiko_show.html | 52 +- docs/netmiko/cloudgenix/cloudgenix_ion.html | 68 +- docs/netmiko/cloudgenix/index.html | 70 +- docs/netmiko/coriant/coriant_ssh.html | 60 +- docs/netmiko/coriant/index.html | 62 +- docs/netmiko/dell/dell_dnos6.html | 96 +- docs/netmiko/dell/dell_force10_ssh.html | 52 +- docs/netmiko/dell/dell_isilon_ssh.html | 112 +- docs/netmiko/dell/dell_os10_ssh.html | 68 +- docs/netmiko/dell/dell_powerconnect.html | 139 ++- docs/netmiko/dell/dell_sonic_ssh.html | 52 +- docs/netmiko/dell/index.html | 326 +++--- docs/netmiko/dlink/dlink_ds.html | 112 +- docs/netmiko/dlink/index.html | 68 +- docs/netmiko/eltex/eltex_esr_ssh.html | 101 +- docs/netmiko/eltex/eltex_ssh.html | 60 +- docs/netmiko/eltex/index.html | 138 ++- docs/netmiko/endace/endace_ssh.html | 54 +- docs/netmiko/endace/index.html | 51 +- docs/netmiko/enterasys/enterasys_ssh.html | 60 +- docs/netmiko/enterasys/index.html | 62 +- docs/netmiko/ericsson/ericsson_ipos.html | 88 +- docs/netmiko/ericsson/index.html | 86 +- docs/netmiko/exceptions.html | 132 ++- docs/netmiko/extreme/extreme_ers_ssh.html | 248 ++-- docs/netmiko/extreme/extreme_exos.html | 130 ++- docs/netmiko/extreme/extreme_netiron.html | 104 +- docs/netmiko/extreme/extreme_nos_ssh.html | 60 +- docs/netmiko/extreme/extreme_slx_ssh.html | 60 +- .../netmiko/extreme/extreme_tierraos_ssh.html | 60 +- docs/netmiko/extreme/extreme_vsp_ssh.html | 60 +- docs/netmiko/extreme/extreme_wing_ssh.html | 52 +- docs/netmiko/extreme/index.html | 486 ++++---- docs/netmiko/f5/f5_linux_ssh.html | 44 +- docs/netmiko/f5/f5_tmsh_ssh.html | 76 +- docs/netmiko/f5/index.html | 102 +- docs/netmiko/flexvnf/flexvnf_ssh.html | 116 +- docs/netmiko/flexvnf/index.html | 114 +- docs/netmiko/fortinet/fortinet_ssh.html | 76 +- docs/netmiko/fortinet/index.html | 78 +- docs/netmiko/hp/hp_comware.html | 172 +-- docs/netmiko/hp/hp_procurve.html | 197 ++-- docs/netmiko/hp/index.html | 122 +- docs/netmiko/huawei/huawei.html | 255 +++-- docs/netmiko/huawei/huawei_smartax.html | 78 +- docs/netmiko/huawei/index.html | 204 ++-- docs/netmiko/index.html | 1003 ++++++++++------- docs/netmiko/ipinfusion/index.html | 68 +- docs/netmiko/ipinfusion/ipinfusion_ocnos.html | 96 +- docs/netmiko/juniper/index.html | 116 +- docs/netmiko/juniper/juniper.html | 212 ++-- docs/netmiko/juniper/juniper_screenos.html | 60 +- docs/netmiko/keymile/index.html | 92 +- docs/netmiko/keymile/keymile_nos_ssh.html | 54 +- docs/netmiko/keymile/keymile_ssh.html | 56 +- docs/netmiko/linux/index.html | 299 +++-- docs/netmiko/linux/linux_ssh.html | 367 +++--- docs/netmiko/mellanox/index.html | 77 +- .../netmiko/mellanox/mellanox_mlnxos_ssh.html | 80 +- docs/netmiko/mikrotik/index.html | 309 ++++- docs/netmiko/mikrotik/mikrotik_ssh.html | 645 ++++++++++- docs/netmiko/mrv/index.html | 118 +- docs/netmiko/mrv/mrv_lx.html | 68 +- docs/netmiko/mrv/mrv_ssh.html | 68 +- docs/netmiko/netapp/index.html | 66 +- docs/netmiko/netapp/netapp_cdot_ssh.html | 68 +- docs/netmiko/netgear/index.html | 59 +- docs/netmiko/netgear/netgear_prosafe_ssh.html | 62 +- docs/netmiko/netmiko_globals.html | 22 +- docs/netmiko/no_config.html | 67 +- docs/netmiko/no_enable.html | 58 +- docs/netmiko/nokia/index.html | 526 ++++++++- docs/netmiko/nokia/nokia_srl.html | 655 +++++++++++ docs/netmiko/nokia/nokia_sros.html | 223 ++-- docs/netmiko/oneaccess/index.html | 44 +- docs/netmiko/oneaccess/oneaccess_oneos.html | 68 +- docs/netmiko/ovs/index.html | 46 +- docs/netmiko/ovs/ovs_linux_ssh.html | 44 +- docs/netmiko/paloalto/index.html | 68 +- docs/netmiko/paloalto/paloalto_panos.html | 202 ++-- docs/netmiko/pluribus/index.html | 40 +- docs/netmiko/pluribus/pluribus_ssh.html | 38 +- docs/netmiko/quanta/index.html | 54 +- docs/netmiko/quanta/quanta_mesh_ssh.html | 52 +- docs/netmiko/rad/index.html | 78 +- docs/netmiko/rad/rad_etx.html | 147 ++- docs/netmiko/raisecom/index.html | 78 +- docs/netmiko/raisecom/raisecom_roap.html | 126 ++- docs/netmiko/ruckus/index.html | 68 +- docs/netmiko/ruckus/ruckus_fastiron.html | 116 +- docs/netmiko/ruijie/index.html | 68 +- docs/netmiko/ruijie/ruijie_os.html | 104 +- docs/netmiko/scp_functions.html | 48 +- docs/netmiko/scp_handler.html | 229 ++-- docs/netmiko/session_log.html | 54 +- docs/netmiko/sixwind/index.html | 46 +- docs/netmiko/sixwind/sixwind_os.html | 136 ++- docs/netmiko/snmp_autodetect.html | 51 +- docs/netmiko/sophos/index.html | 62 +- docs/netmiko/sophos/sophos_sfos_ssh.html | 60 +- docs/netmiko/ssh_auth.html | 30 +- docs/netmiko/ssh_autodetect.html | 55 +- docs/netmiko/supermicro/index.html | 68 +- docs/netmiko/supermicro/smci_smis.html | 104 +- docs/netmiko/terminal_server/index.html | 76 +- .../terminal_server/terminal_server.html | 104 +- docs/netmiko/tplink/index.html | 76 +- docs/netmiko/tplink/tplink_jetstream.html | 157 +-- docs/netmiko/ubiquiti/edge_ssh.html | 98 +- docs/netmiko/ubiquiti/edgerouter_ssh.html | 44 +- docs/netmiko/ubiquiti/index.html | 154 +-- docs/netmiko/ubiquiti/unifiswitch_ssh.html | 54 +- docs/netmiko/utilities.html | 236 ++-- docs/netmiko/vyos/index.html | 104 +- docs/netmiko/vyos/vyos_ssh.html | 106 +- docs/netmiko/watchguard/fireware_ssh.html | 82 +- docs/netmiko/watchguard/index.html | 80 +- docs/netmiko/yamaha/index.html | 68 +- docs/netmiko/yamaha/yamaha.html | 144 ++- docs/netmiko/zte/index.html | 68 +- docs/netmiko/zte/zte_zxros.html | 124 +- docs/netmiko/zyxel/index.html | 62 +- docs/netmiko/zyxel/zyxel_ssh.html | 60 +- netmiko/__init__.py | 2 +- release_process.txt | 2 +- requirements-dev.txt | 1 + 174 files changed, 12631 insertions(+), 7645 deletions(-) create mode 100644 docs/netmiko/nokia/nokia_srl.html diff --git a/docs/netmiko/a10/a10_ssh.html b/docs/netmiko/a10/a10_ssh.html index 394134f04..2cdb73fc9 100644 --- a/docs/netmiko/a10/a10_ssh.html +++ b/docs/netmiko/a10/a10_ssh.html @@ -3,15 +3,17 @@ - + netmiko.a10.a10_ssh API documentation - - - - - + + + + + + +
@@ -22,7 +24,9 @@

Module netmiko.a10.a10_ssh

A10 support.

-Source code + +Expand source code +
"""A10 support."""
 from netmiko.cisco_base_connection import CiscoSSHConnection
 
@@ -58,16 +62,16 @@ 

Classes

class A10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

A10 support.

+

A10 support.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -106,7 +110,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -151,12 +155,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -164,9 +168,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class A10SSH(CiscoSSHConnection):
     """A10 support."""
 
@@ -195,12 +201,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
-

Not Implemented

+

Not Implemented

-Source code + +Expand source code +
def save_config(
     self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
 ) -> str:
@@ -209,12 +217,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

A10 requires to be enable mode to disable paging.

+

A10 requires to be enable mode to disable paging.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """A10 requires to be enable mode to disable paging."""
     self._test_channel_read(pattern=r"[>#]")
@@ -303,9 +313,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/a10/index.html b/docs/netmiko/a10/index.html index e9903e2f0..bc1357df4 100644 --- a/docs/netmiko/a10/index.html +++ b/docs/netmiko/a10/index.html @@ -3,15 +3,17 @@ - + netmiko.a10 API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.a10

-Source code + +Expand source code +
from netmiko.a10.a10_ssh import A10SSH
 
 __all__ = ["A10SSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.a10.a10_ssh
-

A10 support.

+

A10 support.

@@ -45,16 +49,16 @@

Classes

class A10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

A10 support.

+

A10 support.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class A10SSH(CiscoSSHConnection):
     """A10 support."""
 
@@ -182,12 +188,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
-

Not Implemented

+

Not Implemented

-Source code + +Expand source code +
def save_config(
     self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
 ) -> str:
@@ -196,12 +204,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

A10 requires to be enable mode to disable paging.

+

A10 requires to be enable mode to disable paging.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """A10 requires to be enable mode to disable paging."""
     self._test_channel_read(pattern=r"[>#]")
@@ -295,9 +305,7 @@ 

A10SSH

- - \ No newline at end of file diff --git a/docs/netmiko/accedian/accedian_ssh.html b/docs/netmiko/accedian/accedian_ssh.html index 23062de0e..1cd246623 100644 --- a/docs/netmiko/accedian/accedian_ssh.html +++ b/docs/netmiko/accedian/accedian_ssh.html @@ -3,15 +3,17 @@ - + netmiko.accedian.accedian_ssh API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.accedian.accedian_ssh

-Source code + +Expand source code +
from typing import Optional
 from netmiko.no_enable import NoEnable
 from netmiko.no_config import NoConfig
@@ -67,10 +71,10 @@ 

Classes

class AccedianSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Class for platforms that have no enable mode.

+

Class for platforms that have no enable mode.

Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

@@ -80,10 +84,10 @@

Classes

don't explicitly support enable mode.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -122,7 +126,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -167,12 +171,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -180,9 +184,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AccedianSSH(NoEnable, NoConfig, CiscoSSHConnection):
     def session_preparation(self) -> None:
         self._test_channel_read(pattern=r"[:#]")
@@ -221,12 +227,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
-

Not Implemented

+

Not Implemented

-Source code + +Expand source code +
def save_config(
     self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
 ) -> str:
@@ -235,12 +243,14 @@ 

Methods

-def set_base_prompt(self, pri_prompt_terminator=':', alt_prompt_terminator='#', delay_factor=2.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = ':', alt_prompt_terminator: str = '#', delay_factor: float = 2.0, pattern: Optional[str] = None) ‑> str
-

Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

+

Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

-Source code + +Expand source code +
def set_base_prompt(
     self,
     pri_prompt_terminator: str = ":",
@@ -335,9 +345,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/accedian/index.html b/docs/netmiko/accedian/index.html index a626e5195..7465dd262 100644 --- a/docs/netmiko/accedian/index.html +++ b/docs/netmiko/accedian/index.html @@ -3,15 +3,17 @@ - + netmiko.accedian API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.accedian

-Source code + +Expand source code +
from netmiko.accedian.accedian_ssh import AccedianSSH
 
 __all__ = ["AccedianSSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.accedian.accedian_ssh
-
+
@@ -45,10 +49,10 @@

Classes

class AccedianSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Class for platforms that have no enable mode.

+

Class for platforms that have no enable mode.

Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

@@ -58,10 +62,10 @@

Classes

don't explicitly support enable mode.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -100,7 +104,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -145,12 +149,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -158,9 +162,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class AccedianSSH(NoEnable, NoConfig, CiscoSSHConnection):
     def session_preparation(self) -> None:
         self._test_channel_read(pattern=r"[:#]")
@@ -199,12 +205,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
-

Not Implemented

+

Not Implemented

-Source code + +Expand source code +
def save_config(
     self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
 ) -> str:
@@ -213,12 +221,14 @@ 

Methods

-def set_base_prompt(self, pri_prompt_terminator=':', alt_prompt_terminator='#', delay_factor=2.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = ':', alt_prompt_terminator: str = '#', delay_factor: float = 2.0, pattern: Optional[str] = None) ‑> str
-

Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

+

Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

-Source code + +Expand source code +
def set_base_prompt(
     self,
     pri_prompt_terminator: str = ":",
@@ -318,9 +328,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/adtran/adtran.html b/docs/netmiko/adtran/adtran.html index f9ab8d592..8973265c9 100644 --- a/docs/netmiko/adtran/adtran.html +++ b/docs/netmiko/adtran/adtran.html @@ -3,15 +3,17 @@ - + netmiko.adtran.adtran API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.adtran.adtran

-Source code + +Expand source code +
from typing import Any, Optional
 import re
 from netmiko.cisco_base_connection import CiscoBaseConnection
@@ -57,7 +61,9 @@ 

Module netmiko.adtran.adtran

def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( @@ -108,16 +114,16 @@

Classes

class AdtranOSBase -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -156,7 +162,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -201,12 +207,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -214,9 +220,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AdtranOSBase(CiscoBaseConnection):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         if kwargs.get("global_cmd_verify") is None:
@@ -247,7 +255,9 @@ 

Classes

def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( @@ -288,12 +298,14 @@

Subclasses

Methods

-def config_mode(self, config_command='config term', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'config term', pattern: str = '', re_flags: int = 0) ‑> str
-

Enter configuration mode.

+

Enter configuration mode.

-Source code + +Expand source code +
def config_mode(
     self, config_command: str = "config term", pattern: str = "", re_flags: int = 0
 ) -> str:
@@ -304,12 +316,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Prepare the session after the connection has been established.

+

Prepare the session after the connection has been established.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Prepare the session after the connection has been established."""
     self.ansi_escape_codes = True
@@ -368,16 +382,16 @@ 

Inherited members

class AdtranOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -416,7 +430,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -461,12 +475,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -474,9 +488,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AdtranOSSSH(AdtranOSBase):
     pass
@@ -537,16 +553,16 @@

Inherited members

class AdtranOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -585,7 +601,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -630,12 +646,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -643,9 +659,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AdtranOSTelnet(AdtranOSBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -742,9 +760,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/adtran/index.html b/docs/netmiko/adtran/index.html index 0386aecd4..fcf18d1ef 100644 --- a/docs/netmiko/adtran/index.html +++ b/docs/netmiko/adtran/index.html @@ -3,15 +3,17 @@ - + netmiko.adtran API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.adtran

-Source code + +Expand source code +
from netmiko.adtran.adtran import AdtranOSSSH, AdtranOSTelnet
 
 __all__ = ["AdtranOSSSH", "AdtranOSTelnet"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.adtran.adtran
-
+
@@ -45,16 +49,16 @@

Classes

class AdtranOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class AdtranOSSSH(AdtranOSBase):
     pass
@@ -214,16 +220,16 @@

Inherited members

class AdtranOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -262,7 +268,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -307,12 +313,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -320,9 +326,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AdtranOSTelnet(AdtranOSBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -417,9 +425,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/alcatel/alcatel_aos_ssh.html b/docs/netmiko/alcatel/alcatel_aos_ssh.html index 81aa5abd2..d83e146e6 100644 --- a/docs/netmiko/alcatel/alcatel_aos_ssh.html +++ b/docs/netmiko/alcatel/alcatel_aos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.alcatel.alcatel_aos_ssh API documentation - - - - - + + + + + + +
@@ -22,7 +24,9 @@

Module netmiko.alcatel.alcatel_aos_ssh

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

-Source code + +Expand source code +
"""Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8)."""
 from netmiko.no_enable import NoEnable
 from netmiko.no_config import NoConfig
@@ -60,16 +64,16 @@ 

Classes

class AlcatelAosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

+

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -108,7 +112,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -153,12 +157,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -166,9 +170,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AlcatelAosSSH(NoEnable, NoConfig, CiscoSSHConnection):
     """Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8)."""
 
@@ -199,12 +205,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='write memory flash-synchro', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory flash-synchro', confirm: bool = False, confirm_response: str = '') ‑> str
-

Save Config

+

Save Config

-Source code + +Expand source code +
def save_config(
     self,
     cmd: str = "write memory flash-synchro",
@@ -294,9 +302,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/alcatel/index.html b/docs/netmiko/alcatel/index.html index c650d1984..2800dd5de 100644 --- a/docs/netmiko/alcatel/index.html +++ b/docs/netmiko/alcatel/index.html @@ -3,15 +3,17 @@ - + netmiko.alcatel API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.alcatel

-Source code + +Expand source code +
from netmiko.alcatel.alcatel_aos_ssh import AlcatelAosSSH
 
 __all__ = ["AlcatelAosSSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.alcatel.alcatel_aos_ssh
-

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

+

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

@@ -45,16 +49,16 @@

Classes

class AlcatelAosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

+

Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class AlcatelAosSSH(NoEnable, NoConfig, CiscoSSHConnection):
     """Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8)."""
 
@@ -184,12 +190,14 @@ 

Ancestors

Methods

-def save_config(self, cmd='write memory flash-synchro', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory flash-synchro', confirm: bool = False, confirm_response: str = '') ‑> str
-

Save Config

+

Save Config

-Source code + +Expand source code +
def save_config(
     self,
     cmd: str = "write memory flash-synchro",
@@ -284,9 +292,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/allied_telesis/allied_telesis_awplus.html b/docs/netmiko/allied_telesis/allied_telesis_awplus.html index c0aa2a9a9..9738c3a80 100644 --- a/docs/netmiko/allied_telesis/allied_telesis_awplus.html +++ b/docs/netmiko/allied_telesis/allied_telesis_awplus.html @@ -3,15 +3,17 @@ - + netmiko.allied_telesis.allied_telesis_awplus API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.allied_telesis.allied_telesis_awplus
-Source code + +Expand source code +
from netmiko.cisco_base_connection import CiscoBaseConnection
 import time
 
@@ -81,16 +85,16 @@ 

Classes

class AlliedTelesisAwplusBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Implement methods for interacting with Allied Telesis devices.

+

Implement methods for interacting with Allied Telesis devices.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -129,7 +133,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -174,12 +178,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -187,9 +191,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AlliedTelesisAwplusBase(CiscoBaseConnection):
     """Implement methods for interacting with Allied Telesis devices."""
 
@@ -241,12 +247,14 @@ 

Subclasses

Methods

-def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
-

Exit configuration mode.

+

Exit configuration mode.

-Source code + +Expand source code +
def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
     """Exit configuration mode."""
     output = ""
@@ -264,14 +272,16 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Prepare the session after the connection has been established.

+

Prepare the session after the connection has been established.

Disable paging (the '–more–' prompts). -Set the base prompt for interaction ('>').

+Set the base prompt for interaction ('>').

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """
     Prepare the session after the connection has been established.
@@ -336,16 +346,16 @@ 

Inherited members

class AlliedTelesisAwplusSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Implement methods for interacting with Allied Telesis devices.

+

Implement methods for interacting with Allied Telesis devices.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -384,7 +394,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -429,12 +439,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -442,9 +452,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AlliedTelesisAwplusSSH(AlliedTelesisAwplusBase):
     pass
@@ -535,9 +547,7 @@

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/allied_telesis/index.html b/docs/netmiko/allied_telesis/index.html index b2985295a..59302927c 100644 --- a/docs/netmiko/allied_telesis/index.html +++ b/docs/netmiko/allied_telesis/index.html @@ -3,15 +3,17 @@ - + netmiko.allied_telesis API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.allied_telesis

-Source code + +Expand source code +
from netmiko.allied_telesis.allied_telesis_awplus import AlliedTelesisAwplusSSH
 
 __all__ = ["AlliedTelesisAwplusSSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.allied_telesis.allied_telesis_awplus
-
+
@@ -45,16 +49,16 @@

Classes

class AlliedTelesisAwplusSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Implement methods for interacting with Allied Telesis devices.

+

Implement methods for interacting with Allied Telesis devices.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class AlliedTelesisAwplusSSH(AlliedTelesisAwplusBase):
     pass
@@ -242,9 +248,7 @@

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/apresia/apresia_aeos.html b/docs/netmiko/apresia/apresia_aeos.html index 6f5b09867..5e3823a77 100644 --- a/docs/netmiko/apresia/apresia_aeos.html +++ b/docs/netmiko/apresia/apresia_aeos.html @@ -3,15 +3,17 @@ - + netmiko.apresia.apresia_aeos API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.apresia.apresia_aeos

-Source code + +Expand source code +
from typing import Any, Optional
 from netmiko.cisco_base_connection import CiscoSSHConnection
 
@@ -79,16 +83,16 @@ 

Classes

class ApresiaAeosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -127,7 +131,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -172,12 +176,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -185,9 +189,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class ApresiaAeosBase(CiscoSSHConnection):
     def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
@@ -232,12 +238,14 @@ 

Subclasses

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Prepare the session after the connection has been established.

+

Prepare the session after the connection has been established.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Prepare the session after the connection has been established."""
     self._test_channel_read(pattern=r"[>#]")
@@ -296,16 +304,16 @@ 

Inherited members

class ApresiaAeosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -344,7 +352,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -389,12 +397,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -402,9 +410,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class ApresiaAeosSSH(ApresiaAeosBase):
     pass
@@ -466,16 +476,16 @@

Inherited members

class ApresiaAeosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -514,7 +524,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -559,12 +569,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -572,9 +582,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class ApresiaAeosTelnet(ApresiaAeosBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -671,9 +683,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/apresia/index.html b/docs/netmiko/apresia/index.html index 432058152..faec52b44 100644 --- a/docs/netmiko/apresia/index.html +++ b/docs/netmiko/apresia/index.html @@ -3,15 +3,17 @@ - + netmiko.apresia API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.apresia

-Source code + +Expand source code +
from netmiko.apresia.apresia_aeos import ApresiaAeosSSH, ApresiaAeosTelnet
 
 __all__ = ["ApresiaAeosSSH", "ApresiaAeosTelnet"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.apresia.apresia_aeos
-
+
@@ -45,16 +49,16 @@

Classes

class ApresiaAeosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class ApresiaAeosSSH(ApresiaAeosBase):
     pass
@@ -215,16 +221,16 @@

Inherited members

class ApresiaAeosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -263,7 +269,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -308,12 +314,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -321,9 +327,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class ApresiaAeosTelnet(ApresiaAeosBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -419,9 +427,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/arista/arista.html b/docs/netmiko/arista/arista.html index 7792ecae4..b16c1d4c4 100644 --- a/docs/netmiko/arista/arista.html +++ b/docs/netmiko/arista/arista.html @@ -3,15 +3,17 @@ - + netmiko.arista.arista API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.arista.arista

-Source code + +Expand source code +
from typing import Any, Optional, Union, Sequence
 from typing import TYPE_CHECKING
 import re
@@ -53,7 +57,10 @@ 

Module netmiko.arista.arista

) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -178,16 +185,16 @@

Classes

class AristaBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -226,7 +233,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -271,12 +278,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -284,9 +291,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AristaBase(CiscoSSHConnection):
     def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
@@ -308,7 +317,10 @@ 

Classes

) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -367,17 +379,22 @@

Subclasses

Methods

-def check_config_mode(self, check_string=')#', pattern='[>\\#]') +def check_config_mode(self, check_string: str = ')#', pattern: str = '[>\\#]', force_regex: bool = False) ‑> bool
-

Checks if the device is in configuration mode or not.

+

Checks if the device is in configuration mode or not.

Arista, unfortunately, does this: loc1-core01(s1)#

-

Can also be (s2)

+

Can also be (s2)

-Source code + +Expand source code +
def check_config_mode(
-    self, check_string: str = ")#", pattern: str = r"[>\#]"
+    self,
+    check_string: str = ")#",
+    pattern: str = r"[>\#]",
+    force_regex: bool = False,
 ) -> bool:
     """
     Checks if the device is in configuration mode or not.
@@ -395,12 +412,14 @@ 

Methods

-def config_mode(self, config_command='configure terminal', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure terminal', pattern: str = '', re_flags: int = 0) ‑> str
-

Force arista to read pattern all the way to prompt on the next line.

+

Force arista to read pattern all the way to prompt on the next line.

-Source code + +Expand source code +
def config_mode(
     self,
     config_command: str = "configure terminal",
@@ -422,12 +441,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Prepare the session after the connection has been established.

+

Prepare the session after the connection has been established.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Prepare the session after the connection has been established."""
     cmd = "terminal width 511"
@@ -486,12 +507,14 @@ 

Inherited members

class AristaFileTransfer -(ssh_conn, source_file, dest_file, file_system='/mnt/flash', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/mnt/flash', direction: str = 'put', **kwargs: Any)
-

Arista SCP File Transfer driver.

+

Arista SCP File Transfer driver.

-Source code + +Expand source code +
class AristaFileTransfer(CiscoFileTransfer):
     """Arista SCP File Transfer driver."""
 
@@ -580,16 +603,16 @@ 

Inherited members

class AristaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -628,7 +651,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -673,12 +696,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -686,9 +709,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class AristaSSH(AristaBase):
     pass
@@ -750,16 +775,16 @@

Inherited members

class AristaTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -798,7 +823,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -843,12 +868,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -856,9 +881,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class AristaTelnet(AristaBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -960,9 +987,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/arista/index.html b/docs/netmiko/arista/index.html index 6fb17e5a0..b5196e6cd 100644 --- a/docs/netmiko/arista/index.html +++ b/docs/netmiko/arista/index.html @@ -3,15 +3,17 @@ - + netmiko.arista API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.arista

-Source code + +Expand source code +
from netmiko.arista.arista import AristaSSH, AristaTelnet, AristaFileTransfer
 
 __all__ = ["AristaSSH", "AristaTelnet", "AristaFileTransfer"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.arista.arista
-
+
@@ -45,12 +49,14 @@

Classes

class AristaFileTransfer -(ssh_conn, source_file, dest_file, file_system='/mnt/flash', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/mnt/flash', direction: str = 'put', **kwargs: Any)
-

Arista SCP File Transfer driver.

+

Arista SCP File Transfer driver.

-Source code + +Expand source code +
class AristaFileTransfer(CiscoFileTransfer):
     """Arista SCP File Transfer driver."""
 
@@ -139,16 +145,16 @@ 

Inherited members

class AristaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -187,7 +193,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -232,12 +238,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -245,9 +251,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class AristaSSH(AristaBase):
     pass
@@ -309,16 +317,16 @@

Inherited members

class AristaTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -357,7 +365,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -402,12 +410,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -415,9 +423,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class AristaTelnet(AristaBase):
     def __init__(self, *args: Any, **kwargs: Any) -> None:
         default_enter = kwargs.get("default_enter")
@@ -516,9 +526,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/aruba/aruba_ssh.html b/docs/netmiko/aruba/aruba_ssh.html index f6d8f5dd9..20d0d54fb 100644 --- a/docs/netmiko/aruba/aruba_ssh.html +++ b/docs/netmiko/aruba/aruba_ssh.html @@ -3,15 +3,17 @@ - + netmiko.aruba.aruba_ssh API documentation - - - - - + + + + + + +
@@ -23,7 +25,9 @@

Module netmiko.aruba.aruba_ssh

Aruba OS support.

For use with Aruba OS Controllers.

-Source code + +Expand source code +
"""
 Aruba OS support.
 
@@ -55,7 +59,10 @@ 

Module netmiko.aruba.aruba_ssh

self.disable_paging(command="no paging") def check_config_mode( - self, check_string: str = "(config) #", pattern: str = r"[>#]" + self, + check_string: str = "(config) #", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -87,16 +94,16 @@

Classes

class ArubaSSH -(**kwargs) +(**kwargs: Any)
-

Aruba OS support

+

Aruba OS support

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -135,7 +142,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -180,12 +187,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -193,9 +200,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class ArubaSSH(CiscoSSHConnection):
     """Aruba OS support"""
 
@@ -217,7 +226,10 @@ 

Classes

self.disable_paging(command="no paging") def check_config_mode( - self, check_string: str = "(config) #", pattern: str = r"[>#]" + self, + check_string: str = "(config) #", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -246,15 +258,20 @@

Ancestors

Methods

-def check_config_mode(self, check_string='(config) #', pattern='[>#]') +def check_config_mode(self, check_string: str = '(config) #', pattern: str = '[>#]', force_regex: bool = False) ‑> bool
-

Checks if the device is in configuration mode or not.

-

Aruba uses "() (config) #" as config prompt

+

Checks if the device is in configuration mode or not.

+

Aruba uses "() (config) #" as config prompt

-Source code + +Expand source code +
def check_config_mode(
-    self, check_string: str = "(config) #", pattern: str = r"[>#]"
+    self,
+    check_string: str = "(config) #",
+    pattern: str = r"[>#]",
+    force_regex: bool = False,
 ) -> bool:
     """
     Checks if the device is in configuration mode or not.
@@ -265,12 +282,14 @@ 

Methods

-def config_mode(self, config_command='configure term', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure term', pattern: str = '', re_flags: int = 0) ‑> str
-

Aruba auto completes on space so 'configure' needs fully spelled-out.

+

Aruba auto completes on space so 'configure' needs fully spelled-out.

-Source code + +Expand source code +
def config_mode(
     self,
     config_command: str = "configure term",
@@ -284,12 +303,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Aruba OS requires enable mode to disable paging.

+

Aruba OS requires enable mode to disable paging.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Aruba OS requires enable mode to disable paging."""
     # Aruba switches output ansi codes
@@ -377,9 +398,7 @@ 

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/aruba/index.html b/docs/netmiko/aruba/index.html index 6e4b9a538..322d7becb 100644 --- a/docs/netmiko/aruba/index.html +++ b/docs/netmiko/aruba/index.html @@ -3,15 +3,17 @@ - + netmiko.aruba API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.aruba

-Source code + +Expand source code +
from netmiko.aruba.aruba_ssh import ArubaSSH
 
 __all__ = ["ArubaSSH"]
@@ -32,7 +36,7 @@

Sub-modules

netmiko.aruba.aruba_ssh
-

Aruba OS support …

+

Aruba OS support …

@@ -45,16 +49,16 @@

Classes

class ArubaSSH -(**kwargs) +(**kwargs: Any)
-

Aruba OS support

+

Aruba OS support

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -93,7 +97,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class ArubaSSH(CiscoSSHConnection):
     """Aruba OS support"""
 
@@ -175,7 +181,10 @@ 

Classes

self.disable_paging(command="no paging") def check_config_mode( - self, check_string: str = "(config) #", pattern: str = r"[>#]" + self, + check_string: str = "(config) #", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -204,15 +213,20 @@

Ancestors

Methods

-def check_config_mode(self, check_string='(config) #', pattern='[>#]') +def check_config_mode(self, check_string: str = '(config) #', pattern: str = '[>#]', force_regex: bool = False) ‑> bool
-

Checks if the device is in configuration mode or not.

-

Aruba uses "() (config) #" as config prompt

+

Checks if the device is in configuration mode or not.

+

Aruba uses "() (config) #" as config prompt

-Source code + +Expand source code +
def check_config_mode(
-    self, check_string: str = "(config) #", pattern: str = r"[>#]"
+    self,
+    check_string: str = "(config) #",
+    pattern: str = r"[>#]",
+    force_regex: bool = False,
 ) -> bool:
     """
     Checks if the device is in configuration mode or not.
@@ -223,12 +237,14 @@ 

Methods

-def config_mode(self, config_command='configure term', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure term', pattern: str = '', re_flags: int = 0) ‑> str
-

Aruba auto completes on space so 'configure' needs fully spelled-out.

+

Aruba auto completes on space so 'configure' needs fully spelled-out.

-Source code + +Expand source code +
def config_mode(
     self,
     config_command: str = "configure term",
@@ -242,12 +258,14 @@ 

Methods

-def session_preparation(self) +def session_preparation(self) ‑> None
-

Aruba OS requires enable mode to disable paging.

+

Aruba OS requires enable mode to disable paging.

-Source code + +Expand source code +
def session_preparation(self) -> None:
     """Aruba OS requires enable mode to disable paging."""
     # Aruba switches output ansi codes
@@ -340,9 +358,7 @@ 

Aruba

- - \ No newline at end of file diff --git a/docs/netmiko/base_connection.html b/docs/netmiko/base_connection.html index cafaa1d19..1a2544a1f 100644 --- a/docs/netmiko/base_connection.html +++ b/docs/netmiko/base_connection.html @@ -3,15 +3,17 @@ - + netmiko.base_connection API documentation - - - - - + + + + + + +
@@ -25,7 +27,9 @@

Module netmiko.base_connection

platforms (Cisco and non-Cisco).

Also defines methods that should generally be supported by child classes

-Source code + +Expand source code +
"""
 Base connection class for netmiko
 
@@ -1333,10 +1337,7 @@ 

Module netmiko.base_connection

self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -1959,7 +1960,9 @@

Module netmiko.base_connection

raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not. :param check_string: Identification of configuration mode from the device @@ -1974,7 +1977,11 @@

Module netmiko.base_connection

output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output def config_mode( self, config_command: str = "", pattern: str = "", re_flags: int = 0 @@ -2409,12 +2416,14 @@

Module netmiko.base_connection

Functions

-def lock_channel(func) +def lock_channel(func: ~F) ‑> ~F
-
+
-Source code + +Expand source code +
def lock_channel(func: F) -> F:
     @functools.wraps(func)
     def wrapper_decorator(self: "BaseConnection", *args: Any, **kwargs: Any) -> Any:
@@ -2430,12 +2439,14 @@ 

Functions

-def log_writes(func) +def log_writes(func: ~F) ‑> ~F
-

Handle both session_log and log of writes.

+

Handle both session_log and log of writes.

-Source code + +Expand source code +
def log_writes(func: F) -> F:
     """Handle both session_log and log of writes."""
 
@@ -2466,17 +2477,17 @@ 

Classes

class BaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Defines vendor independent methods.

+

Defines vendor independent methods.

Otherwise method left as a stub method.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -2515,7 +2526,7 @@ 

Classes

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -2560,12 +2571,12 @@

Classes

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -2573,9 +2584,11 @@

Classes

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+
-Source code + +Expand source code +
class BaseConnection:
     """
     Defines vendor independent methods.
@@ -3758,10 +3771,7 @@ 

Classes

self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -4384,7 +4394,9 @@

Classes

raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not. :param check_string: Identification of configuration mode from the device @@ -4399,7 +4411,11 @@

Classes

output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output def config_mode( self, config_command: str = "", pattern: str = "", re_flags: int = 0 @@ -4824,10 +4840,10 @@

Classes

Subclasses

  • TelnetConnection
  • -
  • CiscoBaseConnection
  • CheckPointGaiaSSH
  • CienaSaosBase
  • CiscoWlcSSH
  • +
  • CiscoBaseConnection
  • NetscalerSSH
  • DellIsilonSSH
  • EricssonIposSSH
  • @@ -4836,6 +4852,7 @@

    Subclasses

  • JuniperBase
  • JuniperScreenOsSSH
  • NetAppcDotSSH
  • +
  • NokiaSrlSSH
  • NokiaSros
  • PaloAltoPanosBase
  • PluribusSSH
  • @@ -4847,14 +4864,16 @@

    Subclasses

    Static methods

    -def strip_backspaces(output) +def strip_backspaces(output: str) ‑> str
    -

    Strip any backspace characters out of the output.

    +

    Strip any backspace characters out of the output.

    :param output: Output obtained from a remote network device. -:type output: str

    +:type output: str

    -Source code + +Expand source code +
    @staticmethod
     def strip_backspaces(output: str) -> str:
         """Strip any backspace characters out of the output.
    @@ -4870,17 +4889,21 @@ 

    Static methods

    Methods

    -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    :param check_string: Identification of configuration mode from the device :type check_string: str

    :param pattern: Pattern to terminate reading of channel -:type pattern: str

    +:type pattern: str

    -Source code -
    def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not.
     
         :param check_string: Identification of configuration mode from the device
    @@ -4895,18 +4918,24 @@ 

    Methods

    output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output
    + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output
    -def check_enable_mode(self, check_string='') +def check_enable_mode(self, check_string: str = '') ‑> bool
    -

    Check if in enable mode. Return boolean.

    +

    Check if in enable mode. Return boolean.

    :param check_string: Identification of privilege mode from device -:type check_string: str

    +:type check_string: str

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = "") -> bool:
         """Check if in enable mode. Return boolean.
     
    @@ -4919,24 +4948,28 @@ 

    Methods

    -def cleanup(self, command='') +def cleanup(self, command: str = '') ‑> None
    -

    Logout of the session on the network device plus any additional cleanup.

    +

    Logout of the session on the network device plus any additional cleanup.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "") -> None:
         """Logout of the session on the network device plus any additional cleanup."""
         pass
    -def clear_buffer(self, backoff=True, backoff_max=3.0, delay_factor=None) +def clear_buffer(self, backoff: bool = True, backoff_max: float = 3.0, delay_factor: Optional[float] = None) ‑> str
    -

    Read any data available in the channel.

    +

    Read any data available in the channel.

    -Source code + +Expand source code +
    def clear_buffer(
         self,
         backoff: bool = True,
    @@ -4966,12 +4999,14 @@ 

    Methods

    -def command_echo_read(self, cmd, read_timeout) +def command_echo_read(self, cmd: str, read_timeout: float) ‑> str
    -
    +
    -Source code + +Expand source code +
    def command_echo_read(self, cmd: str, read_timeout: float) -> str:
     
         # Make sure you read until you detect the command echo (avoid getting out of sync)
    @@ -4992,30 +5027,34 @@ 

    Methods

    -def commit(self) +def commit(self) ‑> str
    -

    Commit method for platforms that support this.

    +

    Commit method for platforms that support this.

    -Source code + +Expand source code +
    def commit(self) -> str:
         """Commit method for platforms that support this."""
         raise AttributeError("Network device does not support 'commit()' method")
    -def config_mode(self, config_command='', pattern='', re_flags=0) +def config_mode(self, config_command: str = '', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter into config_mode.

    +

    Enter into config_mode.

    :param config_command: Configuration command to send to the device :type config_command: str

    :param pattern: Pattern to terminate reading of channel :type pattern: str

    :param re_flags: Regular expression flags -:type re_flags: RegexFlag

    +:type re_flags: RegexFlag

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -5048,14 +5087,16 @@ 

    Methods

    -def disable_paging(self, command='terminal length 0', delay_factor=None, cmd_verify=True, pattern=None) +def disable_paging(self, command: str = 'terminal length 0', delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str
    -

    Disable paging default to a Cisco CLI method.

    +

    Disable paging default to a Cisco CLI method.

    :param command: Device command to disable pagination of output

    -

    :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def disable_paging(
         self,
         command: str = "terminal length 0",
    @@ -5091,12 +5132,14 @@ 

    Methods

    -def disconnect(self) +def disconnect(self) ‑> None
    -

    Try to gracefully close the session.

    +

    Try to gracefully close the session.

    -Source code + +Expand source code +
    def disconnect(self) -> None:
         """Try to gracefully close the session."""
         try:
    @@ -5120,16 +5163,18 @@ 

    Methods

    -def enable(self, cmd='', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = '', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enter enable mode.

    +

    Enter enable mode.

    :param cmd: Device command to enter enable mode

    :param pattern: pattern to search for indicating device is waiting for password

    :param enable_pattern: pattern indicating you have entered enable mode

    -

    :param re_flags: Regular expression flags used in conjunction with pattern

    +

    :param re_flags: Regular expression flags used in conjunction with pattern

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "",
    @@ -5186,18 +5231,20 @@ 

    Methods

    -def establish_connection(self, width=511, height=1000) +def establish_connection(self, width: int = 511, height: int = 1000) ‑> None
    -

    Establish SSH connection to the network device

    +

    Establish SSH connection to the network device

    Timeout will generate a NetmikoTimeoutException Authentication failure will generate a NetmikoAuthenticationException

    :param width: Specified width of the VT100 terminal window (default: 511) :type width: int

    :param height: Specified height of the VT100 terminal window (default: 1000) -:type height: int

    +:type height: int

    -Source code + +Expand source code +
        def establish_connection(self, width: int = 511, height: int = 1000) -> None:
             """Establish SSH connection to the network device
     
    @@ -5308,16 +5355,18 @@ 

    Methods

    -def exit_config_mode(self, exit_config='', pattern='') +def exit_config_mode(self, exit_config: str = '', pattern: str = '') ‑> str
    -

    Exit from configuration mode.

    +

    Exit from configuration mode.

    :param exit_config: Command to exit configuration mode :type exit_config: str

    :param pattern: Pattern to terminate reading of channel -:type pattern: str

    +:type pattern: str

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
         """Exit from configuration mode.
     
    @@ -5346,14 +5395,16 @@ 

    Methods

    -def exit_enable_mode(self, exit_command='') +def exit_enable_mode(self, exit_command: str = '') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    :param exit_command: Command that exits the session from privileged mode -:type exit_command: str

    +:type exit_command: str

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "") -> str:
         """Exit enable mode.
     
    @@ -5370,15 +5421,17 @@ 

    Methods

    -def find_prompt(self, delay_factor=1.0, pattern=None) +def find_prompt(self, delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Finds the current network device prompt, last line only.

    +

    Finds the current network device prompt, last line only.

    :param delay_factor: See init: global_delay_factor :type delay_factor: int

    -

    :param pattern: Regular expression pattern to determine whether prompt is valid

    +

    :param pattern: Regular expression pattern to determine whether prompt is valid

    -Source code + +Expand source code +
    def find_prompt(
         self, delay_factor: float = 1.0, pattern: Optional[str] = None
     ) -> str:
    @@ -5395,10 +5448,7 @@ 

    Methods

    self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -5428,12 +5478,14 @@

    Methods

    -def is_alive(self) +def is_alive(self) ‑> bool
    -

    Returns a boolean flag with the state of the connection.

    +

    Returns a boolean flag with the state of the connection.

    -Source code + +Expand source code +
    def is_alive(self) -> bool:
         """Returns a boolean flag with the state of the connection."""
         null = chr(0)
    @@ -5473,14 +5525,16 @@ 

    Methods

    -def normalize_cmd(self, command) +def normalize_cmd(self, command: str) ‑> str
    -

    Normalize CLI commands to have a single trailing newline.

    +

    Normalize CLI commands to have a single trailing newline.

    :param command: Command that may require line feed to be normalized -:type command: str

    +:type command: str

    -Source code + +Expand source code +
    def normalize_cmd(self, command: str) -> str:
         """Normalize CLI commands to have a single trailing newline.
     
    @@ -5493,20 +5547,22 @@ 

    Methods

    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Convert `

    +

    Convert `

    , -,

    -

    to +,

    +

    to .`

        :param a_string: A string that may have non-normalized line feeds
             i.e. output returned from device, or a device prompt
         :type a_string: str
    -
    +
    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Convert `\r\r\n`,`\r\n`, `\n\r` to `\n.`
     
    @@ -5524,12 +5580,14 @@ 

    Methods

    -def paramiko_cleanup(self) +def paramiko_cleanup(self) ‑> None
    -

    Cleanup Paramiko to try to gracefully handle SSH session ending.

    +

    Cleanup Paramiko to try to gracefully handle SSH session ending.

    -Source code + +Expand source code +
    def paramiko_cleanup(self) -> None:
         """Cleanup Paramiko to try to gracefully handle SSH session ending."""
         if self.remote_conn_pre is not None:
    @@ -5538,12 +5596,14 @@ 

    Methods

    -def read_channel(self) +def read_channel(self) ‑> str
    -

    Generic handler that will read all the data from given channel.

    +

    Generic handler that will read all the data from given channel.

    -Source code + +Expand source code +
    @lock_channel
     def read_channel(self) -> str:
         """Generic handler that will read all the data from given channel."""
    @@ -5566,10 +5626,10 @@ 

    Methods

    -def read_channel_timing(self, last_read=2.0, read_timeout=120.0, delay_factor=None, max_loops=None) +def read_channel_timing(self, last_read: float = 2.0, read_timeout: float = 120.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None) ‑> str
    -

    Read data on the channel based on timing delays.

    +

    Read data on the channel based on timing delays.

    General pattern is keep reading until no new data is read. Once no new data is read wait last_read amount of time (one last read). As long as no new data, then return data.

    @@ -5579,9 +5639,11 @@

    Methods

    on an absolute timeout. It will only complete based on timeout based on their being no new data.

    :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -

    :param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    :param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
        def read_channel_timing(
             self,
             last_read: float = 2.0,
    @@ -5654,10 +5716,10 @@ 

    Methods

    -def read_until_pattern(self, pattern='', read_timeout=10.0, re_flags=0, max_loops=None) +def read_until_pattern(self, pattern: str = '', read_timeout: float = 10.0, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
    -

    Read channel until pattern is detected.

    +

    Read channel until pattern is detected.

    Will return string up to and including pattern.

    Returns ReadTimeout if pattern not detected in read_timeout seconds.

    :param pattern: Regular expression pattern used to identify that reading is done.

    @@ -5665,9 +5727,11 @@

    Methods

    A read_timeout value of 0 will cause the loop to never timeout (i.e. it will keep reading indefinitely until pattern is detected.

    :param re_flags: regex flags used in conjunction with pattern (defaults to no flags).

    -

    :param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    :param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
        def read_until_pattern(
             self,
             pattern: str = "",
    @@ -5748,12 +5812,14 @@ 

    Methods

    -def read_until_prompt(self, read_timeout=10.0, read_entire_line=False, re_flags=0, max_loops=None) +def read_until_prompt(self, read_timeout: float = 10.0, read_entire_line: bool = False, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
    -

    Read channel up to and including self.base_prompt.

    +

    Read channel up to and including self.base_prompt.

    -Source code + +Expand source code +
    def read_until_prompt(
         self,
         read_timeout: float = 10.0,
    @@ -5774,12 +5840,14 @@ 

    Methods

    -def read_until_prompt_or_pattern(self, pattern='', read_timeout=10.0, read_entire_line=False, re_flags=0, max_loops=None) +def read_until_prompt_or_pattern(self, pattern: str = '', read_timeout: float = 10.0, read_entire_line: bool = False, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
    -

    Read until either self.base_prompt or pattern is detected.

    +

    Read until either self.base_prompt or pattern is detected.

    -Source code + +Expand source code +
    def read_until_prompt_or_pattern(
         self,
         pattern: str = "",
    @@ -5805,10 +5873,10 @@ 

    Methods

    -def run_ttp(self, template, res_kwargs=None, **kwargs) +def run_ttp(self, template: Union[str, bytes, ForwardRef('PathLike[Any]')], res_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any) ‑> Any
    -

    Run TTP template parsing by using input parameters to collect +

    Run TTP template parsing by using input parameters to collect devices output.

    :param template: template content, OS path to template or reference to template within TTP templates collection in @@ -5821,9 +5889,11 @@

    Methods

    :param commands: list of commands to collect

    Inputs' load could be of one of the supported formats and controlled by input's load attribute, supported values - python, yaml or json. For each input output collected -from device and parsed accordingly.

    +from device and parsed accordingly.

    -Source code + +Expand source code +
    def run_ttp(
         self,
         template: Union[str, bytes, "PathLike[Any]"],
    @@ -5862,12 +5932,14 @@ 

    Methods

    -def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -5876,15 +5948,17 @@ 

    Methods

    -def select_delay_factor(self, delay_factor) +def select_delay_factor(self, delay_factor: float) ‑> float
    -

    Choose the greater of delay_factor or self.global_delay_factor (default). +

    Choose the greater of delay_factor or self.global_delay_factor (default). In fast_cli choose the lesser of delay_factor of self.global_delay_factor.

    :param delay_factor: See init: global_delay_factor -:type delay_factor: int

    +:type delay_factor: int

    -Source code + +Expand source code +
    def select_delay_factor(self, delay_factor: float) -> float:
         """
         Choose the greater of delay_factor or self.global_delay_factor (default).
    @@ -5906,10 +5980,10 @@ 

    Methods

    -def send_command(self, command_string, expect_string=None, read_timeout=10.0, delay_factor=None, max_loops=None, auto_find_prompt=True, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=True) +def send_command(self, command_string: str, expect_string: Optional[str] = None, read_timeout: float = 10.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, auto_find_prompt: bool = True, strip_prompt: bool = True, strip_command: bool = True, normalize: bool = True, use_textfsm: bool = False, textfsm_template: Optional[str] = None, use_ttp: bool = False, ttp_template: Optional[str] = None, use_genie: bool = False, cmd_verify: bool = True) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Execute command_string on the SSH channel using a pattern-based mechanism. Generally +

    Execute command_string on the SSH channel using a pattern-based mechanism. Generally used for show commands. By default this method will keep waiting to receive data until the network device prompt is detected. The current network device prompt will be determined automatically.

    @@ -5928,9 +6002,11 @@

    Methods

    :param ttp_template: Name of template to parse output with; can be fully qualified path, relative path, or name of file in current directory. (default: None).

    :param use_genie: Process command output through PyATS/Genie parser (default: False).

    -

    :param cmd_verify: Verify command echo before proceeding (default: True).

    +

    :param cmd_verify: Verify command echo before proceeding (default: True).

    -Source code + +Expand source code +
        @select_cmd_verify
         def send_command(
             self,
    @@ -6123,12 +6199,14 @@ 

    Methods

    -def send_command_expect(self, *args, **kwargs) +def send_command_expect(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Support previous name of send_command method.

    +

    Support previous name of send_command method.

    -Source code + +Expand source code +
    def send_command_expect(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -6137,10 +6215,10 @@ 

    Methods

    -def send_command_timing(self, command_string, last_read=2.0, read_timeout=120.0, delay_factor=None, max_loops=None, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=False) +def send_command_timing(self, command_string: str, last_read: float = 2.0, read_timeout: float = 120.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = True, strip_command: bool = True, normalize: bool = True, use_textfsm: bool = False, textfsm_template: Optional[str] = None, use_ttp: bool = False, ttp_template: Optional[str] = None, use_genie: bool = False, cmd_verify: bool = False) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Execute command_string on the SSH channel using a delay-based mechanism. Generally +

    Execute command_string on the SSH channel using a delay-based mechanism. Generally used for show commands.

    :param command_string: The command to be executed on the remote device.

    :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    @@ -6155,9 +6233,11 @@

    Methods

    :param ttp_template: Name of template to parse output with; can be fully qualified path, relative path, or name of file in current directory. (default: None).

    :param use_genie: Process command output through PyATS/Genie parser (default: False).

    -

    :param cmd_verify: Verify command echo before proceeding (default: False).

    +

    :param cmd_verify: Verify command echo before proceeding (default: False).

    -Source code + +Expand source code +
    @select_cmd_verify
     def send_command_timing(
         self,
    @@ -6242,17 +6322,19 @@ 

    Methods

    -def send_config_from_file(self, config_file, **kwargs) +def send_config_from_file(self, config_file: Union[str, bytes, ForwardRef('PathLike[Any]')], **kwargs: Any) ‑> str
    -

    Send configuration commands down the SSH channel from a file.

    +

    Send configuration commands down the SSH channel from a file.

    The file is processed line-by-line and each command is sent down the SSH channel.

    **kwargs are passed to send_config_set method.

    :param config_file: Path to configuration file to be sent to the device

    -

    :param kwargs: params to be sent to send_config_set method

    +

    :param kwargs: params to be sent to send_config_set method

    -Source code + +Expand source code +
    def send_config_from_file(
         self, config_file: Union[str, bytes, "PathLike[Any]"], **kwargs: Any
     ) -> str:
    @@ -6274,10 +6356,10 @@ 

    Methods

    -def send_config_set(self, config_commands=None, *, exit_config_mode=True, read_timeout=None, delay_factor=None, max_loops=None, strip_prompt=False, strip_command=False, config_mode_command=None, cmd_verify=True, enter_config_mode=True, error_pattern='', terminator='#', bypass_commands=None) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = False, strip_command: bool = False, config_mode_command: Optional[str] = None, cmd_verify: bool = True, enter_config_mode: bool = True, error_pattern: str = '', terminator: str = '#', bypass_commands: Optional[str] = None) ‑> str
    -

    Send configuration commands down the SSH channel.

    +

    Send configuration commands down the SSH channel.

    config_commands is an iterable containing all of the configuration commands. The commands will be executed one after the other.

    Automatically exits/enters configuration mode.

    @@ -6296,9 +6378,11 @@

    Methods

    :param terminator: Regular expression pattern to use as an alternate terminator in certain situations.

    :param bypass_commands: Regular expression pattern indicating configuration commands -where cmd_verify is automatically disabled.

    +where cmd_verify is automatically disabled.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -6459,18 +6543,20 @@ 

    Methods

    -def send_multiline(self, commands, multiline=True, **kwargs) +def send_multiline(self, commands: Sequence[Union[str, List[str]]], multiline: bool = True, **kwargs: Any) ‑> str
    -

    commands should either be:

    +

    commands should either be:

    commands = [[cmd1, expect1], [cmd2, expect2], …]]

    Or

    commands = [cmd1, cmd2, cmd3, …]

    Any expect_string that is a null-string will use pattern based on device's prompt (unless expect_string argument is passed in via -kwargs.

    +kwargs.

    -Source code + +Expand source code +
    def send_multiline(
         self,
         commands: Sequence[Union[str, List[str]]],
    @@ -6521,12 +6607,14 @@ 

    Methods

    -def send_multiline_timing(self, commands, multiline=True, **kwargs) +def send_multiline_timing(self, commands: Sequence[str], multiline: bool = True, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def send_multiline_timing(
         self, commands: Sequence[str], multiline: bool = True, **kwargs: Any
     ) -> str:
    @@ -6540,12 +6628,14 @@ 

    Methods

    -def serial_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:[Uu]ser:|sername|ogin)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def serial_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:[Uu]ser:|sername|ogin)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -
    +
    -Source code + +Expand source code +
    def serial_login(
         self,
         pri_prompt_terminator: str = r"#\s*$",
    @@ -6566,19 +6656,21 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    +

    Prepare the session after the connection has been established

    This method handles some differences that occur between various devices early on in the session.

    In general, it should include: self._test_channel_read(pattern=r"some_pattern") self.set_base_prompt() self.set_terminal_width() -self.disable_paging()

    +self.disable_paging()

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -6599,10 +6691,10 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt

    +

    Sets self.base_prompt

    Used as delimiter for stripping of trailing prompt in output.

    Should be set to something that is general and applies in multiple contexts. For Cisco devices this will be set to router hostname (i.e. prompt without > or #).

    @@ -6611,9 +6703,11 @@

    Methods

    :param pri_prompt_terminator: Primary trailing delimiter for identifying a device prompt

    :param alt_prompt_terminator: Alternate trailing delimiter for identifying a device prompt

    :param delay_factor: See init: global_delay_factor

    -

    :param pattern: Regular expression pattern to search for in find_prompt() call

    +

    :param pattern: Regular expression pattern to search for in find_prompt() call

    -Source code + +Expand source code +
    @retry(
         wait=wait_exponential(multiplier=0.33, min=0, max=5),
         stop=stop_after_attempt(5),
    @@ -6667,16 +6761,18 @@ 

    Methods

    -def set_terminal_width(self, command='', delay_factor=None, cmd_verify=False, pattern=None) +def set_terminal_width(self, command: str = '', delay_factor: Optional[float] = None, cmd_verify: bool = False, pattern: Optional[str] = None) ‑> str
    -

    CLI terminals try to automatically adjust the line based on the width of the terminal. +

    CLI terminals try to automatically adjust the line based on the width of the terminal. This causes the output to get distorted when accessed programmatically.

    Set terminal width to 511 which works on a broad set of devices.

    :param command: Command string to send to the device

    -

    :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def set_terminal_width(
         self,
         command: str = "",
    @@ -6712,22 +6808,24 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Handler for devices like WLC, Extreme ERS that throw up characters prior to login.

    +

    Handler for devices like WLC, Extreme ERS that throw up characters prior to login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Handler for devices like WLC, Extreme ERS that throw up characters prior to login."""
         pass
    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Remove any ANSI (VT100) ESC codes from the output

    +

    Remove any ANSI (VT100) ESC codes from the output

    http://en.wikipedia.org/wiki/ANSI_escape_code

    Note: this does not capture ALL possible ANSI Escape Codes only the ones I have encountered

    @@ -6763,9 +6861,11 @@

    Methods

    very bottom of the screen).

    HP ProCurve and Cisco SG300 require this (possible others).

    :param string_buffer: The string to be processed to remove ANSI escape codes -:type string_buffer: str

    +:type string_buffer: str

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """
         Remove any ANSI (VT100) ESC codes from the output
    @@ -6878,17 +6978,19 @@ 

    Methods

    -def strip_command(self, command_string, output) +def strip_command(self, command_string: str, output: str) ‑> str
    -

    Strip command_string from output string

    +

    Strip command_string from output string

    Cisco IOS adds backspaces into output for long commands (i.e. for commands that line wrap)

    :param command_string: The command string sent to the device :type command_string: str

    :param output: The returned output as a result of the command string sent to the device -:type output: str

    +:type output: str

    -Source code + +Expand source code +
    def strip_command(self, command_string: str, output: str) -> str:
         """
         Strip command_string from output string
    @@ -6920,14 +7022,16 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    :param a_string: Returned string from device -:type a_string: str

    +:type a_string: str

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip the trailing router prompt from the output.
     
    @@ -6944,17 +7048,19 @@ 

    Methods

    -def telnet_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    Telnet login. Can be username/password or just password.

    +

    Telnet login. Can be username/password or just password.

    :param pri_prompt_terminator: Primary trailing delimiter for identifying a device prompt

    :param alt_prompt_terminator: Alternate trailing delimiter for identifying a device prompt

    :param username_pattern: Pattern used to identify the username prompt

    :param delay_factor: See init: global_delay_factor

    -

    :param max_loops: Controls the wait time in conjunction with the delay_factor

    +

    :param max_loops: Controls the wait time in conjunction with the delay_factor

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"#\s*$",
    @@ -7046,14 +7152,16 @@ 

    Methods

    -def write_channel(self, out_data) +def write_channel(self, out_data: str) ‑> None
    -

    Generic method that will write data out the channel.

    +

    Generic method that will write data out the channel.

    :param out_data: data to be written to the channel -:type out_data: str

    +:type out_data: str

    -Source code + +Expand source code +
    @lock_channel
     @log_writes
     def write_channel(self, out_data: str) -> None:
    @@ -7069,10 +7177,10 @@ 

    Methods

    class SecretsFilter -(no_log=None) +(no_log: Optional[Dict[Any, str]] = None)
    -

    Filter instances are used to perform arbitrary filtering of LogRecords.

    +

    Filter instances are used to perform arbitrary filtering of LogRecords.

    Loggers and Handlers can optionally use Filter instances to filter records as desired. The base filter class only allows events which are below a certain point in the logger hierarchy. For example, a filter @@ -7082,9 +7190,11 @@

    Methods

    Initialize a filter.

    Initialize with the name of the logger which, together with its children, will have its events allowed through the filter. If no -name is specified, allow every event.

    +name is specified, allow every event.

    -Source code + +Expand source code +
    class SecretsFilter(logging.Filter):
         def __init__(self, no_log: Optional[Dict[Any, str]] = None) -> None:
             self.no_log = no_log
    @@ -7103,12 +7213,14 @@ 

    Ancestors

    Methods

    -def filter(self, record) +def filter(self, record: logging.LogRecord) ‑> bool
    -

    Removes secrets (no_log) from messages

    +

    Removes secrets (no_log) from messages

    -Source code + +Expand source code +
    def filter(self, record: logging.LogRecord) -> bool:
         """Removes secrets (no_log) from messages"""
         if self.no_log:
    @@ -7121,17 +7233,17 @@ 

    Methods

    class TelnetConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -7170,7 +7282,7 @@ 

    Methods

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -7215,12 +7327,12 @@

    Methods

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -7228,9 +7340,11 @@

    Methods

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TelnetConnection(BaseConnection):
         pass
    @@ -7373,9 +7487,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/broadcom/broadcom_icos_ssh.html b/docs/netmiko/broadcom/broadcom_icos_ssh.html index 381e7153d..049871dcb 100644 --- a/docs/netmiko/broadcom/broadcom_icos_ssh.html +++ b/docs/netmiko/broadcom/broadcom_icos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.broadcom.broadcom_icos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.broadcom.broadcom_icos_ssh

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoSSHConnection
     
     
    @@ -39,7 +43,9 @@ 

    Module netmiko.broadcom.broadcom_icos_ssh

    self.set_terminal_width() self.disable_paging() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -82,17 +88,17 @@

    Classes

    class BroadcomIcosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Broadcom Icos devices. +

    Implements support for Broadcom Icos devices. Syntax its almost identical to Cisco IOS in most cases

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -131,7 +137,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -176,12 +182,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -189,9 +195,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class BroadcomIcosSSH(CiscoSSHConnection):
         """
         Implements support for Broadcom Icos devices.
    @@ -206,7 +214,9 @@ 

    Classes

    self.set_terminal_width() self.disable_paging() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -246,24 +256,30 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +def check_config_mode(self, check_string: str = ')#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -274,36 +290,42 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config)
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
         return super().exit_enable_mode(exit_command=exit_command)
    -def save_config(self, cmd='write memory', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -393,9 +415,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/broadcom/index.html b/docs/netmiko/broadcom/index.html index f5a71b448..9678f9f85 100644 --- a/docs/netmiko/broadcom/index.html +++ b/docs/netmiko/broadcom/index.html @@ -3,15 +3,17 @@ - + netmiko.broadcom API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.broadcom

    -Source code + +Expand source code +
    from netmiko.broadcom.broadcom_icos_ssh import BroadcomIcosSSH
     
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.broadcom.broadcom_icos_ssh
    -
    +
    @@ -46,17 +50,17 @@

    Classes

    class BroadcomIcosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Broadcom Icos devices. +

    Implements support for Broadcom Icos devices. Syntax its almost identical to Cisco IOS in most cases

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -95,7 +99,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -140,12 +144,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -153,9 +157,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class BroadcomIcosSSH(CiscoSSHConnection):
         """
         Implements support for Broadcom Icos devices.
    @@ -170,7 +176,9 @@ 

    Classes

    self.set_terminal_width() self.disable_paging() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -210,24 +218,30 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +def check_config_mode(self, check_string: str = ')#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -238,36 +252,42 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config)
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
         return super().exit_enable_mode(exit_command=exit_command)
    -def save_config(self, cmd='write memory', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -362,9 +382,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/brocade/brocade_fos_ssh.html b/docs/netmiko/brocade/brocade_fos_ssh.html index 74842c86d..baba6eb52 100644 --- a/docs/netmiko/brocade/brocade_fos_ssh.html +++ b/docs/netmiko/brocade/brocade_fos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.brocade.brocade_fos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.brocade.brocade_fos_ssh

    -Source code + +Expand source code +
    from typing import Any
     from netmiko.no_enable import NoEnable
     from netmiko.no_config import NoConfig
    @@ -52,12 +56,14 @@ 

    Classes

    class BrocadeFOSSSH -(**kwargs) +(**kwargs: Any)
    -

    Brocade Fabric OS support

    +

    Brocade Fabric OS support

    -Source code + +Expand source code +
    class BrocadeFOSSSH(NoEnable, NoConfig, CiscoSSHConnection):
         """Brocade Fabric OS support"""
     
    @@ -152,9 +158,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/brocade/index.html b/docs/netmiko/brocade/index.html index 2fddb4882..0502c7455 100644 --- a/docs/netmiko/brocade/index.html +++ b/docs/netmiko/brocade/index.html @@ -3,15 +3,17 @@ - + netmiko.brocade API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.brocade

    -Source code + +Expand source code +
    from netmiko.brocade.brocade_fos_ssh import BrocadeFOSSSH
     
     __all__ = ["BrocadeFOSSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.brocade.brocade_fos_ssh
    -
    +
    @@ -45,12 +49,14 @@

    Classes

    class BrocadeFOSSSH -(**kwargs) +(**kwargs: Any)
    -

    Brocade Fabric OS support

    +

    Brocade Fabric OS support

    -Source code + +Expand source code +
    class BrocadeFOSSSH(NoEnable, NoConfig, CiscoSSHConnection):
         """Brocade Fabric OS support"""
     
    @@ -150,9 +156,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/calix/calix_b6.html b/docs/netmiko/calix/calix_b6.html index 0f2cf600e..3c04e691d 100644 --- a/docs/netmiko/calix/calix_b6.html +++ b/docs/netmiko/calix/calix_b6.html @@ -3,15 +3,17 @@ - + netmiko.calix.calix_b6 API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.calix.calix_b6

    Calix B6 SSH Driver for Netmiko

    -Source code + +Expand source code +
    """Calix B6 SSH Driver for Netmiko"""
     from typing import Any
     import time
    @@ -87,7 +91,9 @@ 

    Module netmiko.calix.calix_b6

    """ raise NetmikoTimeoutException(msg) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string) @@ -146,16 +152,16 @@

    Classes

    class CalixB6Base -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Common methods for Calix B6, both SSH and Telnet.

    +

    Common methods for Calix B6, both SSH and Telnet.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -194,7 +200,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -239,12 +245,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -252,9 +258,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CalixB6Base(CiscoSSHConnection):
         """Common methods for Calix B6, both SSH and Telnet."""
     
    @@ -307,7 +315,9 @@ 

    Classes

    """ raise NetmikoTimeoutException(msg) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string) @@ -335,24 +345,30 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +def check_config_mode(self, check_string: str = ')#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode

    +

    Checks if the device is in configuration mode

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode"""
         return super().check_config_mode(check_string=check_string)
    -def session_preparation(self) +def session_preparation(self) ‑> Any
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> Any:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -363,14 +379,16 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Calix B6 presents with the following on login:

    +

    Calix B6 presents with the following on login:

    login as: -Password: ****

    +Password: ****

    -Source code + +Expand source code +
        def special_login_handler(self, delay_factor: float = 1.0) -> None:
             """
             Calix B6 presents with the following on login:
    @@ -457,18 +475,18 @@ 

    Inherited members

    class CalixB6SSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Calix B6 SSH Driver.

    +

    Calix B6 SSH Driver.

    To make it work, we have to override the SSHClient _auth method and manually handle the username/password.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -507,7 +525,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -552,12 +570,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -565,9 +583,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CalixB6SSH(CalixB6Base):
         """Calix B6 SSH Driver.
     
    @@ -652,16 +672,16 @@ 

    Inherited members

    class CalixB6Telnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Calix B6 Telnet Driver.

    +

    Calix B6 Telnet Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -700,7 +720,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -745,12 +765,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -758,9 +778,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CalixB6Telnet(CalixB6Base):
         """Calix B6 Telnet Driver."""
     
    @@ -858,9 +880,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/calix/index.html b/docs/netmiko/calix/index.html index 254b35f05..0ae4964bc 100644 --- a/docs/netmiko/calix/index.html +++ b/docs/netmiko/calix/index.html @@ -3,15 +3,17 @@ - + netmiko.calix API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.calix

    -Source code + +Expand source code +
    from netmiko.calix.calix_b6 import CalixB6SSH, CalixB6Telnet
     
     __all__ = ["CalixB6SSH", "CalixB6Telnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.calix.calix_b6
    -

    Calix B6 SSH Driver for Netmiko

    +

    Calix B6 SSH Driver for Netmiko

    @@ -45,18 +49,18 @@

    Classes

    class CalixB6SSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Calix B6 SSH Driver.

    +

    Calix B6 SSH Driver.

    To make it work, we have to override the SSHClient _auth method and manually handle the username/password.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -95,7 +99,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -140,12 +144,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -153,9 +157,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CalixB6SSH(CalixB6Base):
         """Calix B6 SSH Driver.
     
    @@ -240,16 +246,16 @@ 

    Inherited members

    class CalixB6Telnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Calix B6 Telnet Driver.

    +

    Calix B6 Telnet Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -288,7 +294,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -333,12 +339,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -346,9 +352,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CalixB6Telnet(CalixB6Base):
         """Calix B6 Telnet Driver."""
     
    @@ -443,9 +451,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cdot/cdot_cros_ssh.html b/docs/netmiko/cdot/cdot_cros_ssh.html index b476d4ebf..2a7a0f147 100644 --- a/docs/netmiko/cdot/cdot_cros_ssh.html +++ b/docs/netmiko/cdot/cdot_cros_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cdot.cdot_cros_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cdot.cdot_cros_ssh

    -Source code + +Expand source code +
    #!/usr/bin/env python
     # CDOT = Centre for Development of Telematics, India
     # CROS = CDOT Router OS
    @@ -63,7 +67,10 @@ 

    Module netmiko.cdot.cdot_cros_ssh

    ) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -150,16 +157,16 @@

    Classes

    class CdotCrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with CROS network devices.

    +

    Implement methods for interacting with CROS network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -198,7 +205,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -243,12 +250,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -256,9 +263,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CdotCrosSSH(NoEnable, CiscoBaseConnection):
         """Implement methods for interacting with CROS network devices."""
     
    @@ -283,7 +292,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -367,33 +379,40 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[#\\$]') +def check_config_mode(self, check_string: str = ')#', pattern: str = '[#\\$]', force_regex: bool = False) ‑> bool
    -

    Checks if device is in configuration mode

    +

    Checks if device is in configuration mode

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[#\$]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[#\$]",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None, and_quit=True) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None, and_quit: bool = True) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -443,12 +462,14 @@ 

    Methods

    -def config_mode(self, config_command='config', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'config', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "config", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -459,12 +480,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    CROS requires you not exit from configuration mode.

    +

    CROS requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -478,12 +501,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[#\$]")
    @@ -571,9 +596,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cdot/index.html b/docs/netmiko/cdot/index.html index 3237ca26a..90985abf4 100644 --- a/docs/netmiko/cdot/index.html +++ b/docs/netmiko/cdot/index.html @@ -3,15 +3,17 @@ - + netmiko.cdot API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cdot

    -Source code + +Expand source code +
    from netmiko.cdot.cdot_cros_ssh import CdotCrosSSH
     
     __all__ = ["CdotCrosSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.cdot.cdot_cros_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class CdotCrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with CROS network devices.

    +

    Implement methods for interacting with CROS network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CdotCrosSSH(NoEnable, CiscoBaseConnection):
         """Implement methods for interacting with CROS network devices."""
     
    @@ -178,7 +184,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -262,33 +271,40 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[#\\$]') +def check_config_mode(self, check_string: str = ')#', pattern: str = '[#\\$]', force_regex: bool = False) ‑> bool
    -

    Checks if device is in configuration mode

    +

    Checks if device is in configuration mode

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[#\$]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[#\$]",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None, and_quit=True) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None, and_quit: bool = True) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -338,12 +354,14 @@ 

    Methods

    -def config_mode(self, config_command='config', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'config', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "config", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -354,12 +372,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    CROS requires you not exit from configuration mode.

    +

    CROS requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -373,12 +393,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[#\$]")
    @@ -471,9 +493,7 @@ 

    C

    - - \ No newline at end of file diff --git a/docs/netmiko/centec/centec_os.html b/docs/netmiko/centec/centec_os.html index 2c7233d15..1caeec650 100644 --- a/docs/netmiko/centec/centec_os.html +++ b/docs/netmiko/centec/centec_os.html @@ -3,15 +3,17 @@ - + netmiko.centec.centec_os API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.centec.centec_os

    Centec OS Support

    -Source code + +Expand source code +
    """Centec OS Support"""
     from netmiko.cisco_base_connection import CiscoBaseConnection
     
    @@ -64,16 +68,16 @@ 

    Classes

    class CentecOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -112,7 +116,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -157,12 +161,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -170,9 +174,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CentecOSBase(CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -201,12 +207,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save config: write

    +

    Save config: write

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -217,12 +225,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -280,16 +290,16 @@ 

    Inherited members

    class CentecOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -328,7 +338,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -373,12 +383,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -386,9 +396,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CentecOSSSH(CentecOSBase):
     
         pass
    @@ -450,16 +462,16 @@

    Inherited members

    class CentecOSTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -498,7 +510,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -543,12 +555,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -556,9 +568,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CentecOSTelnet(CentecOSBase):
     
         pass
    @@ -653,9 +667,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/centec/index.html b/docs/netmiko/centec/index.html index ae0adcdc8..d0e2ef76a 100644 --- a/docs/netmiko/centec/index.html +++ b/docs/netmiko/centec/index.html @@ -3,15 +3,17 @@ - + netmiko.centec API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.centec

    -Source code + +Expand source code +
    from netmiko.centec.centec_os import CentecOSSSH, CentecOSTelnet
     
     __all__ = ["CentecOSSSH", "CentecOSTelnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.centec.centec_os
    -

    Centec OS Support

    +

    Centec OS Support

    @@ -45,16 +49,16 @@

    Classes

    class CentecOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CentecOSSSH(CentecOSBase):
     
         pass
    @@ -215,16 +221,16 @@

    Inherited members

    class CentecOSTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -263,7 +269,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -308,12 +314,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -321,9 +327,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
-Source code + +Expand source code +
class CentecOSTelnet(CentecOSBase):
 
     pass
@@ -416,9 +424,7 @@

-

Generated by pdoc 0.6.3.

+

Generated by pdoc 0.10.0.

- - \ No newline at end of file diff --git a/docs/netmiko/channel.html b/docs/netmiko/channel.html index 4ca1f8906..f5e635a2d 100644 --- a/docs/netmiko/channel.html +++ b/docs/netmiko/channel.html @@ -3,15 +3,17 @@ - + netmiko.channel API documentation - - - - - + + + + + + +
@@ -21,7 +23,9 @@

Module netmiko.channel

-Source code + +Expand source code +
from typing import Any, Optional
 from abc import ABC, abstractmethod
 import paramiko
@@ -202,14 +206,16 @@ 

Classes

class Channel -(*args, **kwargs) +(*args: Any, **kwargs: Any)
-

Helper class that provides a standard way to create an ABC using +

Helper class that provides a standard way to create an ABC using inheritance.

-

Create the object.

+

Create the object.

-Source code + +Expand source code +
class Channel(ABC):
     @abstractmethod
     def __init__(self, *args: Any, **kwargs: Any) -> None:
@@ -249,7 +255,12 @@ 

Classes

@abstractmethod def write_channel(self, out_data: str) -> None: """Write data down the channel.""" - pass
+ pass + + # @abstractmethod + # def is_alive(self) -> bool: + # """Is the channel alive.""" + # pass

Ancestors

    @@ -258,18 +269,20 @@

    Ancestors

    Subclasses

    Methods

    -def read_buffer(self) +def read_buffer(self) ‑> str
    -

    Single read of available data.

    +

    Single read of available data.

    -Source code + +Expand source code +
    @abstractmethod
     def read_buffer(self) -> str:
         """Single read of available data."""
    @@ -277,12 +290,14 @@ 

    Methods

    -def read_channel(self) +def read_channel(self) ‑> str
    -

    Read all of the available data from the channel.

    +

    Read all of the available data from the channel.

    -Source code + +Expand source code +
    @abstractmethod
     def read_channel(self) -> str:
         """Read all of the available data from the channel."""
    @@ -290,12 +305,14 @@ 

    Methods

    -def write_channel(self, out_data) +def write_channel(self, out_data: str) ‑> None
    -

    Write data down the channel.

    +

    Write data down the channel.

    -Source code + +Expand source code +
    @abstractmethod
     def write_channel(self, out_data: str) -> None:
         """Write data down the channel."""
    @@ -306,15 +323,17 @@ 

    Methods

    class SSHChannel -(conn, encoding) +(conn: Optional[paramiko.channel.Channel], encoding: str)
    -

    Helper class that provides a standard way to create an ABC using +

    Helper class that provides a standard way to create an ABC using inheritance.

    Placeholder init method so that reading and writing can be moved to the -channel class.

    +channel class.

    -Source code + +Expand source code +
    class SSHChannel(Channel):
         def __init__(self, conn: Optional[paramiko.Channel], encoding: str) -> None:
             """
    @@ -374,15 +393,17 @@ 

    Inherited members

    class SerialChannel -(conn, encoding) +(conn: Optional[serial.serialposix.Serial], encoding: str)
    -

    Helper class that provides a standard way to create an ABC using +

    Helper class that provides a standard way to create an ABC using inheritance.

    Placeholder init method so that reading and writing can be moved to the -channel class.

    +channel class.

    -Source code + +Expand source code +
    class SerialChannel(Channel):
         def __init__(self, conn: Optional[serial.Serial], encoding: str) -> None:
             """
    @@ -441,15 +462,17 @@ 

    Inherited members

    class TelnetChannel -(conn, encoding) +(conn: Optional[telnetlib.Telnet], encoding: str)
    -

    Helper class that provides a standard way to create an ABC using +

    Helper class that provides a standard way to create an ABC using inheritance.

    Placeholder init method so that reading and writing can be moved to the -channel class.

    +channel class.

    -Source code + +Expand source code +
    class TelnetChannel(Channel):
         def __init__(self, conn: Optional[telnetlib.Telnet], encoding: str) -> None:
             """
    @@ -532,9 +555,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html index d414540aa..42c87c360 100644 --- a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html +++ b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html @@ -3,15 +3,17 @@ - + netmiko.checkpoint.checkpoint_gaia_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.checkpoint.checkpoint_gaia_ssh

    -Source code + +Expand source code +
    from netmiko.no_config import NoConfig
     from netmiko.base_connection import BaseConnection
     
    @@ -59,17 +63,17 @@ 

    Classes

    class CheckPointGaiaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements methods for communicating with Check Point Gaia +

    Implements methods for communicating with Check Point Gaia firewalls.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -108,7 +112,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -153,12 +157,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -166,9 +170,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CheckPointGaiaSSH(NoConfig, BaseConnection):
         """
         Implements methods for communicating with Check Point Gaia
    @@ -198,13 +204,15 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    -

    Set the base prompt for interaction ('>').

    +

    Prepare the session after the connection has been established.

    +

    Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -293,9 +301,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/checkpoint/index.html b/docs/netmiko/checkpoint/index.html index 284a19e0b..e1db4bb61 100644 --- a/docs/netmiko/checkpoint/index.html +++ b/docs/netmiko/checkpoint/index.html @@ -3,15 +3,17 @@ - + netmiko.checkpoint API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.checkpoint

    -Source code + +Expand source code +
    from netmiko.checkpoint.checkpoint_gaia_ssh import CheckPointGaiaSSH
     
     __all__ = ["CheckPointGaiaSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.checkpoint.checkpoint_gaia_ssh
    -
    +
    @@ -45,17 +49,17 @@

    Classes

    class CheckPointGaiaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements methods for communicating with Check Point Gaia +

    Implements methods for communicating with Check Point Gaia firewalls.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -139,12 +143,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -152,9 +156,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CheckPointGaiaSSH(NoConfig, BaseConnection):
         """
         Implements methods for communicating with Check Point Gaia
    @@ -184,13 +190,15 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    -

    Set the base prompt for interaction ('>').

    +

    Prepare the session after the connection has been established.

    +

    Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -284,9 +292,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ciena/ciena_saos.html b/docs/netmiko/ciena/ciena_saos.html index f8de7150f..d28416295 100644 --- a/docs/netmiko/ciena/ciena_saos.html +++ b/docs/netmiko/ciena/ciena_saos.html @@ -3,15 +3,17 @@ - + netmiko.ciena.ciena_saos API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.ciena.ciena_saos

    Ciena SAOS support.

    -Source code + +Expand source code +
    """Ciena SAOS support."""
     from typing import Optional, Any
     import re
    @@ -235,17 +239,17 @@ 

    Classes

    class CienaSaosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -284,7 +288,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -329,12 +333,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -342,9 +346,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CienaSaosBase(NoEnable, NoConfig, BaseConnection):
         """
         Ciena SAOS support.
    @@ -394,12 +400,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='configuration save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'configuration save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config.

    +

    Saves Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "configuration save",
    @@ -463,12 +471,14 @@ 

    Inherited members

    class CienaSaosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', **kwargs: Any)
    -

    Ciena SAOS SCP File Transfer driver.

    +

    Ciena SAOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CienaSaosFileTransfer(BaseFileTransfer):
         """Ciena SAOS SCP File Transfer driver."""
     
    @@ -619,10 +629,10 @@ 

    Ancestors

    Methods

    -def remote_space_available(self, search_pattern='') +def remote_space_available(self, search_pattern: str = '') ‑> int
    -

    Return space available on Ciena SAOS

    +

    Return space available on Ciena SAOS

    Output should only have the file-system that matches {self.file_system}

    Filesystem 1K-blocks @@ -631,9 +641,11 @@

    Methods

    1048576 648 1047928 -0% /tmp

    +0% /tmp

    -Source code + +Expand source code +
    def remote_space_available(self, search_pattern: str = "") -> int:
         """
         Return space available on Ciena SAOS
    @@ -702,17 +714,17 @@ 

    Inherited members

    class CienaSaosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -751,7 +763,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -796,12 +808,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -809,9 +821,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CienaSaosSSH(CienaSaosBase):
         pass
    @@ -873,17 +887,17 @@

    Inherited members

    class CienaSaosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -922,7 +936,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -967,12 +981,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -980,9 +994,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CienaSaosTelnet(CienaSaosBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -1085,9 +1101,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ciena/index.html b/docs/netmiko/ciena/index.html index f38b15400..14911476e 100644 --- a/docs/netmiko/ciena/index.html +++ b/docs/netmiko/ciena/index.html @@ -3,15 +3,17 @@ - + netmiko.ciena API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ciena

    -Source code + +Expand source code +
    from netmiko.ciena.ciena_saos import (
         CienaSaosSSH,
         CienaSaosTelnet,
    @@ -36,7 +40,7 @@ 

    Sub-modules

    netmiko.ciena.ciena_saos
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    @@ -49,12 +53,14 @@

    Classes

    class CienaSaosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', **kwargs: Any)
    -

    Ciena SAOS SCP File Transfer driver.

    +

    Ciena SAOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CienaSaosFileTransfer(BaseFileTransfer):
         """Ciena SAOS SCP File Transfer driver."""
     
    @@ -205,10 +211,10 @@ 

    Ancestors

    Methods

    -def remote_space_available(self, search_pattern='') +def remote_space_available(self, search_pattern: str = '') ‑> int
    -

    Return space available on Ciena SAOS

    +

    Return space available on Ciena SAOS

    Output should only have the file-system that matches {self.file_system}

    Filesystem 1K-blocks @@ -217,9 +223,11 @@

    Methods

    1048576 648 1047928 -0% /tmp

    +0% /tmp

    -Source code + +Expand source code +
    def remote_space_available(self, search_pattern: str = "") -> int:
         """
         Return space available on Ciena SAOS
    @@ -288,17 +296,17 @@ 

    Inherited members

    class CienaSaosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -337,7 +345,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -382,12 +390,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -395,9 +403,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CienaSaosSSH(CienaSaosBase):
         pass
    @@ -459,17 +469,17 @@

    Inherited members

    class CienaSaosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Ciena SAOS support.

    +

    Ciena SAOS support.

    Implements methods for interacting Ciena Saos devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -508,7 +518,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -553,12 +563,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -566,9 +576,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CienaSaosTelnet(CienaSaosBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -670,9 +682,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_asa_ssh.html b/docs/netmiko/cisco/cisco_asa_ssh.html index 4754f10fe..79f079aec 100644 --- a/docs/netmiko/cisco/cisco_asa_ssh.html +++ b/docs/netmiko/cisco/cisco_asa_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_asa_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco.cisco_asa_ssh

    Subclass specific to Cisco ASA.

    -Source code + +Expand source code +
    """Subclass specific to Cisco ASA."""
     from typing import Any, Union, List, Dict, Optional
     import re
    @@ -67,7 +71,10 @@ 

    Module netmiko.cisco.cisco_asa_ssh

    self.set_base_prompt() def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -209,12 +216,14 @@

    Classes

    class CiscoAsaFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco ASA SCP File Transfer driver.

    +

    Cisco ASA SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoAsaFileTransfer(CiscoFileTransfer):
         """Cisco ASA SCP File Transfer driver."""
     
    @@ -252,16 +261,16 @@ 

    Inherited members

    class CiscoAsaSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Subclass specific to Cisco ASA.

    +

    Subclass specific to Cisco ASA.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -300,7 +309,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -345,12 +354,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -358,9 +367,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoAsaSSH(CiscoSSHConnection):
         """Subclass specific to Cisco ASA."""
     
    @@ -397,7 +408,10 @@ 

    Inherited members

    self.set_base_prompt() def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -530,16 +544,18 @@

    Ancestors

    Methods

    -def asa_login(self) +def asa_login(self) ‑> None
    -

    Handle ASA reaching privilege level 15 using login

    +

    Handle ASA reaching privilege level 15 using login

    twb-dc-fw1> login Username: admin

    Raises NetmikoAuthenticationException, if we do not reach privilege -level 15 after 10 loops.

    +level 15 after 10 loops.

    -Source code + +Expand source code +
    def asa_login(self) -> None:
         """
         Handle ASA reaching privilege level 15 using login
    @@ -576,12 +592,14 @@ 

    Methods

    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Cisco ASA needed that extra

    +

    Cisco ASA needed that extra

    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Cisco ASA needed that extra \r\n\r"""
         newline = re.compile("(\r\n\r|\r\r\r\n|\r\r\n|\r\n|\n\r)")
    @@ -594,12 +612,14 @@ 

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -610,13 +630,15 @@ 

    Methods

    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    If the ASA is in multi-context mode, then the base_prompt needs to be -updated after each context change.

    +

    If the ASA is in multi-context mode, then the base_prompt needs to be +updated after each context change.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -643,13 +665,15 @@ 

    Methods

    -def send_command_timing(self, *args, **kwargs) +def send_command_timing(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    If the ASA is in multi-context mode, then the base_prompt needs to be -updated after each context change.

    +

    If the ASA is in multi-context mode, then the base_prompt needs to be +updated after each context change.

    -Source code + +Expand source code +
    def send_command_timing(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -668,12 +692,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
     
    @@ -704,15 +730,17 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Cisco ASA in multi-context mode needs to have the base prompt updated +

    Cisco ASA in multi-context mode needs to have the base prompt updated (if you switch contexts i.e. 'changeto')

    This switch of ASA contexts can occur in configuration mode. If this -happens the trailing '(config*' needs stripped off.

    +happens the trailing '(config*' needs stripped off.

    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """
         Cisco ASA in multi-context mode needs to have the base prompt updated
    @@ -812,9 +840,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_ftd_ssh.html b/docs/netmiko/cisco/cisco_ftd_ssh.html index 847ee71f7..64344b92f 100644 --- a/docs/netmiko/cisco/cisco_ftd_ssh.html +++ b/docs/netmiko/cisco/cisco_ftd_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_ftd_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco.cisco_ftd_ssh

    Subclass specific to Cisco FTD.

    -Source code + +Expand source code +
    """Subclass specific to Cisco FTD."""
     from typing import Any
     from netmiko.no_enable import NoEnable
    @@ -42,7 +46,9 @@ 

    Module netmiko.cisco.cisco_ftd_ssh

    """Canot change config on FTD via ssh""" raise NotImplementedError - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Canot change config on FTD via ssh""" return False
    @@ -58,16 +64,16 @@

    Classes

    class CiscoFtdSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Subclass specific to Cisco FTD.

    +

    Subclass specific to Cisco FTD.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -106,7 +112,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -151,12 +157,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -164,9 +170,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CiscoFtdSSH(NoEnable, NoConfig, CiscoSSHConnection):
         """Subclass specific to Cisco FTD."""
     
    @@ -179,7 +187,9 @@ 

    Classes

    """Canot change config on FTD via ssh""" raise NotImplementedError - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Canot change config on FTD via ssh""" return False
    @@ -194,36 +204,44 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Canot change config on FTD via ssh

    +

    Canot change config on FTD via ssh

    -Source code -
    def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Canot change config on FTD via ssh"""
         return False
    -def send_config_set(self, *args, **kwargs) +def send_config_set(self, *args: Any, **kwargs: Any) ‑> str
    -

    Canot change config on FTD via ssh

    +

    Canot change config on FTD via ssh

    -Source code + +Expand source code +
    def send_config_set(self, *args: Any, **kwargs: Any) -> str:
         """Canot change config on FTD via ssh"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -307,9 +325,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_ios.html b/docs/netmiko/cisco/cisco_ios.html index 415a0da32..6ed5d40ba 100644 --- a/docs/netmiko/cisco/cisco_ios.html +++ b/docs/netmiko/cisco/cisco_ios.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_ios API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco.cisco_ios

    -Source code + +Expand source code +
    from typing import Any, Optional, Callable, Type
     from types import TracebackType
     import time
    @@ -66,7 +70,10 @@ 

    Module netmiko.cisco.cisco_ios

    return self.base_prompt def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -323,16 +330,16 @@

    Classes

    class CiscoIosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Common Methods for IOS (both SSH and telnet).

    +

    Common Methods for IOS (both SSH and telnet).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -371,7 +378,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -416,12 +423,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -429,9 +436,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoIosBase(CiscoBaseConnection):
         """Common Methods for IOS (both SSH and telnet)."""
     
    @@ -464,7 +473,10 @@ 

    Classes

    return self.base_prompt def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -489,20 +501,22 @@

    Ancestors

    Subclasses

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using Copy Run Start

    +

    Saves Config Using Copy Run Start

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -513,12 +527,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         cmd = "terminal width 511"
    @@ -528,13 +544,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Cisco IOS/IOS-XE abbreviates the prompt at 20-chars in config mode.

    -

    Consequently, abbreviate the base_prompt

    +

    Cisco IOS/IOS-XE abbreviates the prompt at 20-chars in config mode.

    +

    Consequently, abbreviate the base_prompt

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "#",
    @@ -606,12 +624,14 @@ 

    Inherited members

    class CiscoIosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco IOS SCP File Transfer driver.

    +

    Cisco IOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoIosFileTransfer(CiscoFileTransfer):
         """Cisco IOS SCP File Transfer driver."""
     
    @@ -653,16 +673,16 @@ 

    Inherited members

    class CiscoIosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS SSH driver.

    +

    Cisco IOS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -701,7 +721,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -746,12 +766,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -759,9 +779,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoIosSSH(CiscoIosBase):
         """Cisco IOS SSH driver."""
     
    @@ -824,16 +846,16 @@ 

    Inherited members

    class CiscoIosSerial -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS Serial driver.

    +

    Cisco IOS Serial driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -872,7 +894,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -917,12 +939,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -930,9 +952,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoIosSerial(CiscoIosBase):
         """Cisco IOS Serial driver."""
     
    @@ -995,16 +1019,16 @@ 

    Inherited members

    class CiscoIosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS Telnet driver.

    +

    Cisco IOS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1043,7 +1067,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1088,12 +1112,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1101,9 +1125,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoIosTelnet(CiscoIosBase):
         """Cisco IOS Telnet driver."""
     
    @@ -1166,12 +1192,14 @@ 

    Inherited members

    class InLineTransfer -(ssh_conn, source_file='', dest_file='', file_system=None, direction='put', source_config=None, socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str = '', dest_file: str = '', file_system: Optional[str] = None, direction: str = 'put', source_config: Optional[str] = None, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Use TCL on Cisco IOS to directly transfer file.

    +

    Use TCL on Cisco IOS to directly transfer file.

    -Source code + +Expand source code +
    class InLineTransfer(CiscoIosFileTransfer):
         """Use TCL on Cisco IOS to directly transfer file."""
     
    @@ -1384,12 +1412,14 @@ 

    Ancestors

    Methods

    -def config_md5(self, source_config) +def config_md5(self, source_config: str) ‑> str
    -

    Compute MD5 hash of text.

    +

    Compute MD5 hash of text.

    -Source code + +Expand source code +
    def config_md5(self, source_config: str) -> str:
         """Compute MD5 hash of text."""
         file_contents = source_config + "\n"  # Cisco IOS automatically adds this
    @@ -1398,12 +1428,14 @@ 

    Methods

    -def file_md5(self, file_name, add_newline=False) +def file_md5(self, file_name: str, add_newline: bool = False) ‑> str
    -

    Compute MD5 hash of file.

    +

    Compute MD5 hash of file.

    -Source code + +Expand source code +
    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
         """Compute MD5 hash of file."""
         if add_newline is True:
    @@ -1490,9 +1522,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_nxos_ssh.html b/docs/netmiko/cisco/cisco_nxos_ssh.html index e2e6992c9..4c5042c9c 100644 --- a/docs/netmiko/cisco/cisco_nxos_ssh.html +++ b/docs/netmiko/cisco/cisco_nxos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_nxos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco.cisco_nxos_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional, Callable
     import re
     import os
    @@ -49,7 +53,10 @@ 

    Module netmiko.cisco.cisco_nxos_ssh

    return newline.sub(self.RESPONSE_RETURN, a_string).replace("\r", "\n") def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -211,12 +218,14 @@

    Classes

    class CiscoNxosFileTransfer -(ssh_conn, source_file, dest_file, file_system='bootflash:', direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: str = 'bootflash:', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco NXOS SCP File Transfer driver.

    +

    Cisco NXOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoNxosFileTransfer(CiscoFileTransfer):
         """Cisco NXOS SCP File Transfer driver."""
     
    @@ -337,12 +346,14 @@ 

    Ancestors

    Static methods

    -def process_md5(md5_output, pattern='= (.*)') +def process_md5(md5_output: str, pattern: str = '= (.*)') ‑> str
    -

    Not needed on NX-OS.

    +

    Not needed on NX-OS.

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"= (.*)") -> str:
         """Not needed on NX-OS."""
    @@ -376,16 +387,16 @@ 

    Inherited members

    class CiscoNxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -424,7 +435,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -469,12 +480,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -482,9 +493,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoNxosSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -504,7 +517,10 @@ 

    Inherited members

    return newline.sub(self.RESPONSE_RETURN, a_string).replace("\r", "\n") def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -550,30 +566,37 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[>#]') +def check_config_mode(self, check_string: str = ')#', pattern: str = '[>#]', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[>#]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[>#]",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Convert ' +

    Convert ' ' or '

    ' to ' , and remove extra ' -'s in the text.

    +'s in the text.

    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Convert '\r\n' or '\r\r\n' to '\n, and remove extra '\r's in the text."""
         newline = re.compile(r"(\r\r\n\r|\r\r\n|\r\n)")
    @@ -582,12 +605,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -683,9 +708,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_s300.html b/docs/netmiko/cisco/cisco_s300.html index af25013d5..bfea0c194 100644 --- a/docs/netmiko/cisco/cisco_s300.html +++ b/docs/netmiko/cisco/cisco_s300.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_s300 API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco.cisco_s300

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoSSHConnection
     
     
    @@ -78,19 +82,19 @@ 

    Classes

    class CiscoS300Base -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices.

    +

    Support for Cisco SG300 series of devices.

    Note, must configure the following to disable SG300 from prompting for username twice:

    configure terminal ip ssh password-auth

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -129,7 +133,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -174,12 +178,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -187,9 +191,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoS300Base(CiscoSSHConnection):
         """
         Support for Cisco SG300 series of devices.
    @@ -232,12 +238,14 @@ 

    Subclasses

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -298,19 +306,19 @@ 

    Inherited members

    class CiscoS300SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices.

    +

    Support for Cisco SG300 series of devices.

    Note, must configure the following to disable SG300 from prompting for username twice:

    configure terminal ip ssh password-auth

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -349,7 +357,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -394,12 +402,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -407,9 +415,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoS300SSH(CiscoS300Base):
         pass
    @@ -471,17 +481,17 @@

    Inherited members

    class CiscoS300Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices, with telnet. +

    Support for Cisco SG300 series of devices, with telnet. Note: can be used with Sx200 series, with telnet enabled.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -520,7 +530,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -565,12 +575,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -578,9 +588,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoS300Telnet(CiscoS300Base):
         """
         Support for Cisco SG300 series of devices, with telnet.
    @@ -679,9 +691,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_tp_tcce.html b/docs/netmiko/cisco/cisco_tp_tcce.html index 0a7569cbd..2eb8c15b8 100644 --- a/docs/netmiko/cisco/cisco_tp_tcce.html +++ b/docs/netmiko/cisco/cisco_tp_tcce.html @@ -3,17 +3,19 @@ - + netmiko.cisco.cisco_tp_tcce API documentation - - - - - + + + + + + +
    @@ -28,7 +30,9 @@

    Module netmiko.cisco.cisco_tp_tcce

    Written by Ahmad Barrin Updated by Kirk Byers

    -Source code + +Expand source code +
    """
     CiscoTpTcCeSSH Class
     Class to manage Cisco Telepresence Endpoint on TC/CE software release. Also working for Cisco
    @@ -131,16 +135,16 @@ 

    Classes

    class CiscoTpTcCeSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -179,7 +183,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -224,12 +228,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -237,9 +241,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoTpTcCeSSH(CiscoSSHConnection):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -325,50 +331,58 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Paging is disabled by default.

    +

    Paging is disabled by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Paging is disabled by default."""
         return ""
    -def find_prompt(self, *args, **kwargs) +def find_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Use 'OK' as standard prompt.

    +

    Use 'OK' as standard prompt.

    -Source code + +Expand source code +
    def find_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Use 'OK' as standard prompt."""
         return "OK"
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Send command to network device retrieve output until router_prompt or expect_string

    +

    Send command to network device retrieve output until router_prompt or expect_string

    By default this method will keep waiting to receive data until the network device prompt is -detected. The current network device prompt will be determined automatically.

    +detected. The current network device prompt will be determined automatically.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -392,18 +406,20 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    +

    Prepare the session after the connection has been established

    This method handles some of vagaries that occur between various devices early on in the session.

    In general, it should include: self.set_base_prompt() self.disable_paging() -self.set_terminal_width()

    +self.set_terminal_width()

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -428,12 +444,14 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Use 'OK' as base_prompt.

    +

    Use 'OK' as base_prompt.

    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Use 'OK' as base_prompt."""
         self.base_prompt = "OK"
    @@ -441,12 +459,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip the trailing router prompt from the output."""
         expect_string = r"^(OK|ERROR|Command not recognized\.)$"
    @@ -535,9 +555,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_viptela.html b/docs/netmiko/cisco/cisco_viptela.html index 49afd7fa4..19ee321b9 100644 --- a/docs/netmiko/cisco/cisco_viptela.html +++ b/docs/netmiko/cisco/cisco_viptela.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_viptela API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco.cisco_viptela

    Subclass specific to Cisco Viptela.

    -Source code + +Expand source code +
    """Subclass specific to Cisco Viptela."""
     from typing import Union, Sequence, TextIO, Any
     import re
    @@ -39,7 +43,9 @@ 

    Module netmiko.cisco.cisco_viptela

    self.set_base_prompt() self.disable_paging(command="paginate false") - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -116,16 +122,16 @@

    Classes

    class CiscoViptelaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Subclass specific to Cisco Viptela.

    +

    Subclass specific to Cisco Viptela.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -164,7 +170,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -209,12 +215,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -222,9 +228,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoViptelaSSH(CiscoSSHConnection):
         """Subclass specific to Cisco Viptela."""
     
    @@ -234,7 +242,9 @@ 

    Classes

    self.set_base_prompt() self.disable_paging(command="paginate false") - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -308,26 +318,32 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +def check_config_mode(self, check_string: str = ')#', pattern: str = '#', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def exit_config_mode(self, exit_config='end', pattern='#') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#') ‑> str
    -

    Exit from configuration mode.

    +

    Exit from configuration mode.

    Viptela might have the following in the output (if no 'commit()' occurred.

    -

    Uncommitted changes found, commit them? [yes/no/CANCEL]

    +

    Uncommitted changes found, commit them? [yes/no/CANCEL]

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = r"#") -> str:
         """
         Exit from configuration mode.
    @@ -359,12 +375,14 @@ 

    Methods

    -def save_config(self, cmd='commit', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'commit', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "commit", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -373,12 +391,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -463,9 +483,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_wlc_ssh.html b/docs/netmiko/cisco/cisco_wlc_ssh.html index 6aeb6e6c0..9095c3788 100644 --- a/docs/netmiko/cisco/cisco_wlc_ssh.html +++ b/docs/netmiko/cisco/cisco_wlc_ssh.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_wlc_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco.cisco_wlc_ssh

    Netmiko Cisco WLC support.

    -Source code + +Expand source code +
    """Netmiko Cisco WLC support."""
     from typing import Any, Union, Sequence, TextIO
     import time
    @@ -223,7 +227,7 @@ 

    Module netmiko.cisco.cisco_wlc_ssh

    count += 1 def check_config_mode( - self, check_string: str = "config", pattern: str = "" + self, check_string: str = "config", pattern: str = "", force_regex: bool = False ) -> bool: """Checks if the device is in configuration mode or not.""" if not pattern: @@ -288,16 +292,16 @@

    Classes

    class CiscoWlcSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Netmiko Cisco WLC support.

    +

    Netmiko Cisco WLC support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -336,7 +340,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -381,12 +385,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -394,9 +398,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoWlcSSH(BaseConnection):
         """Netmiko Cisco WLC support."""
     
    @@ -587,7 +593,7 @@ 

    Classes

    count += 1 def check_config_mode( - self, check_string: str = "config", pattern: str = "" + self, check_string: str = "config", pattern: str = "", force_regex: bool = False ) -> bool: """Checks if the device is in configuration mode or not.""" if not pattern: @@ -647,14 +653,16 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='config', pattern='') +def check_config_mode(self, check_string: str = 'config', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "config", pattern: str = ""
    +    self, check_string: str = "config", pattern: str = "", force_regex: bool = False
     ) -> bool:
         """Checks if the device is in configuration mode or not."""
         if not pattern:
    @@ -663,12 +671,14 @@ 

    Methods

    -def cleanup(self, command='logout') +def cleanup(self, command: str = 'logout') ‑> None
    -

    Reset WLC back to normal paging and gracefully close session.

    +

    Reset WLC back to normal paging and gracefully close session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "logout") -> None:
         """Reset WLC back to normal paging and gracefully close session."""
         self.send_command_timing("config paging enable")
    @@ -707,12 +717,14 @@ 

    Methods

    -def config_mode(self, config_command='config', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'config', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter into config_mode.

    +

    Enter into config_mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "config", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -723,24 +735,28 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Exit config_mode.

    +

    Exit config_mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Exit config_mode."""
         return super().exit_config_mode(exit_config, pattern)
    -def save_config(self, cmd='save config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'save config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Saves Config.

    +

    Saves Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -763,16 +779,18 @@ 

    Methods

    -def send_command_w_enter(self, *args, **kwargs) +def send_command_w_enter(self, *args: Any, **kwargs: Any) ‑> str
    -

    For 'show run-config' Cisco WLC adds a 'Press Enter to continue…' message +

    For 'show run-config' Cisco WLC adds a 'Press Enter to continue…' message Even though pagination is disabled.

    show run-config also has excessive delays in the output which requires special handling.

    -

    Arguments are the same as send_command_timing() method.

    +

    Arguments are the same as send_command_timing() method.

    -Source code + +Expand source code +
    def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str:
         """
         For 'show run-config' Cisco WLC adds a 'Press Enter to continue...' message
    @@ -830,13 +848,15 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    -

    Cisco WLC uses "config paging disable" to disable paging

    +

    Prepare the session after the connection has been established

    +

    Cisco WLC uses "config paging disable" to disable paging

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -855,16 +875,18 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    WLC presents with the following on login (in certain OS versions)

    +

    WLC presents with the following on login (in certain OS versions)

    login as: user

    (Cisco Controller)

    User: user

    -

    Password:****

    +

    Password:****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """WLC presents with the following on login (in certain OS versions)
     
    @@ -975,9 +997,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/cisco_xr.html b/docs/netmiko/cisco/cisco_xr.html index e59c9a1c5..a98088050 100644 --- a/docs/netmiko/cisco/cisco_xr.html +++ b/docs/netmiko/cisco/cisco_xr.html @@ -3,15 +3,17 @@ - + netmiko.cisco.cisco_xr API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco.cisco_xr

    -Source code + +Expand source code +
    from typing import Optional, Any, Union, Sequence, TextIO
     import re
     import warnings
    @@ -184,7 +188,10 @@ 

    Module netmiko.cisco.cisco_xr

    return output def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not. @@ -292,16 +299,16 @@

    Classes

    class CiscoXrBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -340,7 +347,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -385,12 +392,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -398,9 +405,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoXrBase(CiscoBaseConnection):
         def establish_connection(self, width: int = 511, height: int = 511) -> None:
             """Establish SSH connection to the network device"""
    @@ -556,7 +565,10 @@ 

    Classes

    return output def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[#\$]" + self, + check_string: str = ")#", + pattern: str = r"[#\$]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not. @@ -609,16 +621,21 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[#\\$]') +def check_config_mode(self, check_string: str = ')#', pattern: str = '[#\\$]', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    IOS-XR, unfortunately, does this: -RP/0/RSP0/CPU0:BNG(admin)#

    +RP/0/RSP0/CPU0:BNG(admin)#

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[#\$]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[#\$]",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if the device is in configuration mode or not.
     
    @@ -634,10 +651,10 @@ 

    Methods

    -def commit(self, confirm=False, confirm_delay=None, comment='', label='', read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, comment: str = '', label: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    default (no options): command_string = commit confirm and confirm_delay: @@ -662,9 +679,11 @@

    Methods

    started or since the last commit was made from this session. You can use the 'show configuration commit changes' command to browse the changes.

    Exit of configuration mode with pending changes will cause the changes to be discarded and -an exception to be generated.

    +an exception to be generated.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -774,24 +793,28 @@ 

    Methods

    -def establish_connection(self, width=511, height=511) +def establish_connection(self, width: int = 511, height: int = 511) ‑> None
    -

    Establish SSH connection to the network device

    +

    Establish SSH connection to the network device

    -Source code + +Expand source code +
    def establish_connection(self, width: int = 511, height: int = 511) -> None:
         """Establish SSH connection to the network device"""
         super().establish_connection(width=width, height=height)
    -def exit_config_mode(self, exit_config='end', pattern='') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = "") -> str:
         """Exit configuration mode."""
         output = ""
    @@ -816,24 +839,28 @@ 

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented (use commit() method)

    +

    Not Implemented (use commit() method)

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented (use commit() method)"""
         raise NotImplementedError
    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    IOS-XR requires you not exit from configuration mode.

    +

    IOS-XR requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -847,12 +874,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         # IOS-XR has an issue where it echoes the command even though it hasn't returned the prompt
    @@ -865,13 +894,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Cisco IOS-XR abbreviates the prompt at 31-chars in config mode.

    -

    Consequently, abbreviate the base_prompt

    +

    Cisco IOS-XR abbreviates the prompt at 31-chars in config mode.

    +

    Consequently, abbreviate the base_prompt

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "#",
    @@ -938,12 +969,14 @@ 

    Inherited members

    class CiscoXrFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco IOS-XR SCP File Transfer driver.

    +

    Cisco IOS-XR SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoXrFileTransfer(CiscoFileTransfer):
         """Cisco IOS-XR SCP File Transfer driver."""
     
    @@ -995,16 +1028,18 @@ 

    Ancestors

    Static methods

    -def process_md5(md5_output, pattern='^([a-fA-F0-9]+)$') +def process_md5(md5_output: str, pattern: str = '^([a-fA-F0-9]+)$') ‑> str
    -

    IOS-XR defaults with timestamps enabled

    +

    IOS-XR defaults with timestamps enabled

    show md5 file /bootflash:/boot/grub/grub.cfg

    Sat Mar 3 17:49:03.596 UTC -c84843f0030efd44b01343fdb8c2e801

    +c84843f0030efd44b01343fdb8c2e801

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"^([a-fA-F0-9]+)$") -> str:
         """
    @@ -1025,13 +1060,15 @@ 

    show md5 file /bootflash:/boot/g

    Methods

    -def remote_md5(self, base_cmd='show md5 file', remote_file=None) +def remote_md5(self, base_cmd: str = 'show md5 file', remote_file: Optional[str] = None) ‑> str
    -

    IOS-XR for MD5 requires this extra leading /

    -

    show md5 file /bootflash:/boot/grub/grub.cfg

    +

    IOS-XR for MD5 requires this extra leading /

    +

    show md5 file /bootflash:/boot/grub/grub.cfg

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "show md5 file", remote_file: Optional[str] = None
     ) -> str:
    @@ -1078,16 +1115,16 @@ 

    Inherited members

    class CiscoXrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco XR SSH driver.

    +

    Cisco XR SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1126,7 +1163,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1171,12 +1208,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1184,9 +1221,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoXrSSH(CiscoXrBase):
         """Cisco XR SSH driver."""
     
    @@ -1249,16 +1288,16 @@ 

    Inherited members

    class CiscoXrTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco XR Telnet driver.

    +

    Cisco XR Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1297,7 +1336,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1342,12 +1381,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1355,9 +1394,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoXrTelnet(CiscoXrBase):
         """Cisco XR Telnet driver."""
     
    @@ -1466,9 +1507,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco/index.html b/docs/netmiko/cisco/index.html index c1a3f6040..94741eea2 100644 --- a/docs/netmiko/cisco/index.html +++ b/docs/netmiko/cisco/index.html @@ -3,15 +3,17 @@ - + netmiko.cisco API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cisco

    -Source code + +Expand source code +
    from netmiko.cisco.cisco_ios import (
         CiscoIosBase,
         CiscoIosSSH,
    @@ -68,41 +72,41 @@ 

    Sub-modules

    netmiko.cisco.cisco_asa_ssh
    -

    Subclass specific to Cisco ASA.

    +

    Subclass specific to Cisco ASA.

    netmiko.cisco.cisco_ftd_ssh
    -

    Subclass specific to Cisco FTD.

    +

    Subclass specific to Cisco FTD.

    netmiko.cisco.cisco_ios
    -
    +
    netmiko.cisco.cisco_nxos_ssh
    -
    +
    netmiko.cisco.cisco_s300
    -
    +
    netmiko.cisco.cisco_tp_tcce
    -

    CiscoTpTcCeSSH Class +

    CiscoTpTcCeSSH Class Class to manage Cisco Telepresence Endpoint on TC/CE software release. Also working for Cisco -Expressway/VCS …

    +Expressway/VCS …

    netmiko.cisco.cisco_viptela
    -

    Subclass specific to Cisco Viptela.

    +

    Subclass specific to Cisco Viptela.

    netmiko.cisco.cisco_wlc_ssh
    -

    Netmiko Cisco WLC support.

    +

    Netmiko Cisco WLC support.

    netmiko.cisco.cisco_xr
    -
    +
    @@ -115,12 +119,14 @@

    Classes

    class CiscoAsaFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco ASA SCP File Transfer driver.

    +

    Cisco ASA SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoAsaFileTransfer(CiscoFileTransfer):
         """Cisco ASA SCP File Transfer driver."""
     
    @@ -158,16 +164,16 @@ 

    Inherited members

    class CiscoAsaSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Subclass specific to Cisco ASA.

    +

    Subclass specific to Cisco ASA.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -206,7 +212,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -251,12 +257,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -264,9 +270,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CiscoAsaSSH(CiscoSSHConnection):
         """Subclass specific to Cisco ASA."""
     
    @@ -303,7 +311,10 @@ 

    Inherited members

    self.set_base_prompt() def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>\#]" + self, + check_string: str = ")#", + pattern: str = r"[>\#]", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -436,16 +447,18 @@

    Ancestors

    Methods

    -def asa_login(self) +def asa_login(self) ‑> None
    -

    Handle ASA reaching privilege level 15 using login

    +

    Handle ASA reaching privilege level 15 using login

    twb-dc-fw1> login Username: admin

    Raises NetmikoAuthenticationException, if we do not reach privilege -level 15 after 10 loops.

    +level 15 after 10 loops.

    -Source code + +Expand source code +
    def asa_login(self) -> None:
         """
         Handle ASA reaching privilege level 15 using login
    @@ -482,12 +495,14 @@ 

    Methods

    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Cisco ASA needed that extra

    +

    Cisco ASA needed that extra

    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Cisco ASA needed that extra \r\n\r"""
         newline = re.compile("(\r\n\r|\r\r\r\n|\r\r\n|\r\n|\n\r)")
    @@ -500,12 +515,14 @@ 

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -516,13 +533,15 @@ 

    Methods

    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    If the ASA is in multi-context mode, then the base_prompt needs to be -updated after each context change.

    +

    If the ASA is in multi-context mode, then the base_prompt needs to be +updated after each context change.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -549,13 +568,15 @@ 

    Methods

    -def send_command_timing(self, *args, **kwargs) +def send_command_timing(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    If the ASA is in multi-context mode, then the base_prompt needs to be -updated after each context change.

    +

    If the ASA is in multi-context mode, then the base_prompt needs to be +updated after each context change.

    -Source code + +Expand source code +
    def send_command_timing(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -574,12 +595,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
     
    @@ -610,15 +633,17 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Cisco ASA in multi-context mode needs to have the base prompt updated +

    Cisco ASA in multi-context mode needs to have the base prompt updated (if you switch contexts i.e. 'changeto')

    This switch of ASA contexts can occur in configuration mode. If this -happens the trailing '(config*' needs stripped off.

    +happens the trailing '(config*' needs stripped off.

    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """
         Cisco ASA in multi-context mode needs to have the base prompt updated
    @@ -683,16 +708,16 @@ 

    Inherited members

    class CiscoFtdSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Subclass specific to Cisco FTD.

    +

    Subclass specific to Cisco FTD.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -731,7 +756,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -776,12 +801,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -789,9 +814,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoFtdSSH(NoEnable, NoConfig, CiscoSSHConnection):
         """Subclass specific to Cisco FTD."""
     
    @@ -804,7 +831,9 @@ 

    Inherited members

    """Canot change config on FTD via ssh""" raise NotImplementedError - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Canot change config on FTD via ssh""" return False
    @@ -819,36 +848,44 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Canot change config on FTD via ssh

    +

    Canot change config on FTD via ssh

    -Source code -
    def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Canot change config on FTD via ssh"""
         return False
    -def send_config_set(self, *args, **kwargs) +def send_config_set(self, *args: Any, **kwargs: Any) ‑> str
    -

    Canot change config on FTD via ssh

    +

    Canot change config on FTD via ssh

    -Source code + +Expand source code +
    def send_config_set(self, *args: Any, **kwargs: Any) -> str:
         """Canot change config on FTD via ssh"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -904,16 +941,16 @@ 

    Inherited members

    class CiscoIosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Common Methods for IOS (both SSH and telnet).

    +

    Common Methods for IOS (both SSH and telnet).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -952,7 +989,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -997,12 +1034,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1010,9 +1047,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoIosBase(CiscoBaseConnection):
         """Common Methods for IOS (both SSH and telnet)."""
     
    @@ -1045,7 +1084,10 @@ 

    Inherited members

    return self.base_prompt def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -1070,20 +1112,22 @@

    Ancestors

    Subclasses

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using Copy Run Start

    +

    Saves Config Using Copy Run Start

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -1094,12 +1138,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         cmd = "terminal width 511"
    @@ -1109,13 +1155,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Cisco IOS/IOS-XE abbreviates the prompt at 20-chars in config mode.

    -

    Consequently, abbreviate the base_prompt

    +

    Cisco IOS/IOS-XE abbreviates the prompt at 20-chars in config mode.

    +

    Consequently, abbreviate the base_prompt

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "#",
    @@ -1187,12 +1235,14 @@ 

    Inherited members

    class CiscoIosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco IOS SCP File Transfer driver.

    +

    Cisco IOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoIosFileTransfer(CiscoFileTransfer):
         """Cisco IOS SCP File Transfer driver."""
     
    @@ -1234,16 +1284,16 @@ 

    Inherited members

    class CiscoIosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS SSH driver.

    +

    Cisco IOS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1282,7 +1332,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1327,12 +1377,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1340,9 +1390,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoIosSSH(CiscoIosBase):
         """Cisco IOS SSH driver."""
     
    @@ -1405,16 +1457,16 @@ 

    Inherited members

    class CiscoIosSerial -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS Serial driver.

    +

    Cisco IOS Serial driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1453,7 +1505,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1498,12 +1550,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1511,9 +1563,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoIosSerial(CiscoIosBase):
         """Cisco IOS Serial driver."""
     
    @@ -1576,16 +1630,16 @@ 

    Inherited members

    class CiscoIosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco IOS Telnet driver.

    +

    Cisco IOS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1624,7 +1678,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1669,12 +1723,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1682,9 +1736,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoIosTelnet(CiscoIosBase):
         """Cisco IOS Telnet driver."""
     
    @@ -1747,12 +1803,14 @@ 

    Inherited members

    class CiscoNxosFileTransfer -(ssh_conn, source_file, dest_file, file_system='bootflash:', direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: str = 'bootflash:', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco NXOS SCP File Transfer driver.

    +

    Cisco NXOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoNxosFileTransfer(CiscoFileTransfer):
         """Cisco NXOS SCP File Transfer driver."""
     
    @@ -1873,12 +1931,14 @@ 

    Ancestors

    Static methods

    -def process_md5(md5_output, pattern='= (.*)') +def process_md5(md5_output: str, pattern: str = '= (.*)') ‑> str
    -

    Not needed on NX-OS.

    +

    Not needed on NX-OS.

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"= (.*)") -> str:
         """Not needed on NX-OS."""
    @@ -1912,16 +1972,16 @@ 

    Inherited members

    class CiscoNxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1960,7 +2020,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -2005,12 +2065,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -2018,9 +2078,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoNxosSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -2040,7 +2102,10 @@ 

    Inherited members

    return newline.sub(self.RESPONSE_RETURN, a_string).replace("\r", "\n") def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -2086,30 +2151,37 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[>#]') +def check_config_mode(self, check_string: str = ')#', pattern: str = '[>#]', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[>#]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[>#]",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
    -

    Convert ' +

    Convert ' ' or '

    ' to ' , and remove extra ' -'s in the text.

    +'s in the text.

    -Source code + +Expand source code +
    def normalize_linefeeds(self, a_string: str) -> str:
         """Convert '\r\n' or '\r\r\n' to '\n, and remove extra '\r's in the text."""
         newline = re.compile(r"(\r\r\n\r|\r\r\n|\r\n)")
    @@ -2118,12 +2190,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -2185,19 +2259,19 @@ 

    Inherited members

    class CiscoS300SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices.

    +

    Support for Cisco SG300 series of devices.

    Note, must configure the following to disable SG300 from prompting for username twice:

    configure terminal ip ssh password-auth

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2236,7 +2310,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -2281,12 +2355,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -2294,9 +2368,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoS300SSH(CiscoS300Base):
         pass
    @@ -2358,17 +2434,17 @@

    Inherited members

    class CiscoS300Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Cisco SG300 series of devices, with telnet. +

    Support for Cisco SG300 series of devices, with telnet. Note: can be used with Sx200 series, with telnet enabled.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2407,7 +2483,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -2452,12 +2528,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -2465,9 +2541,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoS300Telnet(CiscoS300Base):
         """
         Support for Cisco SG300 series of devices, with telnet.
    @@ -2534,16 +2612,16 @@ 

    Inherited members

    class CiscoTpTcCeSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2582,7 +2660,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -2627,12 +2705,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -2640,9 +2718,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoTpTcCeSSH(CiscoSSHConnection):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -2728,50 +2808,58 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Paging is disabled by default.

    +

    Paging is disabled by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Paging is disabled by default."""
         return ""
    -def find_prompt(self, *args, **kwargs) +def find_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Use 'OK' as standard prompt.

    +

    Use 'OK' as standard prompt.

    -Source code + +Expand source code +
    def find_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Use 'OK' as standard prompt."""
         return "OK"
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Send command to network device retrieve output until router_prompt or expect_string

    +

    Send command to network device retrieve output until router_prompt or expect_string

    By default this method will keep waiting to receive data until the network device prompt is -detected. The current network device prompt will be determined automatically.

    +detected. The current network device prompt will be determined automatically.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -2795,18 +2883,20 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    +

    Prepare the session after the connection has been established

    This method handles some of vagaries that occur between various devices early on in the session.

    In general, it should include: self.set_base_prompt() self.disable_paging() -self.set_terminal_width()

    +self.set_terminal_width()

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -2831,12 +2921,14 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Use 'OK' as base_prompt.

    +

    Use 'OK' as base_prompt.

    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Use 'OK' as base_prompt."""
         self.base_prompt = "OK"
    @@ -2844,12 +2936,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip the trailing router prompt from the output."""
         expect_string = r"^(OK|ERROR|Command not recognized\.)$"
    @@ -2906,16 +3000,16 @@ 

    Inherited members

    class CiscoViptelaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Subclass specific to Cisco Viptela.

    +

    Subclass specific to Cisco Viptela.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2954,7 +3048,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -2999,12 +3093,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -3012,9 +3106,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoViptelaSSH(CiscoSSHConnection):
         """Subclass specific to Cisco Viptela."""
     
    @@ -3024,7 +3120,9 @@ 

    Inherited members

    self.set_base_prompt() self.disable_paging(command="paginate false") - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -3098,26 +3196,32 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +def check_config_mode(self, check_string: str = ')#', pattern: str = '#', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def exit_config_mode(self, exit_config='end', pattern='#') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#') ‑> str
    -

    Exit from configuration mode.

    +

    Exit from configuration mode.

    Viptela might have the following in the output (if no 'commit()' occurred.

    -

    Uncommitted changes found, commit them? [yes/no/CANCEL]

    +

    Uncommitted changes found, commit them? [yes/no/CANCEL]

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = r"#") -> str:
         """
         Exit from configuration mode.
    @@ -3149,12 +3253,14 @@ 

    Methods

    -def save_config(self, cmd='commit', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'commit', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "commit", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -3163,12 +3269,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -3224,16 +3332,16 @@ 

    Inherited members

    class CiscoWlcSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Netmiko Cisco WLC support.

    +

    Netmiko Cisco WLC support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -3272,7 +3380,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -3317,12 +3425,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -3330,9 +3438,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoWlcSSH(BaseConnection):
         """Netmiko Cisco WLC support."""
     
    @@ -3523,7 +3633,7 @@ 

    Inherited members

    count += 1 def check_config_mode( - self, check_string: str = "config", pattern: str = "" + self, check_string: str = "config", pattern: str = "", force_regex: bool = False ) -> bool: """Checks if the device is in configuration mode or not.""" if not pattern: @@ -3583,14 +3693,16 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='config', pattern='') +def check_config_mode(self, check_string: str = 'config', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "config", pattern: str = ""
    +    self, check_string: str = "config", pattern: str = "", force_regex: bool = False
     ) -> bool:
         """Checks if the device is in configuration mode or not."""
         if not pattern:
    @@ -3599,12 +3711,14 @@ 

    Methods

    -def cleanup(self, command='logout') +def cleanup(self, command: str = 'logout') ‑> None
    -

    Reset WLC back to normal paging and gracefully close session.

    +

    Reset WLC back to normal paging and gracefully close session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "logout") -> None:
         """Reset WLC back to normal paging and gracefully close session."""
         self.send_command_timing("config paging enable")
    @@ -3643,12 +3757,14 @@ 

    Methods

    -def config_mode(self, config_command='config', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'config', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter into config_mode.

    +

    Enter into config_mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "config", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -3659,24 +3775,28 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Exit config_mode.

    +

    Exit config_mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Exit config_mode."""
         return super().exit_config_mode(exit_config, pattern)
    -def save_config(self, cmd='save config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'save config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Saves Config.

    +

    Saves Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -3699,16 +3819,18 @@ 

    Methods

    -def send_command_w_enter(self, *args, **kwargs) +def send_command_w_enter(self, *args: Any, **kwargs: Any) ‑> str
    -

    For 'show run-config' Cisco WLC adds a 'Press Enter to continue…' message +

    For 'show run-config' Cisco WLC adds a 'Press Enter to continue…' message Even though pagination is disabled.

    show run-config also has excessive delays in the output which requires special handling.

    -

    Arguments are the same as send_command_timing() method.

    +

    Arguments are the same as send_command_timing() method.

    -Source code + +Expand source code +
    def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str:
         """
         For 'show run-config' Cisco WLC adds a 'Press Enter to continue...' message
    @@ -3766,13 +3888,15 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established

    -

    Cisco WLC uses "config paging disable" to disable paging

    +

    Prepare the session after the connection has been established

    +

    Cisco WLC uses "config paging disable" to disable paging

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established
    @@ -3791,16 +3915,18 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    WLC presents with the following on login (in certain OS versions)

    +

    WLC presents with the following on login (in certain OS versions)

    login as: user

    (Cisco Controller)

    User: user

    -

    Password:****

    +

    Password:****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """WLC presents with the following on login (in certain OS versions)
     
    @@ -3878,12 +4004,14 @@ 

    Inherited members

    class CiscoXrFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Cisco IOS-XR SCP File Transfer driver.

    +

    Cisco IOS-XR SCP File Transfer driver.

    -Source code + +Expand source code +
    class CiscoXrFileTransfer(CiscoFileTransfer):
         """Cisco IOS-XR SCP File Transfer driver."""
     
    @@ -3935,16 +4063,18 @@ 

    Ancestors

    Static methods

    -def process_md5(md5_output, pattern='^([a-fA-F0-9]+)$') +def process_md5(md5_output: str, pattern: str = '^([a-fA-F0-9]+)$') ‑> str
    -

    IOS-XR defaults with timestamps enabled

    +

    IOS-XR defaults with timestamps enabled

    show md5 file /bootflash:/boot/grub/grub.cfg

    Sat Mar 3 17:49:03.596 UTC -c84843f0030efd44b01343fdb8c2e801

    +c84843f0030efd44b01343fdb8c2e801

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"^([a-fA-F0-9]+)$") -> str:
         """
    @@ -3965,13 +4095,15 @@ 

    show md5 file /bootflash:/boot/g

    Methods

    -def remote_md5(self, base_cmd='show md5 file', remote_file=None) +def remote_md5(self, base_cmd: str = 'show md5 file', remote_file: Optional[str] = None) ‑> str
    -

    IOS-XR for MD5 requires this extra leading /

    -

    show md5 file /bootflash:/boot/grub/grub.cfg

    +

    IOS-XR for MD5 requires this extra leading /

    +

    show md5 file /bootflash:/boot/grub/grub.cfg

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "show md5 file", remote_file: Optional[str] = None
     ) -> str:
    @@ -4018,16 +4150,16 @@ 

    Inherited members

    class CiscoXrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco XR SSH driver.

    +

    Cisco XR SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -4066,7 +4198,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -4111,12 +4243,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -4124,9 +4256,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoXrSSH(CiscoXrBase):
         """Cisco XR SSH driver."""
     
    @@ -4189,16 +4323,16 @@ 

    Inherited members

    class CiscoXrTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Cisco XR Telnet driver.

    +

    Cisco XR Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -4237,7 +4371,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -4282,12 +4416,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -4295,9 +4429,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoXrTelnet(CiscoXrBase):
         """Cisco XR Telnet driver."""
     
    @@ -4360,12 +4496,14 @@ 

    Inherited members

    class InLineTransfer -(ssh_conn, source_file='', dest_file='', file_system=None, direction='put', source_config=None, socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str = '', dest_file: str = '', file_system: Optional[str] = None, direction: str = 'put', source_config: Optional[str] = None, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Use TCL on Cisco IOS to directly transfer file.

    +

    Use TCL on Cisco IOS to directly transfer file.

    -Source code + +Expand source code +
    class InLineTransfer(CiscoIosFileTransfer):
         """Use TCL on Cisco IOS to directly transfer file."""
     
    @@ -4578,12 +4716,14 @@ 

    Ancestors

    Methods

    -def config_md5(self, source_config) +def config_md5(self, source_config: str) ‑> str
    -

    Compute MD5 hash of text.

    +

    Compute MD5 hash of text.

    -Source code + +Expand source code +
    def config_md5(self, source_config: str) -> str:
         """Compute MD5 hash of text."""
         file_contents = source_config + "\n"  # Cisco IOS automatically adds this
    @@ -4592,12 +4732,14 @@ 

    Methods

    -def file_md5(self, file_name, add_newline=False) +def file_md5(self, file_name: str, add_newline: bool = False) ‑> str
    -

    Compute MD5 hash of file.

    +

    Compute MD5 hash of file.

    -Source code + +Expand source code +
    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
         """Compute MD5 hash of file."""
         if add_newline is True:
    @@ -4787,9 +4929,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cisco_base_connection.html b/docs/netmiko/cisco_base_connection.html index 01aa04af5..e8ed54bf5 100644 --- a/docs/netmiko/cisco_base_connection.html +++ b/docs/netmiko/cisco_base_connection.html @@ -3,15 +3,17 @@ - + netmiko.cisco_base_connection API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cisco_base_connection

    CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms.

    -Source code + +Expand source code +
    """CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms."""
     from typing import Optional
     import re
    @@ -55,7 +59,9 @@ 

    Module netmiko.cisco_base_connection

    """Exits enable (privileged exec) mode.""" return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. @@ -275,7 +281,10 @@

    Module netmiko.cisco_base_connection

    else: # Some devices are slow so match on trailing-prompt if you can output = self._send_command_str( - command_string=cmd, strip_prompt=False, strip_command=False + command_string=cmd, + strip_prompt=False, + strip_command=False, + read_timeout=100.0, ) return output @@ -299,16 +308,16 @@

    Classes

    class CiscoBaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -347,7 +356,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -392,12 +401,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -405,9 +414,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CiscoBaseConnection(BaseConnection):
         """Base Class for cisco-like behavior."""
     
    @@ -431,7 +442,9 @@ 

    Classes

    """Exits enable (privileged exec) mode.""" return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. @@ -651,7 +664,10 @@

    Classes

    else: # Some devices are slow so match on trailing-prompt if you can output = self._send_command_str( - command_string=cmd, strip_prompt=False, strip_command=False + command_string=cmd, + strip_prompt=False, + strip_command=False, + read_timeout=100.0, ) return output
    @@ -661,13 +677,13 @@

    Ancestors

Subclasses

Methods

-def check_config_mode(self, check_string=')#', pattern='') +def check_config_mode(self, check_string: str = ')#', pattern: str = '', force_regex: bool = False) ‑> bool
-

Checks if the device is in configuration mode or not.

-

Cisco IOS devices abbreviate the prompt at 20 chars in config mode

+

Checks if the device is in configuration mode or not.

+

Cisco IOS devices abbreviate the prompt at 20 chars in config mode

-Source code -
def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
+
+Expand source code
+
+
def check_config_mode(
+    self, check_string: str = ")#", pattern: str = "", force_regex: bool = False
+) -> bool:
     """
     Checks if the device is in configuration mode or not.
 
@@ -699,24 +719,28 @@ 

Methods

-def check_enable_mode(self, check_string='#') +def check_enable_mode(self, check_string: str = '#') ‑> bool
-

Check if in enable mode. Return boolean.

+

Check if in enable mode. Return boolean.

-Source code + +Expand source code +
def check_enable_mode(self, check_string: str = "#") -> bool:
     """Check if in enable mode. Return boolean."""
     return super().check_enable_mode(check_string=check_string)
-def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
-

Gracefully exit the SSH session.

+

Gracefully exit the SSH session.

-Source code + +Expand source code +
def cleanup(self, command: str = "exit") -> None:
     """Gracefully exit the SSH session."""
     try:
@@ -731,12 +755,14 @@ 

Methods

-def enable(self, cmd='enable', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
-

Enter enable mode.

+

Enter enable mode.

-Source code + +Expand source code +
def enable(
     self,
     cmd: str = "enable",
@@ -751,36 +777,42 @@ 

Methods

-def exit_config_mode(self, exit_config='end', pattern='#.*') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#.*') ‑> str
-

Exit from configuration mode.

+

Exit from configuration mode.

-Source code + +Expand source code +
def exit_config_mode(self, exit_config: str = "end", pattern: str = r"#.*") -> str:
     """Exit from configuration mode."""
     return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
-def exit_enable_mode(self, exit_command='disable') +def exit_enable_mode(self, exit_command: str = 'disable') ‑> str
-

Exits enable (privileged exec) mode.

+

Exits enable (privileged exec) mode.

-Source code + +Expand source code +
def exit_enable_mode(self, exit_command: str = "disable") -> str:
     """Exits enable (privileged exec) mode."""
     return super().exit_enable_mode(exit_command=exit_command)
-def save_config(self, cmd='copy running-config startup-config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = False, confirm_response: str = '') ‑> str
-

Saves Config.

+

Saves Config.

-Source code + +Expand source code +
def save_config(
     self,
     cmd: str = "copy running-config startup-config",
@@ -805,18 +837,23 @@ 

Methods

else: # Some devices are slow so match on trailing-prompt if you can output = self._send_command_str( - command_string=cmd, strip_prompt=False, strip_command=False + command_string=cmd, + strip_prompt=False, + strip_command=False, + read_timeout=100.0, ) return output
-def serial_login(self, pri_prompt_terminator='\\#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def serial_login(self, pri_prompt_terminator: str = '\\#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
-
+
-Source code + +Expand source code +
def serial_login(
     self,
     pri_prompt_terminator: str = r"\#\s*$",
@@ -844,12 +881,14 @@ 

Methods

-def telnet_login(self, pri_prompt_terminator='\\#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '\\#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
-

Telnet login. Can be username/password or just password.

+

Telnet login. Can be username/password or just password.

-Source code + +Expand source code +
def telnet_login(
     self,
     pri_prompt_terminator: str = r"\#\s*$",
@@ -1006,12 +1045,14 @@ 

Inherited members

class CiscoFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
-

Class to manage SCP file transfer and associated SSH control channel.

+

Class to manage SCP file transfer and associated SSH control channel.

-Source code + +Expand source code +
class CiscoFileTransfer(BaseFileTransfer):
     pass
@@ -1022,8 +1063,8 @@

Ancestors

Subclasses

class CiscoSSHConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
-

Base Class for cisco-like behavior.

+

Base Class for cisco-like behavior.

    Initialize attributes for establishing connection to target device.
 
-    :param ip: IP address of target device. Not required if `host` is
+    :param ip: IP address of target device. Not required if <code>host</code> is
         provided.
 
-    :param host: Hostname of target device. Not required if `ip` is
+    :param host: Hostname of target device. Not required if <code>ip</code> is
             provided.
 
     :param username: Username to authenticate against target device if
@@ -1103,7 +1144,7 @@ 

Inherited members

:param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1148,12 +1189,12 @@

Inherited members

:param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1161,9 +1202,11 @@

Inherited members

:param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
+

-Source code + +Expand source code +
class CiscoSSHConnection(CiscoBaseConnection):
     pass
@@ -1177,11 +1220,11 @@

Subclasses

  • A10SSH
  • AccedianSSH
  • AlcatelAosSSH
  • -
  • AristaBase
  • ApresiaAeosBase
  • +
  • AristaBase
  • ArubaSSH
  • -
  • BrocadeFOSSSH
  • BroadcomIcosSSH
  • +
  • BrocadeFOSSSH
  • CalixB6Base
  • CiscoAsaSSH
  • CiscoFtdSSH
  • @@ -1195,8 +1238,8 @@

    Subclasses

  • DellOS10SSH
  • DellSonicSSH
  • DlinkDSBase
  • -
  • EltexSSH
  • EltexEsrSSH
  • +
  • EltexSSH
  • EndaceSSH
  • EnterasysSSH
  • ExtremeErsSSH
  • @@ -1207,12 +1250,12 @@

    Subclasses

  • ExtremeTierraSSH
  • ExtremeVspSSH
  • ExtremeWingSSH
  • -
  • LinuxSSH
  • FortinetSSH
  • -
  • HPProcurveBase
  • HPComwareBase
  • -
  • MikrotikBase
  • +
  • HPProcurveBase
  • +
  • LinuxSSH
  • MellanoxMlnxosSSH
  • +
  • MikrotikBase
  • MrvLxSSH
  • MrvOptiswitchSSH
  • NetgearProSafeSSH
  • @@ -1315,9 +1358,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/citrix/index.html b/docs/netmiko/citrix/index.html index c2cbea3b2..9cb5a51e1 100644 --- a/docs/netmiko/citrix/index.html +++ b/docs/netmiko/citrix/index.html @@ -3,15 +3,17 @@ - + netmiko.citrix API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.citrix

    -Source code + +Expand source code +
    from netmiko.citrix.netscaler_ssh import NetscalerSSH
     
     __all__ = ["NetscalerSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.citrix.netscaler_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class NetscalerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netscaler SSH class.

    +

    Netscaler SSH class.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class NetscalerSSH(NoConfig, BaseConnection):
         """Netscaler SSH class."""
     
    @@ -204,12 +210,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -220,13 +228,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt.

    -

    Netscaler has only '>' for the prompt.

    +

    Sets self.base_prompt.

    +

    Netscaler has only '>' for the prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -251,12 +261,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip 'Done' from command output

    +

    Strip 'Done' from command output

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip 'Done' from command output"""
         output = super().strip_prompt(a_string)
    @@ -349,9 +361,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/citrix/netscaler_ssh.html b/docs/netmiko/citrix/netscaler_ssh.html index 9560e20ee..73536d398 100644 --- a/docs/netmiko/citrix/netscaler_ssh.html +++ b/docs/netmiko/citrix/netscaler_ssh.html @@ -3,15 +3,17 @@ - + netmiko.citrix.netscaler_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.citrix.netscaler_ssh

    -Source code + +Expand source code +
    from typing import Optional
     from netmiko.no_config import NoConfig
     from netmiko.base_connection import BaseConnection
    @@ -81,16 +85,16 @@ 

    Classes

    class NetscalerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netscaler SSH class.

    +

    Netscaler SSH class.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -129,7 +133,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -174,12 +178,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -187,9 +191,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class NetscalerSSH(NoConfig, BaseConnection):
         """Netscaler SSH class."""
     
    @@ -240,12 +246,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -256,13 +264,15 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt.

    -

    Netscaler has only '>' for the prompt.

    +

    Sets self.base_prompt.

    +

    Netscaler has only '>' for the prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -287,12 +297,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip 'Done' from command output

    +

    Strip 'Done' from command output

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip 'Done' from command output"""
         output = super().strip_prompt(a_string)
    @@ -380,9 +392,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cli_tools/index.html b/docs/netmiko/cli_tools/index.html index 94f2785c8..29ddbef5c 100644 --- a/docs/netmiko/cli_tools/index.html +++ b/docs/netmiko/cli_tools/index.html @@ -3,15 +3,17 @@ - + netmiko.cli_tools API documentation - - - - - + + + + + + +
    @@ -26,15 +28,15 @@

    Sub-modules

    netmiko.cli_tools.netmiko_cfg
    -

    Return output from single show cmd using Netmiko.

    +

    Return output from single show cmd using Netmiko.

    netmiko.cli_tools.netmiko_grep
    -

    Create grep like remote behavior on show run or command output.

    +

    Create grep like remote behavior on show run or command output.

    netmiko.cli_tools.netmiko_show
    -

    Return output from single show cmd using Netmiko.

    +

    Return output from single show cmd using Netmiko.

    @@ -67,9 +69,7 @@

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/cli_tools/netmiko_cfg.html b/docs/netmiko/cli_tools/netmiko_cfg.html index 88e04c3da..1ba66e573 100644 --- a/docs/netmiko/cli_tools/netmiko_cfg.html +++ b/docs/netmiko/cli_tools/netmiko_cfg.html @@ -3,15 +3,17 @@ - + netmiko.cli_tools.netmiko_cfg API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cli_tools.netmiko_cfg

    Return output from single show cmd using Netmiko.

    -Source code + +Expand source code +
    #!/usr/bin/env python
     """Return output from single show cmd using Netmiko."""
     from __future__ import print_function
    @@ -267,9 +271,11 @@ 

    Functions

    def grepx(files, pattern, grep_options, use_colors=True)
    -

    Call system grep

    +

    Call system grep

    -Source code + +Expand source code +
    def grepx(files, pattern, grep_options, use_colors=True):
         """Call system grep"""
         if not isinstance(files, (list, tuple)):
    @@ -294,9 +300,11 @@ 

    Functions

    def main(args)
    -
    +
    -Source code + +Expand source code +
    def main(args):
         start_time = datetime.now()
         cli_args = parse_arguments(args)
    @@ -407,9 +415,11 @@ 

    Functions

    def main_ep()
    -
    +
    -Source code + +Expand source code +
    def main_ep():
         sys.exit(main(sys.argv[1:]))
    @@ -418,9 +428,11 @@

    Functions

    def parse_arguments(args)
    -

    Parse command-line arguments.

    +

    Parse command-line arguments.

    -Source code + +Expand source code +
    def parse_arguments(args):
         """Parse command-line arguments."""
         description = "Execute single config cmd using Netmiko"
    @@ -468,9 +480,11 @@ 

    Functions

    def ssh_conn(device_name, a_device, cfg_command, output_q)
    -
    +
    -Source code + +Expand source code +
    def ssh_conn(device_name, a_device, cfg_command, output_q):
         try:
             net_connect = ConnectHandler(**a_device)
    @@ -513,9 +527,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/cli_tools/netmiko_grep.html b/docs/netmiko/cli_tools/netmiko_grep.html index 96da6a9ee..8c2dd3b59 100644 --- a/docs/netmiko/cli_tools/netmiko_grep.html +++ b/docs/netmiko/cli_tools/netmiko_grep.html @@ -3,15 +3,17 @@ - + netmiko.cli_tools.netmiko_grep API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cli_tools.netmiko_grep

    Create grep like remote behavior on show run or command output.

    -Source code + +Expand source code +
    #!/usr/bin/env python
     """Create grep like remote behavior on show run or command output."""
     from __future__ import print_function
    @@ -258,9 +262,11 @@ 

    Functions

    def grepx(files, pattern, grep_options, use_colors=True)
    -

    Call system grep

    +

    Call system grep

    -Source code + +Expand source code +
    def grepx(files, pattern, grep_options, use_colors=True):
         """Call system grep"""
         if not isinstance(files, (list, tuple)):
    @@ -285,9 +291,11 @@ 

    Functions

    def main(args)
    -
    +
    -Source code + +Expand source code +
    def main(args):
         start_time = datetime.now()
         cli_args = parse_arguments(args)
    @@ -402,9 +410,11 @@ 

    Functions

    def main_ep()
    -
    +
    -Source code + +Expand source code +
    def main_ep():
         sys.exit(main(sys.argv[1:]))
    @@ -413,9 +423,11 @@

    Functions

    def parse_arguments(args)
    -

    Parse command-line arguments.

    +

    Parse command-line arguments.

    -Source code + +Expand source code +
    def parse_arguments(args):
         """Parse command-line arguments."""
         description = "Grep pattern search on Netmiko output (defaults to running-config)"
    @@ -462,9 +474,11 @@ 

    Functions

    def ssh_conn(device_name, a_device, cli_command, output_q)
    -
    +
    -Source code + +Expand source code +
    def ssh_conn(device_name, a_device, cli_command, output_q):
         try:
             net_connect = ConnectHandler(**a_device)
    @@ -505,9 +519,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/cli_tools/netmiko_show.html b/docs/netmiko/cli_tools/netmiko_show.html index 6aa29cb55..274f2795f 100644 --- a/docs/netmiko/cli_tools/netmiko_show.html +++ b/docs/netmiko/cli_tools/netmiko_show.html @@ -3,15 +3,17 @@ - + netmiko.cli_tools.netmiko_show API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.cli_tools.netmiko_show

    Return output from single show cmd using Netmiko.

    -Source code + +Expand source code +
    #!/usr/bin/env python
     """Return output from single show cmd using Netmiko."""
     from __future__ import print_function
    @@ -257,9 +261,11 @@ 

    Functions

    def grepx(files, pattern, grep_options, use_colors=True)
    -

    Call system grep

    +

    Call system grep

    -Source code + +Expand source code +
    def grepx(files, pattern, grep_options, use_colors=True):
         """Call system grep"""
         if not isinstance(files, (list, tuple)):
    @@ -284,9 +290,11 @@ 

    Functions

    def main(args)
    -
    +
    -Source code + +Expand source code +
    def main(args):
         start_time = datetime.now()
         cli_args = parse_arguments(args)
    @@ -401,9 +409,11 @@ 

    Functions

    def main_ep()
    -
    +
    -Source code + +Expand source code +
    def main_ep():
         sys.exit(main(sys.argv[1:]))
    @@ -412,9 +422,11 @@

    Functions

    def parse_arguments(args)
    -

    Parse command-line arguments.

    +

    Parse command-line arguments.

    -Source code + +Expand source code +
    def parse_arguments(args):
         """Parse command-line arguments."""
         description = (
    @@ -460,9 +472,11 @@ 

    Functions

    def ssh_conn(device_name, a_device, cli_command, output_q)
    -
    +
    -Source code + +Expand source code +
    def ssh_conn(device_name, a_device, cli_command, output_q):
         try:
             net_connect = ConnectHandler(**a_device)
    @@ -503,9 +517,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/cloudgenix/cloudgenix_ion.html b/docs/netmiko/cloudgenix/cloudgenix_ion.html index 681e7d7f3..b5462e653 100644 --- a/docs/netmiko/cloudgenix/cloudgenix_ion.html +++ b/docs/netmiko/cloudgenix/cloudgenix_ion.html @@ -3,15 +3,17 @@ - + netmiko.cloudgenix.cloudgenix_ion API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cloudgenix.cloudgenix_ion

    -Source code + +Expand source code +
    from typing import Any, Union, Sequence, TextIO, Optional
     from netmiko.no_config import NoConfig
     from netmiko.cisco_base_connection import CiscoSSHConnection
    @@ -81,10 +85,10 @@ 

    Classes

    class CloudGenixIonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -92,10 +96,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -134,7 +138,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -179,12 +183,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -192,9 +196,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CloudGenixIonSSH(NoConfig, CiscoSSHConnection):
         def establish_connection(self, width: int = 100, height: int = 1000) -> None:
             super().establish_connection(width=width, height=height)
    @@ -247,36 +253,42 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Cloud Genix ION sets terminal height in establish_connection

    +

    Cloud Genix ION sets terminal height in establish_connection

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Cloud Genix ION sets terminal height in establish_connection"""
         return ""
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self, *args, **kwargs) +def session_preparation(self, *args: Any, **kwargs: Any) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self, *args: Any, **kwargs: Any) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -362,9 +374,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/cloudgenix/index.html b/docs/netmiko/cloudgenix/index.html index 1147f698c..9fa98d7de 100644 --- a/docs/netmiko/cloudgenix/index.html +++ b/docs/netmiko/cloudgenix/index.html @@ -3,15 +3,17 @@ - + netmiko.cloudgenix API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.cloudgenix

    -Source code + +Expand source code +
    from netmiko.cloudgenix.cloudgenix_ion import CloudGenixIonSSH
     
     __all__ = ["CloudGenixIonSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.cloudgenix.cloudgenix_ion
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class CloudGenixIonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -56,10 +60,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -143,12 +147,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -156,9 +160,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CloudGenixIonSSH(NoConfig, CiscoSSHConnection):
         def establish_connection(self, width: int = 100, height: int = 1000) -> None:
             super().establish_connection(width=width, height=height)
    @@ -211,36 +217,42 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Cloud Genix ION sets terminal height in establish_connection

    +

    Cloud Genix ION sets terminal height in establish_connection

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Cloud Genix ION sets terminal height in establish_connection"""
         return ""
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self, *args, **kwargs) +def session_preparation(self, *args: Any, **kwargs: Any) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self, *args: Any, **kwargs: Any) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -331,9 +343,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/coriant/coriant_ssh.html b/docs/netmiko/coriant/coriant_ssh.html index 40dc18d23..bd75a5b81 100644 --- a/docs/netmiko/coriant/coriant_ssh.html +++ b/docs/netmiko/coriant/coriant_ssh.html @@ -3,15 +3,17 @@ - + netmiko.coriant.coriant_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.coriant.coriant_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional
     from netmiko.no_enable import NoEnable
     from netmiko.no_config import NoConfig
    @@ -65,10 +69,10 @@ 

    Classes

    class CoriantSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -78,10 +82,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -120,7 +124,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -165,12 +169,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -178,9 +182,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class CoriantSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read(pattern=r"[>:]")
    @@ -217,24 +223,28 @@ 

    Ancestors

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def set_base_prompt(self, pri_prompt_terminator=':', alt_prompt_terminator='>', delay_factor=2.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = ':', alt_prompt_terminator: str = '>', delay_factor: float = 2.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ":",
    @@ -329,9 +339,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/coriant/index.html b/docs/netmiko/coriant/index.html index ab7dbcf15..8c46c9c4a 100644 --- a/docs/netmiko/coriant/index.html +++ b/docs/netmiko/coriant/index.html @@ -3,15 +3,17 @@ - + netmiko.coriant API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.coriant

    -Source code + +Expand source code +
    from netmiko.coriant.coriant_ssh import CoriantSSH
     
     __all__ = ["CoriantSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.coriant.coriant_ssh
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class CoriantSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -145,12 +149,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -158,9 +162,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class CoriantSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read(pattern=r"[>:]")
    @@ -197,24 +203,28 @@ 

    Ancestors

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def set_base_prompt(self, pri_prompt_terminator=':', alt_prompt_terminator='>', delay_factor=2.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = ':', alt_prompt_terminator: str = '>', delay_factor: float = 2.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ":",
    @@ -314,9 +324,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_dnos6.html b/docs/netmiko/dell/dell_dnos6.html index d1e575038..b76c02c6d 100644 --- a/docs/netmiko/dell/dell_dnos6.html +++ b/docs/netmiko/dell/dell_dnos6.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_dnos6 API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.dell.dell_dnos6

    Dell N2/3/4000 base driver- supports DNOS6.

    -Source code + +Expand source code +
    """Dell N2/3/4000 base driver- supports DNOS6."""
     from netmiko.dell.dell_powerconnect import DellPowerConnectBase
     
    @@ -68,16 +72,16 @@ 

    Classes

    class DellDNOS6Base -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -116,7 +120,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -161,12 +165,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -174,9 +178,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellDNOS6Base(DellPowerConnectBase):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -212,12 +218,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -281,16 +289,16 @@ 

    Inherited members

    class DellDNOS6SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -329,7 +337,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -374,12 +382,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -387,9 +395,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellDNOS6SSH(DellDNOS6Base):
         pass
    @@ -451,16 +461,16 @@

    Inherited members

    class DellDNOS6Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -499,7 +509,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -544,12 +554,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -557,9 +567,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellDNOS6Telnet(DellDNOS6Base):
         pass
    @@ -653,9 +665,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_force10_ssh.html b/docs/netmiko/dell/dell_force10_ssh.html index b78262ad4..43f9265a5 100644 --- a/docs/netmiko/dell/dell_force10_ssh.html +++ b/docs/netmiko/dell/dell_force10_ssh.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_force10_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.dell.dell_force10_ssh

    Dell Force10 Driver - supports DNOS9.

    -Source code + +Expand source code +
    """Dell Force10 Driver - supports DNOS9."""
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -53,16 +57,16 @@ 

    Classes

    class DellForce10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell Force10 Driver - supports DNOS9.

    +

    Dell Force10 Driver - supports DNOS9.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -101,7 +105,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -146,12 +150,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -159,9 +163,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellForce10SSH(CiscoSSHConnection):
         """Dell Force10 Driver - supports DNOS9."""
     
    @@ -185,12 +191,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -280,9 +288,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_isilon_ssh.html b/docs/netmiko/dell/dell_isilon_ssh.html index 27a5881f9..08b206f75 100644 --- a/docs/netmiko/dell/dell_isilon_ssh.html +++ b/docs/netmiko/dell/dell_isilon_ssh.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_isilon_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.dell.dell_isilon_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional
     import time
     import re
    @@ -108,7 +112,9 @@ 

    Module netmiko.dell.dell_isilon_ssh

    def exit_enable_mode(self, exit_command: str = "exit") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Use equivalent enable method.""" return self.check_enable_mode(check_string=check_string) @@ -137,17 +143,17 @@

    Classes

    class DellIsilonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -186,7 +192,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -231,12 +237,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -244,9 +250,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellIsilonSSH(BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -326,7 +334,9 @@ 

    Classes

    def exit_enable_mode(self, exit_command: str = "exit") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Use equivalent enable method.""" return self.check_enable_mode(check_string=check_string) @@ -350,24 +360,30 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='#', pattern='') +def check_config_mode(self, check_string: str = '#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Use equivalent enable method."""
         return self.check_enable_mode(check_string=check_string)
    -def config_mode(self, config_command='sudo su', pattern='ssword', re_flags=re.IGNORECASE) +def config_mode(self, config_command: str = 'sudo su', pattern: str = 'ssword', re_flags: int = re.IGNORECASE) ‑> str
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "sudo su",
    @@ -379,36 +395,42 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Isilon doesn't have paging by default.

    +

    Isilon doesn't have paging by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Isilon doesn't have paging by default."""
         return ""
    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Use equivalent enable method."""
         return self.exit_enable_mode(exit_command=exit_config)
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -419,12 +441,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Determine base prompt.

    +

    Determine base prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "$",
    @@ -442,12 +466,14 @@ 

    Methods

    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Remove Null code

    +

    Remove Null code

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """Remove Null code"""
         output = re.sub(r"\x00", "", string_buffer)
    @@ -531,9 +557,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_os10_ssh.html b/docs/netmiko/dell/dell_os10_ssh.html index d0c3732ab..bc5721298 100644 --- a/docs/netmiko/dell/dell_os10_ssh.html +++ b/docs/netmiko/dell/dell_os10_ssh.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_os10_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.dell.dell_os10_ssh

    Dell EMC Networking OS10 Driver - supports dellos10.

    -Source code + +Expand source code +
    """Dell EMC Networking OS10 Driver - supports dellos10."""
     from typing import Any, Optional
     from netmiko.base_connection import BaseConnection
    @@ -159,12 +163,14 @@ 

    Classes

    class DellOS10FileTransfer -(ssh_conn, source_file, dest_file, file_system='/home/admin', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/home/admin', direction: str = 'put', **kwargs: Any)
    -

    Dell EMC Networking OS10 SCP File Transfer driver.

    +

    Dell EMC Networking OS10 SCP File Transfer driver.

    -Source code + +Expand source code +
    class DellOS10FileTransfer(BaseFileTransfer):
         """Dell EMC Networking OS10 SCP File Transfer driver."""
     
    @@ -272,12 +278,14 @@ 

    Ancestors

    Methods

    -def remote_md5(self, base_cmd='verify /md5', remote_file=None) +def remote_md5(self, base_cmd: str = 'verify /md5', remote_file: Optional[str] = None) ‑> str
    -

    Calculate remote MD5 and returns the hash.

    +

    Calculate remote MD5 and returns the hash.

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "verify /md5", remote_file: Optional[str] = None
     ) -> str:
    @@ -322,16 +330,16 @@ 

    Inherited members

    class DellOS10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell EMC Networking OS10 Driver - supports dellos10.

    +

    Dell EMC Networking OS10 Driver - supports dellos10.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -370,7 +378,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -415,12 +423,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -428,9 +436,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellOS10SSH(CiscoSSHConnection):
         """Dell EMC Networking OS10 Driver - supports dellos10."""
     
    @@ -454,12 +464,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -555,9 +567,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_powerconnect.html b/docs/netmiko/dell/dell_powerconnect.html index 2080d71e4..aac828647 100644 --- a/docs/netmiko/dell/dell_powerconnect.html +++ b/docs/netmiko/dell/dell_powerconnect.html @@ -3,15 +3,17 @@ - + netmiko.dell.dell_powerconnect API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.dell.dell_powerconnect

    Dell PowerConnect Driver.

    -Source code + +Expand source code +
    """Dell PowerConnect Driver."""
     from typing import Optional
     from paramiko import SSHClient
    @@ -62,7 +66,10 @@ 

    Module netmiko.dell.dell_powerconnect

    return self.base_prompt def check_config_mode( - self, check_string: str = "(config)#", pattern: str = "" + self, + check_string: str = "(config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -151,16 +158,16 @@

    Classes

    class DellPowerConnectBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -199,7 +206,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -244,12 +251,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -257,9 +264,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectBase(CiscoBaseConnection):
         """Dell PowerConnect Driver."""
     
    @@ -290,7 +299,10 @@ 

    Classes

    return self.base_prompt def check_config_mode( - self, check_string: str = "(config)#", pattern: str = "" + self, + check_string: str = "(config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -309,33 +321,40 @@

    Ancestors

    Subclasses

    Methods

    -def check_config_mode(self, check_string='(config)#', pattern='') +def check_config_mode(self, check_string: str = '(config)#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode

    +

    Checks if the device is in configuration mode

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "(config)#", pattern: str = ""
    +    self,
    +    check_string: str = "(config)#",
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks if the device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -346,12 +365,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -420,18 +441,18 @@ 

    Inherited members

    class DellPowerConnectSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

    To make it work, we have to override the SSHClient _auth method. If we use login/password, the ssh server use the (none) auth mechanism.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -470,7 +491,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -515,12 +536,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -528,9 +549,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectSSH(DellPowerConnectBase):
         """Dell PowerConnect Driver.
     
    @@ -598,14 +621,16 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Powerconnect presents with the following on login

    +

    Powerconnect presents with the following on login

    User Name:

    -

    Password: ****

    +

    Password: ****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """
         Powerconnect presents with the following on login
    @@ -686,16 +711,16 @@ 

    Inherited members

    class DellPowerConnectTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Telnet Driver.

    +

    Dell PowerConnect Telnet Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -734,7 +759,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -779,12 +804,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -792,9 +817,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectTelnet(DellPowerConnectBase):
         """Dell PowerConnect Telnet Driver."""
     
    @@ -894,9 +921,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/dell_sonic_ssh.html b/docs/netmiko/dell/dell_sonic_ssh.html index 1e4a7b507..ec31f2f92 100644 --- a/docs/netmiko/dell/dell_sonic_ssh.html +++ b/docs/netmiko/dell/dell_sonic_ssh.html @@ -3,16 +3,18 @@ - + netmiko.dell.dell_sonic_ssh API documentation - - - - - + + + + + + +
    @@ -24,7 +26,9 @@

    Module netmiko.dell.dell_sonic_ssh

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver - supports dellenterprisesonic.

    -Source code + +Expand source code +
    """
     Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver
     - supports dellenterprisesonic.
    @@ -78,17 +82,17 @@ 

    Classes

    class DellSonicSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution +

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver - supports dellenterprisesonic.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -127,7 +131,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -172,12 +176,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -185,9 +189,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellSonicSSH(NoEnable, CiscoSSHConnection):
         """
         Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution
    @@ -230,12 +236,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>$#]")
    @@ -321,9 +329,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dell/index.html b/docs/netmiko/dell/index.html index 59e1a7d1d..40f7e89c1 100644 --- a/docs/netmiko/dell/index.html +++ b/docs/netmiko/dell/index.html @@ -3,15 +3,17 @@ - + netmiko.dell API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.dell

    -Source code + +Expand source code +
    from netmiko.dell.dell_dnos6 import DellDNOS6SSH
     from netmiko.dell.dell_dnos6 import DellDNOS6Telnet
     from netmiko.dell.dell_force10_ssh import DellForce10SSH
    @@ -49,28 +53,28 @@ 

    Sub-modules

    netmiko.dell.dell_dnos6
    -

    Dell N2/3/4000 base driver- supports DNOS6.

    +

    Dell N2/3/4000 base driver- supports DNOS6.

    netmiko.dell.dell_force10_ssh
    -

    Dell Force10 Driver - supports DNOS9.

    +

    Dell Force10 Driver - supports DNOS9.

    netmiko.dell.dell_isilon_ssh
    -
    +
    netmiko.dell.dell_os10_ssh
    -

    Dell EMC Networking OS10 Driver - supports dellos10.

    +

    Dell EMC Networking OS10 Driver - supports dellos10.

    netmiko.dell.dell_powerconnect
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

    netmiko.dell.dell_sonic_ssh
    -

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver -- supports dellenterprisesonic.

    +

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver +- supports dellenterprisesonic.

    @@ -83,16 +87,16 @@

    Classes

    class DellDNOS6SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -131,7 +135,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -176,12 +180,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -189,9 +193,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class DellDNOS6SSH(DellDNOS6Base):
         pass
    @@ -253,16 +259,16 @@

    Inherited members

    class DellDNOS6Telnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -301,7 +307,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -346,12 +352,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -359,9 +365,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellDNOS6Telnet(DellDNOS6Base):
         pass
    @@ -423,16 +431,16 @@

    Inherited members

    class DellForce10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell Force10 Driver - supports DNOS9.

    +

    Dell Force10 Driver - supports DNOS9.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -471,7 +479,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -516,12 +524,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -529,9 +537,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellForce10SSH(CiscoSSHConnection):
         """Dell Force10 Driver - supports DNOS9."""
     
    @@ -555,12 +565,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -624,17 +636,17 @@ 

    Inherited members

    class DellIsilonSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -673,7 +685,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -718,12 +730,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -731,9 +743,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellIsilonSSH(BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -813,7 +827,9 @@ 

    Inherited members

    def exit_enable_mode(self, exit_command: str = "exit") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Use equivalent enable method.""" return self.check_enable_mode(check_string=check_string) @@ -837,24 +853,30 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='#', pattern='') +def check_config_mode(self, check_string: str = '#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Use equivalent enable method."""
         return self.check_enable_mode(check_string=check_string)
    -def config_mode(self, config_command='sudo su', pattern='ssword', re_flags=re.IGNORECASE) +def config_mode(self, config_command: str = 'sudo su', pattern: str = 'ssword', re_flags: int = re.IGNORECASE) ‑> str
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "sudo su",
    @@ -866,36 +888,42 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Isilon doesn't have paging by default.

    +

    Isilon doesn't have paging by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Isilon doesn't have paging by default."""
         return ""
    -def exit_config_mode(self, exit_config='exit', pattern='') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '') ‑> str
    -

    Use equivalent enable method.

    +

    Use equivalent enable method.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str:
         """Use equivalent enable method."""
         return self.exit_enable_mode(exit_command=exit_config)
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -906,12 +934,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Determine base prompt.

    +

    Determine base prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "$",
    @@ -929,12 +959,14 @@ 

    Methods

    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Remove Null code

    +

    Remove Null code

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """Remove Null code"""
         output = re.sub(r"\x00", "", string_buffer)
    @@ -986,12 +1018,14 @@ 

    Inherited members

    class DellOS10FileTransfer -(ssh_conn, source_file, dest_file, file_system='/home/admin', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/home/admin', direction: str = 'put', **kwargs: Any)
    -

    Dell EMC Networking OS10 SCP File Transfer driver.

    +

    Dell EMC Networking OS10 SCP File Transfer driver.

    -Source code + +Expand source code +
    class DellOS10FileTransfer(BaseFileTransfer):
         """Dell EMC Networking OS10 SCP File Transfer driver."""
     
    @@ -1099,12 +1133,14 @@ 

    Ancestors

    Methods

    -def remote_md5(self, base_cmd='verify /md5', remote_file=None) +def remote_md5(self, base_cmd: str = 'verify /md5', remote_file: Optional[str] = None) ‑> str
    -

    Calculate remote MD5 and returns the hash.

    +

    Calculate remote MD5 and returns the hash.

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "verify /md5", remote_file: Optional[str] = None
     ) -> str:
    @@ -1149,16 +1185,16 @@ 

    Inherited members

    class DellOS10SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell EMC Networking OS10 Driver - supports dellos10.

    +

    Dell EMC Networking OS10 Driver - supports dellos10.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1197,7 +1233,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1242,12 +1278,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1255,9 +1291,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellOS10SSH(CiscoSSHConnection):
         """Dell EMC Networking OS10 Driver - supports dellos10."""
     
    @@ -1281,12 +1319,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-configuration startup-configuration', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-configuration startup-configuration', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-configuration startup-configuration",
    @@ -1350,18 +1390,18 @@ 

    Inherited members

    class DellPowerConnectSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Driver.

    +

    Dell PowerConnect Driver.

    To make it work, we have to override the SSHClient _auth method. If we use login/password, the ssh server use the (none) auth mechanism.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1400,7 +1440,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1445,12 +1485,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1458,9 +1498,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectSSH(DellPowerConnectBase):
         """Dell PowerConnect Driver.
     
    @@ -1528,14 +1570,16 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Powerconnect presents with the following on login

    +

    Powerconnect presents with the following on login

    User Name:

    -

    Password: ****

    +

    Password: ****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """
         Powerconnect presents with the following on login
    @@ -1616,16 +1660,16 @@ 

    Inherited members

    class DellPowerConnectTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell PowerConnect Telnet Driver.

    +

    Dell PowerConnect Telnet Driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1664,7 +1708,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1709,12 +1753,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1722,9 +1766,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellPowerConnectTelnet(DellPowerConnectBase):
         """Dell PowerConnect Telnet Driver."""
     
    @@ -1787,17 +1833,17 @@ 

    Inherited members

    class DellSonicSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution +

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution by Dell Technologies Driver - supports dellenterprisesonic.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1836,7 +1882,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1881,12 +1927,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1894,9 +1940,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DellSonicSSH(NoEnable, CiscoSSHConnection):
         """
         Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution
    @@ -1939,12 +1987,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>$#]")
    @@ -2085,9 +2135,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/dlink/dlink_ds.html b/docs/netmiko/dlink/dlink_ds.html index 8d2ae473b..e9308a4b0 100644 --- a/docs/netmiko/dlink/dlink_ds.html +++ b/docs/netmiko/dlink/dlink_ds.html @@ -3,15 +3,17 @@ - + netmiko.dlink.dlink_ds API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.dlink.dlink_ds

    -Source code + +Expand source code +
    from typing import Any
     from netmiko.no_enable import NoEnable
     from netmiko.no_config import NoConfig
    @@ -74,16 +78,16 @@ 

    Classes

    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -122,7 +126,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -167,12 +171,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -180,9 +184,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DlinkDSBase(NoEnable, NoConfig, CiscoSSHConnection):
         """Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)"""
     
    @@ -222,12 +228,14 @@ 

    Subclasses

    Methods

    -

    Return paging before disconnect

    +

    Return paging before disconnect

    -Source code + +Expand source code +
    def cleanup(self, command: str = "logout") -> None:
         """Return paging before disconnect"""
         self.send_command_timing("enable clipaging")
    @@ -235,12 +243,14 @@ 

    Methods

    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -251,12 +261,14 @@ 

    Methods

    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -314,16 +326,16 @@ 

    Inherited members

    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -362,7 +374,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -407,12 +419,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -420,9 +432,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DlinkDSSSH(DlinkDSBase):
         pass
    @@ -486,16 +500,16 @@

    Inherited members

    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -534,7 +548,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -579,12 +593,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -592,9 +606,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DlinkDSTelnet(DlinkDSBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -695,9 +711,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/dlink/index.html b/docs/netmiko/dlink/index.html index e40cf2bae..32be79183 100644 --- a/docs/netmiko/dlink/index.html +++ b/docs/netmiko/dlink/index.html @@ -3,15 +3,17 @@ - + netmiko.dlink API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.dlink

    -Source code + +Expand source code +
    from netmiko.dlink.dlink_ds import DlinkDSTelnet, DlinkDSSSH
     
     __all__ = ["DlinkDSTelnet", "DlinkDSSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.dlink.dlink_ds
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class DlinkDSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class DlinkDSSSH(DlinkDSBase):
         pass
    @@ -217,16 +223,16 @@

    Inherited members

    class DlinkDSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    +

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -265,7 +271,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -310,12 +316,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -323,9 +329,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class DlinkDSTelnet(DlinkDSBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -423,9 +431,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/eltex/eltex_esr_ssh.html b/docs/netmiko/eltex/eltex_esr_ssh.html index 6e3d79389..4a9a48bd5 100644 --- a/docs/netmiko/eltex/eltex_esr_ssh.html +++ b/docs/netmiko/eltex/eltex_esr_ssh.html @@ -3,15 +3,17 @@ - + netmiko.eltex.eltex_esr_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.eltex.eltex_esr_ssh

    -Source code + +Expand source code +
    from typing import Optional, Any
     import warnings
     from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG
    @@ -50,7 +54,10 @@ 

    Module netmiko.eltex.eltex_esr_ssh

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = "" + self, + check_string: str = "(config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -166,16 +173,16 @@

    Classes

    class EltexEsrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netmiko support for routers Eltex ESR.

    +

    Netmiko support for routers Eltex ESR.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -214,7 +221,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -259,12 +266,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -272,9 +279,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class EltexEsrSSH(CiscoSSHConnection):
         """Netmiko support for routers Eltex ESR."""
     
    @@ -297,7 +306,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = "" + self, + check_string: str = "(config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -410,32 +422,39 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='(config', pattern='') +def check_config_mode(self, check_string: str = '(config', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks whether in configuration mode. Returns a boolean.

    +

    Checks whether in configuration mode. Returns a boolean.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "(config", pattern: str = ""
    +    self,
    +    check_string: str = "(config",
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks whether in configuration mode. Returns a boolean."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, read_timeout=120.0, delay_factor=None) +def commit(self, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration. +

    Commit the candidate configuration. Commit the entered configuration. Raise an error and return the failure if the commit fails. default: command_string = commit

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self, read_timeout: float = 120.0, delay_factor: Optional[float] = None
     ) -> str:
    @@ -472,12 +491,14 @@ 

    Methods

    -def config_mode(self, config_command='configure', pattern='\\)\\#', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '\\)\\#', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "configure",
    @@ -491,24 +512,28 @@ 

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented (use commit() method)

    +

    Not Implemented (use commit() method)

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented (use commit() method)"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -594,9 +619,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/eltex/eltex_ssh.html b/docs/netmiko/eltex/eltex_ssh.html index 9dd3cc8d5..0b39b8ae2 100644 --- a/docs/netmiko/eltex/eltex_ssh.html +++ b/docs/netmiko/eltex/eltex_ssh.html @@ -3,15 +3,17 @@ - + netmiko.eltex.eltex_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.eltex.eltex_ssh

    -Source code + +Expand source code +
    from typing import Any
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -50,16 +54,16 @@ 

    Classes

    class EltexSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -143,12 +147,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -156,9 +160,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class EltexSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -180,24 +186,28 @@ 

    Ancestors

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -283,9 +293,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/eltex/index.html b/docs/netmiko/eltex/index.html index d8e17cec8..b178c848a 100644 --- a/docs/netmiko/eltex/index.html +++ b/docs/netmiko/eltex/index.html @@ -3,15 +3,17 @@ - + netmiko.eltex API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.eltex

    -Source code + +Expand source code +
    from netmiko.eltex.eltex_ssh import EltexSSH
     from netmiko.eltex.eltex_esr_ssh import EltexEsrSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.eltex.eltex_esr_ssh
    -
    +
    netmiko.eltex.eltex_ssh
    -
    +
    @@ -50,16 +54,16 @@

    Classes

    class EltexEsrSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netmiko support for routers Eltex ESR.

    +

    Netmiko support for routers Eltex ESR.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -143,12 +147,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -156,9 +160,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class EltexEsrSSH(CiscoSSHConnection):
         """Netmiko support for routers Eltex ESR."""
     
    @@ -181,7 +187,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = "" + self, + check_string: str = "(config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -294,32 +303,39 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string='(config', pattern='') +def check_config_mode(self, check_string: str = '(config', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks whether in configuration mode. Returns a boolean.

    +

    Checks whether in configuration mode. Returns a boolean.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "(config", pattern: str = ""
    +    self,
    +    check_string: str = "(config",
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Checks whether in configuration mode. Returns a boolean."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, read_timeout=120.0, delay_factor=None) +def commit(self, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration. +

    Commit the candidate configuration. Commit the entered configuration. Raise an error and return the failure if the commit fails. default: command_string = commit

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self, read_timeout: float = 120.0, delay_factor: Optional[float] = None
     ) -> str:
    @@ -356,12 +372,14 @@ 

    Methods

    -def config_mode(self, config_command='configure', pattern='\\)\\#', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '\\)\\#', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "configure",
    @@ -375,24 +393,28 @@ 

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented (use commit() method)

    +

    Not Implemented (use commit() method)

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented (use commit() method)"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -448,16 +470,16 @@ 

    Inherited members

    class EltexSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -496,7 +518,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -541,12 +563,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -554,9 +576,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class EltexSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -578,24 +602,28 @@ 

    Ancestors

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -697,9 +725,7 @@ 

    Eltex

    - - \ No newline at end of file diff --git a/docs/netmiko/endace/endace_ssh.html b/docs/netmiko/endace/endace_ssh.html index ed518a022..3d1a48f5b 100644 --- a/docs/netmiko/endace/endace_ssh.html +++ b/docs/netmiko/endace/endace_ssh.html @@ -3,15 +3,17 @@ - + netmiko.endace.endace_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.endace.endace_ssh

    -Source code + +Expand source code +
    from typing import Optional
     from netmiko.cisco_base_connection import CiscoSSHConnection
     import re
    @@ -46,7 +50,10 @@ 

    Module netmiko.endace.endace_ssh

    ) def check_config_mode( - self, check_string: str = "(config) #", pattern: str = "" + self, + check_string: str = "(config) #", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -93,16 +100,16 @@

    Classes

    class EndaceSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -141,7 +148,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -186,12 +193,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -199,9 +206,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class EndaceSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read()
    @@ -221,7 +230,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config) #", pattern: str = "" + self, + check_string: str = "(config) #", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -336,9 +348,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/endace/index.html b/docs/netmiko/endace/index.html index 38d4ba2f8..ff4d45127 100644 --- a/docs/netmiko/endace/index.html +++ b/docs/netmiko/endace/index.html @@ -3,15 +3,17 @@ - + netmiko.endace API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.endace

    -Source code + +Expand source code +
    from netmiko.endace.endace_ssh import EndaceSSH
     
     __all__ = ["EndaceSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.endace.endace_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class EndaceSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class EndaceSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read()
    @@ -173,7 +179,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config) #", pattern: str = "" + self, + check_string: str = "(config) #", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -293,9 +302,7 @@

    E

    - - \ No newline at end of file diff --git a/docs/netmiko/enterasys/enterasys_ssh.html b/docs/netmiko/enterasys/enterasys_ssh.html index 005449156..435193e52 100644 --- a/docs/netmiko/enterasys/enterasys_ssh.html +++ b/docs/netmiko/enterasys/enterasys_ssh.html @@ -3,15 +3,17 @@ - + netmiko.enterasys.enterasys_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.enterasys.enterasys_ssh

    Enterasys support.

    -Source code + +Expand source code +
    """Enterasys support."""
     from typing import Any
     from netmiko.cisco_base_connection import CiscoSSHConnection
    @@ -53,16 +57,16 @@ 

    Classes

    class EnterasysSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Enterasys support.

    +

    Enterasys support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -101,7 +105,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -146,12 +150,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -159,9 +163,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class EnterasysSSH(CiscoSSHConnection):
         """Enterasys support."""
     
    @@ -184,24 +190,28 @@ 

    Ancestors

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Enterasys requires enable mode to disable paging.

    +

    Enterasys requires enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Enterasys requires enable mode to disable paging."""
         self._test_channel_read(pattern=r">")
    @@ -286,9 +296,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/enterasys/index.html b/docs/netmiko/enterasys/index.html index ffd9388f0..1ab380551 100644 --- a/docs/netmiko/enterasys/index.html +++ b/docs/netmiko/enterasys/index.html @@ -3,15 +3,17 @@ - + netmiko.enterasys API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.enterasys

    -Source code + +Expand source code +
    from netmiko.enterasys.enterasys_ssh import EnterasysSSH
     
     __all__ = ["EnterasysSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.enterasys.enterasys_ssh
    -

    Enterasys support.

    +

    Enterasys support.

    @@ -45,16 +49,16 @@

    Classes

    class EnterasysSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Enterasys support.

    +

    Enterasys support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class EnterasysSSH(CiscoSSHConnection):
         """Enterasys support."""
     
    @@ -176,24 +182,28 @@ 

    Ancestors

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Enterasys requires enable mode to disable paging.

    +

    Enterasys requires enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Enterasys requires enable mode to disable paging."""
         self._test_channel_read(pattern=r">")
    @@ -283,9 +293,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ericsson/ericsson_ipos.html b/docs/netmiko/ericsson/ericsson_ipos.html index afb38cfe6..ea249833f 100644 --- a/docs/netmiko/ericsson/ericsson_ipos.html +++ b/docs/netmiko/ericsson/ericsson_ipos.html @@ -3,15 +3,17 @@ - + netmiko.ericsson.ericsson_ipos API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.ericsson.ericsson_ipos

    Ericsson Ipos looks like it was RedBack equipment.

    -Source code + +Expand source code +
    """
     Ericsson Ipos looks like it was RedBack equipment.
     """
    @@ -57,7 +61,9 @@ 

    Module netmiko.ericsson.ericsson_ipos

    def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( @@ -182,17 +188,17 @@

    Classes

    class EricssonIposSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -231,7 +237,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -276,12 +282,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -289,9 +295,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class EricssonIposSSH(BaseConnection):
         def session_preparation(self) -> None:
             self._test_channel_read(pattern=r"[>#]")
    @@ -316,7 +324,9 @@ 

    Classes

    def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( @@ -436,16 +446,18 @@

    Ancestors

    Methods

    -def commit(self, confirm=False, confirm_delay=None, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -505,15 +517,17 @@ 

    Methods

    -def exit_config_mode(self, exit_config='end', pattern='#') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#') ‑> str
    -

    Exit from configuration mode. +

    Exit from configuration mode. Ercisson output : end -Commit configuration changes and return to exec mode

    +Commit configuration changes and return to exec mode

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = "#") -> str:
         """
         Exit from configuration mode.
    @@ -524,12 +538,14 @@ 

    Methods

    -def save_config(self, cmd='save config', confirm=True, confirm_response='yes') +def save_config(self, cmd: str = 'save config', confirm: bool = True, confirm_response: str = 'yes') ‑> str
    -

    Saves configuration

    +

    Saves configuration

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -559,12 +575,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    Ericsson IPOS requires you not exit from configuration mode.

    +

    Ericsson IPOS requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -654,9 +672,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ericsson/index.html b/docs/netmiko/ericsson/index.html index 28fcbdade..6d7992990 100644 --- a/docs/netmiko/ericsson/index.html +++ b/docs/netmiko/ericsson/index.html @@ -3,15 +3,17 @@ - + netmiko.ericsson API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ericsson

    -Source code + +Expand source code +
    from netmiko.ericsson.ericsson_ipos import EricssonIposSSH
     
     __all__ = ["EricssonIposSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.ericsson.ericsson_ipos
    -

    Ericsson Ipos looks like it was RedBack equipment.

    +

    Ericsson Ipos looks like it was RedBack equipment.

    @@ -45,17 +49,17 @@

    Classes

    class EricssonIposSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -139,12 +143,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -152,9 +156,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class EricssonIposSSH(BaseConnection):
         def session_preparation(self) -> None:
             self._test_channel_read(pattern=r"[>#]")
    @@ -179,7 +185,9 @@ 

    Classes

    def exit_enable_mode(self, exit_command: str = "disable") -> str: return super().exit_enable_mode(exit_command=exit_command) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( @@ -299,16 +307,18 @@

    Ancestors

    Methods

    -def commit(self, confirm=False, confirm_delay=None, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -368,15 +378,17 @@ 

    Methods

    -def exit_config_mode(self, exit_config='end', pattern='#') +def exit_config_mode(self, exit_config: str = 'end', pattern: str = '#') ‑> str
    -

    Exit from configuration mode. +

    Exit from configuration mode. Ercisson output : end -Commit configuration changes and return to exec mode

    +Commit configuration changes and return to exec mode

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "end", pattern: str = "#") -> str:
         """
         Exit from configuration mode.
    @@ -387,12 +399,14 @@ 

    Methods

    -def save_config(self, cmd='save config', confirm=True, confirm_response='yes') +def save_config(self, cmd: str = 'save config', confirm: bool = True, confirm_response: str = 'yes') ‑> str
    -

    Saves configuration

    +

    Saves configuration

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -422,12 +436,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    Ericsson IPOS requires you not exit from configuration mode.

    +

    Ericsson IPOS requires you not exit from configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -522,9 +538,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/exceptions.html b/docs/netmiko/exceptions.html index ad8b6a8fb..03a0c8ef2 100644 --- a/docs/netmiko/exceptions.html +++ b/docs/netmiko/exceptions.html @@ -3,15 +3,17 @@ - + netmiko.exceptions API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.exceptions

    -Source code + +Expand source code +
    from paramiko.ssh_exception import SSHException
     from paramiko.ssh_exception import AuthenticationException
     
    @@ -94,9 +98,11 @@ 

    Classes

    (*args, **kwargs)
    -

    Exception raised for invalid configuration error.

    +

    Exception raised for invalid configuration error.

    -Source code + +Expand source code +
    class ConfigInvalidException(NetmikoBaseException):
         """Exception raised for invalid configuration error."""
     
    @@ -114,9 +120,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    Generic exception indicating the connection failed.

    +

    Generic exception indicating the connection failed.

    -Source code + +Expand source code +
    class ConnectionException(NetmikoBaseException):
         """Generic exception indicating the connection failed."""
     
    @@ -130,13 +138,15 @@ 

    Ancestors

    -class NetMikoAuthenticationException +class NetmikoAuthenticationException (*args, **kwargs)
    -

    SSH authentication exception based on Paramiko AuthenticationException.

    +

    SSH authentication exception based on Paramiko AuthenticationException.

    -Source code + +Expand source code +
    class NetmikoAuthenticationException(AuthenticationException):
         """SSH authentication exception based on Paramiko AuthenticationException."""
     
    @@ -150,34 +160,16 @@ 

    Ancestors

  • builtins.BaseException
  • -
    -class NetMikoTimeoutException -(*args, **kwargs) -
    -
    -

    SSH session timed trying to connect to the device.

    -
    -Source code -
    class NetmikoTimeoutException(SSHException):
    -    """SSH session timed trying to connect to the device."""
    -
    -    pass
    -
    -

    Ancestors

    -
      -
    • paramiko.ssh_exception.SSHException
    • -
    • builtins.Exception
    • -
    • builtins.BaseException
    • -
    -
    -class NetmikoAuthenticationException +class NetMikoAuthenticationException (*args, **kwargs)
    -

    SSH authentication exception based on Paramiko AuthenticationException.

    +

    SSH authentication exception based on Paramiko AuthenticationException.

    -Source code + +Expand source code +
    class NetmikoAuthenticationException(AuthenticationException):
         """SSH authentication exception based on Paramiko AuthenticationException."""
     
    @@ -196,9 +188,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General base exception except for exceptions that inherit from Paramiko.

    +

    General base exception except for exceptions that inherit from Paramiko.

    -Source code + +Expand source code +
    class NetmikoBaseException(Exception):
         """General base exception except for exceptions that inherit from Paramiko."""
     
    @@ -211,10 +205,10 @@ 

    Ancestors

    Subclasses

    @@ -222,9 +216,33 @@

    Subclasses

    (*args, **kwargs)
    -

    SSH session timed trying to connect to the device.

    +

    SSH session timed trying to connect to the device.

    -Source code + +Expand source code + +
    class NetmikoTimeoutException(SSHException):
    +    """SSH session timed trying to connect to the device."""
    +
    +    pass
    +
    +

    Ancestors

    +
      +
    • paramiko.ssh_exception.SSHException
    • +
    • builtins.Exception
    • +
    • builtins.BaseException
    • +
    +
    +
    +class NetMikoTimeoutException +(*args, **kwargs) +
    +
    +

    SSH session timed trying to connect to the device.

    +
    + +Expand source code +
    class NetmikoTimeoutException(SSHException):
         """SSH session timed trying to connect to the device."""
     
    @@ -242,9 +260,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko read operation.

    +

    General exception indicating an error occurred during a Netmiko read operation.

    -Source code + +Expand source code +
    class ReadException(NetmikoBaseException):
         """General exception indicating an error occurred during a Netmiko read operation."""
     
    @@ -266,9 +286,11 @@ 

    Subclasses

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko read operation.

    +

    General exception indicating an error occurred during a Netmiko read operation.

    -Source code + +Expand source code +
    class ReadTimeout(ReadException):
         """General exception indicating an error occurred during a Netmiko read operation."""
     
    @@ -287,9 +309,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko write operation.

    +

    General exception indicating an error occurred during a Netmiko write operation.

    -Source code + +Expand source code +
    class WriteException(NetmikoBaseException):
         """General exception indicating an error occurred during a Netmiko write operation."""
     
    @@ -328,9 +352,6 @@ 

    NetmikoAuthenticationException

  • -

    NetmikoTimeoutException

    -
  • -
  • NetmikoAuthenticationException

  • @@ -340,6 +361,9 @@

    NetmikoTimeoutException

  • +

    NetmikoTimeoutException

    +
  • +
  • ReadException

  • @@ -354,9 +378,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_ers_ssh.html b/docs/netmiko/extreme/extreme_ers_ssh.html index c64ffbdb0..97f37e317 100644 --- a/docs/netmiko/extreme/extreme_ers_ssh.html +++ b/docs/netmiko/extreme/extreme_ers_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_ers_ssh API documentation - - - - - + + + + + + +
    @@ -22,10 +24,13 @@

    Module netmiko.extreme.extreme_ers_ssh

    Netmiko support for Extreme Ethernet Routing Switch.

    -Source code + +Expand source code +
    """Netmiko support for Extreme Ethernet Routing Switch."""
    -import time
    +import re
     from netmiko.cisco_base_connection import CiscoSSHConnection
    +from netmiko.exceptions import NetmikoAuthenticationException
     
     # Extreme ERS presents Enter Ctrl-Y to begin.
     CTRL_Y = "\x19"
    @@ -34,8 +39,10 @@ 

    Module netmiko.extreme.extreme_ers_ssh

    class ExtremeErsSSH(CiscoSSHConnection): """Netmiko support for Extreme Ethernet Routing Switch.""" + prompt_pattern = r"(?m:[>#]\s*$)" # force re.Multiline + def session_preparation(self) -> None: - self._test_channel_read(pattern=r"[>#]") + # special_login_handler() will always ensure self.prompt_pattern self.set_base_prompt() self.set_terminal_width() self.disable_paging() @@ -44,30 +51,43 @@

    Module netmiko.extreme.extreme_ers_ssh

    """ Extreme ERS presents the following as part of the login process: - Enter Ctrl-Y to begin. + Enter Ctrl-Y to begin + + Older devices the Ctrl-Y is before SSH-login (not 100% sure of this). + + Newer devices this is after SSH-login. """ - delay_factor = self.select_delay_factor(delay_factor) - # Handle 'Enter Ctrl-Y to begin' output = "" - i = 0 - while i <= 12: - output = self.read_channel() - if output: - if "Ctrl-Y" in output: - self.write_channel(CTRL_Y) - if "sername" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "ssword" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(0.5 * delay_factor) + uname = "sername" + password = "ssword" + cntl_y = "Ctrl-Y" + pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})" + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if cntl_y in new_data: + self.write_channel(CTRL_Y) + elif uname in new_data: + assert isinstance(self.username, str) + self.write_channel(self.username + self.RETURN) + elif password in new_data: + assert isinstance(self.password, str) + self.write_channel(self.password + self.RETURN) else: - self.write_channel(self.RETURN) - time.sleep(1 * delay_factor) - i += 1 + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) def save_config( self, @@ -92,16 +112,16 @@

    Classes

    class ExtremeErsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netmiko support for Extreme Ethernet Routing Switch.

    +

    Netmiko support for Extreme Ethernet Routing Switch.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -140,7 +160,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -185,12 +205,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -198,14 +218,18 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeErsSSH(CiscoSSHConnection):
         """Netmiko support for Extreme Ethernet Routing Switch."""
     
    +    prompt_pattern = r"(?m:[>#]\s*$)"  # force re.Multiline
    +
         def session_preparation(self) -> None:
    -        self._test_channel_read(pattern=r"[>#]")
    +        # special_login_handler() will always ensure self.prompt_pattern
             self.set_base_prompt()
             self.set_terminal_width()
             self.disable_paging()
    @@ -214,30 +238,43 @@ 

    Classes

    """ Extreme ERS presents the following as part of the login process: - Enter Ctrl-Y to begin. + Enter Ctrl-Y to begin + + Older devices the Ctrl-Y is before SSH-login (not 100% sure of this). + + Newer devices this is after SSH-login. """ - delay_factor = self.select_delay_factor(delay_factor) - # Handle 'Enter Ctrl-Y to begin' output = "" - i = 0 - while i <= 12: - output = self.read_channel() - if output: - if "Ctrl-Y" in output: - self.write_channel(CTRL_Y) - if "sername" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "ssword" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(0.5 * delay_factor) + uname = "sername" + password = "ssword" + cntl_y = "Ctrl-Y" + pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})" + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if cntl_y in new_data: + self.write_channel(CTRL_Y) + elif uname in new_data: + assert isinstance(self.username, str) + self.write_channel(self.username + self.RETURN) + elif password in new_data: + assert isinstance(self.password, str) + self.write_channel(self.password + self.RETURN) else: - self.write_channel(self.RETURN) - time.sleep(1 * delay_factor) - i += 1 + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) def save_config( self, @@ -256,15 +293,24 @@

    Ancestors

  • CiscoBaseConnection
  • BaseConnection
  • +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -278,41 +324,58 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Extreme ERS presents the following as part of the login process:

    -

    Enter Ctrl-Y to begin.

    +

    Extreme ERS presents the following as part of the login process:

    +

    Enter Ctrl-Y to begin

    +

    Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).

    +

    Newer devices this is after SSH-login.

    -Source code -
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
    -    """
    -    Extreme ERS presents the following as part of the login process:
    -
    -    Enter Ctrl-Y to begin.
    -    """
    -    delay_factor = self.select_delay_factor(delay_factor)
    -
    -    # Handle 'Enter Ctrl-Y to begin'
    -    output = ""
    -    i = 0
    -    while i <= 12:
    -        output = self.read_channel()
    -        if output:
    -            if "Ctrl-Y" in output:
    +
    +Expand source code
    +
    +
        def special_login_handler(self, delay_factor: float = 1.0) -> None:
    +        """
    +        Extreme ERS presents the following as part of the login process:
    +
    +        Enter Ctrl-Y to begin
    +
    +        Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).
    +
    +        Newer devices this is after SSH-login.
    +        """
    +
    +        output = ""
    +        uname = "sername"
    +        password = "ssword"
    +        cntl_y = "Ctrl-Y"
    +        pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})"
    +        while True:
    +            new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0)
    +            output += new_data
    +            if re.search(self.prompt_pattern, new_data):
    +                return
    +
    +            if cntl_y in new_data:
                     self.write_channel(CTRL_Y)
    -            if "sername" in output:
    +            elif uname in new_data:
                     assert isinstance(self.username, str)
                     self.write_channel(self.username + self.RETURN)
    -            elif "ssword" in output:
    +            elif password in new_data:
                     assert isinstance(self.password, str)
                     self.write_channel(self.password + self.RETURN)
    -                break
    -            time.sleep(0.5 * delay_factor)
    -        else:
    -            self.write_channel(self.RETURN)
    -            time.sleep(1 * delay_factor)
    -        i += 1
    + else: + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg)
    @@ -382,6 +445,7 @@

    Index

  • ExtremeErsSSH

    @@ -392,9 +456,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_exos.html b/docs/netmiko/extreme/extreme_exos.html index c8295b8dc..8d4a89c11 100644 --- a/docs/netmiko/extreme/extreme_exos.html +++ b/docs/netmiko/extreme/extreme_exos.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_exos API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_exos

    Extreme support.

    -Source code + +Expand source code +
    """Extreme support."""
     import os
     from typing import Any, Callable, Optional, Union, List, Dict
    @@ -254,17 +258,17 @@ 

    Classes

    class ExtremeExosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -303,7 +307,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -348,12 +352,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -361,9 +365,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeExosBase(NoConfig, CiscoSSHConnection):
         """Extreme Exos support.
     
    @@ -438,12 +444,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='save configuration primary', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save configuration primary', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save configuration primary",
    @@ -457,12 +465,14 @@ 

    Methods

    -def send_command(self, *args, **kwargs) +def send_command(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Extreme needs special handler here due to the prompt changes.

    +

    Extreme needs special handler here due to the prompt changes.

    -Source code + +Expand source code +
    def send_command(
         self, *args: Any, **kwargs: Any
     ) -> Union[str, List[Any], Dict[str, Any]]:
    @@ -477,10 +487,10 @@ 

    Methods

    -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Extreme attaches an id to the prompt. The id increases with every command. +

    Extreme attaches an id to the prompt. The id increases with every command. It needs to br stripped off to match the prompt. Eg.

    testhost.1 #
     testhost.2 #
    @@ -490,9 +500,11 @@ 

    Methods

    prompt, eg.

    * testhost.4 #
     * testhost.5 #
    -
    +
    -Source code + +Expand source code +
    def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
         """
         Extreme attaches an id to the prompt. The id increases with every command.
    @@ -567,12 +579,14 @@ 

    Inherited members

  • class ExtremeExosFileTransfer -(ssh_conn, source_file, dest_file, file_system='/usr/local/cfg', direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=False) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/usr/local/cfg', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False)
    -

    Extreme EXOS SCP File Transfer driver.

    +

    Extreme EXOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class ExtremeExosFileTransfer(BaseFileTransfer):
         """Extreme EXOS SCP File Transfer driver."""
     
    @@ -718,12 +732,14 @@ 

    Ancestors

    Methods

    -def verify_file(self) +def verify_file(self) ‑> bool
    -

    Verify the file has been transferred correctly based on filesize.

    +

    Verify the file has been transferred correctly based on filesize.

    -Source code + +Expand source code +
    def verify_file(self) -> bool:
         """Verify the file has been transferred correctly based on filesize."""
         if self.direction == "put":
    @@ -766,17 +782,17 @@ 

    Inherited members

    class ExtremeExosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -815,7 +831,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -860,12 +876,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -873,9 +889,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeExosSSH(ExtremeExosBase):
         pass
    @@ -938,17 +956,17 @@

    Inherited members

    class ExtremeExosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -987,7 +1005,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1032,12 +1050,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1045,9 +1063,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeExosTelnet(ExtremeExosBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -1153,9 +1173,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_netiron.html b/docs/netmiko/extreme/extreme_netiron.html index d886f564e..b3e7d244e 100644 --- a/docs/netmiko/extreme/extreme_netiron.html +++ b/docs/netmiko/extreme/extreme_netiron.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_netiron API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.extreme.extreme_netiron

    -Source code + +Expand source code +
    from typing import Any
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -68,16 +72,16 @@ 

    Classes

    class ExtremeNetironBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -116,7 +120,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -161,12 +165,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -174,9 +178,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironBase(CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -210,12 +216,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write memory', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -229,12 +237,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -293,16 +303,16 @@ 

    Inherited members

    class ExtremeNetironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -341,7 +351,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -386,12 +396,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -399,9 +409,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironSSH(ExtremeNetironBase):
         pass
    @@ -463,16 +475,16 @@

    Inherited members

    class ExtremeNetironTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -511,7 +523,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -556,12 +568,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -569,9 +581,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironTelnet(ExtremeNetironBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -669,9 +683,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_nos_ssh.html b/docs/netmiko/extreme/extreme_nos_ssh.html index cb8b66973..7d3891c0a 100644 --- a/docs/netmiko/extreme/extreme_nos_ssh.html +++ b/docs/netmiko/extreme/extreme_nos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_nos_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_nos_ssh

    Support for Extreme NOS/VDX.

    -Source code + +Expand source code +
    """Support for Extreme NOS/VDX."""
     import time
     from netmiko.no_enable import NoEnable
    @@ -67,16 +71,16 @@ 

    Classes

    class ExtremeNosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme NOS/VDX.

    +

    Support for Extreme NOS/VDX.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -115,7 +119,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -160,12 +164,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -173,9 +177,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeNosSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme NOS/VDX."""
     
    @@ -212,12 +218,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme VDX.

    +

    Save Config for Extreme VDX.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -231,12 +239,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -321,9 +331,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_slx_ssh.html b/docs/netmiko/extreme/extreme_slx_ssh.html index 944ed4224..b30e52f49 100644 --- a/docs/netmiko/extreme/extreme_slx_ssh.html +++ b/docs/netmiko/extreme/extreme_slx_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_slx_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_slx_ssh

    Support for Extreme SLX.

    -Source code + +Expand source code +
    """Support for Extreme SLX."""
     import time
     from netmiko.no_enable import NoEnable
    @@ -67,16 +71,16 @@ 

    Classes

    class ExtremeSlxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme SLX.

    +

    Support for Extreme SLX.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -115,7 +119,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -160,12 +164,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -173,9 +177,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeSlxSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme SLX."""
     
    @@ -212,12 +218,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme SLX.

    +

    Save Config for Extreme SLX.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -231,12 +239,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -321,9 +331,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_tierraos_ssh.html b/docs/netmiko/extreme/extreme_tierraos_ssh.html index 386008678..deaf1d54c 100644 --- a/docs/netmiko/extreme/extreme_tierraos_ssh.html +++ b/docs/netmiko/extreme/extreme_tierraos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_tierraos_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_tierraos_ssh

    Support for Extreme TierraOS.

    -Source code + +Expand source code +
    """Support for Extreme TierraOS."""
     import time
     from netmiko.no_enable import NoEnable
    @@ -67,16 +71,16 @@ 

    Classes

    class ExtremeTierraSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme TierraOS.

    +

    Support for Extreme TierraOS.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -115,7 +119,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -160,12 +164,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -173,9 +177,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeTierraSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme TierraOS."""
     
    @@ -212,12 +218,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy run flash://config-file/startup-config', confirm=False, confirm_response='y') +def save_config(self, cmd: str = 'copy run flash://config-file/startup-config', confirm: bool = False, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme TierraOS.

    +

    Save Config for Extreme TierraOS.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy run flash://config-file/startup-config",
    @@ -231,12 +239,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -321,9 +331,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_vsp_ssh.html b/docs/netmiko/extreme/extreme_vsp_ssh.html index 973c6bd98..6e78144e3 100644 --- a/docs/netmiko/extreme/extreme_vsp_ssh.html +++ b/docs/netmiko/extreme/extreme_vsp_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_vsp_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.extreme.extreme_vsp_ssh

    Extreme Virtual Services Platform Support.

    -Source code + +Expand source code +
    """Extreme Virtual Services Platform Support."""
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -59,16 +63,16 @@ 

    Classes

    class ExtremeVspSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Virtual Services Platform Support.

    +

    Extreme Virtual Services Platform Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -107,7 +111,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -152,12 +156,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -165,9 +169,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeVspSSH(CiscoSSHConnection):
         """Extreme Virtual Services Platform Support."""
     
    @@ -197,12 +203,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -216,12 +224,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -306,9 +316,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/extreme_wing_ssh.html b/docs/netmiko/extreme/extreme_wing_ssh.html index 214b0aa62..caf599fa6 100644 --- a/docs/netmiko/extreme/extreme_wing_ssh.html +++ b/docs/netmiko/extreme/extreme_wing_ssh.html @@ -3,15 +3,17 @@ - + netmiko.extreme.extreme_wing_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.extreme.extreme_wing_ssh

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoSSHConnection
     
     
    @@ -47,16 +51,16 @@ 

    Classes

    class ExtremeWingSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme WiNG support.

    +

    Extreme WiNG support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -95,7 +99,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -140,12 +144,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -153,9 +157,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeWingSSH(CiscoSSHConnection):
         """Extreme WiNG support."""
     
    @@ -175,12 +181,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Disable paging and set Max term width

    +

    Disable paging and set Max term width

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Disable paging and set Max term width"""
         self._test_channel_read(pattern=r">|#")
    @@ -266,9 +274,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/extreme/index.html b/docs/netmiko/extreme/index.html index 7f7f87590..90c7c1df2 100644 --- a/docs/netmiko/extreme/index.html +++ b/docs/netmiko/extreme/index.html @@ -3,15 +3,17 @@ - + netmiko.extreme API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.extreme

    -Source code + +Expand source code +
    from netmiko.extreme.extreme_ers_ssh import ExtremeErsSSH
     from netmiko.extreme.extreme_exos import ExtremeExosSSH, ExtremeExosFileTransfer
     from netmiko.extreme.extreme_exos import ExtremeExosTelnet
    @@ -53,35 +57,35 @@ 

    Sub-modules

    netmiko.extreme.extreme_ers_ssh
    -

    Netmiko support for Extreme Ethernet Routing Switch.

    +

    Netmiko support for Extreme Ethernet Routing Switch.

    netmiko.extreme.extreme_exos
    -

    Extreme support.

    +

    Extreme support.

    netmiko.extreme.extreme_netiron
    -
    +
    netmiko.extreme.extreme_nos_ssh
    -

    Support for Extreme NOS/VDX.

    +

    Support for Extreme NOS/VDX.

    netmiko.extreme.extreme_slx_ssh
    -

    Support for Extreme SLX.

    +

    Support for Extreme SLX.

    netmiko.extreme.extreme_tierraos_ssh
    -

    Support for Extreme TierraOS.

    +

    Support for Extreme TierraOS.

    netmiko.extreme.extreme_vsp_ssh
    -

    Extreme Virtual Services Platform Support.

    +

    Extreme Virtual Services Platform Support.

    netmiko.extreme.extreme_wing_ssh
    -
    +
    @@ -94,16 +98,16 @@

    Classes

    class ExtremeErsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Netmiko support for Extreme Ethernet Routing Switch.

    +

    Netmiko support for Extreme Ethernet Routing Switch.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -142,7 +146,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -187,12 +191,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -200,14 +204,18 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class ExtremeErsSSH(CiscoSSHConnection):
         """Netmiko support for Extreme Ethernet Routing Switch."""
     
    +    prompt_pattern = r"(?m:[>#]\s*$)"  # force re.Multiline
    +
         def session_preparation(self) -> None:
    -        self._test_channel_read(pattern=r"[>#]")
    +        # special_login_handler() will always ensure self.prompt_pattern
             self.set_base_prompt()
             self.set_terminal_width()
             self.disable_paging()
    @@ -216,30 +224,43 @@ 

    Classes

    """ Extreme ERS presents the following as part of the login process: - Enter Ctrl-Y to begin. + Enter Ctrl-Y to begin + + Older devices the Ctrl-Y is before SSH-login (not 100% sure of this). + + Newer devices this is after SSH-login. """ - delay_factor = self.select_delay_factor(delay_factor) - # Handle 'Enter Ctrl-Y to begin' output = "" - i = 0 - while i <= 12: - output = self.read_channel() - if output: - if "Ctrl-Y" in output: - self.write_channel(CTRL_Y) - if "sername" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "ssword" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(0.5 * delay_factor) + uname = "sername" + password = "ssword" + cntl_y = "Ctrl-Y" + pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})" + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if cntl_y in new_data: + self.write_channel(CTRL_Y) + elif uname in new_data: + assert isinstance(self.username, str) + self.write_channel(self.username + self.RETURN) + elif password in new_data: + assert isinstance(self.password, str) + self.write_channel(self.password + self.RETURN) else: - self.write_channel(self.RETURN) - time.sleep(1 * delay_factor) - i += 1 + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) def save_config( self, @@ -258,15 +279,24 @@

    Ancestors

  • CiscoBaseConnection
  • BaseConnection
  • +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -280,41 +310,58 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Extreme ERS presents the following as part of the login process:

    -

    Enter Ctrl-Y to begin.

    +

    Extreme ERS presents the following as part of the login process:

    +

    Enter Ctrl-Y to begin

    +

    Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).

    +

    Newer devices this is after SSH-login.

    -Source code -
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
    -    """
    -    Extreme ERS presents the following as part of the login process:
    +
    +Expand source code
    +
    +
        def special_login_handler(self, delay_factor: float = 1.0) -> None:
    +        """
    +        Extreme ERS presents the following as part of the login process:
     
    -    Enter Ctrl-Y to begin.
    -    """
    -    delay_factor = self.select_delay_factor(delay_factor)
    +        Enter Ctrl-Y to begin
     
    -    # Handle 'Enter Ctrl-Y to begin'
    -    output = ""
    -    i = 0
    -    while i <= 12:
    -        output = self.read_channel()
    -        if output:
    -            if "Ctrl-Y" in output:
    +        Older devices the Ctrl-Y is before SSH-login (not 100% sure of this).
    +
    +        Newer devices this is after SSH-login.
    +        """
    +
    +        output = ""
    +        uname = "sername"
    +        password = "ssword"
    +        cntl_y = "Ctrl-Y"
    +        pattern = rf"(?:{uname}|{password}|{cntl_y}|{self.prompt_pattern})"
    +        while True:
    +            new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0)
    +            output += new_data
    +            if re.search(self.prompt_pattern, new_data):
    +                return
    +
    +            if cntl_y in new_data:
                     self.write_channel(CTRL_Y)
    -            if "sername" in output:
    +            elif uname in new_data:
                     assert isinstance(self.username, str)
                     self.write_channel(self.username + self.RETURN)
    -            elif "ssword" in output:
    +            elif password in new_data:
                     assert isinstance(self.password, str)
                     self.write_channel(self.password + self.RETURN)
    -                break
    -            time.sleep(0.5 * delay_factor)
    -        else:
    -            self.write_channel(self.RETURN)
    -            time.sleep(1 * delay_factor)
    -        i += 1
    + else: + msg = f""" +Failed to login to Extreme ERS Devices. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg)
    @@ -367,12 +414,14 @@

    Inherited members

    class ExtremeExosFileTransfer -(ssh_conn, source_file, dest_file, file_system='/usr/local/cfg', direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=False) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/usr/local/cfg', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False)
    -

    Extreme EXOS SCP File Transfer driver.

    +

    Extreme EXOS SCP File Transfer driver.

    -Source code + +Expand source code +
    class ExtremeExosFileTransfer(BaseFileTransfer):
         """Extreme EXOS SCP File Transfer driver."""
     
    @@ -518,12 +567,14 @@ 

    Ancestors

    Methods

    -def verify_file(self) +def verify_file(self) ‑> bool
    -

    Verify the file has been transferred correctly based on filesize.

    +

    Verify the file has been transferred correctly based on filesize.

    -Source code + +Expand source code +
    def verify_file(self) -> bool:
         """Verify the file has been transferred correctly based on filesize."""
         if self.direction == "put":
    @@ -566,17 +617,17 @@ 

    Inherited members

    class ExtremeExosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -615,7 +666,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -660,12 +711,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -673,9 +724,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeExosSSH(ExtremeExosBase):
         pass
    @@ -738,17 +791,17 @@

    Inherited members

    class ExtremeExosTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Extreme Exos support.

    +

    Extreme Exos support.

    Designed for EXOS >= 15.0

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -787,7 +840,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -832,12 +885,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -845,9 +898,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeExosTelnet(ExtremeExosBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -913,16 +968,16 @@ 

    Inherited members

    class ExtremeNetironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -961,7 +1016,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1006,12 +1061,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1019,9 +1074,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironSSH(ExtremeNetironBase):
         pass
    @@ -1083,16 +1140,16 @@

    Inherited members

    class ExtremeNetironTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1131,7 +1188,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1176,12 +1233,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1189,9 +1246,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeNetironTelnet(ExtremeNetironBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -1256,16 +1315,16 @@ 

    Inherited members

    class ExtremeNosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme NOS/VDX.

    +

    Support for Extreme NOS/VDX.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1304,7 +1363,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1349,12 +1408,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1362,9 +1421,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeNosSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme NOS/VDX."""
     
    @@ -1401,12 +1462,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme VDX.

    +

    Save Config for Extreme VDX.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -1420,12 +1483,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -1483,16 +1548,16 @@ 

    Inherited members

    class ExtremeSlxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme SLX.

    +

    Support for Extreme SLX.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1531,7 +1596,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1576,12 +1641,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1589,9 +1654,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeSlxSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme SLX."""
     
    @@ -1628,12 +1695,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme SLX.

    +

    Save Config for Extreme SLX.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -1647,12 +1716,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -1710,16 +1781,16 @@ 

    Inherited members

    class ExtremeTierraSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Support for Extreme TierraOS.

    +

    Support for Extreme TierraOS.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1758,7 +1829,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1803,12 +1874,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1816,9 +1887,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeTierraSSH(NoEnable, CiscoSSHConnection):
         """Support for Extreme TierraOS."""
     
    @@ -1855,12 +1928,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy run flash://config-file/startup-config', confirm=False, confirm_response='y') +def save_config(self, cmd: str = 'copy run flash://config-file/startup-config', confirm: bool = False, confirm_response: str = 'y') ‑> str
    -

    Save Config for Extreme TierraOS.

    +

    Save Config for Extreme TierraOS.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy run flash://config-file/startup-config",
    @@ -1874,12 +1949,14 @@ 

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Adding a delay after login.

    +

    Adding a delay after login.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Adding a delay after login."""
         delay_factor = self.select_delay_factor(delay_factor)
    @@ -1937,16 +2014,16 @@ 

    Inherited members

    class ExtremeVspSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme Virtual Services Platform Support.

    +

    Extreme Virtual Services Platform Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1985,7 +2062,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -2030,12 +2107,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -2043,9 +2120,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeVspSSH(CiscoSSHConnection):
         """Extreme Virtual Services Platform Support."""
     
    @@ -2075,12 +2154,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config

    +

    Save Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -2094,12 +2175,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -2157,16 +2240,16 @@ 

    Inherited members

    class ExtremeWingSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Extreme WiNG support.

    +

    Extreme WiNG support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -2205,7 +2288,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -2250,12 +2333,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -2263,9 +2346,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ExtremeWingSSH(CiscoSSHConnection):
         """Extreme WiNG support."""
     
    @@ -2285,12 +2370,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Disable paging and set Max term width

    +

    Disable paging and set Max term width

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Disable paging and set Max term width"""
         self._test_channel_read(pattern=r">|#")
    @@ -2379,6 +2466,7 @@ 

    Index

  • ExtremeErsSSH

    @@ -2441,9 +2529,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/f5/f5_linux_ssh.html b/docs/netmiko/f5/f5_linux_ssh.html index b0f37d060..b82e3ed28 100644 --- a/docs/netmiko/f5/f5_linux_ssh.html +++ b/docs/netmiko/f5/f5_linux_ssh.html @@ -3,15 +3,17 @@ - + netmiko.f5.f5_linux_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.f5.f5_linux_ssh

    -Source code + +Expand source code +
    from netmiko.linux.linux_ssh import LinuxSSH
     
     
    @@ -40,16 +44,16 @@ 

    Classes

    class F5LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -88,7 +92,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -133,12 +137,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -146,9 +150,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class F5LinuxSSH(LinuxSSH):
         pass
    @@ -233,9 +239,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/f5/f5_tmsh_ssh.html b/docs/netmiko/f5/f5_tmsh_ssh.html index 6e1e2772b..dd42839d2 100644 --- a/docs/netmiko/f5/f5_tmsh_ssh.html +++ b/docs/netmiko/f5/f5_tmsh_ssh.html @@ -3,15 +3,17 @@ - + netmiko.f5.f5_tmsh_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.f5.f5_tmsh_ssh

    -Source code + +Expand source code +
    from netmiko.no_config import NoConfig
     from netmiko.base_connection import BaseConnection
     
    @@ -73,10 +77,10 @@ 

    Classes

    class F5TmshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -84,10 +88,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -126,7 +130,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -171,12 +175,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -184,9 +188,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class F5TmshSSH(NoConfig, BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -230,12 +236,14 @@ 

    Ancestors

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Gracefully exit the SSH session.

    +

    Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Gracefully exit the SSH session."""
         try:
    @@ -249,12 +257,14 @@ 

    Methods

    -def exit_tmsh(self) +def exit_tmsh(self) ‑> str
    -
    +
    -Source code + +Expand source code +
    def exit_tmsh(self) -> str:
         output = self._send_command_str("quit", expect_string=r"#")
         self.set_base_prompt()
    @@ -262,12 +272,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"#")
    @@ -281,12 +293,14 @@ 

    Methods

    -def tmsh_mode(self, delay_factor=1.0) +def tmsh_mode(self, delay_factor: float = 1.0) ‑> str
    -

    tmsh command is equivalent to config command on F5.

    +

    tmsh command is equivalent to config command on F5.

    -Source code + +Expand source code +
    def tmsh_mode(self, delay_factor: float = 1.0) -> str:
         """tmsh command is equivalent to config command on F5."""
         command = f"{self.RETURN}tmsh{self.RETURN}"
    @@ -374,9 +388,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/f5/index.html b/docs/netmiko/f5/index.html index 060266f0b..9c853fd23 100644 --- a/docs/netmiko/f5/index.html +++ b/docs/netmiko/f5/index.html @@ -3,15 +3,17 @@ - + netmiko.f5 API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.f5

    -Source code + +Expand source code +
    from netmiko.f5.f5_tmsh_ssh import F5TmshSSH
     from netmiko.f5.f5_linux_ssh import F5LinuxSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.f5.f5_linux_ssh
    -
    +
    netmiko.f5.f5_tmsh_ssh
    -
    +
    @@ -50,16 +54,16 @@

    Classes

    class F5LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -143,12 +147,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -156,9 +160,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class F5LinuxSSH(LinuxSSH):
         pass
    @@ -220,10 +226,10 @@

    Inherited members

    class F5TmshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -231,10 +237,10 @@

    Inherited members

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -273,7 +279,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -318,12 +324,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -331,9 +337,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class F5TmshSSH(NoConfig, BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -377,12 +385,14 @@ 

    Ancestors

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Gracefully exit the SSH session.

    +

    Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Gracefully exit the SSH session."""
         try:
    @@ -396,12 +406,14 @@ 

    Methods

    -def exit_tmsh(self) +def exit_tmsh(self) ‑> str
    -
    +
    -Source code + +Expand source code +
    def exit_tmsh(self) -> str:
         output = self._send_command_str("quit", expect_string=r"#")
         self.set_base_prompt()
    @@ -409,12 +421,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"#")
    @@ -428,12 +442,14 @@ 

    Methods

    -def tmsh_mode(self, delay_factor=1.0) +def tmsh_mode(self, delay_factor: float = 1.0) ‑> str
    -

    tmsh command is equivalent to config command on F5.

    +

    tmsh command is equivalent to config command on F5.

    -Source code + +Expand source code +
    def tmsh_mode(self, delay_factor: float = 1.0) -> str:
         """tmsh command is equivalent to config command on F5."""
         command = f"{self.RETURN}tmsh{self.RETURN}"
    @@ -530,9 +546,7 @@ 

    F5TmshSSH

    - - \ No newline at end of file diff --git a/docs/netmiko/flexvnf/flexvnf_ssh.html b/docs/netmiko/flexvnf/flexvnf_ssh.html index 970cca267..0ae715f57 100644 --- a/docs/netmiko/flexvnf/flexvnf_ssh.html +++ b/docs/netmiko/flexvnf/flexvnf_ssh.html @@ -3,15 +3,17 @@ - + netmiko.flexvnf.flexvnf_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.flexvnf.flexvnf_ssh

    -Source code + +Expand source code +
    from typing import Optional, Any
     import re
     import time
    @@ -65,7 +69,9 @@ 

    Module netmiko.flexvnf.flexvnf_ssh

    break count += 1 - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string) @@ -238,10 +244,10 @@

    Classes

    class FlexvnfSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -251,10 +257,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -293,7 +299,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -338,12 +344,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -351,9 +357,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class FlexvnfSSH(NoEnable, BaseConnection):
         def session_preparation(self) -> None:
             """
    @@ -388,7 +396,9 @@ 

    Classes

    break count += 1 - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string) @@ -557,22 +567,26 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=']', pattern='') +def check_config_mode(self, check_string: str = ']', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "]", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string)
    -def commit(self, confirm=False, confirm_delay=None, check=False, comment='', and_quit=False, read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, check: bool = False, comment: str = '', and_quit: bool = False, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    @@ -588,9 +602,11 @@

    Methods

    command_string = commit confirmed or commit confirmed check: command_string = commit check

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -687,12 +703,14 @@ 

    Methods

    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -703,12 +721,14 @@ 

    Methods

    -def enter_cli_mode(self) +def enter_cli_mode(self) ‑> None
    -

    Check if at shell prompt root@ and go into CLI.

    +

    Check if at shell prompt root@ and go into CLI.

    -Source code + +Expand source code +
    def enter_cli_mode(self) -> None:
         """Check if at shell prompt root@ and go into CLI."""
         delay_factor = self.select_delay_factor(delay_factor=0)
    @@ -731,12 +751,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit configuration-mode', pattern='') +def exit_config_mode(self, exit_config: str = 'exit configuration-mode', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit configuration-mode", pattern: str = ""
     ) -> str:
    @@ -757,14 +779,16 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    Disable paging (the '–more–' prompts). -Set the base prompt for interaction ('>').

    +Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -780,12 +804,14 @@ 

    Methods

    -def strip_prompt(self, *args, **kwargs) +def strip_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Strip the trailing router prompt from the output."""
         a_string = super().strip_prompt(*args, **kwargs)
    @@ -870,9 +896,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/flexvnf/index.html b/docs/netmiko/flexvnf/index.html index 6e6a94051..9abe604d7 100644 --- a/docs/netmiko/flexvnf/index.html +++ b/docs/netmiko/flexvnf/index.html @@ -3,15 +3,17 @@ - + netmiko.flexvnf API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.flexvnf

    -Source code + +Expand source code +
    from netmiko.flexvnf.flexvnf_ssh import FlexvnfSSH
     
     __all__ = ["FlexvnfSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.flexvnf.flexvnf_ssh
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class FlexvnfSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -145,12 +149,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -158,9 +162,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class FlexvnfSSH(NoEnable, BaseConnection):
         def session_preparation(self) -> None:
             """
    @@ -195,7 +201,9 @@ 

    Classes

    break count += 1 - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string) @@ -364,22 +372,26 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=']', pattern='') +def check_config_mode(self, check_string: str = ']', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "]", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string)
    -def commit(self, confirm=False, confirm_delay=None, check=False, comment='', and_quit=False, read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, check: bool = False, comment: str = '', and_quit: bool = False, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    @@ -395,9 +407,11 @@

    Methods

    command_string = commit confirmed or commit confirmed check: command_string = commit check

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -494,12 +508,14 @@ 

    Methods

    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -510,12 +526,14 @@ 

    Methods

    -def enter_cli_mode(self) +def enter_cli_mode(self) ‑> None
    -

    Check if at shell prompt root@ and go into CLI.

    +

    Check if at shell prompt root@ and go into CLI.

    -Source code + +Expand source code +
    def enter_cli_mode(self) -> None:
         """Check if at shell prompt root@ and go into CLI."""
         delay_factor = self.select_delay_factor(delay_factor=0)
    @@ -538,12 +556,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit configuration-mode', pattern='') +def exit_config_mode(self, exit_config: str = 'exit configuration-mode', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit configuration-mode", pattern: str = ""
     ) -> str:
    @@ -564,14 +584,16 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    Disable paging (the '–more–' prompts). -Set the base prompt for interaction ('>').

    +Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -587,12 +609,14 @@ 

    Methods

    -def strip_prompt(self, *args, **kwargs) +def strip_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Strip the trailing router prompt from the output."""
         a_string = super().strip_prompt(*args, **kwargs)
    @@ -682,9 +706,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/fortinet/fortinet_ssh.html b/docs/netmiko/fortinet/fortinet_ssh.html index 6354b95a9..c48125159 100644 --- a/docs/netmiko/fortinet/fortinet_ssh.html +++ b/docs/netmiko/fortinet/fortinet_ssh.html @@ -3,15 +3,17 @@ - + netmiko.fortinet.fortinet_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.fortinet.fortinet_ssh

    -Source code + +Expand source code +
    import paramiko
     import re
     from typing import Optional
    @@ -139,10 +143,10 @@ 

    Classes

    class FortinetSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -150,10 +154,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -192,7 +196,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -237,12 +241,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -250,9 +254,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class FortinetSSH(NoConfig, CiscoSSHConnection):
         def _modify_connection_params(self) -> None:
             """Modify connection parameters prior to SSH connection."""
    @@ -360,12 +366,14 @@ 

    Ancestors

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Re-enable paging globally.

    +

    Re-enable paging globally.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Re-enable paging globally."""
         if self.allow_disable_global:
    @@ -381,12 +389,14 @@ 

    Methods

    -def disable_paging(self, command='terminal length 0', delay_factor=None, cmd_verify=True, pattern=None) +def disable_paging(self, command: str = 'terminal length 0', delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str
    -

    Disable paging is only available with specific roles so it may fail.

    +

    Disable paging is only available with specific roles so it may fail.

    -Source code + +Expand source code +
    def disable_paging(
         self,
         command: str = "terminal length 0",
    @@ -433,12 +443,14 @@ 

    Methods

    -def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -447,12 +459,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
     
    @@ -544,9 +558,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/fortinet/index.html b/docs/netmiko/fortinet/index.html index 0a62e5097..7ac34acf0 100644 --- a/docs/netmiko/fortinet/index.html +++ b/docs/netmiko/fortinet/index.html @@ -3,15 +3,17 @@ - + netmiko.fortinet API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.fortinet

    -Source code + +Expand source code +
    from netmiko.fortinet.fortinet_ssh import FortinetSSH
     
     __all__ = ["FortinetSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.fortinet.fortinet_ssh
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class FortinetSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    @@ -56,10 +60,10 @@

    Classes

    overwrite check_config_mode in the platform specific driver and return False.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -143,12 +147,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -156,9 +160,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class FortinetSSH(NoConfig, CiscoSSHConnection):
         def _modify_connection_params(self) -> None:
             """Modify connection parameters prior to SSH connection."""
    @@ -266,12 +272,14 @@ 

    Ancestors

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Re-enable paging globally.

    +

    Re-enable paging globally.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Re-enable paging globally."""
         if self.allow_disable_global:
    @@ -287,12 +295,14 @@ 

    Methods

    -def disable_paging(self, command='terminal length 0', delay_factor=None, cmd_verify=True, pattern=None) +def disable_paging(self, command: str = 'terminal length 0', delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str
    -

    Disable paging is only available with specific roles so it may fail.

    +

    Disable paging is only available with specific roles so it may fail.

    -Source code + +Expand source code +
    def disable_paging(
         self,
         command: str = "terminal length 0",
    @@ -339,12 +349,14 @@ 

    Methods

    -def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -353,12 +365,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
     
    @@ -455,9 +469,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/hp/hp_comware.html b/docs/netmiko/hp/hp_comware.html index 1b393cd8a..b9e6fc888 100644 --- a/docs/netmiko/hp/hp_comware.html +++ b/docs/netmiko/hp/hp_comware.html @@ -3,15 +3,17 @@ - + netmiko.hp.hp_comware API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.hp.hp_comware

    -Source code + +Expand source code +
    import re
     from typing import Union, Sequence, TextIO, Any, Optional
     
    @@ -60,7 +64,9 @@ 

    Module netmiko.hp.hp_comware

    """Exit config mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string) @@ -144,6 +150,9 @@

    Module netmiko.hp.hp_comware

    """enable mode on Comware is system-view.""" return self.check_config_mode(check_string=check_string) + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + def save_config( self, cmd: str = "save force", confirm: bool = False, confirm_response: str = "" ) -> str: @@ -175,16 +184,16 @@

    Classes

    class HPComwareBase -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -223,7 +232,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -268,12 +277,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -281,9 +290,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPComwareBase(CiscoSSHConnection):
         def __init__(self, **kwargs: Any) -> None:
             # Comware doesn't have a way to set terminal width which breaks cmd_verify
    @@ -316,7 +327,9 @@ 

    Classes

    """Exit config mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string) @@ -400,6 +413,9 @@

    Classes

    """enable mode on Comware is system-view.""" return self.check_config_mode(check_string=check_string) + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + def save_config( self, cmd: str = "save force", confirm: bool = False, confirm_response: str = "" ) -> str: @@ -422,36 +438,44 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=']', pattern='') +def check_config_mode(self, check_string: str = ']', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Check whether device is in configuration mode. Return a boolean.

    +

    Check whether device is in configuration mode. Return a boolean.

    -Source code -
    def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "]", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Check whether device is in configuration mode. Return a boolean."""
         return super().check_config_mode(check_string=check_string)
    -def check_enable_mode(self, check_string=']') +def check_enable_mode(self, check_string: str = ']') ‑> bool
    -

    enable mode on Comware is system-view.

    +

    enable mode on Comware is system-view.

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = "]") -> bool:
         """enable mode on Comware is system-view."""
         return self.check_config_mode(check_string=check_string)
    -def enable(self, cmd='system-view', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'system-view', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    enable mode on Comware is system-view.

    +

    enable mode on Comware is system-view.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "system-view",
    @@ -464,36 +488,42 @@ 

    Methods

    -def exit_config_mode(self, exit_config='return', pattern='>') +def exit_config_mode(self, exit_config: str = 'return', pattern: str = '>') ‑> str
    -

    Exit config mode.

    +

    Exit config mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "return", pattern: str = r">") -> str:
         """Exit config mode."""
         return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    -def exit_enable_mode(self, exit_command='return') +def exit_enable_mode(self, exit_command: str = 'return') ‑> str
    -

    enable mode on Comware is system-view.

    +

    enable mode on Comware is system-view.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "return") -> str:
         """enable mode on Comware is system-view."""
         return self.exit_config_mode(exit_config=exit_command)
    -def save_config(self, cmd='save force', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save force', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config.

    +

    Save Config.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save force", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -504,12 +534,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         # Comware can have a banner that prompts you to continue
    @@ -525,16 +557,18 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator=']', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = ']', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt

    +

    Sets self.base_prompt

    Used as delimiter for stripping of trailing prompt in output.

    Should be set to something that is general and applies in multiple contexts. For Comware this will be the router prompt with < > or [ ] stripped off.

    -

    This will be set on logging in, but not when entering system-view

    +

    This will be set on logging in, but not when entering system-view

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -610,16 +644,16 @@ 

    Inherited members

    class HPComwareSSH -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -658,7 +692,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -703,12 +737,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -716,9 +750,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPComwareSSH(HPComwareBase):
         pass
    @@ -780,16 +816,16 @@

    Inherited members

    class HPComwareTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -828,7 +864,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -873,12 +909,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -886,9 +922,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPComwareTelnet(HPComwareBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -992,9 +1030,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/hp/hp_procurve.html b/docs/netmiko/hp/hp_procurve.html index 6dc186452..2f2079600 100644 --- a/docs/netmiko/hp/hp_procurve.html +++ b/docs/netmiko/hp/hp_procurve.html @@ -3,15 +3,17 @@ - + netmiko.hp.hp_procurve API documentation - - - - - + + + + + + +
    @@ -21,12 +23,14 @@

    Module netmiko.hp.hp_procurve

    -Source code + +Expand source code +
    import re
     import time
     import socket
     from os import path
    -from typing import Optional
    +from typing import Optional, Any
     
     from paramiko import SSHClient
     from netmiko.ssh_auth import SSHClient_noauth
    @@ -36,6 +40,19 @@ 

    Module netmiko.hp.hp_procurve

    class HPProcurveBase(CiscoSSHConnection): + def __init__(self, *args: Any, **kwargs: Any) -> None: + # ProCurve's seem to fail more on connection than they should? + # increase conn_timeout to try to improve this. + conn_timeout = kwargs.get("conn_timeout") + kwargs["conn_timeout"] = 20 if conn_timeout is None else conn_timeout + + disabled_algorithms = kwargs.get("disabled_algorithms") + if disabled_algorithms is None: + disabled_algorithms = {"pubkeys": ["rsa-sha2-256", "rsa-sha2-512"]} + kwargs["disabled_algorithms"] = disabled_algorithms + + super().__init__(*args, **kwargs) + def session_preparation(self) -> None: """ Prepare the session after the connection has been established. @@ -67,12 +84,17 @@

    Module netmiko.hp.hp_procurve

    if len(self.base_prompt) >= 25: self.set_base_prompt() + # ProCurve requires elevated privileges to disable output paging :-( + self.enable() self.set_terminal_width(command="terminal width 511", pattern="terminal") command = self.RETURN + "no page" self.disable_paging(command=command) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ The pattern is needed as it is not in the parent class. @@ -87,12 +109,14 @@

    Module netmiko.hp.hp_procurve

    pattern: str = "password", enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE, - default_username: str = "manager", + default_username: str = "", ) -> str: """Enter enable mode""" if self.check_enable_mode(): return "" + if not default_username: + default_username = self.username output = "" username_pattern = r"(username|login|user name)" @@ -110,7 +134,7 @@

    Module netmiko.hp.hp_procurve

    if re.search(username_pattern, new_output, flags=re_flags): output += new_output self.write_channel(default_username + self.RETURN) - full_pattern = rf"{pwd_pattern}|{prompt_pattern})" + full_pattern = rf"({pwd_pattern}|{prompt_pattern})" new_output = self.read_until_pattern( full_pattern, read_timeout=15, re_flags=re_flags ) @@ -242,16 +266,16 @@

    Classes

    class HPProcurveBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -290,7 +314,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -335,12 +359,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -348,10 +372,25 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPProcurveBase(CiscoSSHConnection):
    +    def __init__(self, *args: Any, **kwargs: Any) -> None:
    +        # ProCurve's seem to fail more on connection than they should?
    +        # increase conn_timeout to try to improve this.
    +        conn_timeout = kwargs.get("conn_timeout")
    +        kwargs["conn_timeout"] = 20 if conn_timeout is None else conn_timeout
    +
    +        disabled_algorithms = kwargs.get("disabled_algorithms")
    +        if disabled_algorithms is None:
    +            disabled_algorithms = {"pubkeys": ["rsa-sha2-256", "rsa-sha2-512"]}
    +            kwargs["disabled_algorithms"] = disabled_algorithms
    +
    +        super().__init__(*args, **kwargs)
    +
         def session_preparation(self) -> None:
             """
             Prepare the session after the connection has been established.
    @@ -383,12 +422,17 @@ 

    Classes

    if len(self.base_prompt) >= 25: self.set_base_prompt() + # ProCurve requires elevated privileges to disable output paging :-( + self.enable() self.set_terminal_width(command="terminal width 511", pattern="terminal") command = self.RETURN + "no page" self.disable_paging(command=command) def check_config_mode( - self, check_string: str = ")#", pattern: str = r"[>#]" + self, + check_string: str = ")#", + pattern: str = r"[>#]", + force_regex: bool = False, ) -> bool: """ The pattern is needed as it is not in the parent class. @@ -403,12 +447,14 @@

    Classes

    pattern: str = "password", enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE, - default_username: str = "manager", + default_username: str = "", ) -> str: """Enter enable mode""" if self.check_enable_mode(): return "" + if not default_username: + default_username = self.username output = "" username_pattern = r"(username|login|user name)" @@ -426,7 +472,7 @@

    Classes

    if re.search(username_pattern, new_output, flags=re_flags): output += new_output self.write_channel(default_username + self.RETURN) - full_pattern = rf"{pwd_pattern}|{prompt_pattern})" + full_pattern = rf"({pwd_pattern}|{prompt_pattern})" new_output = self.read_until_pattern( full_pattern, read_timeout=15, re_flags=re_flags ) @@ -517,15 +563,20 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='[>#]') +def check_config_mode(self, check_string: str = ')#', pattern: str = '[>#]', force_regex: bool = False) ‑> bool
    -

    The pattern is needed as it is not in the parent class.

    -

    Not having this will make each check_config_mode() call take ~2 seconds.

    +

    The pattern is needed as it is not in the parent class.

    +

    Not having this will make each check_config_mode() call take ~2 seconds.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ")#", pattern: str = r"[>#]"
    +    self,
    +    check_string: str = ")#",
    +    pattern: str = r"[>#]",
    +    force_regex: bool = False,
     ) -> bool:
         """
         The pattern is needed as it is not in the parent class.
    @@ -536,24 +587,28 @@ 

    Methods

    -def enable(self, cmd='enable', pattern='password', enable_pattern=None, re_flags=re.IGNORECASE, default_username='manager') +def enable(self, cmd: str = 'enable', pattern: str = 'password', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE, default_username: str = '') ‑> str
    -

    Enter enable mode

    +

    Enter enable mode

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
         pattern: str = "password",
         enable_pattern: Optional[str] = None,
         re_flags: int = re.IGNORECASE,
    -    default_username: str = "manager",
    +    default_username: str = "",
     ) -> str:
         """Enter enable mode"""
     
         if self.check_enable_mode():
             return ""
    +    if not default_username:
    +        default_username = self.username
     
         output = ""
         username_pattern = r"(username|login|user name)"
    @@ -571,7 +626,7 @@ 

    Methods

    if re.search(username_pattern, new_output, flags=re_flags): output += new_output self.write_channel(default_username + self.RETURN) - full_pattern = rf"{pwd_pattern}|{prompt_pattern})" + full_pattern = rf"({pwd_pattern}|{prompt_pattern})" new_output = self.read_until_pattern( full_pattern, read_timeout=15, re_flags=re_flags ) @@ -597,12 +652,14 @@

    Methods

    -def save_config(self, cmd='write memory', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write memory', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config.

    +

    Save Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -616,12 +673,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -653,6 +712,8 @@ 

    Methods

    if len(self.base_prompt) >= 25: self.set_base_prompt() + # ProCurve requires elevated privileges to disable output paging :-( + self.enable() self.set_terminal_width(command="terminal width 511", pattern="terminal") command = self.RETURN + "no page" self.disable_paging(command=command)
    @@ -706,16 +767,16 @@

    Inherited members

    class HPProcurveSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -754,7 +815,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -799,12 +860,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -812,9 +873,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPProcurveSSH(HPProcurveBase):
         def _build_ssh_client(self) -> SSHClient:
             """Allow passwordless authentication for HP devices being provisioned."""
    @@ -894,16 +957,16 @@ 

    Inherited members

    class HPProcurveTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -942,7 +1005,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -987,12 +1050,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1000,9 +1063,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPProcurveTelnet(HPProcurveBase):
         def telnet_login(
             self,
    @@ -1033,12 +1098,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#', alt_prompt_terminator='>', username_pattern='(Login Name:|sername:)', pwd_pattern='assword', delay_factor=1.0, max_loops=60) +def telnet_login(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', username_pattern: str = '(Login Name:|sername:)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 60) ‑> str
    -

    Telnet login: can be username/password or just password.

    +

    Telnet login: can be username/password or just password.

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = "#",
    @@ -1148,9 +1215,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/hp/index.html b/docs/netmiko/hp/index.html index 0087a4765..2475c450f 100644 --- a/docs/netmiko/hp/index.html +++ b/docs/netmiko/hp/index.html @@ -3,15 +3,17 @@ - + netmiko.hp API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.hp

    -Source code + +Expand source code +
    from netmiko.hp.hp_procurve import HPProcurveSSH, HPProcurveTelnet
     from netmiko.hp.hp_comware import HPComwareSSH, HPComwareTelnet
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.hp.hp_comware
    -
    +
    netmiko.hp.hp_procurve
    -
    +
    @@ -50,16 +54,16 @@

    Classes

    class HPComwareSSH -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -143,12 +147,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -156,9 +160,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class HPComwareSSH(HPComwareBase):
         pass
    @@ -220,16 +226,16 @@

    Inherited members

    class HPComwareTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -268,7 +274,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -313,12 +319,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -326,9 +332,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPComwareTelnet(HPComwareBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -393,16 +401,16 @@ 

    Inherited members

    class HPProcurveSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -441,7 +449,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -486,12 +494,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -499,9 +507,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPProcurveSSH(HPProcurveBase):
         def _build_ssh_client(self) -> SSHClient:
             """Allow passwordless authentication for HP devices being provisioned."""
    @@ -581,16 +591,16 @@ 

    Inherited members

    class HPProcurveTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -629,7 +639,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -674,12 +684,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -687,9 +697,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HPProcurveTelnet(HPProcurveBase):
         def telnet_login(
             self,
    @@ -720,12 +732,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#', alt_prompt_terminator='>', username_pattern='(Login Name:|sername:)', pwd_pattern='assword', delay_factor=1.0, max_loops=60) +def telnet_login(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', username_pattern: str = '(Login Name:|sername:)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 60) ‑> str
    -

    Telnet login: can be username/password or just password.

    +

    Telnet login: can be username/password or just password.

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = "#",
    @@ -838,9 +852,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/huawei/huawei.html b/docs/netmiko/huawei/huawei.html index 24cbd3df7..ba74869a3 100644 --- a/docs/netmiko/huawei/huawei.html +++ b/docs/netmiko/huawei/huawei.html @@ -3,15 +3,17 @@ - + netmiko.huawei.huawei API documentation - - - - - + + + + + + +
    @@ -21,8 +23,10 @@

    Module netmiko.huawei.huawei

    -Source code -
    from typing import Optional, Any
    +
    +Expand source code
    +
    +
    from typing import Optional, Any, Union, Sequence, TextIO
     import time
     import re
     import warnings
    @@ -70,7 +74,9 @@ 

    Module netmiko.huawei.huawei

    """Exit configuration mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string) @@ -117,6 +123,9 @@

    Module netmiko.huawei.huawei

    cmd=cmd, confirm=confirm, confirm_response=confirm_response ) + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command) + class HuaweiSSH(HuaweiBase): """Huawei SSH driver.""" @@ -213,6 +222,17 @@

    Module netmiko.huawei.huawei

    class HuaweiVrpv8SSH(HuaweiSSH): + def send_config_set( + self, + config_commands: Union[str, Sequence[str], TextIO, None] = None, + exit_config_mode: bool = False, + **kwargs: Any, + ) -> str: + """Huawei VRPv8 requires you not exit from configuration mode.""" + return super().send_config_set( + config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs + ) + def commit( self, comment: str = "", @@ -272,10 +292,10 @@

    Classes

    class HuaweiBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -285,10 +305,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -327,7 +347,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -372,12 +392,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -385,9 +405,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HuaweiBase(NoEnable, CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -424,7 +446,9 @@ 

    Classes

    """Exit configuration mode.""" return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string) @@ -469,7 +493,10 @@

    Classes

    """Save Config for HuaweiSSH""" return super().save_config( cmd=cmd, confirm=confirm, confirm_response=confirm_response - )
    + ) + + def cleanup(self, command: str = "quit") -> None: + return super().cleanup(command=command)

    Ancestors

      @@ -485,36 +512,44 @@

      Subclasses

      Methods

      -def check_config_mode(self, check_string=']', pattern='') +def check_config_mode(self, check_string: str = ']', pattern: str = '', force_regex: bool = False) ‑> bool
      -

      Checks whether in configuration mode. Returns a boolean.

      +

      Checks whether in configuration mode. Returns a boolean.

      -Source code -
      def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
      +
      +Expand source code
      +
      +
      def check_config_mode(
      +    self, check_string: str = "]", pattern: str = "", force_regex: bool = False
      +) -> bool:
           """Checks whether in configuration mode. Returns a boolean."""
           return super().check_config_mode(check_string=check_string)
      -def exit_config_mode(self, exit_config='return', pattern='>') +def exit_config_mode(self, exit_config: str = 'return', pattern: str = '>') ‑> str
      -

      Exit configuration mode.

      +

      Exit configuration mode.

      -Source code + +Expand source code +
      def exit_config_mode(self, exit_config: str = "return", pattern: str = r">") -> str:
           """Exit configuration mode."""
           return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
      -def save_config(self, cmd='save', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'save', confirm: bool = True, confirm_response: str = 'y') ‑> str
      -

      Save Config for HuaweiSSH

      +

      Save Config for HuaweiSSH

      -Source code + +Expand source code +
      def save_config(
           self, cmd: str = "save", confirm: bool = True, confirm_response: str = "y"
       ) -> str:
      @@ -525,12 +560,14 @@ 

      Methods

      -def session_preparation(self) +def session_preparation(self) ‑> None
      -

      Prepare the session after the connection has been established.

      +

      Prepare the session after the connection has been established.

      -Source code + +Expand source code +
      def session_preparation(self) -> None:
           """Prepare the session after the connection has been established."""
           self.ansi_escape_codes = True
      @@ -540,16 +577,18 @@ 

      Methods

      -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator=']', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = ']', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
      -

      Sets self.base_prompt

      +

      Sets self.base_prompt

      Used as delimiter for stripping of trailing prompt in output.

      Should be set to something that is general and applies in multiple contexts. For Huawei this will be the router prompt with < > or [ ] stripped off.

      -

      This will be set on logging in, but not when entering system-view

      +

      This will be set on logging in, but not when entering system-view

      -Source code + +Expand source code +
      def set_base_prompt(
           self,
           pri_prompt_terminator: str = ">",
      @@ -587,14 +626,16 @@ 

      Methods

      -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
      -

      Huawei does a strange thing where they add a space and then add ESC[1D +

      Huawei does a strange thing where they add a space and then add ESC[1D to move the cursor to the left one.

      -

      The extra space is problematic.

      +

      The extra space is problematic.

      -Source code + +Expand source code +
      def strip_ansi_escape_codes(self, string_buffer: str) -> str:
           """
           Huawei does a strange thing where they add a space and then add ESC[1D
      @@ -656,16 +697,16 @@ 

      Inherited members

      class HuaweiSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
      -

      Huawei SSH driver.

      +

      Huawei SSH driver.

          Initialize attributes for establishing connection to target device.
       
      -    :param ip: IP address of target device. Not required if `host` is
      +    :param ip: IP address of target device. Not required if <code>host</code> is
               provided.
       
      -    :param host: Hostname of target device. Not required if `ip` is
      +    :param host: Hostname of target device. Not required if <code>ip</code> is
                   provided.
       
           :param username: Username to authenticate against target device if
      @@ -704,7 +745,7 @@ 

      Inherited members

      :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -749,12 +790,12 @@

      Inherited members

      :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -762,9 +803,11 @@

      Inherited members

      :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
      +

    -Source code + +Expand source code +
    class HuaweiSSH(HuaweiBase):
         """Huawei SSH driver."""
     
    @@ -840,16 +883,16 @@ 

    Inherited members

    class HuaweiTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei Telnet driver.

    +

    Huawei Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -888,7 +931,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -933,12 +976,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -946,9 +989,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HuaweiTelnet(HuaweiBase):
         """Huawei Telnet driver."""
     
    @@ -1038,12 +1083,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator=']\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = ']\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    Telnet login for Huawei Devices

    +

    Telnet login for Huawei Devices

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"]\s*$",
    @@ -1172,16 +1219,16 @@ 

    Inherited members

    class HuaweiVrpv8SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei SSH driver.

    +

    Huawei SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1220,7 +1267,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1265,12 +1312,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1278,10 +1325,23 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HuaweiVrpv8SSH(HuaweiSSH):
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +        exit_config_mode: bool = False,
    +        **kwargs: Any,
    +    ) -> str:
    +        """Huawei VRPv8 requires you not exit from configuration mode."""
    +        return super().send_config_set(
    +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +        )
    +
         def commit(
             self,
             comment: str = "",
    @@ -1340,19 +1400,21 @@ 

    Ancestors

    Methods

    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -1398,17 +1460,40 @@ 

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    +
    +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +
    +
    +

    Huawei VRPv8 requires you not exit from configuration mode.

    +
    + +Expand source code + +
    def send_config_set(
    +    self,
    +    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    exit_config_mode: bool = False,
    +    **kwargs: Any,
    +) -> str:
    +    """Huawei VRPv8 requires you not exit from configuration mode."""
    +    return super().send_config_set(
    +        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +    )
    +
    +

    Inherited members

  • @@ -1506,9 +1591,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/huawei/huawei_smartax.html b/docs/netmiko/huawei/huawei_smartax.html index 7d61d143e..5eb00adad 100644 --- a/docs/netmiko/huawei/huawei_smartax.html +++ b/docs/netmiko/huawei/huawei_smartax.html @@ -3,15 +3,17 @@ - + netmiko.huawei.huawei_smartax API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.huawei.huawei_smartax

    -Source code + +Expand source code +
    import time
     import re
     from typing import Optional
    @@ -97,7 +101,9 @@ 

    Module netmiko.huawei.huawei_smartax

    config_command=config_command, pattern=pattern, re_flags=re_flags ) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string) def exit_config_mode( @@ -153,16 +159,16 @@

    Classes

    class HuaweiSmartAXSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Supports Huawei SmartAX and OLT.

    +

    Supports Huawei SmartAX and OLT.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -201,7 +207,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -246,12 +252,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -259,9 +265,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HuaweiSmartAXSSH(CiscoBaseConnection):
         """Supports Huawei SmartAX and OLT."""
     
    @@ -329,7 +337,9 @@ 

    Classes

    config_command=config_command, pattern=pattern, re_flags=re_flags ) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string) def exit_config_mode( @@ -381,12 +391,14 @@

    Ancestors

    Methods

    -def save_config(self, cmd='save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config for HuaweiSSH

    +

    Save Config for HuaweiSSH

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -397,12 +409,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -413,14 +427,16 @@ 

    Methods

    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Huawei does a strange thing where they add a space and then add ESC[1D +

    Huawei does a strange thing where they add a space and then add ESC[1D to move the cursor to the left one. -The extra space is problematic.

    +The extra space is problematic.

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """
         Huawei does a strange thing where they add a space and then add ESC[1D
    @@ -515,9 +531,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/huawei/index.html b/docs/netmiko/huawei/index.html index 0f2cfe0aa..0aa2e01be 100644 --- a/docs/netmiko/huawei/index.html +++ b/docs/netmiko/huawei/index.html @@ -3,15 +3,17 @@ - + netmiko.huawei API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.huawei

    -Source code + +Expand source code +
    from netmiko.huawei.huawei import HuaweiSSH, HuaweiVrpv8SSH
     from netmiko.huawei.huawei import HuaweiTelnet
     from netmiko.huawei.huawei_smartax import HuaweiSmartAXSSH
    @@ -34,11 +38,11 @@ 

    Sub-modules

    netmiko.huawei.huawei
    -
    +
    netmiko.huawei.huawei_smartax
    -
    +
    @@ -51,16 +55,16 @@

    Classes

    class HuaweiSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei SSH driver.

    +

    Huawei SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -99,7 +103,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -144,12 +148,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -157,9 +161,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class HuaweiSSH(HuaweiBase):
         """Huawei SSH driver."""
     
    @@ -235,16 +241,16 @@ 

    Inherited members

    class HuaweiSmartAXSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Supports Huawei SmartAX and OLT.

    +

    Supports Huawei SmartAX and OLT.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -283,7 +289,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -328,12 +334,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -341,9 +347,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HuaweiSmartAXSSH(CiscoBaseConnection):
         """Supports Huawei SmartAX and OLT."""
     
    @@ -411,7 +419,9 @@ 

    Inherited members

    config_command=config_command, pattern=pattern, re_flags=re_flags ) - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string) def exit_config_mode( @@ -463,12 +473,14 @@

    Ancestors

    Methods

    -def save_config(self, cmd='save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config for HuaweiSSH

    +

    Save Config for HuaweiSSH

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -479,12 +491,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -495,14 +509,16 @@ 

    Methods

    -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
    -

    Huawei does a strange thing where they add a space and then add ESC[1D +

    Huawei does a strange thing where they add a space and then add ESC[1D to move the cursor to the left one. -The extra space is problematic.

    +The extra space is problematic.

    -Source code + +Expand source code +
    def strip_ansi_escape_codes(self, string_buffer: str) -> str:
         """
         Huawei does a strange thing where they add a space and then add ESC[1D
    @@ -569,16 +585,16 @@ 

    Inherited members

    class HuaweiTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei Telnet driver.

    +

    Huawei Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -617,7 +633,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -662,12 +678,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -675,9 +691,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HuaweiTelnet(HuaweiBase):
         """Huawei Telnet driver."""
     
    @@ -767,12 +785,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator=']\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = ']\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    Telnet login for Huawei Devices

    +

    Telnet login for Huawei Devices

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"]\s*$",
    @@ -901,16 +921,16 @@ 

    Inherited members

    class HuaweiVrpv8SSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Huawei SSH driver.

    +

    Huawei SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -949,7 +969,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -994,12 +1014,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1007,10 +1027,23 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class HuaweiVrpv8SSH(HuaweiSSH):
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +        exit_config_mode: bool = False,
    +        **kwargs: Any,
    +    ) -> str:
    +        """Huawei VRPv8 requires you not exit from configuration mode."""
    +        return super().send_config_set(
    +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +        )
    +
         def commit(
             self,
             comment: str = "",
    @@ -1069,19 +1102,21 @@ 

    Ancestors

    Methods

    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -1127,17 +1162,40 @@ 

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    +
    +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +
    +
    +

    Huawei VRPv8 requires you not exit from configuration mode.

    +
    + +Expand source code + +
    def send_config_set(
    +    self,
    +    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    exit_config_mode: bool = False,
    +    **kwargs: Any,
    +) -> str:
    +    """Huawei VRPv8 requires you not exit from configuration mode."""
    +    return super().send_config_set(
    +        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +    )
    +
    +

    Inherited members

    @@ -1238,9 +1296,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/index.html b/docs/netmiko/index.html index afa31819a..a893bdab6 100644 --- a/docs/netmiko/index.html +++ b/docs/netmiko/index.html @@ -3,59 +3,95 @@ - + netmiko API documentation - - - - - + + + + + + +
    -

    Module netmiko

    +

    Package netmiko

    -Source code -
    import logging
    +
    +Expand source code
    +
    +
    import sys
    +
    +__version__ = "4.1.1"
    +PY_MAJ_VER = 3
    +PY_MIN_VER = 7
    +MIN_PYTHON_VER = "3.7"
    +
    +
    +# Make sure user is using a valid Python version (for Netmiko)
    +def check_python_version():  # type: ignore
    +    python_snake = "\U0001F40D"
    +
    +    # Use old-school .format() method in case someone tries to use Netmiko with very old Python
    +    msg = """
    +
    +Netmiko Version {net_ver} requires Python Version {py_ver} or higher.
    +
    +""".format(
    +        net_ver=__version__, py_ver=MIN_PYTHON_VER
    +    )
    +    if sys.version_info.major != PY_MAJ_VER:
    +        raise ValueError(msg)
    +    elif sys.version_info.minor < PY_MIN_VER:
    +        # Why not :-)
    +        msg = msg.rstrip() + " {snake}\n\n".format(snake=python_snake)
    +        raise ValueError(msg)
    +
    +
    +check_python_version()  # type: ignore
    +
    +
    +import logging  # noqa
    +
     
     # Logging configuration
    -log = logging.getLogger(__name__)  # noqa
    -log.addHandler(logging.NullHandler())  # noqa
    -
    -from netmiko.ssh_dispatcher import ConnectHandler
    -from netmiko.ssh_dispatcher import ConnLogOnly
    -from netmiko.ssh_dispatcher import ConnUnify
    -from netmiko.ssh_dispatcher import ssh_dispatcher
    -from netmiko.ssh_dispatcher import redispatch
    -from netmiko.ssh_dispatcher import platforms
    -from netmiko.ssh_dispatcher import FileTransfer
    -from netmiko.scp_handler import SCPConn
    -from netmiko.cisco.cisco_ios import InLineTransfer
    -from netmiko.exceptions import (
    +log = logging.getLogger(__name__)
    +log.addHandler(logging.NullHandler())
    +
    +
    +from netmiko.ssh_dispatcher import ConnectHandler  # noqa
    +from netmiko.ssh_dispatcher import ConnLogOnly  # noqa
    +from netmiko.ssh_dispatcher import ConnUnify  # noqa
    +from netmiko.ssh_dispatcher import ssh_dispatcher  # noqa
    +from netmiko.ssh_dispatcher import redispatch  # noqa
    +from netmiko.ssh_dispatcher import platforms  # noqa
    +from netmiko.ssh_dispatcher import FileTransfer  # noqa
    +from netmiko.scp_handler import SCPConn  # noqa
    +from netmiko.cisco.cisco_ios import InLineTransfer  # noqa
    +from netmiko.exceptions import (  # noqa
         NetmikoTimeoutException,
         NetMikoTimeoutException,
     )
    -from netmiko.exceptions import (
    +from netmiko.exceptions import (  # noqa
         NetmikoAuthenticationException,
         NetMikoAuthenticationException,
     )
    -from netmiko.exceptions import ConfigInvalidException
    -from netmiko.exceptions import ReadException, ReadTimeout
    -from netmiko.exceptions import NetmikoBaseException, ConnectionException
    -from netmiko.ssh_autodetect import SSHDetect
    -from netmiko.base_connection import BaseConnection
    -from netmiko.scp_functions import file_transfer, progress_bar
    +from netmiko.exceptions import ConfigInvalidException  # noqa
    +from netmiko.exceptions import ReadException, ReadTimeout  # noqa
    +from netmiko.exceptions import NetmikoBaseException, ConnectionException  # noqa
    +from netmiko.ssh_autodetect import SSHDetect  # noqa
    +from netmiko.base_connection import BaseConnection  # noqa
    +from netmiko.scp_functions import file_transfer, progress_bar  # noqa
     
     # Alternate naming
     Netmiko = ConnectHandler
     
    -__version__ = "4.0.1a1"
     __all__ = (
         "ConnectHandler",
         "ConnLogOnly",
    @@ -91,309 +127,309 @@ 

    Sub-modules

    netmiko.a10
    -
    +
    netmiko.accedian
    -
    +
    netmiko.adtran
    -
    +
    netmiko.alcatel
    -
    +
    netmiko.allied_telesis
    -
    +
    netmiko.apresia
    -
    +
    netmiko.arista
    -
    +
    netmiko.aruba
    -
    +
    netmiko.base_connection
    -

    Base connection class for netmiko …

    +

    Base connection class for netmiko …

    netmiko.broadcom
    -
    +
    netmiko.brocade
    -
    +
    netmiko.calix
    -
    +
    netmiko.cdot
    -
    +
    netmiko.centec
    -
    +
    netmiko.channel
    -
    +
    netmiko.checkpoint
    -
    +
    netmiko.ciena
    -
    +
    netmiko.cisco
    -
    +
    netmiko.cisco_base_connection
    -

    CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms.

    +

    CiscoBaseConnection is netmiko SSH class for Cisco and Cisco-like platforms.

    netmiko.citrix
    -
    +
    netmiko.cli_tools
    -
    +
    netmiko.cloudgenix
    -
    +
    netmiko.coriant
    -
    +
    netmiko.dell
    -
    +
    netmiko.dlink
    -
    +
    netmiko.eltex
    -
    +
    netmiko.endace
    -
    +
    netmiko.enterasys
    -
    +
    netmiko.ericsson
    -
    +
    netmiko.exceptions
    -
    +
    netmiko.extreme
    -
    +
    netmiko.f5
    -
    +
    netmiko.flexvnf
    -
    +
    netmiko.fortinet
    -
    +
    netmiko.hp
    -
    +
    netmiko.huawei
    -
    +
    netmiko.ipinfusion
    -
    +
    netmiko.juniper
    -
    +
    netmiko.keymile
    -
    +
    netmiko.linux
    -
    +
    netmiko.mellanox
    -
    +
    netmiko.mikrotik
    -
    +
    netmiko.mrv
    -
    +
    netmiko.netapp
    -
    +
    netmiko.netgear
    -
    +
    netmiko.netmiko_globals
    -
    +
    netmiko.no_config
    -
    +
    netmiko.no_enable
    -
    +
    netmiko.nokia
    -
    +
    netmiko.oneaccess
    -
    +
    netmiko.ovs
    -
    +
    netmiko.paloalto
    -
    +
    netmiko.pluribus
    -
    +
    netmiko.quanta
    -
    +
    netmiko.rad
    -
    +
    netmiko.raisecom
    -
    +
    netmiko.ruckus
    -
    +
    netmiko.ruijie
    -
    +
    netmiko.scp_functions
    -

    Netmiko SCP operations …

    +

    Netmiko SCP operations …

    netmiko.scp_handler
    -

    Netmiko SCP operations …

    +

    Netmiko SCP operations …

    netmiko.session_log
    -
    +
    netmiko.sixwind
    -
    +
    netmiko.snmp_autodetect
    -

    This module is used to auto-detect the type of a device in order to automatically create a -Netmiko connection …

    +

    This module is used to auto-detect the type of a device in order to automatically create a +Netmiko connection …

    netmiko.sophos
    -
    +
    netmiko.ssh_auth
    -
    +
    netmiko.ssh_autodetect
    -

    The ssh_autodetect module is used to auto-detect the netmiko device_type to use to further initiate -a new SSH connection with a remote host. This …

    +

    The ssh_autodetect module is used to auto-detect the netmiko device_type to use to further initiate +a new SSH connection with a remote host. This …

    netmiko.supermicro
    -
    +
    netmiko.terminal_server
    -
    +
    netmiko.tplink
    -
    +
    netmiko.ubiquiti
    -
    +
    netmiko.utilities
    -

    Miscellaneous utility functions.

    +

    Miscellaneous utility functions.

    netmiko.vyos
    -
    +
    netmiko.watchguard
    -
    +
    netmiko.yamaha
    -
    +
    netmiko.zte
    -
    +
    netmiko.zyxel
    -
    +
    @@ -403,14 +439,16 @@

    Sub-modules

    Functions

    -def ConnLogOnly(log_file='netmiko.log', log_level=None, log_format=None, **kwargs) +def ConnLogOnly(log_file: str = 'netmiko.log', log_level: Optional[int] = None, log_format: Optional[str] = None, **kwargs: Any) ‑> Optional[BaseConnection]
    -

    Dispatcher function that will return either: netmiko_object or None

    +

    Dispatcher function that will return either: netmiko_object or None

    Excluding errors in logging configuration should never generate an exception -all errors should be logged.

    +all errors should be logged.

    -Source code + +Expand source code +
    def ConnLogOnly(
         log_file: str = "netmiko.log",
         log_level: Optional[int] = None,
    @@ -466,12 +504,14 @@ 

    Functions

    -def ConnUnify(**kwargs) +def ConnUnify(**kwargs: Any) ‑> BaseConnection
    -
    +
    -Source code + +Expand source code +
    def ConnUnify(
         **kwargs: Any,
     ) -> "BaseConnection":
    @@ -498,12 +538,14 @@ 

    Functions

    -def ConnectHandler(*args, **kwargs) +def ConnectHandler(*args: Any, **kwargs: Any) ‑> BaseConnection
    -

    Factory function selects the proper class and creates object based on device_type.

    +

    Factory function selects the proper class and creates object based on device_type.

    -Source code + +Expand source code +
    def ConnectHandler(*args: Any, **kwargs: Any) -> "BaseConnection":
         """Factory function selects the proper class and creates object based on device_type."""
         device_type = kwargs["device_type"]
    @@ -521,12 +563,14 @@ 

    Functions

    -def FileTransfer(*args, **kwargs) +def FileTransfer(*args: Any, **kwargs: Any) ‑> BaseFileTransfer
    -

    Factory function selects the proper SCP class and creates object based on device_type.

    +

    Factory function selects the proper SCP class and creates object based on device_type.

    -Source code + +Expand source code +
    def FileTransfer(*args: Any, **kwargs: Any) -> "BaseFileTransfer":
         """Factory function selects the proper SCP class and creates object based on device_type."""
         if len(args) >= 1:
    @@ -544,12 +588,14 @@ 

    Functions

    -def Netmiko(*args, **kwargs) +def Netmiko(*args: Any, **kwargs: Any) ‑> BaseConnection
    -

    Factory function selects the proper class and creates object based on device_type.

    +

    Factory function selects the proper class and creates object based on device_type.

    -Source code + +Expand source code +
    def ConnectHandler(*args: Any, **kwargs: Any) -> "BaseConnection":
         """Factory function selects the proper class and creates object based on device_type."""
         device_type = kwargs["device_type"]
    @@ -567,18 +613,20 @@ 

    Functions

    -def file_transfer(ssh_conn, source_file, dest_file, file_system=None, direction='put', disable_md5=False, inline_transfer=False, overwrite_file=False, socket_timeout=10.0, progress=None, progress4=None, verify_file=None) +def file_transfer(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', disable_md5: bool = False, inline_transfer: bool = False, overwrite_file: bool = False, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, verify_file: Optional[bool] = None) ‑> Dict[str, bool]
    -

    Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices.

    +

    Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices.

    inline_transfer ONLY SUPPORTS TEXT FILES and will not support binary file transfers.

    return { 'file_exists': boolean, 'file_transferred': boolean, 'file_verified': boolean, -}

    +}

    -Source code + +Expand source code +
    def file_transfer(
         ssh_conn: "BaseConnection",
         source_file: str,
    @@ -687,12 +735,14 @@ 

    Functions

    -def progress_bar(filename, size, sent, peername=None) +def progress_bar(filename: ~AnyStr, size: int, sent: int, peername: Optional[str] = None) ‑> None
    -
    +
    -Source code + +Expand source code +
    def progress_bar(
         filename: AnyStr, size: int, sent: int, peername: Optional[str] = None
     ) -> None:
    @@ -722,14 +772,16 @@ 

    Functions

    -def redispatch(obj, device_type, session_prep=True) +def redispatch(obj: BaseConnection, device_type: str, session_prep: bool = True)
    -

    Dynamically change Netmiko object's class to proper class. +

    Dynamically change Netmiko object's class to proper class. Generally used with terminal_server device_type when you need to redispatch after interacting -with terminal server.

    +with terminal server.

    -Source code + +Expand source code +
    def redispatch(
         obj: "BaseConnection", device_type: str, session_prep: bool = True
     ) -> None:
    @@ -745,12 +797,14 @@ 

    Functions

    -def ssh_dispatcher(device_type) +def ssh_dispatcher(device_type: str) ‑> Type[BaseConnection]
    -

    Select the class to be instantiated based on vendor/platform.

    +

    Select the class to be instantiated based on vendor/platform.

    -Source code + +Expand source code +
    def ssh_dispatcher(device_type: str) -> Type["BaseConnection"]:
         """Select the class to be instantiated based on vendor/platform."""
         return CLASS_MAPPER[device_type]
    @@ -763,17 +817,17 @@

    Classes

    class BaseConnection -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -812,7 +866,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -857,12 +911,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -870,9 +924,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class BaseConnection:
         """
         Defines vendor independent methods.
    @@ -2055,10 +2111,7 @@ 

    Classes

    self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -2681,7 +2734,9 @@

    Classes

    raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not. :param check_string: Identification of configuration mode from the device @@ -2696,7 +2751,11 @@

    Classes

    output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output def config_mode( self, config_command: str = "", pattern: str = "", re_flags: int = 0 @@ -3121,10 +3180,10 @@

    Classes

    Subclasses

    • TelnetConnection
    • -
    • CiscoBaseConnection
    • CheckPointGaiaSSH
    • CienaSaosBase
    • CiscoWlcSSH
    • +
    • CiscoBaseConnection
    • NetscalerSSH
    • DellIsilonSSH
    • EricssonIposSSH
    • @@ -3133,6 +3192,7 @@

      Subclasses

    • JuniperBase
    • JuniperScreenOsSSH
    • NetAppcDotSSH
    • +
    • NokiaSrlSSH
    • NokiaSros
    • PaloAltoPanosBase
    • PluribusSSH
    • @@ -3144,14 +3204,16 @@

      Subclasses

      Static methods

      -def strip_backspaces(output) +def strip_backspaces(output: str) ‑> str
      -

      Strip any backspace characters out of the output.

      +

      Strip any backspace characters out of the output.

      :param output: Output obtained from a remote network device. -:type output: str

      +:type output: str

      -Source code + +Expand source code +
      @staticmethod
       def strip_backspaces(output: str) -> str:
           """Strip any backspace characters out of the output.
      @@ -3167,17 +3229,21 @@ 

      Static methods

      Methods

      -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
      -

      Checks if the device is in configuration mode or not.

      +

      Checks if the device is in configuration mode or not.

      :param check_string: Identification of configuration mode from the device :type check_string: str

      :param pattern: Pattern to terminate reading of channel -:type pattern: str

      +:type pattern: str

      -Source code -
      def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
      +
      +Expand source code
      +
      +
      def check_config_mode(
      +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
      +) -> bool:
           """Checks if the device is in configuration mode or not.
       
           :param check_string: Identification of configuration mode from the device
      @@ -3192,18 +3258,24 @@ 

      Methods

      output = self.read_channel_timing(read_timeout=10.0) else: output = self.read_until_pattern(pattern=pattern) - return check_string in output
      + + if force_regex: + return bool(re.search(check_string, output)) + else: + return check_string in output
      -def check_enable_mode(self, check_string='') +def check_enable_mode(self, check_string: str = '') ‑> bool
      -

      Check if in enable mode. Return boolean.

      +

      Check if in enable mode. Return boolean.

      :param check_string: Identification of privilege mode from device -:type check_string: str

      +:type check_string: str

      -Source code + +Expand source code +
      def check_enable_mode(self, check_string: str = "") -> bool:
           """Check if in enable mode. Return boolean.
       
      @@ -3216,24 +3288,28 @@ 

      Methods

      -def cleanup(self, command='') +def cleanup(self, command: str = '') ‑> None
      -

      Logout of the session on the network device plus any additional cleanup.

      +

      Logout of the session on the network device plus any additional cleanup.

      -Source code + +Expand source code +
      def cleanup(self, command: str = "") -> None:
           """Logout of the session on the network device plus any additional cleanup."""
           pass
      -def clear_buffer(self, backoff=True, backoff_max=3.0, delay_factor=None) +def clear_buffer(self, backoff: bool = True, backoff_max: float = 3.0, delay_factor: Optional[float] = None) ‑> str
      -

      Read any data available in the channel.

      +

      Read any data available in the channel.

      -Source code + +Expand source code +
      def clear_buffer(
           self,
           backoff: bool = True,
      @@ -3263,12 +3339,14 @@ 

      Methods

      -def command_echo_read(self, cmd, read_timeout) +def command_echo_read(self, cmd: str, read_timeout: float) ‑> str
      -
      +
      -Source code + +Expand source code +
      def command_echo_read(self, cmd: str, read_timeout: float) -> str:
       
           # Make sure you read until you detect the command echo (avoid getting out of sync)
      @@ -3289,30 +3367,34 @@ 

      Methods

      -def commit(self) +def commit(self) ‑> str
      -

      Commit method for platforms that support this.

      +

      Commit method for platforms that support this.

      -Source code + +Expand source code +
      def commit(self) -> str:
           """Commit method for platforms that support this."""
           raise AttributeError("Network device does not support 'commit()' method")
      -def config_mode(self, config_command='', pattern='', re_flags=0) +def config_mode(self, config_command: str = '', pattern: str = '', re_flags: int = 0) ‑> str
      -

      Enter into config_mode.

      +

      Enter into config_mode.

      :param config_command: Configuration command to send to the device :type config_command: str

      :param pattern: Pattern to terminate reading of channel :type pattern: str

      :param re_flags: Regular expression flags -:type re_flags: RegexFlag

      +:type re_flags: RegexFlag

      -Source code + +Expand source code +
      def config_mode(
           self, config_command: str = "", pattern: str = "", re_flags: int = 0
       ) -> str:
      @@ -3345,14 +3427,16 @@ 

      Methods

      -def disable_paging(self, command='terminal length 0', delay_factor=None, cmd_verify=True, pattern=None) +def disable_paging(self, command: str = 'terminal length 0', delay_factor: Optional[float] = None, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str
      -

      Disable paging default to a Cisco CLI method.

      +

      Disable paging default to a Cisco CLI method.

      :param command: Device command to disable pagination of output

      -

      :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      +

      :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      -Source code + +Expand source code +
      def disable_paging(
           self,
           command: str = "terminal length 0",
      @@ -3388,12 +3472,14 @@ 

      Methods

      -def disconnect(self) +def disconnect(self) ‑> None
      -

      Try to gracefully close the session.

      +

      Try to gracefully close the session.

      -Source code + +Expand source code +
      def disconnect(self) -> None:
           """Try to gracefully close the session."""
           try:
      @@ -3417,16 +3503,18 @@ 

      Methods

      -def enable(self, cmd='', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = '', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
      -

      Enter enable mode.

      +

      Enter enable mode.

      :param cmd: Device command to enter enable mode

      :param pattern: pattern to search for indicating device is waiting for password

      :param enable_pattern: pattern indicating you have entered enable mode

      -

      :param re_flags: Regular expression flags used in conjunction with pattern

      +

      :param re_flags: Regular expression flags used in conjunction with pattern

      -Source code + +Expand source code +
      def enable(
           self,
           cmd: str = "",
      @@ -3483,18 +3571,20 @@ 

      Methods

      -def establish_connection(self, width=511, height=1000) +def establish_connection(self, width: int = 511, height: int = 1000) ‑> None
      -

      Establish SSH connection to the network device

      +

      Establish SSH connection to the network device

      Timeout will generate a NetmikoTimeoutException Authentication failure will generate a NetmikoAuthenticationException

      :param width: Specified width of the VT100 terminal window (default: 511) :type width: int

      :param height: Specified height of the VT100 terminal window (default: 1000) -:type height: int

      +:type height: int

      -Source code + +Expand source code +
          def establish_connection(self, width: int = 511, height: int = 1000) -> None:
               """Establish SSH connection to the network device
       
      @@ -3605,16 +3695,18 @@ 

      Methods

      -def exit_config_mode(self, exit_config='', pattern='') +def exit_config_mode(self, exit_config: str = '', pattern: str = '') ‑> str
      -

      Exit from configuration mode.

      +

      Exit from configuration mode.

      :param exit_config: Command to exit configuration mode :type exit_config: str

      :param pattern: Pattern to terminate reading of channel -:type pattern: str

      +:type pattern: str

      -Source code + +Expand source code +
      def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
           """Exit from configuration mode.
       
      @@ -3643,14 +3735,16 @@ 

      Methods

      -def exit_enable_mode(self, exit_command='') +def exit_enable_mode(self, exit_command: str = '') ‑> str
      -

      Exit enable mode.

      +

      Exit enable mode.

      :param exit_command: Command that exits the session from privileged mode -:type exit_command: str

      +:type exit_command: str

      -Source code + +Expand source code +
      def exit_enable_mode(self, exit_command: str = "") -> str:
           """Exit enable mode.
       
      @@ -3667,15 +3761,17 @@ 

      Methods

      -def find_prompt(self, delay_factor=1.0, pattern=None) +def find_prompt(self, delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
      -

      Finds the current network device prompt, last line only.

      +

      Finds the current network device prompt, last line only.

      :param delay_factor: See init: global_delay_factor :type delay_factor: int

      -

      :param pattern: Regular expression pattern to determine whether prompt is valid

      +

      :param pattern: Regular expression pattern to determine whether prompt is valid

      -Source code + +Expand source code +
      def find_prompt(
           self, delay_factor: float = 1.0, pattern: Optional[str] = None
       ) -> str:
      @@ -3692,10 +3788,7 @@ 

      Methods

      self.write_channel(self.RETURN) if pattern: - try: - prompt = self.read_until_pattern(pattern=pattern) - except ReadTimeout: - pass + prompt = self.read_until_pattern(pattern=pattern) else: # Initial read time.sleep(sleep_time) @@ -3725,12 +3818,14 @@

      Methods

      -def is_alive(self) +def is_alive(self) ‑> bool
      -

      Returns a boolean flag with the state of the connection.

      +

      Returns a boolean flag with the state of the connection.

      -Source code + +Expand source code +
      def is_alive(self) -> bool:
           """Returns a boolean flag with the state of the connection."""
           null = chr(0)
      @@ -3770,14 +3865,16 @@ 

      Methods

      -def normalize_cmd(self, command) +def normalize_cmd(self, command: str) ‑> str
      -

      Normalize CLI commands to have a single trailing newline.

      +

      Normalize CLI commands to have a single trailing newline.

      :param command: Command that may require line feed to be normalized -:type command: str

      +:type command: str

      -Source code + +Expand source code +
      def normalize_cmd(self, command: str) -> str:
           """Normalize CLI commands to have a single trailing newline.
       
      @@ -3790,20 +3887,22 @@ 

      Methods

      -def normalize_linefeeds(self, a_string) +def normalize_linefeeds(self, a_string: str) ‑> str
      -

      Convert `

      +

      Convert `

      , -,

      -

      to +,

      +

      to .`

          :param a_string: A string that may have non-normalized line feeds
               i.e. output returned from device, or a device prompt
           :type a_string: str
      -
      +
      -Source code + +Expand source code +
      def normalize_linefeeds(self, a_string: str) -> str:
           """Convert `\r\r\n`,`\r\n`, `\n\r` to `\n.`
       
      @@ -3821,12 +3920,14 @@ 

      Methods

      -def paramiko_cleanup(self) +def paramiko_cleanup(self) ‑> None
      -

      Cleanup Paramiko to try to gracefully handle SSH session ending.

      +

      Cleanup Paramiko to try to gracefully handle SSH session ending.

      -Source code + +Expand source code +
      def paramiko_cleanup(self) -> None:
           """Cleanup Paramiko to try to gracefully handle SSH session ending."""
           if self.remote_conn_pre is not None:
      @@ -3835,12 +3936,14 @@ 

      Methods

      -def read_channel(self) +def read_channel(self) ‑> str
      -

      Generic handler that will read all the data from given channel.

      +

      Generic handler that will read all the data from given channel.

      -Source code + +Expand source code +
      @lock_channel
       def read_channel(self) -> str:
           """Generic handler that will read all the data from given channel."""
      @@ -3863,10 +3966,10 @@ 

      Methods

      -def read_channel_timing(self, last_read=2.0, read_timeout=120.0, delay_factor=None, max_loops=None) +def read_channel_timing(self, last_read: float = 2.0, read_timeout: float = 120.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None) ‑> str
      -

      Read data on the channel based on timing delays.

      +

      Read data on the channel based on timing delays.

      General pattern is keep reading until no new data is read. Once no new data is read wait last_read amount of time (one last read). As long as no new data, then return data.

      @@ -3876,9 +3979,11 @@

      Methods

      on an absolute timeout. It will only complete based on timeout based on their being no new data.

      :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      -

      :param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      +

      :param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      -Source code + +Expand source code +
          def read_channel_timing(
               self,
               last_read: float = 2.0,
      @@ -3951,10 +4056,10 @@ 

      Methods

      -def read_until_pattern(self, pattern='', read_timeout=10.0, re_flags=0, max_loops=None) +def read_until_pattern(self, pattern: str = '', read_timeout: float = 10.0, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
      -

      Read channel until pattern is detected.

      +

      Read channel until pattern is detected.

      Will return string up to and including pattern.

      Returns ReadTimeout if pattern not detected in read_timeout seconds.

      :param pattern: Regular expression pattern used to identify that reading is done.

      @@ -3962,9 +4067,11 @@

      Methods

      A read_timeout value of 0 will cause the loop to never timeout (i.e. it will keep reading indefinitely until pattern is detected.

      :param re_flags: regex flags used in conjunction with pattern (defaults to no flags).

      -

      :param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      +

      :param max_loops: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      -Source code + +Expand source code +
          def read_until_pattern(
               self,
               pattern: str = "",
      @@ -4045,12 +4152,14 @@ 

      Methods

      -def read_until_prompt(self, read_timeout=10.0, read_entire_line=False, re_flags=0, max_loops=None) +def read_until_prompt(self, read_timeout: float = 10.0, read_entire_line: bool = False, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
      -

      Read channel up to and including self.base_prompt.

      +

      Read channel up to and including self.base_prompt.

      -Source code + +Expand source code +
      def read_until_prompt(
           self,
           read_timeout: float = 10.0,
      @@ -4071,12 +4180,14 @@ 

      Methods

      -def read_until_prompt_or_pattern(self, pattern='', read_timeout=10.0, read_entire_line=False, re_flags=0, max_loops=None) +def read_until_prompt_or_pattern(self, pattern: str = '', read_timeout: float = 10.0, read_entire_line: bool = False, re_flags: int = 0, max_loops: Optional[int] = None) ‑> str
      -

      Read until either self.base_prompt or pattern is detected.

      +

      Read until either self.base_prompt or pattern is detected.

      -Source code + +Expand source code +
      def read_until_prompt_or_pattern(
           self,
           pattern: str = "",
      @@ -4102,10 +4213,10 @@ 

      Methods

      -def run_ttp(self, template, res_kwargs=None, **kwargs) +def run_ttp(self, template: Union[str, bytes, ForwardRef('PathLike[Any]')], res_kwargs: Optional[Dict[str, Any]] = None, **kwargs: Any) ‑> Any
      -

      Run TTP template parsing by using input parameters to collect +

      Run TTP template parsing by using input parameters to collect devices output.

      :param template: template content, OS path to template or reference to template within TTP templates collection in @@ -4118,9 +4229,11 @@

      Methods

      :param commands: list of commands to collect

      Inputs' load could be of one of the supported formats and controlled by input's load attribute, supported values - python, yaml or json. For each input output collected -from device and parsed accordingly.

      +from device and parsed accordingly.

      -Source code + +Expand source code +
      def run_ttp(
           self,
           template: Union[str, bytes, "PathLike[Any]"],
      @@ -4159,12 +4272,14 @@ 

      Methods

      -def save_config(self, cmd='', confirm=False, confirm_response='') +def save_config(self, cmd: str = '', confirm: bool = False, confirm_response: str = '') ‑> str
      -

      Not Implemented

      +

      Not Implemented

      -Source code + +Expand source code +
      def save_config(
           self, cmd: str = "", confirm: bool = False, confirm_response: str = ""
       ) -> str:
      @@ -4173,15 +4288,17 @@ 

      Methods

      -def select_delay_factor(self, delay_factor) +def select_delay_factor(self, delay_factor: float) ‑> float
      -

      Choose the greater of delay_factor or self.global_delay_factor (default). +

      Choose the greater of delay_factor or self.global_delay_factor (default). In fast_cli choose the lesser of delay_factor of self.global_delay_factor.

      :param delay_factor: See init: global_delay_factor -:type delay_factor: int

      +:type delay_factor: int

      -Source code + +Expand source code +
      def select_delay_factor(self, delay_factor: float) -> float:
           """
           Choose the greater of delay_factor or self.global_delay_factor (default).
      @@ -4203,10 +4320,10 @@ 

      Methods

      -def send_command(self, command_string, expect_string=None, read_timeout=10.0, delay_factor=None, max_loops=None, auto_find_prompt=True, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=True) +def send_command(self, command_string: str, expect_string: Optional[str] = None, read_timeout: float = 10.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, auto_find_prompt: bool = True, strip_prompt: bool = True, strip_command: bool = True, normalize: bool = True, use_textfsm: bool = False, textfsm_template: Optional[str] = None, use_ttp: bool = False, ttp_template: Optional[str] = None, use_genie: bool = False, cmd_verify: bool = True) ‑> Union[str, List[Any], Dict[str, Any]]
      -

      Execute command_string on the SSH channel using a pattern-based mechanism. Generally +

      Execute command_string on the SSH channel using a pattern-based mechanism. Generally used for show commands. By default this method will keep waiting to receive data until the network device prompt is detected. The current network device prompt will be determined automatically.

      @@ -4225,9 +4342,11 @@

      Methods

      :param ttp_template: Name of template to parse output with; can be fully qualified path, relative path, or name of file in current directory. (default: None).

      :param use_genie: Process command output through PyATS/Genie parser (default: False).

      -

      :param cmd_verify: Verify command echo before proceeding (default: True).

      +

      :param cmd_verify: Verify command echo before proceeding (default: True).

      -Source code + +Expand source code +
          @select_cmd_verify
           def send_command(
               self,
      @@ -4420,12 +4539,14 @@ 

      Methods

      -def send_command_expect(self, *args, **kwargs) +def send_command_expect(self, *args: Any, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
      -

      Support previous name of send_command method.

      +

      Support previous name of send_command method.

      -Source code + +Expand source code +
      def send_command_expect(
           self, *args: Any, **kwargs: Any
       ) -> Union[str, List[Any], Dict[str, Any]]:
      @@ -4434,10 +4555,10 @@ 

      Methods

      -def send_command_timing(self, command_string, last_read=2.0, read_timeout=120.0, delay_factor=None, max_loops=None, strip_prompt=True, strip_command=True, normalize=True, use_textfsm=False, textfsm_template=None, use_ttp=False, ttp_template=None, use_genie=False, cmd_verify=False) +def send_command_timing(self, command_string: str, last_read: float = 2.0, read_timeout: float = 120.0, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = True, strip_command: bool = True, normalize: bool = True, use_textfsm: bool = False, textfsm_template: Optional[str] = None, use_ttp: bool = False, ttp_template: Optional[str] = None, use_genie: bool = False, cmd_verify: bool = False) ‑> Union[str, List[Any], Dict[str, Any]]
      -

      Execute command_string on the SSH channel using a delay-based mechanism. Generally +

      Execute command_string on the SSH channel using a delay-based mechanism. Generally used for show commands.

      :param command_string: The command to be executed on the remote device.

      :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      @@ -4452,9 +4573,11 @@

      Methods

      :param ttp_template: Name of template to parse output with; can be fully qualified path, relative path, or name of file in current directory. (default: None).

      :param use_genie: Process command output through PyATS/Genie parser (default: False).

      -

      :param cmd_verify: Verify command echo before proceeding (default: False).

      +

      :param cmd_verify: Verify command echo before proceeding (default: False).

      -Source code + +Expand source code +
      @select_cmd_verify
       def send_command_timing(
           self,
      @@ -4539,17 +4662,19 @@ 

      Methods

      -def send_config_from_file(self, config_file, **kwargs) +def send_config_from_file(self, config_file: Union[str, bytes, ForwardRef('PathLike[Any]')], **kwargs: Any) ‑> str
      -

      Send configuration commands down the SSH channel from a file.

      +

      Send configuration commands down the SSH channel from a file.

      The file is processed line-by-line and each command is sent down the SSH channel.

      **kwargs are passed to send_config_set method.

      :param config_file: Path to configuration file to be sent to the device

      -

      :param kwargs: params to be sent to send_config_set method

      +

      :param kwargs: params to be sent to send_config_set method

      -Source code + +Expand source code +
      def send_config_from_file(
           self, config_file: Union[str, bytes, "PathLike[Any]"], **kwargs: Any
       ) -> str:
      @@ -4571,10 +4696,10 @@ 

      Methods

      -def send_config_set(self, config_commands=None, *, exit_config_mode=True, read_timeout=None, delay_factor=None, max_loops=None, strip_prompt=False, strip_command=False, config_mode_command=None, cmd_verify=True, enter_config_mode=True, error_pattern='', terminator='#', bypass_commands=None) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = False, strip_command: bool = False, config_mode_command: Optional[str] = None, cmd_verify: bool = True, enter_config_mode: bool = True, error_pattern: str = '', terminator: str = '#', bypass_commands: Optional[str] = None) ‑> str
      -

      Send configuration commands down the SSH channel.

      +

      Send configuration commands down the SSH channel.

      config_commands is an iterable containing all of the configuration commands. The commands will be executed one after the other.

      Automatically exits/enters configuration mode.

      @@ -4593,9 +4718,11 @@

      Methods

      :param terminator: Regular expression pattern to use as an alternate terminator in certain situations.

      :param bypass_commands: Regular expression pattern indicating configuration commands -where cmd_verify is automatically disabled.

      +where cmd_verify is automatically disabled.

      -Source code + +Expand source code +
      def send_config_set(
           self,
           config_commands: Union[str, Sequence[str], TextIO, None] = None,
      @@ -4756,18 +4883,20 @@ 

      Methods

      -def send_multiline(self, commands, multiline=True, **kwargs) +def send_multiline(self, commands: Sequence[Union[str, List[str]]], multiline: bool = True, **kwargs: Any) ‑> str
      -

      commands should either be:

      +

      commands should either be:

      commands = [[cmd1, expect1], [cmd2, expect2], …]]

      Or

      commands = [cmd1, cmd2, cmd3, …]

      Any expect_string that is a null-string will use pattern based on device's prompt (unless expect_string argument is passed in via -kwargs.

      +kwargs.

      -Source code + +Expand source code +
      def send_multiline(
           self,
           commands: Sequence[Union[str, List[str]]],
      @@ -4818,12 +4947,14 @@ 

      Methods

      -def send_multiline_timing(self, commands, multiline=True, **kwargs) +def send_multiline_timing(self, commands: Sequence[str], multiline: bool = True, **kwargs: Any) ‑> str
      -
      +
      -Source code + +Expand source code +
      def send_multiline_timing(
           self, commands: Sequence[str], multiline: bool = True, **kwargs: Any
       ) -> str:
      @@ -4837,12 +4968,14 @@ 

      Methods

      -def serial_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:[Uu]ser:|sername|ogin)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def serial_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:[Uu]ser:|sername|ogin)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
      -
      +
      -Source code + +Expand source code +
      def serial_login(
           self,
           pri_prompt_terminator: str = r"#\s*$",
      @@ -4863,19 +4996,21 @@ 

      Methods

      -def session_preparation(self) +def session_preparation(self) ‑> None
      -

      Prepare the session after the connection has been established

      +

      Prepare the session after the connection has been established

      This method handles some differences that occur between various devices early on in the session.

      In general, it should include: self._test_channel_read(pattern=r"some_pattern") self.set_base_prompt() self.set_terminal_width() -self.disable_paging()

      +self.disable_paging()

      -Source code + +Expand source code +
      def session_preparation(self) -> None:
           """
           Prepare the session after the connection has been established
      @@ -4896,10 +5031,10 @@ 

      Methods

      -def set_base_prompt(self, pri_prompt_terminator='#', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
      -

      Sets self.base_prompt

      +

      Sets self.base_prompt

      Used as delimiter for stripping of trailing prompt in output.

      Should be set to something that is general and applies in multiple contexts. For Cisco devices this will be set to router hostname (i.e. prompt without > or #).

      @@ -4908,9 +5043,11 @@

      Methods

      :param pri_prompt_terminator: Primary trailing delimiter for identifying a device prompt

      :param alt_prompt_terminator: Alternate trailing delimiter for identifying a device prompt

      :param delay_factor: See init: global_delay_factor

      -

      :param pattern: Regular expression pattern to search for in find_prompt() call

      +

      :param pattern: Regular expression pattern to search for in find_prompt() call

      -Source code + +Expand source code +
      @retry(
           wait=wait_exponential(multiplier=0.33, min=0, max=5),
           stop=stop_after_attempt(5),
      @@ -4964,16 +5101,18 @@ 

      Methods

      -def set_terminal_width(self, command='', delay_factor=None, cmd_verify=False, pattern=None) +def set_terminal_width(self, command: str = '', delay_factor: Optional[float] = None, cmd_verify: bool = False, pattern: Optional[str] = None) ‑> str
      -

      CLI terminals try to automatically adjust the line based on the width of the terminal. +

      CLI terminals try to automatically adjust the line based on the width of the terminal. This causes the output to get distorted when accessed programmatically.

      Set terminal width to 511 which works on a broad set of devices.

      :param command: Command string to send to the device

      -

      :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      +

      :param delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

      -Source code + +Expand source code +
      def set_terminal_width(
           self,
           command: str = "",
      @@ -5009,22 +5148,24 @@ 

      Methods

      -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
      -

      Handler for devices like WLC, Extreme ERS that throw up characters prior to login.

      +

      Handler for devices like WLC, Extreme ERS that throw up characters prior to login.

      -Source code + +Expand source code +
      def special_login_handler(self, delay_factor: float = 1.0) -> None:
           """Handler for devices like WLC, Extreme ERS that throw up characters prior to login."""
           pass
      -def strip_ansi_escape_codes(self, string_buffer) +def strip_ansi_escape_codes(self, string_buffer: str) ‑> str
      -

      Remove any ANSI (VT100) ESC codes from the output

      +

      Remove any ANSI (VT100) ESC codes from the output

      http://en.wikipedia.org/wiki/ANSI_escape_code

      Note: this does not capture ALL possible ANSI Escape Codes only the ones I have encountered

      @@ -5060,9 +5201,11 @@

      Methods

      very bottom of the screen).

      HP ProCurve and Cisco SG300 require this (possible others).

      :param string_buffer: The string to be processed to remove ANSI escape codes -:type string_buffer: str

      +:type string_buffer: str

      -Source code + +Expand source code +
      def strip_ansi_escape_codes(self, string_buffer: str) -> str:
           """
           Remove any ANSI (VT100) ESC codes from the output
      @@ -5175,17 +5318,19 @@ 

      Methods

      -def strip_command(self, command_string, output) +def strip_command(self, command_string: str, output: str) ‑> str
      -

      Strip command_string from output string

      +

      Strip command_string from output string

      Cisco IOS adds backspaces into output for long commands (i.e. for commands that line wrap)

      :param command_string: The command string sent to the device :type command_string: str

      :param output: The returned output as a result of the command string sent to the device -:type output: str

      +:type output: str

      -Source code + +Expand source code +
      def strip_command(self, command_string: str, output: str) -> str:
           """
           Strip command_string from output string
      @@ -5217,14 +5362,16 @@ 

      Methods

      -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
      -

      Strip the trailing router prompt from the output.

      +

      Strip the trailing router prompt from the output.

      :param a_string: Returned string from device -:type a_string: str

      +:type a_string: str

      -Source code + +Expand source code +
      def strip_prompt(self, a_string: str) -> str:
           """Strip the trailing router prompt from the output.
       
      @@ -5241,17 +5388,19 @@ 

      Methods

      -def telnet_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='>\\s*$', username_pattern='(?:user:|username|login|user name)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '>\\s*$', username_pattern: str = '(?:user:|username|login|user name)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
      -

      Telnet login. Can be username/password or just password.

      +

      Telnet login. Can be username/password or just password.

      :param pri_prompt_terminator: Primary trailing delimiter for identifying a device prompt

      :param alt_prompt_terminator: Alternate trailing delimiter for identifying a device prompt

      :param username_pattern: Pattern used to identify the username prompt

      :param delay_factor: See init: global_delay_factor

      -

      :param max_loops: Controls the wait time in conjunction with the delay_factor

      +

      :param max_loops: Controls the wait time in conjunction with the delay_factor

      -Source code + +Expand source code +
      def telnet_login(
           self,
           pri_prompt_terminator: str = r"#\s*$",
      @@ -5343,14 +5492,16 @@ 

      Methods

      -def write_channel(self, out_data) +def write_channel(self, out_data: str) ‑> None
      -

      Generic method that will write data out the channel.

      +

      Generic method that will write data out the channel.

      :param out_data: data to be written to the channel -:type out_data: str

      +:type out_data: str

      -Source code + +Expand source code +
      @lock_channel
       @log_writes
       def write_channel(self, out_data: str) -> None:
      @@ -5369,9 +5520,11 @@ 

      Methods

      (*args, **kwargs)
      -

      Exception raised for invalid configuration error.

      +

      Exception raised for invalid configuration error.

      -Source code + +Expand source code +
      class ConfigInvalidException(NetmikoBaseException):
           """Exception raised for invalid configuration error."""
       
      @@ -5389,9 +5542,11 @@ 

      Ancestors

      (*args, **kwargs)
      -

      Generic exception indicating the connection failed.

      +

      Generic exception indicating the connection failed.

      -Source code + +Expand source code +
      class ConnectionException(NetmikoBaseException):
           """Generic exception indicating the connection failed."""
       
      @@ -5406,12 +5561,14 @@ 

      Ancestors

      class InLineTransfer -(ssh_conn, source_file='', dest_file='', file_system=None, direction='put', source_config=None, socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str = '', dest_file: str = '', file_system: Optional[str] = None, direction: str = 'put', source_config: Optional[str] = None, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
      -

      Use TCL on Cisco IOS to directly transfer file.

      +

      Use TCL on Cisco IOS to directly transfer file.

      -Source code + +Expand source code +
      class InLineTransfer(CiscoIosFileTransfer):
           """Use TCL on Cisco IOS to directly transfer file."""
       
      @@ -5624,12 +5781,14 @@ 

      Ancestors

      Methods

      -def config_md5(self, source_config) +def config_md5(self, source_config: str) ‑> str
      -

      Compute MD5 hash of text.

      +

      Compute MD5 hash of text.

      -Source code + +Expand source code +
      def config_md5(self, source_config: str) -> str:
           """Compute MD5 hash of text."""
           file_contents = source_config + "\n"  # Cisco IOS automatically adds this
      @@ -5638,12 +5797,14 @@ 

      Methods

      -def file_md5(self, file_name, add_newline=False) +def file_md5(self, file_name: str, add_newline: bool = False) ‑> str
      -

      Compute MD5 hash of file.

      +

      Compute MD5 hash of file.

      -Source code + +Expand source code +
      def file_md5(self, file_name: str, add_newline: bool = False) -> str:
           """Compute MD5 hash of file."""
           if add_newline is True:
      @@ -5682,13 +5843,15 @@ 

      Inherited members

    -class NetMikoAuthenticationException +class NetmikoAuthenticationException (*args, **kwargs)
    -

    SSH authentication exception based on Paramiko AuthenticationException.

    +

    SSH authentication exception based on Paramiko AuthenticationException.

    -Source code + +Expand source code +
    class NetmikoAuthenticationException(AuthenticationException):
         """SSH authentication exception based on Paramiko AuthenticationException."""
     
    @@ -5702,34 +5865,16 @@ 

    Ancestors

  • builtins.BaseException
  • -
    -class NetMikoTimeoutException -(*args, **kwargs) -
    -
    -

    SSH session timed trying to connect to the device.

    -
    -Source code -
    class NetmikoTimeoutException(SSHException):
    -    """SSH session timed trying to connect to the device."""
    -
    -    pass
    -
    -

    Ancestors

    -
      -
    • paramiko.ssh_exception.SSHException
    • -
    • builtins.Exception
    • -
    • builtins.BaseException
    • -
    -
    -class NetmikoAuthenticationException +class NetMikoAuthenticationException (*args, **kwargs)
    -

    SSH authentication exception based on Paramiko AuthenticationException.

    +

    SSH authentication exception based on Paramiko AuthenticationException.

    -Source code + +Expand source code +
    class NetmikoAuthenticationException(AuthenticationException):
         """SSH authentication exception based on Paramiko AuthenticationException."""
     
    @@ -5748,9 +5893,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General base exception except for exceptions that inherit from Paramiko.

    +

    General base exception except for exceptions that inherit from Paramiko.

    -Source code + +Expand source code +
    class NetmikoBaseException(Exception):
         """General base exception except for exceptions that inherit from Paramiko."""
     
    @@ -5763,10 +5910,10 @@ 

    Ancestors

    Subclasses

    @@ -5774,9 +5921,33 @@

    Subclasses

    (*args, **kwargs)
    -

    SSH session timed trying to connect to the device.

    +

    SSH session timed trying to connect to the device.

    +
    + +Expand source code + +
    class NetmikoTimeoutException(SSHException):
    +    """SSH session timed trying to connect to the device."""
    +
    +    pass
    +
    +

    Ancestors

    +
      +
    • paramiko.ssh_exception.SSHException
    • +
    • builtins.Exception
    • +
    • builtins.BaseException
    • +
    +
    +
    +class NetMikoTimeoutException +(*args, **kwargs) +
    +
    +

    SSH session timed trying to connect to the device.

    -Source code + +Expand source code +
    class NetmikoTimeoutException(SSHException):
         """SSH session timed trying to connect to the device."""
     
    @@ -5794,9 +5965,11 @@ 

    Ancestors

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko read operation.

    +

    General exception indicating an error occurred during a Netmiko read operation.

    -Source code + +Expand source code +
    class ReadException(NetmikoBaseException):
         """General exception indicating an error occurred during a Netmiko read operation."""
     
    @@ -5818,9 +5991,11 @@ 

    Subclasses

    (*args, **kwargs)
    -

    General exception indicating an error occurred during a Netmiko read operation.

    +

    General exception indicating an error occurred during a Netmiko read operation.

    -Source code + +Expand source code +
    class ReadTimeout(ReadException):
         """General exception indicating an error occurred during a Netmiko read operation."""
     
    @@ -5836,13 +6011,15 @@ 

    Ancestors

    class SCPConn -(ssh_conn, socket_timeout=10.0, progress=None, progress4=None) +(ssh_conn: BaseConnection, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None)
    -

    Establish a secure copy channel to the remote network device.

    -

    Must close the SCP connection to get the file to write to the remote filesystem

    +

    Establish a secure copy channel to the remote network device.

    +

    Must close the SCP connection to get the file to write to the remote filesystem

    -Source code + +Expand source code +
    class SCPConn(object):
         """
         Establish a secure copy channel to the remote network device.
    @@ -5894,24 +6071,28 @@ 

    Ancestors

    Methods

    -def close(self) +def close(self) ‑> None
    -

    Close the SCP connection.

    +

    Close the SCP connection.

    -Source code + +Expand source code +
    def close(self) -> None:
         """Close the SCP connection."""
         self.scp_conn.close()
    -def establish_scp_conn(self) +def establish_scp_conn(self) ‑> None
    -

    Establish the secure copy connection.

    +

    Establish the secure copy connection.

    -Source code + +Expand source code +
    def establish_scp_conn(self) -> None:
         """Establish the secure copy connection."""
         ssh_connect_params = self.ssh_ctl_chan._connect_params_dict()
    @@ -5926,36 +6107,42 @@ 

    Methods

    -def scp_get_file(self, source_file, dest_file) +def scp_get_file(self, source_file: str, dest_file: str) ‑> None
    -

    Get file using SCP.

    +

    Get file using SCP.

    -Source code + +Expand source code +
    def scp_get_file(self, source_file: str, dest_file: str) -> None:
         """Get file using SCP."""
         self.scp_client.get(source_file, dest_file)
    -def scp_put_file(self, source_file, dest_file) +def scp_put_file(self, source_file: str, dest_file: str) ‑> None
    -

    Put file using SCP.

    +

    Put file using SCP.

    -Source code + +Expand source code +
    def scp_put_file(self, source_file: str, dest_file: str) -> None:
         """Put file using SCP."""
         self.scp_client.put(source_file, dest_file)
    -def scp_transfer_file(self, source_file, dest_file) +def scp_transfer_file(self, source_file: str, dest_file: str) ‑> None
    -

    Put file using SCP (for backwards compatibility).

    +

    Put file using SCP (for backwards compatibility).

    -Source code + +Expand source code +
    def scp_transfer_file(self, source_file: str, dest_file: str) -> None:
         """Put file using SCP (for backwards compatibility)."""
         self.scp_client.put(source_file, dest_file)
    @@ -5965,10 +6152,10 @@

    Methods

    class SSHDetect -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    The SSHDetect class tries to automatically guess the device type running on the SSH remote end. +

    The SSHDetect class tries to automatically guess the device type running on the SSH remote end. Be careful that the kwargs 'device_type' must be set to 'autodetect', otherwise it won't work at all.

    Parameters

    @@ -5980,7 +6167,7 @@

    Parameters

    Attributes

    -
    connection : TerminalServerSSH
    +
    connection : TerminalServerSSH
    A basic connection to the remote SSH end.
    potential_matches : dict
    Dict of (device_type, accuracy) that is populated through an interaction with the @@ -5989,9 +6176,11 @@

    Attributes

    Methods

    autodetect() Try to determine the device type.

    -

    Constructor of the SSHDetect class

    +

    Constructor of the SSHDetect class

    -Source code + +Expand source code +
    class SSHDetect(object):
         """
         The SSHDetect class tries to automatically guess the device type running on the SSH remote end.
    @@ -6212,17 +6401,19 @@ 

    Methods

    Methods

    -def autodetect(self) +def autodetect(self) ‑> Optional[str]
    -

    Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE

    +

    Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE

    Returns

    best_match : str or None
    The device type that is currently the best to use to interact with the device
    -
    +
    -Source code + +Expand source code +
    def autodetect(self) -> Union[str, None]:
         """
         Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE
    @@ -6434,9 +6625,6 @@ 

    InLin

    NetmikoAuthenticationException

  • -

    NetmikoTimeoutException

    -
  • -
  • NetmikoAuthenticationException

  • @@ -6446,6 +6634,9 @@

    NetmikoTimeoutException

  • +

    NetmikoTimeoutException

    +
  • +
  • ReadException

  • @@ -6473,9 +6664,7 @@

    SSHDetect

  • - - \ No newline at end of file diff --git a/docs/netmiko/ipinfusion/index.html b/docs/netmiko/ipinfusion/index.html index c8ee4b2e3..e2eb97e96 100644 --- a/docs/netmiko/ipinfusion/index.html +++ b/docs/netmiko/ipinfusion/index.html @@ -3,15 +3,17 @@ - + netmiko.ipinfusion API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ipinfusion

    -Source code + +Expand source code +
    from netmiko.ipinfusion.ipinfusion_ocnos import (
         IpInfusionOcNOSSSH,
         IpInfusionOcNOSTelnet,
    @@ -35,7 +39,7 @@ 

    Sub-modules

    netmiko.ipinfusion.ipinfusion_ocnos
    -
    +
    @@ -48,16 +52,16 @@

    Classes

    class IpInfusionOcNOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    IP Infusion OcNOS SSH driver.

    +

    IP Infusion OcNOS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -96,7 +100,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -141,12 +145,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -154,9 +158,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class IpInfusionOcNOSSSH(IpInfusionOcNOSBase):
         """IP Infusion OcNOS SSH driver."""
     
    @@ -219,17 +225,17 @@ 

    Inherited members

    class IpInfusionOcNOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    IP Infusion OcNOS +

    IP Infusion OcNOS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -268,7 +274,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -313,12 +319,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -326,9 +332,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class IpInfusionOcNOSTelnet(IpInfusionOcNOSBase):
         """IP Infusion OcNOS  Telnet driver."""
     
    @@ -456,9 +464,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ipinfusion/ipinfusion_ocnos.html b/docs/netmiko/ipinfusion/ipinfusion_ocnos.html index 119f40c20..b7ca9eaf3 100644 --- a/docs/netmiko/ipinfusion/ipinfusion_ocnos.html +++ b/docs/netmiko/ipinfusion/ipinfusion_ocnos.html @@ -3,15 +3,17 @@ - + netmiko.ipinfusion.ipinfusion_ocnos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ipinfusion.ipinfusion_ocnos

    -Source code + +Expand source code +
    import time
     from typing import Any
     from socket import socket
    @@ -113,16 +117,16 @@ 

    Classes

    class IpInfusionOcNOSBase -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Common Methods for IP Infusion OcNOS support.

    +

    Common Methods for IP Infusion OcNOS support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -161,7 +165,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -206,12 +210,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -219,9 +223,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class IpInfusionOcNOSBase(CiscoBaseConnection):
         """Common Methods for IP Infusion OcNOS support."""
     
    @@ -260,12 +266,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using write command

    +

    Saves Config Using write command

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -326,16 +334,16 @@ 

    Inherited members

    class IpInfusionOcNOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    IP Infusion OcNOS SSH driver.

    +

    IP Infusion OcNOS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -374,7 +382,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -419,12 +427,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -432,9 +440,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class IpInfusionOcNOSSSH(IpInfusionOcNOSBase):
         """IP Infusion OcNOS SSH driver."""
     
    @@ -497,17 +507,17 @@ 

    Inherited members

    class IpInfusionOcNOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    IP Infusion OcNOS +

    IP Infusion OcNOS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -546,7 +556,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -591,12 +601,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -604,9 +614,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class IpInfusionOcNOSTelnet(IpInfusionOcNOSBase):
         """IP Infusion OcNOS  Telnet driver."""
     
    @@ -735,9 +747,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/juniper/index.html b/docs/netmiko/juniper/index.html index a30c96b48..c2e7a2486 100644 --- a/docs/netmiko/juniper/index.html +++ b/docs/netmiko/juniper/index.html @@ -3,15 +3,17 @@ - + netmiko.juniper API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.juniper

    -Source code + +Expand source code +
    from netmiko.juniper.juniper import JuniperSSH, JuniperTelnet, JuniperFileTransfer
     from netmiko.juniper.juniper_screenos import JuniperScreenOsSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.juniper.juniper
    -
    +
    netmiko.juniper.juniper_screenos
    -
    +
    @@ -50,12 +54,14 @@

    Classes

    class JuniperFileTransfer -(ssh_conn, source_file, dest_file, file_system='/var/tmp', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/var/tmp', direction: str = 'put', **kwargs: Any)
    -

    Juniper SCP File Transfer driver.

    +

    Juniper SCP File Transfer driver.

    -Source code + +Expand source code +
    class JuniperFileTransfer(BaseFileTransfer):
         """Juniper SCP File Transfer driver."""
     
    @@ -135,18 +141,18 @@ 

    Inherited members

    class JuniperSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -185,7 +191,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -230,12 +236,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -243,9 +249,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class JuniperSSH(JuniperBase):
         pass
    @@ -308,16 +316,16 @@

    Inherited members

    class JuniperScreenOsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper ScreenOS devices.

    +

    Implement methods for interacting with Juniper ScreenOS devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -356,7 +364,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -401,12 +409,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -414,9 +422,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class JuniperScreenOsSSH(NoEnable, NoConfig, BaseConnection):
         """
         Implement methods for interacting with Juniper ScreenOS devices.
    @@ -454,12 +464,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config.

    +

    Save Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -471,12 +483,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    ScreenOS can be configured to require: Accept this agreement y/[n]

    +

    ScreenOS can be configured to require: Accept this agreement y/[n]

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         ScreenOS can be configured to require: Accept this agreement y/[n]
    @@ -542,18 +556,18 @@ 

    Inherited members

    class JuniperTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -592,7 +606,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -637,12 +651,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -650,9 +664,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class JuniperTelnet(JuniperBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -760,9 +776,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/juniper/juniper.html b/docs/netmiko/juniper/juniper.html index 0f1a29762..8f8ad21ff 100644 --- a/docs/netmiko/juniper/juniper.html +++ b/docs/netmiko/juniper/juniper.html @@ -3,15 +3,17 @@ - + netmiko.juniper.juniper API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.juniper.juniper

    -Source code + +Expand source code +
    import re
     import warnings
     from typing import Optional, Any
    @@ -92,7 +96,10 @@ 

    Module netmiko.juniper.juniper

    return def check_config_mode( - self, check_string: str = "]", pattern: str = r"(?m:[>#] $)" + self, + check_string: str = "]", + pattern: str = r"(?m:[>#] $)", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -246,8 +253,8 @@

    Module netmiko.juniper.juniper

    """ strings_to_strip = [ r"\[edit.*\]", - r"\{master:.*\}", - r"\{backup:.*\}", + r"\{master:?.*\}", + r"\{backup:?.*\}", r"\{line.*\}", r"\{primary.*\}", r"\{secondary.*\}", @@ -255,9 +262,8 @@

    Module netmiko.juniper.juniper

    response_list = a_string.split(self.RESPONSE_RETURN) last_line = response_list[-1] - for pattern in strings_to_strip: - if re.search(pattern, last_line): + if re.search(pattern, last_line, flags=re.I): return self.RESPONSE_RETURN.join(response_list[:-1]) return a_string @@ -344,18 +350,18 @@

    Classes

    class JuniperBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -394,7 +400,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -439,12 +445,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -452,9 +458,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class JuniperBase(NoEnable, BaseConnection):
         """
         Implement methods for interacting with Juniper Networks devices.
    @@ -516,7 +524,10 @@ 

    Classes

    return def check_config_mode( - self, check_string: str = "]", pattern: str = r"(?m:[>#] $)" + self, + check_string: str = "]", + pattern: str = r"(?m:[>#] $)", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -670,8 +681,8 @@

    Classes

    """ strings_to_strip = [ r"\[edit.*\]", - r"\{master:.*\}", - r"\{backup:.*\}", + r"\{master:?.*\}", + r"\{backup:?.*\}", r"\{line.*\}", r"\{primary.*\}", r"\{secondary.*\}", @@ -679,9 +690,8 @@

    Classes

    response_list = a_string.split(self.RESPONSE_RETURN) last_line = response_list[-1] - for pattern in strings_to_strip: - if re.search(pattern, last_line): + if re.search(pattern, last_line, flags=re.I): return self.RESPONSE_RETURN.join(response_list[:-1]) return a_string @@ -709,17 +719,22 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=']', pattern='(?m:[>#] $)') +def check_config_mode(self, check_string: str = ']', pattern: str = '(?m:[>#] $)', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    ?m = Use multiline matching

    Juniper unfortunately will use # as a message indicator when not in config mode -For example, with commit confirmed.

    +For example, with commit confirmed.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "]", pattern: str = r"(?m:[>#] $)"
    +    self,
    +    check_string: str = "]",
    +    pattern: str = r"(?m:[>#] $)",
    +    force_regex: bool = False,
     ) -> bool:
         """
         Checks if the device is in configuration mode or not.
    @@ -734,12 +749,14 @@ 

    Methods

    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Gracefully exit the SSH session.

    +

    Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Gracefully exit the SSH session."""
         try:
    @@ -753,10 +770,10 @@ 

    Methods

    -def commit(self, confirm=False, confirm_delay=None, check=False, comment='', and_quit=False, read_timeout=120.0, delay_factor=None) +def commit(self, confirm: bool = False, confirm_delay: Optional[int] = None, check: bool = False, comment: str = '', and_quit: bool = False, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    @@ -772,9 +789,11 @@

    Methods

    command_string = commit confirmed or commit confirmed check: command_string = commit check

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         confirm: bool = False,
    @@ -863,13 +882,15 @@ 

    Methods

    -def config_mode(self, config_command='configure', pattern='(?s:Entering configuration mode.*\\].*#)', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '(?s:Entering configuration mode.*\\].*#)', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    -

    ?s = enables re.DOTALL in regex pattern.

    +

    Enter configuration mode.

    +

    ?s = enables re.DOTALL in regex pattern.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "configure",
    @@ -887,12 +908,14 @@ 

    Methods

    -def enter_cli_mode(self) +def enter_cli_mode(self) ‑> None
    -

    Check if at shell prompt root@ and go into CLI.

    +

    Check if at shell prompt root@ and go into CLI.

    -Source code + +Expand source code +
    def enter_cli_mode(self) -> None:
         """Check if at shell prompt root@ and go into CLI."""
         mode = self._determine_mode()
    @@ -908,12 +931,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit configuration-mode', pattern='') +def exit_config_mode(self, exit_config: str = 'exit configuration-mode', pattern: str = '') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit configuration-mode", pattern: str = ""
     ) -> str:
    @@ -938,12 +963,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         pattern = r"[%>$#]"
    @@ -964,17 +991,19 @@ 

    Methods

    -def strip_context_items(self, a_string) +def strip_context_items(self, a_string: str) ‑> str
    -

    Strip Juniper-specific output.

    +

    Strip Juniper-specific output.

    Juniper will also put a configuration context: [edit]

    and various chassis contexts: {master:0}, {backup:1}

    -

    This method removes those lines.

    +

    This method removes those lines.

    -Source code + +Expand source code +
    def strip_context_items(self, a_string: str) -> str:
         """Strip Juniper-specific output.
     
    @@ -988,8 +1017,8 @@ 

    Methods

    """ strings_to_strip = [ r"\[edit.*\]", - r"\{master:.*\}", - r"\{backup:.*\}", + r"\{master:?.*\}", + r"\{backup:?.*\}", r"\{line.*\}", r"\{primary.*\}", r"\{secondary.*\}", @@ -997,20 +1026,21 @@

    Methods

    response_list = a_string.split(self.RESPONSE_RETURN) last_line = response_list[-1] - for pattern in strings_to_strip: - if re.search(pattern, last_line): + if re.search(pattern, last_line, flags=re.I): return self.RESPONSE_RETURN.join(response_list[:-1]) return a_string
    -def strip_prompt(self, *args, **kwargs) +def strip_prompt(self, *args: Any, **kwargs: Any) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, *args: Any, **kwargs: Any) -> str:
         """Strip the trailing router prompt from the output."""
         a_string = super().strip_prompt(*args, **kwargs)
    @@ -1062,12 +1092,14 @@ 

    Inherited members

    class JuniperFileTransfer -(ssh_conn, source_file, dest_file, file_system='/var/tmp', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/var/tmp', direction: str = 'put', **kwargs: Any)
    -

    Juniper SCP File Transfer driver.

    +

    Juniper SCP File Transfer driver.

    -Source code + +Expand source code +
    class JuniperFileTransfer(BaseFileTransfer):
         """Juniper SCP File Transfer driver."""
     
    @@ -1147,18 +1179,18 @@ 

    Inherited members

    class JuniperSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1197,7 +1229,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1242,12 +1274,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1255,9 +1287,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class JuniperSSH(JuniperBase):
         pass
    @@ -1320,18 +1354,18 @@

    Inherited members

    class JuniperTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Implement methods for interacting with Juniper Networks devices.

    +

    Implement methods for interacting with Juniper Networks devices.

    methods. Overrides several methods for Juniper-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1370,7 +1404,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1415,12 +1449,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1428,9 +1462,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class JuniperTelnet(JuniperBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -1539,9 +1575,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/juniper/juniper_screenos.html b/docs/netmiko/juniper/juniper_screenos.html index d5f174581..ca4e2d937 100644 --- a/docs/netmiko/juniper/juniper_screenos.html +++ b/docs/netmiko/juniper/juniper_screenos.html @@ -3,15 +3,17 @@ - + netmiko.juniper.juniper_screenos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.juniper.juniper_screenos

    -Source code + +Expand source code +
    from netmiko.no_enable import NoEnable
     from netmiko.no_config import NoConfig
     from netmiko.base_connection import BaseConnection
    @@ -67,16 +71,16 @@ 

    Classes

    class JuniperScreenOsSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with Juniper ScreenOS devices.

    +

    Implement methods for interacting with Juniper ScreenOS devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -115,7 +119,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -160,12 +164,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -173,9 +177,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class JuniperScreenOsSSH(NoEnable, NoConfig, BaseConnection):
         """
         Implement methods for interacting with Juniper ScreenOS devices.
    @@ -213,12 +219,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='save config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config.

    +

    Save Config.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config",
    @@ -230,12 +238,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    ScreenOS can be configured to require: Accept this agreement y/[n]

    +

    ScreenOS can be configured to require: Accept this agreement y/[n]

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         ScreenOS can be configured to require: Accept this agreement y/[n]
    @@ -328,9 +338,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/keymile/index.html b/docs/netmiko/keymile/index.html index 3296ce928..483518d89 100644 --- a/docs/netmiko/keymile/index.html +++ b/docs/netmiko/keymile/index.html @@ -3,15 +3,17 @@ - + netmiko.keymile API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.keymile

    -Source code + +Expand source code +
    from netmiko.keymile.keymile_ssh import KeymileSSH
     from netmiko.keymile.keymile_nos_ssh import KeymileNOSSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.keymile.keymile_nos_ssh
    -
    +
    netmiko.keymile.keymile_ssh
    -
    +
    @@ -50,16 +54,16 @@

    Classes

    class KeymileNOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Common Methods for IOS (both SSH and telnet).

    +

    Common Methods for IOS (both SSH and telnet).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -143,12 +147,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -156,9 +160,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class KeymileNOSSSH(CiscoIosBase):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -195,13 +201,15 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Since Keymile NOS always returns True on paramiko.connect() we -check the output for substring Login incorrect after connecting.

    +

    Since Keymile NOS always returns True on paramiko.connect() we +check the output for substring Login incorrect after connecting.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Since Keymile NOS always returns True on paramiko.connect() we
         check the output for substring Login incorrect after connecting."""
    @@ -259,19 +267,21 @@ 

    Inherited members

    class KeymileSSH -(**kwargs) +(**kwargs: Any)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    The expectation on platforms that have no method for elevating privileges is that the standard default privileges allow configuration changes.

    Consequently check_enable_mode returns True by default for platforms that -don't explicitly support enable mode.

    +don't explicitly support enable mode.

    -Source code + +Expand source code +
    class KeymileSSH(NoEnable, NoConfig, CiscoIosBase):
         def __init__(self, **kwargs: Any) -> None:
             kwargs.setdefault("default_enter", "\r\n")
    @@ -319,24 +329,28 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Keymile does not use paging.

    +

    Keymile does not use paging.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Keymile does not use paging."""
         return ""
    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    set prompt termination to >

    +

    set prompt termination to >

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -354,12 +368,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Remove appending empty line and prompt from output

    +

    Remove appending empty line and prompt from output

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Remove appending empty line and prompt from output"""
         a_string = a_string[:-1]
    @@ -455,9 +471,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/keymile/keymile_nos_ssh.html b/docs/netmiko/keymile/keymile_nos_ssh.html index 374a69b35..09bc067ff 100644 --- a/docs/netmiko/keymile/keymile_nos_ssh.html +++ b/docs/netmiko/keymile/keymile_nos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.keymile.keymile_nos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.keymile.keymile_nos_ssh

    -Source code + +Expand source code +
    import time
     import re
     
    @@ -69,16 +73,16 @@ 

    Classes

    class KeymileNOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Common Methods for IOS (both SSH and telnet).

    +

    Common Methods for IOS (both SSH and telnet).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -117,7 +121,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -162,12 +166,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -175,9 +179,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class KeymileNOSSSH(CiscoIosBase):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -214,13 +220,15 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Since Keymile NOS always returns True on paramiko.connect() we -check the output for substring Login incorrect after connecting.

    +

    Since Keymile NOS always returns True on paramiko.connect() we +check the output for substring Login incorrect after connecting.

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """Since Keymile NOS always returns True on paramiko.connect() we
         check the output for substring Login incorrect after connecting."""
    @@ -304,9 +312,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/keymile/keymile_ssh.html b/docs/netmiko/keymile/keymile_ssh.html index e95cc85ed..b092b1a8a 100644 --- a/docs/netmiko/keymile/keymile_ssh.html +++ b/docs/netmiko/keymile/keymile_ssh.html @@ -3,15 +3,17 @@ - + netmiko.keymile.keymile_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.keymile.keymile_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional
     import time
     
    @@ -78,19 +82,21 @@ 

    Classes

    class KeymileSSH -(**kwargs) +(**kwargs: Any)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    The expectation on platforms that have no method for elevating privileges is that the standard default privileges allow configuration changes.

    Consequently check_enable_mode returns True by default for platforms that -don't explicitly support enable mode.

    +don't explicitly support enable mode.

    -Source code + +Expand source code +
    class KeymileSSH(NoEnable, NoConfig, CiscoIosBase):
         def __init__(self, **kwargs: Any) -> None:
             kwargs.setdefault("default_enter", "\r\n")
    @@ -138,24 +144,28 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Keymile does not use paging.

    +

    Keymile does not use paging.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Keymile does not use paging."""
         return ""
    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    set prompt termination to >

    +

    set prompt termination to >

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -173,12 +183,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Remove appending empty line and prompt from output

    +

    Remove appending empty line and prompt from output

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Remove appending empty line and prompt from output"""
         a_string = a_string[:-1]
    @@ -262,9 +274,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/linux/index.html b/docs/netmiko/linux/index.html index 6fe789b5d..00ff46677 100644 --- a/docs/netmiko/linux/index.html +++ b/docs/netmiko/linux/index.html @@ -3,15 +3,17 @@ - + netmiko.linux API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.linux

    -Source code + +Expand source code +
    from netmiko.linux.linux_ssh import LinuxSSH, LinuxFileTransfer
     
     __all__ = ["LinuxSSH", "LinuxFileTransfer"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.linux.linux_ssh
    -
    +
    @@ -45,13 +49,15 @@

    Classes

    class LinuxFileTransfer -(ssh_conn, source_file, dest_file, file_system='/var/tmp', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/var/tmp', direction: str = 'put', **kwargs: Any)
    -

    Linux SCP File Transfer driver.

    -

    Mostly for testing purposes.

    +

    Linux SCP File Transfer driver.

    +

    Mostly for testing purposes.

    -Source code + +Expand source code +
    class LinuxFileTransfer(CiscoFileTransfer):
         """
         Linux SCP File Transfer driver.
    @@ -150,16 +156,16 @@ 

    Inherited members

    class LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -198,7 +204,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -243,12 +249,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -256,14 +262,19 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class LinuxSSH(CiscoSSHConnection):
    +    prompt_pattern = rf"[{re.escape(LINUX_PROMPT_PRI)}{re.escape(LINUX_PROMPT_ALT)}]"
    +
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
             self.ansi_escape_codes = True
    -        return super().session_preparation()
    +        self._test_channel_read(pattern=self.prompt_pattern)
    +        self.set_base_prompt()
     
         def _enter_shell(self) -> str:
             """Already in shell."""
    @@ -277,6 +288,13 @@ 

    Inherited members

    """Linux doesn't have paging by default.""" return "" + def find_prompt( + self, delay_factor: float = 1.0, pattern: Optional[str] = None + ) -> str: + if pattern is None: + pattern = self.prompt_pattern + return super().find_prompt(delay_factor=delay_factor, pattern=pattern) + def set_base_prompt( self, pri_prompt_terminator: str = LINUX_PROMPT_PRI, @@ -285,6 +303,8 @@

    Inherited members

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -306,7 +326,10 @@

    Inherited members

    ) def check_config_mode( - self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = "" + self, + check_string: str = LINUX_PROMPT_ROOT, + pattern: str = "", + force_regex: bool = False, ) -> bool: """Verify root""" return self.check_enable_mode(check_string=check_string) @@ -329,15 +352,13 @@

    Inherited members

    def exit_enable_mode(self, exit_command: str = "exit") -> str: """Exit enable mode.""" - delay_factor = self.select_delay_factor(delay_factor=0) - # You can run into a timing issue here if the time.sleep is too small - if delay_factor < 1: - delay_factor = 1 output = "" if self.check_enable_mode(): self.write_channel(self.normalize_cmd(exit_command)) - time.sleep(0.3 * delay_factor) - self.set_base_prompt() + output += self.read_until_pattern(pattern=exit_command) + output += self.read_until_pattern(pattern=self.prompt_pattern) + # Nature of prompt might change with the privilege deescalation + self.set_base_prompt(pattern=self.prompt_pattern) if self.check_enable_mode(): raise ValueError("Failed to exit enable mode.") return output @@ -350,25 +371,32 @@

    Inherited members

    re_flags: int = re.IGNORECASE, ) -> str: """Attempt to become root.""" - delay_factor = self.select_delay_factor(delay_factor=0) + msg = """ + +Netmiko failed to elevate privileges. + +Please ensure you pass the sudo password into ConnectHandler +using the 'secret' argument and that the user has sudo +permissions. + +""" + output = "" if not self.check_enable_mode(): self.write_channel(self.normalize_cmd(cmd)) - time.sleep(0.3 * delay_factor) - try: - output += self.read_channel() - if re.search(pattern, output, flags=re_flags): - self.write_channel(self.normalize_cmd(self.secret)) - self.set_base_prompt() - except socket.timeout: - raise NetmikoTimeoutException( - "Timed-out reading channel, data not available." - ) + # Failed "sudo -s" will put "#" in output so have to delineate further + root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)" + prompt_or_password = rf"({root_prompt}|{pattern})" + output += self.read_until_pattern(pattern=prompt_or_password) + if re.search(pattern, output, flags=re_flags): + self.write_channel(self.normalize_cmd(self.secret)) + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) if not self.check_enable_mode(): - msg = ( - "Failed to enter enable mode. Please ensure you pass " - "the 'secret' argument to ConnectHandler." - ) raise ValueError(msg) return output @@ -391,53 +419,71 @@

    Subclasses

  • F5LinuxSSH
  • OvsLinuxSSH
  • +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

    -def check_config_mode(self, check_string='#', pattern='') +def check_config_mode(self, check_string: str = '#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Verify root

    +

    Verify root

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = ""
    +    self,
    +    check_string: str = LINUX_PROMPT_ROOT,
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Verify root"""
         return self.check_enable_mode(check_string=check_string)
    -def check_enable_mode(self, check_string='#') +def check_enable_mode(self, check_string: str = '#') ‑> bool
    -

    Verify root

    +

    Verify root

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = LINUX_PROMPT_ROOT) -> bool:
         """Verify root"""
         return super().check_enable_mode(check_string=check_string)
    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Try to Gracefully exit the SSH session.

    +

    Try to Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Try to Gracefully exit the SSH session."""
         return super().cleanup(command=command)
    -def config_mode(self, config_command='sudo -s', pattern='ssword', re_flags=re.IGNORECASE) +def config_mode(self, config_command: str = 'sudo -s', pattern: str = 'ssword', re_flags: int = re.IGNORECASE) ‑> str
    -

    Attempt to become root.

    +

    Attempt to become root.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "sudo -s",
    @@ -449,97 +495,112 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Linux doesn't have paging by default.

    +

    Linux doesn't have paging by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Linux doesn't have paging by default."""
         return ""
    -def enable(self, cmd='sudo -s', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'sudo -s', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Attempt to become root.

    +

    Attempt to become root.

    -Source code -
    def enable(
    -    self,
    -    cmd: str = "sudo -s",
    -    pattern: str = "ssword",
    -    enable_pattern: Optional[str] = None,
    -    re_flags: int = re.IGNORECASE,
    -) -> str:
    -    """Attempt to become root."""
    -    delay_factor = self.select_delay_factor(delay_factor=0)
    -    output = ""
    -    if not self.check_enable_mode():
    -        self.write_channel(self.normalize_cmd(cmd))
    -        time.sleep(0.3 * delay_factor)
    -        try:
    -            output += self.read_channel()
    +
    +Expand source code
    +
    +
        def enable(
    +        self,
    +        cmd: str = "sudo -s",
    +        pattern: str = "ssword",
    +        enable_pattern: Optional[str] = None,
    +        re_flags: int = re.IGNORECASE,
    +    ) -> str:
    +        """Attempt to become root."""
    +        msg = """
    +
    +Netmiko failed to elevate privileges.
    +
    +Please ensure you pass the sudo password into ConnectHandler
    +using the 'secret' argument and that the user has sudo
    +permissions.
    +
    +"""
    +
    +        output = ""
    +        if not self.check_enable_mode():
    +            self.write_channel(self.normalize_cmd(cmd))
    +            # Failed "sudo -s" will put "#" in output so have to delineate further
    +            root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)"
    +            prompt_or_password = rf"({root_prompt}|{pattern})"
    +            output += self.read_until_pattern(pattern=prompt_or_password)
                 if re.search(pattern, output, flags=re_flags):
                     self.write_channel(self.normalize_cmd(self.secret))
    -            self.set_base_prompt()
    -        except socket.timeout:
    -            raise NetmikoTimeoutException(
    -                "Timed-out reading channel, data not available."
    -            )
    -        if not self.check_enable_mode():
    -            msg = (
    -                "Failed to enter enable mode. Please ensure you pass "
    -                "the 'secret' argument to ConnectHandler."
    -            )
    -            raise ValueError(msg)
    -    return output
    + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) + if not self.check_enable_mode(): + raise ValueError(msg) + return output
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
    -    delay_factor = self.select_delay_factor(delay_factor=0)
    -    # You can run into a timing issue here if the time.sleep is too small
    -    if delay_factor < 1:
    -        delay_factor = 1
         output = ""
         if self.check_enable_mode():
             self.write_channel(self.normalize_cmd(exit_command))
    -        time.sleep(0.3 * delay_factor)
    -        self.set_base_prompt()
    +        output += self.read_until_pattern(pattern=exit_command)
    +        output += self.read_until_pattern(pattern=self.prompt_pattern)
    +        # Nature of prompt might change with the privilege deescalation
    +        self.set_base_prompt(pattern=self.prompt_pattern)
             if self.check_enable_mode():
                 raise ValueError("Failed to exit enable mode.")
         return output
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def send_config_set(self, config_commands=None, exit_config_mode=True, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = True, **kwargs: Any) ‑> str
    -

    Can't exit from root (if root)

    +

    Can't exit from root (if root)

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -555,25 +616,30 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    -    return super().session_preparation()
    + self._test_channel_read(pattern=self.prompt_pattern) + self.set_base_prompt()
    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Determine base prompt.

    +

    Determine base prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = LINUX_PROMPT_PRI,
    @@ -582,6 +648,8 @@ 

    Methods

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -663,6 +731,7 @@

    Linux
  • disable_paging
  • enable
  • exit_enable_mode
  • +
  • prompt_pattern
  • save_config
  • send_config_set
  • session_preparation
  • @@ -675,9 +744,7 @@

    Linux

    - - \ No newline at end of file diff --git a/docs/netmiko/linux/linux_ssh.html b/docs/netmiko/linux/linux_ssh.html index 25100cdd1..4de939de2 100644 --- a/docs/netmiko/linux/linux_ssh.html +++ b/docs/netmiko/linux/linux_ssh.html @@ -3,15 +3,17 @@ - + netmiko.linux.linux_ssh API documentation - - - - - + + + + + + +
    @@ -21,19 +23,19 @@

    Module netmiko.linux.linux_ssh

    -Source code + +Expand source code +
    from typing import Any, Optional, TYPE_CHECKING, Union, Sequence, TextIO
     import os
     import re
    -import socket
    -import time
     
     if TYPE_CHECKING:
         from netmiko.base_connection import BaseConnection
     
     from netmiko.cisco_base_connection import CiscoSSHConnection
     from netmiko.cisco_base_connection import CiscoFileTransfer
    -from netmiko.exceptions import NetmikoTimeoutException
    +from netmiko.exceptions import ReadTimeout
     
     LINUX_PROMPT_PRI = os.getenv("NETMIKO_LINUX_PROMPT_PRI", "$")
     LINUX_PROMPT_ALT = os.getenv("NETMIKO_LINUX_PROMPT_ALT", "#")
    @@ -41,10 +43,13 @@ 

    Module netmiko.linux.linux_ssh

    class LinuxSSH(CiscoSSHConnection): + prompt_pattern = rf"[{re.escape(LINUX_PROMPT_PRI)}{re.escape(LINUX_PROMPT_ALT)}]" + def session_preparation(self) -> None: """Prepare the session after the connection has been established.""" self.ansi_escape_codes = True - return super().session_preparation() + self._test_channel_read(pattern=self.prompt_pattern) + self.set_base_prompt() def _enter_shell(self) -> str: """Already in shell.""" @@ -58,6 +63,13 @@

    Module netmiko.linux.linux_ssh

    """Linux doesn't have paging by default.""" return "" + def find_prompt( + self, delay_factor: float = 1.0, pattern: Optional[str] = None + ) -> str: + if pattern is None: + pattern = self.prompt_pattern + return super().find_prompt(delay_factor=delay_factor, pattern=pattern) + def set_base_prompt( self, pri_prompt_terminator: str = LINUX_PROMPT_PRI, @@ -66,6 +78,8 @@

    Module netmiko.linux.linux_ssh

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -87,7 +101,10 @@

    Module netmiko.linux.linux_ssh

    ) def check_config_mode( - self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = "" + self, + check_string: str = LINUX_PROMPT_ROOT, + pattern: str = "", + force_regex: bool = False, ) -> bool: """Verify root""" return self.check_enable_mode(check_string=check_string) @@ -110,15 +127,13 @@

    Module netmiko.linux.linux_ssh

    def exit_enable_mode(self, exit_command: str = "exit") -> str: """Exit enable mode.""" - delay_factor = self.select_delay_factor(delay_factor=0) - # You can run into a timing issue here if the time.sleep is too small - if delay_factor < 1: - delay_factor = 1 output = "" if self.check_enable_mode(): self.write_channel(self.normalize_cmd(exit_command)) - time.sleep(0.3 * delay_factor) - self.set_base_prompt() + output += self.read_until_pattern(pattern=exit_command) + output += self.read_until_pattern(pattern=self.prompt_pattern) + # Nature of prompt might change with the privilege deescalation + self.set_base_prompt(pattern=self.prompt_pattern) if self.check_enable_mode(): raise ValueError("Failed to exit enable mode.") return output @@ -131,25 +146,32 @@

    Module netmiko.linux.linux_ssh

    re_flags: int = re.IGNORECASE, ) -> str: """Attempt to become root.""" - delay_factor = self.select_delay_factor(delay_factor=0) + msg = """ + +Netmiko failed to elevate privileges. + +Please ensure you pass the sudo password into ConnectHandler +using the 'secret' argument and that the user has sudo +permissions. + +""" + output = "" if not self.check_enable_mode(): self.write_channel(self.normalize_cmd(cmd)) - time.sleep(0.3 * delay_factor) - try: - output += self.read_channel() - if re.search(pattern, output, flags=re_flags): - self.write_channel(self.normalize_cmd(self.secret)) - self.set_base_prompt() - except socket.timeout: - raise NetmikoTimeoutException( - "Timed-out reading channel, data not available." - ) + # Failed "sudo -s" will put "#" in output so have to delineate further + root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)" + prompt_or_password = rf"({root_prompt}|{pattern})" + output += self.read_until_pattern(pattern=prompt_or_password) + if re.search(pattern, output, flags=re_flags): + self.write_channel(self.normalize_cmd(self.secret)) + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) if not self.check_enable_mode(): - msg = ( - "Failed to enter enable mode. Please ensure you pass " - "the 'secret' argument to ConnectHandler." - ) raise ValueError(msg) return output @@ -240,13 +262,15 @@

    Classes

    class LinuxFileTransfer -(ssh_conn, source_file, dest_file, file_system='/var/tmp', direction='put', **kwargs) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = '/var/tmp', direction: str = 'put', **kwargs: Any)
    -

    Linux SCP File Transfer driver.

    -

    Mostly for testing purposes.

    +

    Linux SCP File Transfer driver.

    +

    Mostly for testing purposes.

    -Source code + +Expand source code +
    class LinuxFileTransfer(CiscoFileTransfer):
         """
         Linux SCP File Transfer driver.
    @@ -345,16 +369,16 @@ 

    Inherited members

    class LinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -393,7 +417,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -438,12 +462,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -451,14 +475,19 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class LinuxSSH(CiscoSSHConnection):
    +    prompt_pattern = rf"[{re.escape(LINUX_PROMPT_PRI)}{re.escape(LINUX_PROMPT_ALT)}]"
    +
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
             self.ansi_escape_codes = True
    -        return super().session_preparation()
    +        self._test_channel_read(pattern=self.prompt_pattern)
    +        self.set_base_prompt()
     
         def _enter_shell(self) -> str:
             """Already in shell."""
    @@ -472,6 +501,13 @@ 

    Inherited members

    """Linux doesn't have paging by default.""" return "" + def find_prompt( + self, delay_factor: float = 1.0, pattern: Optional[str] = None + ) -> str: + if pattern is None: + pattern = self.prompt_pattern + return super().find_prompt(delay_factor=delay_factor, pattern=pattern) + def set_base_prompt( self, pri_prompt_terminator: str = LINUX_PROMPT_PRI, @@ -480,6 +516,8 @@

    Inherited members

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -501,7 +539,10 @@

    Inherited members

    ) def check_config_mode( - self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = "" + self, + check_string: str = LINUX_PROMPT_ROOT, + pattern: str = "", + force_regex: bool = False, ) -> bool: """Verify root""" return self.check_enable_mode(check_string=check_string) @@ -524,15 +565,13 @@

    Inherited members

    def exit_enable_mode(self, exit_command: str = "exit") -> str: """Exit enable mode.""" - delay_factor = self.select_delay_factor(delay_factor=0) - # You can run into a timing issue here if the time.sleep is too small - if delay_factor < 1: - delay_factor = 1 output = "" if self.check_enable_mode(): self.write_channel(self.normalize_cmd(exit_command)) - time.sleep(0.3 * delay_factor) - self.set_base_prompt() + output += self.read_until_pattern(pattern=exit_command) + output += self.read_until_pattern(pattern=self.prompt_pattern) + # Nature of prompt might change with the privilege deescalation + self.set_base_prompt(pattern=self.prompt_pattern) if self.check_enable_mode(): raise ValueError("Failed to exit enable mode.") return output @@ -545,25 +584,32 @@

    Inherited members

    re_flags: int = re.IGNORECASE, ) -> str: """Attempt to become root.""" - delay_factor = self.select_delay_factor(delay_factor=0) + msg = """ + +Netmiko failed to elevate privileges. + +Please ensure you pass the sudo password into ConnectHandler +using the 'secret' argument and that the user has sudo +permissions. + +""" + output = "" if not self.check_enable_mode(): self.write_channel(self.normalize_cmd(cmd)) - time.sleep(0.3 * delay_factor) - try: - output += self.read_channel() - if re.search(pattern, output, flags=re_flags): - self.write_channel(self.normalize_cmd(self.secret)) - self.set_base_prompt() - except socket.timeout: - raise NetmikoTimeoutException( - "Timed-out reading channel, data not available." - ) + # Failed "sudo -s" will put "#" in output so have to delineate further + root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)" + prompt_or_password = rf"({root_prompt}|{pattern})" + output += self.read_until_pattern(pattern=prompt_or_password) + if re.search(pattern, output, flags=re_flags): + self.write_channel(self.normalize_cmd(self.secret)) + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) if not self.check_enable_mode(): - msg = ( - "Failed to enter enable mode. Please ensure you pass " - "the 'secret' argument to ConnectHandler." - ) raise ValueError(msg) return output @@ -586,53 +632,71 @@

    Subclasses

  • F5LinuxSSH
  • OvsLinuxSSH
  • +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

    -def check_config_mode(self, check_string='#', pattern='') +def check_config_mode(self, check_string: str = '#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Verify root

    +

    Verify root

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = LINUX_PROMPT_ROOT, pattern: str = ""
    +    self,
    +    check_string: str = LINUX_PROMPT_ROOT,
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """Verify root"""
         return self.check_enable_mode(check_string=check_string)
    -def check_enable_mode(self, check_string='#') +def check_enable_mode(self, check_string: str = '#') ‑> bool
    -

    Verify root

    +

    Verify root

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = LINUX_PROMPT_ROOT) -> bool:
         """Verify root"""
         return super().check_enable_mode(check_string=check_string)
    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Try to Gracefully exit the SSH session.

    +

    Try to Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Try to Gracefully exit the SSH session."""
         return super().cleanup(command=command)
    -def config_mode(self, config_command='sudo -s', pattern='ssword', re_flags=re.IGNORECASE) +def config_mode(self, config_command: str = 'sudo -s', pattern: str = 'ssword', re_flags: int = re.IGNORECASE) ‑> str
    -

    Attempt to become root.

    +

    Attempt to become root.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "sudo -s",
    @@ -644,97 +708,112 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    Linux doesn't have paging by default.

    +

    Linux doesn't have paging by default.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """Linux doesn't have paging by default."""
         return ""
    -def enable(self, cmd='sudo -s', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'sudo -s', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Attempt to become root.

    +

    Attempt to become root.

    -Source code -
    def enable(
    -    self,
    -    cmd: str = "sudo -s",
    -    pattern: str = "ssword",
    -    enable_pattern: Optional[str] = None,
    -    re_flags: int = re.IGNORECASE,
    -) -> str:
    -    """Attempt to become root."""
    -    delay_factor = self.select_delay_factor(delay_factor=0)
    -    output = ""
    -    if not self.check_enable_mode():
    -        self.write_channel(self.normalize_cmd(cmd))
    -        time.sleep(0.3 * delay_factor)
    -        try:
    -            output += self.read_channel()
    +
    +Expand source code
    +
    +
        def enable(
    +        self,
    +        cmd: str = "sudo -s",
    +        pattern: str = "ssword",
    +        enable_pattern: Optional[str] = None,
    +        re_flags: int = re.IGNORECASE,
    +    ) -> str:
    +        """Attempt to become root."""
    +        msg = """
    +
    +Netmiko failed to elevate privileges.
    +
    +Please ensure you pass the sudo password into ConnectHandler
    +using the 'secret' argument and that the user has sudo
    +permissions.
    +
    +"""
    +
    +        output = ""
    +        if not self.check_enable_mode():
    +            self.write_channel(self.normalize_cmd(cmd))
    +            # Failed "sudo -s" will put "#" in output so have to delineate further
    +            root_prompt = rf"(?m:{LINUX_PROMPT_ROOT}\s*$)"
    +            prompt_or_password = rf"({root_prompt}|{pattern})"
    +            output += self.read_until_pattern(pattern=prompt_or_password)
                 if re.search(pattern, output, flags=re_flags):
                     self.write_channel(self.normalize_cmd(self.secret))
    -            self.set_base_prompt()
    -        except socket.timeout:
    -            raise NetmikoTimeoutException(
    -                "Timed-out reading channel, data not available."
    -            )
    -        if not self.check_enable_mode():
    -            msg = (
    -                "Failed to enter enable mode. Please ensure you pass "
    -                "the 'secret' argument to ConnectHandler."
    -            )
    -            raise ValueError(msg)
    -    return output
    + try: + output += self.read_until_pattern(pattern=root_prompt) + except ReadTimeout: + raise ValueError(msg) + # Nature of prompt might change with the privilege escalation + self.set_base_prompt(pattern=root_prompt) + if not self.check_enable_mode(): + raise ValueError(msg) + return output
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
    -    delay_factor = self.select_delay_factor(delay_factor=0)
    -    # You can run into a timing issue here if the time.sleep is too small
    -    if delay_factor < 1:
    -        delay_factor = 1
         output = ""
         if self.check_enable_mode():
             self.write_channel(self.normalize_cmd(exit_command))
    -        time.sleep(0.3 * delay_factor)
    -        self.set_base_prompt()
    +        output += self.read_until_pattern(pattern=exit_command)
    +        output += self.read_until_pattern(pattern=self.prompt_pattern)
    +        # Nature of prompt might change with the privilege deescalation
    +        self.set_base_prompt(pattern=self.prompt_pattern)
             if self.check_enable_mode():
                 raise ValueError("Failed to exit enable mode.")
         return output
    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def send_config_set(self, config_commands=None, exit_config_mode=True, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = True, **kwargs: Any) ‑> str
    -

    Can't exit from root (if root)

    +

    Can't exit from root (if root)

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -750,25 +829,30 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    -    return super().session_preparation()
    + self._test_channel_read(pattern=self.prompt_pattern) + self.set_base_prompt()

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Determine base prompt.

    +

    Determine base prompt.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = LINUX_PROMPT_PRI,
    @@ -777,6 +861,8 @@ 

    Methods

    pattern: Optional[str] = None, ) -> str: """Determine base prompt.""" + if pattern is None: + pattern = self.prompt_pattern return super().set_base_prompt( pri_prompt_terminator=pri_prompt_terminator, alt_prompt_terminator=alt_prompt_terminator, @@ -853,6 +939,7 @@

    disable_paging
  • enable
  • exit_enable_mode
  • +
  • prompt_pattern
  • save_config
  • send_config_set
  • session_preparation
  • @@ -865,9 +952,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mellanox/index.html b/docs/netmiko/mellanox/index.html index b0807fe36..7bf77e8a0 100644 --- a/docs/netmiko/mellanox/index.html +++ b/docs/netmiko/mellanox/index.html @@ -3,15 +3,17 @@ - + netmiko.mellanox API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.mellanox

    -Source code + +Expand source code +
    from netmiko.mellanox.mellanox_mlnxos_ssh import MellanoxMlnxosSSH
     
     __all__ = ["MellanoxMlnxosSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.mellanox.mellanox_mlnxos_ssh
    -

    Mellanox MLNX-OS Switch support.

    +

    Mellanox MLNX-OS Switch support.

    @@ -45,16 +49,16 @@

    Classes

    class MellanoxMlnxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Mellanox MLNX-OS Switch support.

    +

    Mellanox MLNX-OS Switch support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class MellanoxMlnxosSSH(CiscoSSHConnection):
         """Mellanox MLNX-OS Switch support."""
     
    @@ -186,7 +192,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -248,12 +257,14 @@

    Ancestors

    Methods

    -def enable(self, cmd='enable', pattern='#', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '#', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enter into enable mode.

    +

    Enter into enable mode.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -274,13 +285,15 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='#') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '#') ‑> str
    -

    Mellanox does not support a single command to completely exit configuration mode.

    -

    Consequently, need to keep checking and sending "exit".

    +

    Mellanox does not support a single command to completely exit configuration mode.

    +

    Consequently, need to keep checking and sending "exit".

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "#") -> str:
         """Mellanox does not support a single command to completely exit configuration mode.
     
    @@ -305,12 +318,14 @@ 

    Methods

    -def save_config(self, cmd='configuration write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'configuration write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config on Mellanox devices Enters and Leaves Config Mode

    +

    Save Config on Mellanox devices Enters and Leaves Config Mode

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "configuration write",
    @@ -407,9 +422,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html index fd5de7660..368a4f770 100644 --- a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html +++ b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.mellanox.mellanox_mlnxos_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.mellanox.mellanox_mlnxos_ssh

    Mellanox MLNX-OS Switch support.

    -Source code + +Expand source code +
    """Mellanox MLNX-OS Switch support."""
     import re
     from typing import Optional
    @@ -63,7 +67,10 @@ 

    Module netmiko.mellanox.mellanox_mlnxos_ssh

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -128,16 +135,16 @@

    Classes

    class MellanoxMlnxosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Mellanox MLNX-OS Switch support.

    +

    Mellanox MLNX-OS Switch support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -176,7 +183,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -221,12 +228,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -234,9 +241,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class MellanoxMlnxosSSH(CiscoSSHConnection):
         """Mellanox MLNX-OS Switch support."""
     
    @@ -269,7 +278,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -331,12 +343,14 @@

    Ancestors

    Methods

    -def enable(self, cmd='enable', pattern='#', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '#', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enter into enable mode.

    +

    Enter into enable mode.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -357,13 +371,15 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='#') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '#') ‑> str
    -

    Mellanox does not support a single command to completely exit configuration mode.

    -

    Consequently, need to keep checking and sending "exit".

    +

    Mellanox does not support a single command to completely exit configuration mode.

    +

    Consequently, need to keep checking and sending "exit".

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = "#") -> str:
         """Mellanox does not support a single command to completely exit configuration mode.
     
    @@ -388,12 +404,14 @@ 

    Methods

    -def save_config(self, cmd='configuration write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'configuration write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save Config on Mellanox devices Enters and Leaves Config Mode

    +

    Save Config on Mellanox devices Enters and Leaves Config Mode

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "configuration write",
    @@ -485,9 +503,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/mikrotik/index.html b/docs/netmiko/mikrotik/index.html index 6a52e5401..fdd7a68ba 100644 --- a/docs/netmiko/mikrotik/index.html +++ b/docs/netmiko/mikrotik/index.html @@ -3,15 +3,17 @@ - + netmiko.mikrotik API documentation - - - - - + + + + + + +
    @@ -21,11 +23,14 @@

    Module netmiko.mikrotik

    -Source code + +Expand source code +
    from netmiko.mikrotik.mikrotik_ssh import MikrotikRouterOsSSH
     from netmiko.mikrotik.mikrotik_ssh import MikrotikSwitchOsSSH
    +from netmiko.mikrotik.mikrotik_ssh import MikrotikRouterOsFileTransfer
     
    -__all__ = ["MikrotikRouterOsSSH", "MikrotikSwitchOsSSH"]
    +__all__ = ["MikrotikRouterOsSSH", "MikrotikSwitchOsSSH", "MikrotikRouterOsFileTransfer"]

    @@ -33,7 +38,7 @@

    Sub-modules

    netmiko.mikrotik.mikrotik_ssh
    -
    +
    @@ -44,14 +49,271 @@

    Sub-modules

    Classes

    +
    +class MikrotikRouterOsFileTransfer +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = 'flash', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False) +
    +
    +

    Mikrotik Router Os File Transfer driver.

    +
    + +Expand source code + +
    class MikrotikRouterOsFileTransfer(BaseFileTransfer):
    +    """Mikrotik Router Os File Transfer driver."""
    +
    +    def __init__(
    +        self,
    +        ssh_conn: BaseConnection,
    +        source_file: str,
    +        dest_file: str,
    +        file_system: Optional[str] = "flash",
    +        direction: str = "put",
    +        socket_timeout: float = 10.0,
    +        progress: Optional[Callable[..., Any]] = None,
    +        progress4: Optional[Callable[..., Any]] = None,
    +        hash_supported: bool = False,
    +    ) -> None:
    +        super().__init__(
    +            ssh_conn=ssh_conn,
    +            source_file=source_file,
    +            dest_file=dest_file,
    +            file_system=file_system,
    +            direction=direction,
    +            socket_timeout=socket_timeout,
    +            progress=progress,
    +            progress4=progress4,
    +            hash_supported=hash_supported,
    +        )
    +
    +    def check_file_exists(self, remote_cmd: str = "") -> bool:
    +        """Check if the dest_file already exists on the file system."""
    +        if self.direction == "put":
    +            if not remote_cmd:
    +                remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"'
    +            remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +            # Output will look like
    +            # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun...
    +            # fail case will be blank line (all whitespace)
    +            if (
    +                "size" in remote_out
    +                and f"{self.file_system}/{self.dest_file}" in remote_out
    +            ):
    +                return True
    +            elif not remote_out.strip():
    +                return False
    +            raise ValueError("Unexpected output from check_file_exists")
    +        elif self.direction == "get":
    +            return os.path.exists(self.dest_file)
    +        else:
    +            raise ValueError("Unexpected value for self.direction")
    +
    +    def remote_space_available(self, search_pattern: str = "") -> int:
    +        """Return space available on remote device."""
    +        remote_cmd = "system resource print without-paging"
    +        sys_res = self.ssh_ctl_chan._send_command_timing_str(remote_cmd).splitlines()
    +        for res in sys_res:
    +            if "free-memory" in res:
    +                spaceMib = res.strip().replace("free-memory: ", "").replace("MiB", "")
    +                return int(float(spaceMib) * 1048576)
    +        raise ValueError("Unexpected output from remote_space_available")
    +
    +    def remote_file_size(
    +        self, remote_cmd: str = "", remote_file: Optional[str] = None
    +    ) -> int:
    +        """Get the file size of the remote file."""
    +        if remote_file is None:
    +            if self.direction == "put":
    +                remote_file = self.dest_file
    +            elif self.direction == "get":
    +                remote_file = self.source_file
    +            else:
    +                raise ValueError("Invalid value for file transfer direction.")
    +
    +        if not remote_cmd:
    +            remote_cmd = (
    +                f'/file print detail where name="{self.file_system}/{remote_file}"'
    +            )
    +        remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +        try:
    +            size = remote_out.split("size=")[1].split(" ")[0]
    +            return self._format_to_bytes(size)
    +        except (KeyError, IndexError):
    +            raise ValueError("Unable to find file on remote system")
    +
    +    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    @staticmethod
    +    def process_md5(md5_output: str, pattern: str = "") -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def compare_md5(self) -> bool:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def remote_md5(self, base_cmd: str = "", remote_file: Optional[str] = None) -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def verify_file(self) -> bool:
    +        """
    +        Verify the file has been transferred correctly based on filesize.
    +        This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB...
    +        Therefore multiple conversions from/to bytes are needed
    +        """
    +        if self.direction == "put":
    +            local_size = self._format_bytes(os.stat(self.source_file).st_size)
    +            remote_size = self._format_bytes(
    +                self.remote_file_size(remote_file=self.dest_file)
    +            )
    +            return local_size == remote_size
    +        elif self.direction == "get":
    +            local_size = self._format_bytes(os.stat(self.dest_file).st_size)
    +            remote_size = self._format_bytes(
    +                self.remote_file_size(remote_file=self.source_file)
    +            )
    +            return local_size == remote_size
    +        else:
    +            raise ValueError("Unexpected value of self.direction")
    +
    +    @staticmethod
    +    def _format_to_bytes(size: str) -> int:
    +        """
    +        Internal function to convert Mikrotik size to bytes
    +        """
    +        if size.endswith("KiB"):
    +            return round(int(float(size.replace("KiB", "")) * 1024))
    +        if size.endswith("MiB"):
    +            return round(int(float(size.replace("MiB", "")) * 1048576))
    +        if size.endswith("GiB"):
    +            return round(int(float(size.replace("GiB", "")) * 1073741824))
    +        return round(int(size))
    +
    +    @staticmethod
    +    def _format_bytes(size: int) -> str:
    +        """
    +        Internal function to convert bytes to KiB, MiB or GiB
    +        Extremely approximate
    +        """
    +        n = 0
    +        levels = {0: "", 1: "Ki", 2: "Mi", 3: "Gi"}
    +        while size > 4096 and n < 3:
    +            size = round(size / 1024)
    +            n += 1
    +        return f"{size}{levels[n]}B"
    +
    +

    Ancestors

    + +

    Methods

    +
    +
    +def check_file_exists(self, remote_cmd: str = '') ‑> bool +
    +
    +

    Check if the dest_file already exists on the file system.

    +
    + +Expand source code + +
    def check_file_exists(self, remote_cmd: str = "") -> bool:
    +    """Check if the dest_file already exists on the file system."""
    +    if self.direction == "put":
    +        if not remote_cmd:
    +            remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"'
    +        remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +        # Output will look like
    +        # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun...
    +        # fail case will be blank line (all whitespace)
    +        if (
    +            "size" in remote_out
    +            and f"{self.file_system}/{self.dest_file}" in remote_out
    +        ):
    +            return True
    +        elif not remote_out.strip():
    +            return False
    +        raise ValueError("Unexpected output from check_file_exists")
    +    elif self.direction == "get":
    +        return os.path.exists(self.dest_file)
    +    else:
    +        raise ValueError("Unexpected value for self.direction")
    +
    +
    +
    +def verify_file(self) ‑> bool +
    +
    +

    Verify the file has been transferred correctly based on filesize. +This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB… +Therefore multiple conversions from/to bytes are needed

    +
    + +Expand source code + +
    def verify_file(self) -> bool:
    +    """
    +    Verify the file has been transferred correctly based on filesize.
    +    This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB...
    +    Therefore multiple conversions from/to bytes are needed
    +    """
    +    if self.direction == "put":
    +        local_size = self._format_bytes(os.stat(self.source_file).st_size)
    +        remote_size = self._format_bytes(
    +            self.remote_file_size(remote_file=self.dest_file)
    +        )
    +        return local_size == remote_size
    +    elif self.direction == "get":
    +        local_size = self._format_bytes(os.stat(self.dest_file).st_size)
    +        remote_size = self._format_bytes(
    +            self.remote_file_size(remote_file=self.source_file)
    +        )
    +        return local_size == remote_size
    +    else:
    +        raise ValueError("Unexpected value of self.direction")
    +
    +
    +
    +

    Inherited members

    + +
    class MikrotikRouterOsSSH -(**kwargs) +(**kwargs: Any)
    -

    Mikrotik RouterOS SSH driver.

    +

    Mikrotik RouterOS SSH driver.

    -Source code + +Expand source code +
    class MikrotikRouterOsSSH(MikrotikBase):
         """Mikrotik RouterOS SSH driver."""
     
    @@ -106,7 +368,7 @@ 

    Inherited members

  • special_login_handler
  • strip_ansi_escape_codes
  • strip_backspaces
  • -
  • strip_command
  • +
  • strip_command
  • strip_prompt
  • telnet_login
  • write_channel
  • @@ -116,12 +378,14 @@

    Inherited members

    class MikrotikSwitchOsSSH -(**kwargs) +(**kwargs: Any)
    -

    Mikrotik SwitchOS SSH driver.

    +

    Mikrotik SwitchOS SSH driver.

    -Source code + +Expand source code +
    class MikrotikSwitchOsSSH(MikrotikBase):
         """Mikrotik SwitchOS SSH driver."""
     
    @@ -176,7 +440,7 @@ 

    Inherited members

  • special_login_handler
  • strip_ansi_escape_codes
  • strip_backspaces
  • -
  • strip_command
  • +
  • strip_command
  • strip_prompt
  • telnet_login
  • write_channel
  • @@ -206,6 +470,13 @@

    Index

  • Classes

    • +

      MikrotikRouterOsFileTransfer

      + +
    • +
    • MikrotikRouterOsSSH

    • @@ -217,9 +488,7 @@

      -

      Generated by pdoc 0.6.3.

      +

      Generated by pdoc 0.10.0.

      - - \ No newline at end of file diff --git a/docs/netmiko/mikrotik/mikrotik_ssh.html b/docs/netmiko/mikrotik/mikrotik_ssh.html index 8349fb62e..6350bae76 100644 --- a/docs/netmiko/mikrotik/mikrotik_ssh.html +++ b/docs/netmiko/mikrotik/mikrotik_ssh.html @@ -3,15 +3,17 @@ - + netmiko.mikrotik.mikrotik_ssh API documentation - - - - - + + + + + + +
      @@ -21,10 +23,17 @@

      Module netmiko.mikrotik.mikrotik_ssh

      -Source code -
      from typing import Any, Union, List, Dict, Optional
      +
      +Expand source code
      +
      +
      from typing import Any, Union, List, Dict, Optional, Callable
      +import re
      +import os
      +
       from netmiko.no_enable import NoEnable
       from netmiko.cisco_base_connection import CiscoSSHConnection
      +from netmiko.base_connection import BaseConnection
      +from netmiko.scp_handler import BaseFileTransfer
       
       
       class MikrotikBase(NoEnable, CiscoSSHConnection):
      @@ -69,7 +78,9 @@ 

      Module netmiko.mikrotik.mikrotik_ssh

      self._in_config_mode = True return "" - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return self._in_config_mode @@ -101,6 +112,28 @@

      Module netmiko.mikrotik.mikrotik_ssh

      # Unexpected just return the original string return a_string + def strip_command(self, command_string: str, output: str) -> str: + """ + Mikrotik can echo the command multiple times :-( + + Example: + system routerboard print + [admin@MikroTik] > system routerboard print + """ + output = super().strip_command(command_string, output) + cmd = command_string.strip() + + output = output.lstrip() + # '[admin@MikroTik] > cmd' then the first newline should be matched + pattern = rf"^\[.*\] > {re.escape(cmd)}.*${self.RESPONSE_RETURN}" + if re.search(pattern, output, flags=re.M): + output_lines = re.split(pattern, output, flags=re.M) + new_output = output_lines[1:] + return self.RESPONSE_RETURN.join(new_output) + else: + # command_string isn't there; do nothing + return output + def set_base_prompt( self, pri_prompt_terminator: str = ">", @@ -126,7 +159,7 @@

      Module netmiko.mikrotik.mikrotik_ssh

      **kwargs: Any, ) -> Union[str, List[Any], Dict[str, Any]]: """Force cmd_verify to be True due to all of the line repainting""" - return super()._send_command_timing_str( + return super().send_command_timing( command_string=command_string, cmd_verify=cmd_verify, **kwargs ) @@ -140,7 +173,158 @@

      Module netmiko.mikrotik.mikrotik_ssh

      class MikrotikSwitchOsSSH(MikrotikBase): """Mikrotik SwitchOS SSH driver.""" - pass
      + pass + + +class MikrotikRouterOsFileTransfer(BaseFileTransfer): + """Mikrotik Router Os File Transfer driver.""" + + def __init__( + self, + ssh_conn: BaseConnection, + source_file: str, + dest_file: str, + file_system: Optional[str] = "flash", + direction: str = "put", + socket_timeout: float = 10.0, + progress: Optional[Callable[..., Any]] = None, + progress4: Optional[Callable[..., Any]] = None, + hash_supported: bool = False, + ) -> None: + super().__init__( + ssh_conn=ssh_conn, + source_file=source_file, + dest_file=dest_file, + file_system=file_system, + direction=direction, + socket_timeout=socket_timeout, + progress=progress, + progress4=progress4, + hash_supported=hash_supported, + ) + + def check_file_exists(self, remote_cmd: str = "") -> bool: + """Check if the dest_file already exists on the file system.""" + if self.direction == "put": + if not remote_cmd: + remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"' + remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd) + # Output will look like + # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun... + # fail case will be blank line (all whitespace) + if ( + "size" in remote_out + and f"{self.file_system}/{self.dest_file}" in remote_out + ): + return True + elif not remote_out.strip(): + return False + raise ValueError("Unexpected output from check_file_exists") + elif self.direction == "get": + return os.path.exists(self.dest_file) + else: + raise ValueError("Unexpected value for self.direction") + + def remote_space_available(self, search_pattern: str = "") -> int: + """Return space available on remote device.""" + remote_cmd = "system resource print without-paging" + sys_res = self.ssh_ctl_chan._send_command_timing_str(remote_cmd).splitlines() + for res in sys_res: + if "free-memory" in res: + spaceMib = res.strip().replace("free-memory: ", "").replace("MiB", "") + return int(float(spaceMib) * 1048576) + raise ValueError("Unexpected output from remote_space_available") + + def remote_file_size( + self, remote_cmd: str = "", remote_file: Optional[str] = None + ) -> int: + """Get the file size of the remote file.""" + if remote_file is None: + if self.direction == "put": + remote_file = self.dest_file + elif self.direction == "get": + remote_file = self.source_file + else: + raise ValueError("Invalid value for file transfer direction.") + + if not remote_cmd: + remote_cmd = ( + f'/file print detail where name="{self.file_system}/{remote_file}"' + ) + remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd) + try: + size = remote_out.split("size=")[1].split(" ")[0] + return self._format_to_bytes(size) + except (KeyError, IndexError): + raise ValueError("Unable to find file on remote system") + + def file_md5(self, file_name: str, add_newline: bool = False) -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + @staticmethod + def process_md5(md5_output: str, pattern: str = "") -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def compare_md5(self) -> bool: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def remote_md5(self, base_cmd: str = "", remote_file: Optional[str] = None) -> str: + raise AttributeError( + "RouterOS does not natively support an MD5-hash operation." + ) + + def verify_file(self) -> bool: + """ + Verify the file has been transferred correctly based on filesize. + This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB... + Therefore multiple conversions from/to bytes are needed + """ + if self.direction == "put": + local_size = self._format_bytes(os.stat(self.source_file).st_size) + remote_size = self._format_bytes( + self.remote_file_size(remote_file=self.dest_file) + ) + return local_size == remote_size + elif self.direction == "get": + local_size = self._format_bytes(os.stat(self.dest_file).st_size) + remote_size = self._format_bytes( + self.remote_file_size(remote_file=self.source_file) + ) + return local_size == remote_size + else: + raise ValueError("Unexpected value of self.direction") + + @staticmethod + def _format_to_bytes(size: str) -> int: + """ + Internal function to convert Mikrotik size to bytes + """ + if size.endswith("KiB"): + return round(int(float(size.replace("KiB", "")) * 1024)) + if size.endswith("MiB"): + return round(int(float(size.replace("MiB", "")) * 1048576)) + if size.endswith("GiB"): + return round(int(float(size.replace("GiB", "")) * 1073741824)) + return round(int(size)) + + @staticmethod + def _format_bytes(size: int) -> str: + """ + Internal function to convert bytes to KiB, MiB or GiB + Extremely approximate + """ + n = 0 + levels = {0: "", 1: "Ki", 2: "Mi", 3: "Gi"} + while size > 4096 and n < 3: + size = round(size / 1024) + n += 1 + return f"{size}{levels[n]}B"
      @@ -154,12 +338,14 @@

      Classes

      class MikrotikBase -(**kwargs) +(**kwargs: Any)
      -

      Common Methods for Mikrotik RouterOS and SwitchOS

      +

      Common Methods for Mikrotik RouterOS and SwitchOS

      -Source code + +Expand source code +
      class MikrotikBase(NoEnable, CiscoSSHConnection):
           """Common Methods for Mikrotik RouterOS and SwitchOS"""
       
      @@ -202,7 +388,9 @@ 

      Classes

      self._in_config_mode = True return "" - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return self._in_config_mode @@ -234,6 +422,28 @@

      Classes

      # Unexpected just return the original string return a_string + def strip_command(self, command_string: str, output: str) -> str: + """ + Mikrotik can echo the command multiple times :-( + + Example: + system routerboard print + [admin@MikroTik] > system routerboard print + """ + output = super().strip_command(command_string, output) + cmd = command_string.strip() + + output = output.lstrip() + # '[admin@MikroTik] > cmd' then the first newline should be matched + pattern = rf"^\[.*\] > {re.escape(cmd)}.*${self.RESPONSE_RETURN}" + if re.search(pattern, output, flags=re.M): + output_lines = re.split(pattern, output, flags=re.M) + new_output = output_lines[1:] + return self.RESPONSE_RETURN.join(new_output) + else: + # command_string isn't there; do nothing + return output + def set_base_prompt( self, pri_prompt_terminator: str = ">", @@ -259,7 +469,7 @@

      Classes

      **kwargs: Any, ) -> Union[str, List[Any], Dict[str, Any]]: """Force cmd_verify to be True due to all of the line repainting""" - return super()._send_command_timing_str( + return super().send_command_timing( command_string=command_string, cmd_verify=cmd_verify, **kwargs )
      @@ -278,24 +488,30 @@

      Subclasses

      Methods

      -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
      -

      Checks whether in configuration mode. Returns a boolean.

      +

      Checks whether in configuration mode. Returns a boolean.

      -Source code -
      def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
      +
      +Expand source code
      +
      +
      def check_config_mode(
      +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
      +) -> bool:
           """Checks whether in configuration mode. Returns a boolean."""
           return self._in_config_mode
      -def config_mode(self, config_command='', pattern='', re_flags=0) +def config_mode(self, config_command: str = '', pattern: str = '', re_flags: int = 0) ‑> str
      -

      No configuration mode on Mikrotik

      +

      No configuration mode on Mikrotik

      -Source code + +Expand source code +
      def config_mode(
           self, config_command: str = "", pattern: str = "", re_flags: int = 0
       ) -> str:
      @@ -305,24 +521,28 @@ 

      Methods

      -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
      -

      Mikrotik does not have paging by default.

      +

      Mikrotik does not have paging by default.

      -Source code + +Expand source code +
      def disable_paging(self, *args: Any, **kwargs: Any) -> str:
           """Mikrotik does not have paging by default."""
           return ""
      -def exit_config_mode(self, exit_config='>', pattern='') +def exit_config_mode(self, exit_config: str = '>', pattern: str = '') ‑> str
      -

      No configuration mode on Mikrotik

      +

      No configuration mode on Mikrotik

      -Source code + +Expand source code +
      def exit_config_mode(self, exit_config: str = ">", pattern: str = "") -> str:
           """No configuration mode on Mikrotik"""
           self._in_config_mode = False
      @@ -330,24 +550,28 @@ 

      Methods

      -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
      -

      No save command, all configuration is atomic

      +

      No save command, all configuration is atomic

      -Source code + +Expand source code +
      def save_config(self, *args: Any, **kwargs: Any) -> str:
           """No save command, all configuration is atomic"""
           return ""
      -def send_command_timing(self, command_string, cmd_verify=True, **kwargs) +def send_command_timing(self, command_string: str, cmd_verify: bool = True, **kwargs: Any) ‑> Union[str, List[Any], Dict[str, Any]]
      -

      Force cmd_verify to be True due to all of the line repainting

      +

      Force cmd_verify to be True due to all of the line repainting

      -Source code + +Expand source code +
      def send_command_timing(  # type: ignore
           self,
           command_string: str,
      @@ -355,18 +579,20 @@ 

      Methods

      **kwargs: Any, ) -> Union[str, List[Any], Dict[str, Any]]: """Force cmd_verify to be True due to all of the line repainting""" - return super()._send_command_timing_str( + return super().send_command_timing( command_string=command_string, cmd_verify=cmd_verify, **kwargs )
      -def session_preparation(self, *args, **kwargs) +def session_preparation(self, *args: Any, **kwargs: Any) ‑> None
      -

      Prepare the session after the connection has been established.

      +

      Prepare the session after the connection has been established.

      -Source code + +Expand source code +
      def session_preparation(self, *args: Any, **kwargs: Any) -> None:
           """Prepare the session after the connection has been established."""
           self.ansi_escape_codes = True
      @@ -375,12 +601,14 @@ 

      Methods

      -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='>', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '>', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
      -

      Strip the trailing space off.

      +

      Strip the trailing space off.

      -Source code + +Expand source code +
      def set_base_prompt(
           self,
           pri_prompt_terminator: str = ">",
      @@ -400,17 +628,54 @@ 

      Methods

      return self.base_prompt
      +
      +def strip_command(self, command_string: str, output: str) ‑> str +
      +
      +

      Mikrotik can echo the command multiple times :-(

      +

      Example: +system routerboard print +[admin@MikroTik] > system routerboard print

      +
      + +Expand source code + +
      def strip_command(self, command_string: str, output: str) -> str:
      +    """
      +    Mikrotik can echo the command multiple times :-(
      +
      +    Example:
      +    system routerboard print
      +    [admin@MikroTik] > system routerboard print
      +    """
      +    output = super().strip_command(command_string, output)
      +    cmd = command_string.strip()
      +
      +    output = output.lstrip()
      +    # '[admin@MikroTik] > cmd' then the first newline should be matched
      +    pattern = rf"^\[.*\] > {re.escape(cmd)}.*${self.RESPONSE_RETURN}"
      +    if re.search(pattern, output, flags=re.M):
      +        output_lines = re.split(pattern, output, flags=re.M)
      +        new_output = output_lines[1:]
      +        return self.RESPONSE_RETURN.join(new_output)
      +    else:
      +        # command_string isn't there; do nothing
      +        return output
      +
      +
      -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
      -

      Strip the trailing router prompt from the output.

      +

      Strip the trailing router prompt from the output.

      Mikrotik just does a lot of formatting/has ansi escape codes in output so we need a special handler here.

      There can be two trailing instances of the prompt probably due to -repainting.

      +repainting.

      -Source code + +Expand source code +
      def strip_prompt(self, a_string: str) -> str:
           """Strip the trailing router prompt from the output.
       
      @@ -469,21 +734,277 @@ 

      Inherited members

    • special_login_handler
    • strip_ansi_escape_codes
    • strip_backspaces
    • -
    • strip_command
    • telnet_login
    • write_channel
  • +
    +class MikrotikRouterOsFileTransfer +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = 'flash', direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False) +
    +
    +

    Mikrotik Router Os File Transfer driver.

    +
    + +Expand source code + +
    class MikrotikRouterOsFileTransfer(BaseFileTransfer):
    +    """Mikrotik Router Os File Transfer driver."""
    +
    +    def __init__(
    +        self,
    +        ssh_conn: BaseConnection,
    +        source_file: str,
    +        dest_file: str,
    +        file_system: Optional[str] = "flash",
    +        direction: str = "put",
    +        socket_timeout: float = 10.0,
    +        progress: Optional[Callable[..., Any]] = None,
    +        progress4: Optional[Callable[..., Any]] = None,
    +        hash_supported: bool = False,
    +    ) -> None:
    +        super().__init__(
    +            ssh_conn=ssh_conn,
    +            source_file=source_file,
    +            dest_file=dest_file,
    +            file_system=file_system,
    +            direction=direction,
    +            socket_timeout=socket_timeout,
    +            progress=progress,
    +            progress4=progress4,
    +            hash_supported=hash_supported,
    +        )
    +
    +    def check_file_exists(self, remote_cmd: str = "") -> bool:
    +        """Check if the dest_file already exists on the file system."""
    +        if self.direction == "put":
    +            if not remote_cmd:
    +                remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"'
    +            remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +            # Output will look like
    +            # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun...
    +            # fail case will be blank line (all whitespace)
    +            if (
    +                "size" in remote_out
    +                and f"{self.file_system}/{self.dest_file}" in remote_out
    +            ):
    +                return True
    +            elif not remote_out.strip():
    +                return False
    +            raise ValueError("Unexpected output from check_file_exists")
    +        elif self.direction == "get":
    +            return os.path.exists(self.dest_file)
    +        else:
    +            raise ValueError("Unexpected value for self.direction")
    +
    +    def remote_space_available(self, search_pattern: str = "") -> int:
    +        """Return space available on remote device."""
    +        remote_cmd = "system resource print without-paging"
    +        sys_res = self.ssh_ctl_chan._send_command_timing_str(remote_cmd).splitlines()
    +        for res in sys_res:
    +            if "free-memory" in res:
    +                spaceMib = res.strip().replace("free-memory: ", "").replace("MiB", "")
    +                return int(float(spaceMib) * 1048576)
    +        raise ValueError("Unexpected output from remote_space_available")
    +
    +    def remote_file_size(
    +        self, remote_cmd: str = "", remote_file: Optional[str] = None
    +    ) -> int:
    +        """Get the file size of the remote file."""
    +        if remote_file is None:
    +            if self.direction == "put":
    +                remote_file = self.dest_file
    +            elif self.direction == "get":
    +                remote_file = self.source_file
    +            else:
    +                raise ValueError("Invalid value for file transfer direction.")
    +
    +        if not remote_cmd:
    +            remote_cmd = (
    +                f'/file print detail where name="{self.file_system}/{remote_file}"'
    +            )
    +        remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +        try:
    +            size = remote_out.split("size=")[1].split(" ")[0]
    +            return self._format_to_bytes(size)
    +        except (KeyError, IndexError):
    +            raise ValueError("Unable to find file on remote system")
    +
    +    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    @staticmethod
    +    def process_md5(md5_output: str, pattern: str = "") -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def compare_md5(self) -> bool:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def remote_md5(self, base_cmd: str = "", remote_file: Optional[str] = None) -> str:
    +        raise AttributeError(
    +            "RouterOS does not natively support an MD5-hash operation."
    +        )
    +
    +    def verify_file(self) -> bool:
    +        """
    +        Verify the file has been transferred correctly based on filesize.
    +        This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB...
    +        Therefore multiple conversions from/to bytes are needed
    +        """
    +        if self.direction == "put":
    +            local_size = self._format_bytes(os.stat(self.source_file).st_size)
    +            remote_size = self._format_bytes(
    +                self.remote_file_size(remote_file=self.dest_file)
    +            )
    +            return local_size == remote_size
    +        elif self.direction == "get":
    +            local_size = self._format_bytes(os.stat(self.dest_file).st_size)
    +            remote_size = self._format_bytes(
    +                self.remote_file_size(remote_file=self.source_file)
    +            )
    +            return local_size == remote_size
    +        else:
    +            raise ValueError("Unexpected value of self.direction")
    +
    +    @staticmethod
    +    def _format_to_bytes(size: str) -> int:
    +        """
    +        Internal function to convert Mikrotik size to bytes
    +        """
    +        if size.endswith("KiB"):
    +            return round(int(float(size.replace("KiB", "")) * 1024))
    +        if size.endswith("MiB"):
    +            return round(int(float(size.replace("MiB", "")) * 1048576))
    +        if size.endswith("GiB"):
    +            return round(int(float(size.replace("GiB", "")) * 1073741824))
    +        return round(int(size))
    +
    +    @staticmethod
    +    def _format_bytes(size: int) -> str:
    +        """
    +        Internal function to convert bytes to KiB, MiB or GiB
    +        Extremely approximate
    +        """
    +        n = 0
    +        levels = {0: "", 1: "Ki", 2: "Mi", 3: "Gi"}
    +        while size > 4096 and n < 3:
    +            size = round(size / 1024)
    +            n += 1
    +        return f"{size}{levels[n]}B"
    +
    +

    Ancestors

    + +

    Methods

    +
    +
    +def check_file_exists(self, remote_cmd: str = '') ‑> bool +
    +
    +

    Check if the dest_file already exists on the file system.

    +
    + +Expand source code + +
    def check_file_exists(self, remote_cmd: str = "") -> bool:
    +    """Check if the dest_file already exists on the file system."""
    +    if self.direction == "put":
    +        if not remote_cmd:
    +            remote_cmd = f'/file print detail where name="{self.file_system}/{self.dest_file}"'
    +        remote_out = self.ssh_ctl_chan._send_command_timing_str(remote_cmd)
    +        # Output will look like
    +        # 0 name="flash/test9.txt" type=".txt file" size=19 creation-time=jun...
    +        # fail case will be blank line (all whitespace)
    +        if (
    +            "size" in remote_out
    +            and f"{self.file_system}/{self.dest_file}" in remote_out
    +        ):
    +            return True
    +        elif not remote_out.strip():
    +            return False
    +        raise ValueError("Unexpected output from check_file_exists")
    +    elif self.direction == "get":
    +        return os.path.exists(self.dest_file)
    +    else:
    +        raise ValueError("Unexpected value for self.direction")
    +
    +
    +
    +def verify_file(self) ‑> bool +
    +
    +

    Verify the file has been transferred correctly based on filesize. +This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB… +Therefore multiple conversions from/to bytes are needed

    +
    + +Expand source code + +
    def verify_file(self) -> bool:
    +    """
    +    Verify the file has been transferred correctly based on filesize.
    +    This method is very approximate as Mikrotik rounds file sizes to KiB, MiB, GiB...
    +    Therefore multiple conversions from/to bytes are needed
    +    """
    +    if self.direction == "put":
    +        local_size = self._format_bytes(os.stat(self.source_file).st_size)
    +        remote_size = self._format_bytes(
    +            self.remote_file_size(remote_file=self.dest_file)
    +        )
    +        return local_size == remote_size
    +    elif self.direction == "get":
    +        local_size = self._format_bytes(os.stat(self.dest_file).st_size)
    +        remote_size = self._format_bytes(
    +            self.remote_file_size(remote_file=self.source_file)
    +        )
    +        return local_size == remote_size
    +    else:
    +        raise ValueError("Unexpected value of self.direction")
    +
    +
    +
    +

    Inherited members

    + +
    class MikrotikRouterOsSSH -(**kwargs) +(**kwargs: Any)
    -

    Mikrotik RouterOS SSH driver.

    +

    Mikrotik RouterOS SSH driver.

    -Source code + +Expand source code +
    class MikrotikRouterOsSSH(MikrotikBase):
         """Mikrotik RouterOS SSH driver."""
     
    @@ -538,7 +1059,7 @@ 

    Inherited members

  • special_login_handler
  • strip_ansi_escape_codes
  • strip_backspaces
  • -
  • strip_command
  • +
  • strip_command
  • strip_prompt
  • telnet_login
  • write_channel
  • @@ -548,12 +1069,14 @@

    Inherited members

    class MikrotikSwitchOsSSH -(**kwargs) +(**kwargs: Any)
    -

    Mikrotik SwitchOS SSH driver.

    +

    Mikrotik SwitchOS SSH driver.

    -Source code + +Expand source code +
    class MikrotikSwitchOsSSH(MikrotikBase):
         """Mikrotik SwitchOS SSH driver."""
     
    @@ -608,7 +1131,7 @@ 

    Inherited members

  • special_login_handler
  • strip_ansi_escape_codes
  • strip_backspaces
  • -
  • strip_command
  • +
  • strip_command
  • strip_prompt
  • telnet_login
  • write_channel
  • @@ -643,10 +1166,18 @@

    send_command_timing
  • session_preparation
  • set_base_prompt
  • +
  • strip_command
  • strip_prompt
  • +

    MikrotikRouterOsFileTransfer

    + +
  • +
  • MikrotikRouterOsSSH

  • @@ -658,9 +1189,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mrv/index.html b/docs/netmiko/mrv/index.html index 9deb65fe5..c8a455162 100644 --- a/docs/netmiko/mrv/index.html +++ b/docs/netmiko/mrv/index.html @@ -3,15 +3,17 @@ - + netmiko.mrv API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.mrv

    -Source code + +Expand source code +
    from netmiko.mrv.mrv_lx import MrvLxSSH
     from netmiko.mrv.mrv_ssh import MrvOptiswitchSSH
     
    @@ -33,11 +37,11 @@ 

    Sub-modules

    netmiko.mrv.mrv_lx
    -

    MRV Communications Driver (LX).

    +

    MRV Communications Driver (LX).

    netmiko.mrv.mrv_ssh
    -

    MRV Communications Driver (OptiSwitch).

    +

    MRV Communications Driver (OptiSwitch).

    @@ -50,16 +54,16 @@

    Classes

    class MrvLxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    MRV Communications Driver (LX).

    +

    MRV Communications Driver (LX).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -98,7 +102,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -143,12 +147,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -156,9 +160,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

  • -Source code + +Expand source code +
    class MrvLxSSH(CiscoSSHConnection):
         """MRV Communications Driver (LX)."""
     
    @@ -206,24 +212,28 @@ 

    Ancestors

    Methods

    -def check_enable_mode(self, check_string='>>') +def check_enable_mode(self, check_string: str = '>>') ‑> bool
    -

    MRV has a >> for enable mode instead of # like Cisco

    +

    MRV has a >> for enable mode instead of # like Cisco

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = ">>") -> bool:
         """MRV has a >> for enable mode instead of # like Cisco"""
         return super().check_enable_mode(check_string=check_string)
    -def save_config(self, cmd='save config flash', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config flash', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config flash",
    @@ -237,12 +247,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>|>>]")
    @@ -303,16 +315,16 @@ 

    Inherited members

    class MrvOptiswitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    MRV Communications Driver (OptiSwitch).

    +

    MRV Communications Driver (OptiSwitch).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -351,7 +363,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -396,12 +408,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -409,9 +421,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class MrvOptiswitchSSH(CiscoSSHConnection):
         """MRV Communications Driver (OptiSwitch)."""
     
    @@ -468,12 +482,14 @@ 

    Ancestors

    Methods

    -def enable(self, cmd='enable', pattern='#', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '#', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enable mode on MRV uses no password.

    +

    Enable mode on MRV uses no password.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -498,12 +514,14 @@ 

    Methods

    -def save_config(self, cmd='save config flash', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config flash', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config flash",
    @@ -517,12 +535,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -626,9 +646,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mrv/mrv_lx.html b/docs/netmiko/mrv/mrv_lx.html index 376040575..2392a4859 100644 --- a/docs/netmiko/mrv/mrv_lx.html +++ b/docs/netmiko/mrv/mrv_lx.html @@ -3,15 +3,17 @@ - + netmiko.mrv.mrv_lx API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.mrv.mrv_lx

    MRV Communications Driver (LX).

    -Source code + +Expand source code +
    """MRV Communications Driver (LX)."""
     import time
     import re
    @@ -81,16 +85,16 @@ 

    Classes

    class MrvLxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    MRV Communications Driver (LX).

    +

    MRV Communications Driver (LX).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -129,7 +133,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -174,12 +178,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -187,9 +191,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class MrvLxSSH(CiscoSSHConnection):
         """MRV Communications Driver (LX)."""
     
    @@ -237,24 +243,28 @@ 

    Ancestors

    Methods

    -def check_enable_mode(self, check_string='>>') +def check_enable_mode(self, check_string: str = '>>') ‑> bool
    -

    MRV has a >> for enable mode instead of # like Cisco

    +

    MRV has a >> for enable mode instead of # like Cisco

    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = ">>") -> bool:
         """MRV has a >> for enable mode instead of # like Cisco"""
         return super().check_enable_mode(check_string=check_string)
    -def save_config(self, cmd='save config flash', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config flash', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config flash",
    @@ -268,12 +278,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>|>>]")
    @@ -362,9 +374,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/mrv/mrv_ssh.html b/docs/netmiko/mrv/mrv_ssh.html index f28ade8cd..5b7d53d76 100644 --- a/docs/netmiko/mrv/mrv_ssh.html +++ b/docs/netmiko/mrv/mrv_ssh.html @@ -3,15 +3,17 @@ - + netmiko.mrv.mrv_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.mrv.mrv_ssh

    MRV Communications Driver (OptiSwitch).

    -Source code + +Expand source code +
    """MRV Communications Driver (OptiSwitch)."""
     import time
     import re
    @@ -90,16 +94,16 @@ 

    Classes

    class MrvOptiswitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    MRV Communications Driver (OptiSwitch).

    +

    MRV Communications Driver (OptiSwitch).

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -138,7 +142,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -183,12 +187,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -196,9 +200,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class MrvOptiswitchSSH(CiscoSSHConnection):
         """MRV Communications Driver (OptiSwitch)."""
     
    @@ -255,12 +261,14 @@ 

    Ancestors

    Methods

    -def enable(self, cmd='enable', pattern='#', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '#', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enable mode on MRV uses no password.

    +

    Enable mode on MRV uses no password.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -285,12 +293,14 @@ 

    Methods

    -def save_config(self, cmd='save config flash', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save config flash', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "save config flash",
    @@ -304,12 +314,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -399,9 +411,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/netapp/index.html b/docs/netmiko/netapp/index.html index c447ef15f..46fc428fe 100644 --- a/docs/netmiko/netapp/index.html +++ b/docs/netmiko/netapp/index.html @@ -3,15 +3,17 @@ - + netmiko.netapp API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.netapp

    -Source code + +Expand source code +
    from netmiko.netapp.netapp_cdot_ssh import NetAppcDotSSH
     
     __all__ = ["NetAppcDotSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.netapp.netapp_cdot_ssh
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class NetAppcDotSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -145,12 +149,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -158,9 +162,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class NetAppcDotSSH(NoEnable, BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -176,7 +182,9 @@ 

    Classes

    ) return output - def check_config_mode(self, check_string: str = "*>", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "*>", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( @@ -204,12 +212,14 @@

    Ancestors

    Methods

    -def send_command_with_y(self, *args, **kwargs) +def send_command_with_y(self, *args: Any, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def send_command_with_y(self, *args: Any, **kwargs: Any) -> str:
         output = self._send_command_timing_str(*args, **kwargs)
         if "{y|n}" in output:
    @@ -220,12 +230,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.set_base_prompt()
    @@ -316,9 +328,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/netapp/netapp_cdot_ssh.html b/docs/netmiko/netapp/netapp_cdot_ssh.html index 52a907e5c..1cf774341 100644 --- a/docs/netmiko/netapp/netapp_cdot_ssh.html +++ b/docs/netmiko/netapp/netapp_cdot_ssh.html @@ -3,15 +3,17 @@ - + netmiko.netapp.netapp_cdot_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.netapp.netapp_cdot_ssh

    -Source code + +Expand source code +
    from typing import Any
     
     from netmiko.no_enable import NoEnable
    @@ -43,7 +47,9 @@ 

    Module netmiko.netapp.netapp_cdot_ssh

    ) return output - def check_config_mode(self, check_string: str = "*>", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "*>", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( @@ -75,10 +81,10 @@

    Classes

    class NetAppcDotSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -88,10 +94,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -130,7 +136,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -175,12 +181,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -188,9 +194,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class NetAppcDotSSH(NoEnable, BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -206,7 +214,9 @@ 

    Classes

    ) return output - def check_config_mode(self, check_string: str = "*>", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "*>", pattern: str = "", force_regex: bool = False + ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) def config_mode( @@ -234,12 +244,14 @@

    Ancestors

    Methods

    -def send_command_with_y(self, *args, **kwargs) +def send_command_with_y(self, *args: Any, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def send_command_with_y(self, *args: Any, **kwargs: Any) -> str:
         output = self._send_command_timing_str(*args, **kwargs)
         if "{y|n}" in output:
    @@ -250,12 +262,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.set_base_prompt()
    @@ -341,9 +355,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/netgear/index.html b/docs/netmiko/netgear/index.html index a78c2f82b..64c5a4e19 100644 --- a/docs/netmiko/netgear/index.html +++ b/docs/netmiko/netgear/index.html @@ -3,15 +3,17 @@ - + netmiko.netgear API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.netgear

    -Source code + +Expand source code +
    from netmiko.netgear.netgear_prosafe_ssh import NetgearProSafeSSH
     
     __all__ = ["NetgearProSafeSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.netgear.netgear_prosafe_ssh
    -

    ProSafe OS support

    +

    ProSafe OS support

    @@ -45,16 +49,16 @@

    Classes

    class NetgearProSafeSSH -(**kwargs) +(**kwargs: Any)
    -

    ProSafe OS support

    +

    ProSafe OS support

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class NetgearProSafeSSH(CiscoSSHConnection):
         """ProSafe OS support"""
     
    @@ -174,7 +180,10 @@ 

    Classes

    self.clear_buffer() def check_config_mode( - self, check_string: str = "(Config)#", pattern: str = "" + self, + check_string: str = "(Config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -215,12 +224,14 @@

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    ProSafe OS requires enable mode to disable paging.

    +

    ProSafe OS requires enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """ProSafe OS requires enable mode to disable paging."""
         self._test_channel_read()
    @@ -315,9 +326,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/netgear/netgear_prosafe_ssh.html b/docs/netmiko/netgear/netgear_prosafe_ssh.html index d7927eddc..4e48142cb 100644 --- a/docs/netmiko/netgear/netgear_prosafe_ssh.html +++ b/docs/netmiko/netgear/netgear_prosafe_ssh.html @@ -3,15 +3,17 @@ - + netmiko.netgear.netgear_prosafe_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.netgear.netgear_prosafe_ssh

    ProSafe OS support

    -Source code + +Expand source code +
    """ProSafe OS support"""
     import time
     from typing import Any
    @@ -50,7 +54,10 @@ 

    Module netmiko.netgear.netgear_prosafe_ssh

    self.clear_buffer() def check_config_mode( - self, check_string: str = "(Config)#", pattern: str = "" + self, + check_string: str = "(Config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -94,16 +101,16 @@

    Classes

    class NetgearProSafeSSH -(**kwargs) +(**kwargs: Any)
    -

    ProSafe OS support

    +

    ProSafe OS support

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -142,7 +149,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -187,12 +194,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -200,9 +207,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class NetgearProSafeSSH(CiscoSSHConnection):
         """ProSafe OS support"""
     
    @@ -223,7 +232,10 @@ 

    Classes

    self.clear_buffer() def check_config_mode( - self, check_string: str = "(Config)#", pattern: str = "" + self, + check_string: str = "(Config)#", + pattern: str = "", + force_regex: bool = False, ) -> bool: return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -264,12 +276,14 @@

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    ProSafe OS requires enable mode to disable paging.

    +

    ProSafe OS requires enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """ProSafe OS requires enable mode to disable paging."""
         self._test_channel_read()
    @@ -359,9 +373,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/netmiko_globals.html b/docs/netmiko/netmiko_globals.html index ed9d9d903..ea8f9b8c5 100644 --- a/docs/netmiko/netmiko_globals.html +++ b/docs/netmiko/netmiko_globals.html @@ -3,15 +3,17 @@ - + netmiko.netmiko_globals API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.netmiko_globals

    -Source code + +Expand source code +
    MAX_BUFFER = 65535
     BACKSPACE_CHAR = "\x08"
    @@ -50,9 +54,7 @@

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/no_config.html b/docs/netmiko/no_config.html index 90deeb026..93d16948a 100644 --- a/docs/netmiko/no_config.html +++ b/docs/netmiko/no_config.html @@ -3,15 +3,17 @@ - + netmiko.no_config API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.no_config

    -Source code + +Expand source code +
    class NoConfig:
         """
         Class for platforms that have no config mode.
    @@ -34,7 +38,9 @@ 

    Module netmiko.no_config

    overwrite check_config_mode in the platform specific driver and return False. """ - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: return True def config_mode( @@ -57,17 +63,18 @@

    Classes

    class NoConfig -(*args, **kwargs)
    -

    Class for platforms that have no config mode.

    +

    Class for platforms that have no config mode.

    check_config_mode returns True as the expectation is that configuration commands can be executed directly. So in your current state, you are in "config mode" i.e. you can make configuration changes.

    If you truly cannot make any configuration changes to device then you should probably -overwrite check_config_mode in the platform specific driver and return False.

    +overwrite check_config_mode in the platform specific driver and return False.

    -Source code + +Expand source code +
    class NoConfig:
         """
         Class for platforms that have no config mode.
    @@ -80,7 +87,9 @@ 

    Classes

    overwrite check_config_mode in the platform specific driver and return False. """ - def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "", pattern: str = "", force_regex: bool = False + ) -> bool: return True def config_mode( @@ -115,23 +124,29 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string='', pattern='') +def check_config_mode(self, check_string: str = '', pattern: str = '', force_regex: bool = False) ‑> bool
    -
    +
    -Source code -
    def check_config_mode(self, check_string: str = "", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "", pattern: str = "", force_regex: bool = False
    +) -> bool:
         return True
    -def config_mode(self, config_command='', pattern='', re_flags=0) +def config_mode(self, config_command: str = '', pattern: str = '', re_flags: int = 0) ‑> str
    -
    +
    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -139,12 +154,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='', pattern='') +def exit_config_mode(self, exit_config: str = '', pattern: str = '') ‑> str
    -
    +
    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
         return ""
    @@ -181,9 +198,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/no_enable.html b/docs/netmiko/no_enable.html index 63bc944df..2534109fe 100644 --- a/docs/netmiko/no_enable.html +++ b/docs/netmiko/no_enable.html @@ -3,15 +3,17 @@ - + netmiko.no_enable API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.no_enable

    -Source code + +Expand source code +
    from typing import Optional
     import re
     
    @@ -68,19 +72,20 @@ 

    Classes

    class NoEnable -(*args, **kwargs)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    The expectation on platforms that have no method for elevating privileges is that the standard default privileges allow configuration changes.

    Consequently check_enable_mode returns True by default for platforms that -don't explicitly support enable mode.

    +don't explicitly support enable mode.

    -Source code + +Expand source code +
    class NoEnable:
         """
         Class for platforms that have no enable mode.
    @@ -132,34 +137,39 @@ 

    Subclasses

  • KeymileSSH
  • MikrotikBase
  • NetAppcDotSSH
  • +
  • NokiaSrlSSH
  • PaloAltoPanosBase
  • RadETXBase
  • SixwindOSBase
  • SophosSfosSSH
  • -
  • VyOSSSH
  • SmciSwitchSmisBase
  • +
  • VyOSSSH
  • ZyxelSSH
  • Methods

    -def check_enable_mode(self, check_string='') +def check_enable_mode(self, check_string: str = '') ‑> bool
    -
    +
    -Source code + +Expand source code +
    def check_enable_mode(self, check_string: str = "") -> bool:
         return True
    -def enable(self, cmd='', pattern='', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = '', pattern: str = '', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -
    +
    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "",
    @@ -171,12 +181,14 @@ 

    Methods

    -def exit_enable_mode(self, exit_command='') +def exit_enable_mode(self, exit_command: str = '') ‑> str
    -
    +
    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "") -> str:
         return ""
    @@ -213,9 +225,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/nokia/index.html b/docs/netmiko/nokia/index.html index 7693616a1..e6ce6f7d1 100644 --- a/docs/netmiko/nokia/index.html +++ b/docs/netmiko/nokia/index.html @@ -3,15 +3,17 @@ - + netmiko.nokia API documentation - - - - - + + + + + + +
    @@ -21,22 +23,30 @@

    Module netmiko.nokia

    -Source code + +Expand source code +
    from netmiko.nokia.nokia_sros import (
         NokiaSrosSSH,
         NokiaSrosTelnet,
         NokiaSrosFileTransfer,
     )
     
    -__all__ = ["NokiaSrosSSH", "NokiaSrosFileTransfer", "NokiaSrosTelnet"]
    +from netmiko.nokia.nokia_srl import NokiaSrlSSH + +__all__ = ["NokiaSrosSSH", "NokiaSrosFileTransfer", "NokiaSrosTelnet", "NokiaSrlSSH"]

    Sub-modules

    +
    netmiko.nokia.nokia_srl
    +
    +
    +
    netmiko.nokia.nokia_sros
    -
    +
    @@ -47,14 +57,432 @@

    Sub-modules

    Classes

    +
    +class NokiaSrlSSH +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +
    +
    +

    Implement methods for interacting with Nokia SRL devices for SSH.

    +

    Not applicable in Nokia SRL: +- check_enable_mode() +- enable() +- exit_enable_mode()

    +

    By default, the SR Linux CLI prompt consists of two lines of text, +indicating with an asterisk whether the configuration has been modified or +a plus sign whether the configuration has been saved, the current mode and +session type, the current CLI context, and the host name of the SR Linux device.

    +

    Examples:

    +

    –{ running }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

    +

    –{ * candidate private private-admin }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

    +

    –{ + candidate private private-admin }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

    +

    This class support the default prompt configuration.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class NokiaSrlSSH(BaseConnection, NoEnable):
    +    """
    +    Implement methods for interacting with Nokia SRL devices for SSH.
    +
    +    Not applicable in Nokia SRL:
    +        - check_enable_mode()
    +        - enable()
    +        - exit_enable_mode()
    +
    +    By default, the SR Linux CLI prompt consists of two lines of text,
    +    indicating with an asterisk whether the configuration has been modified or
    +    a plus sign whether the configuration has been saved, the current mode and
    +    session type, the current CLI context, and the host name of the SR Linux device.
    +
    +    Examples:
    +
    +    --{ running }--[ interface ethernet-1/1 subinterface 1 ]--
    +    A:ams01#
    +
    +    --{ * candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
    +    A:ams01#
    +
    +    --{ + candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
    +    A:ams01#
    +
    +    This class support the default prompt configuration.
    +    """
    +
    +    def session_preparation(self) -> None:
    +        self._test_channel_read(pattern=r"#")
    +        self.ansi_escape_codes = True
    +        # Bottom toolbar text not required
    +        commands = [
    +            "environment complete-on-space false",
    +            "environment cli-engine type basic",
    +        ]
    +        for command in commands:
    +            self.disable_paging(command=command, cmd_verify=True, pattern=r"#")
    +        self.set_base_prompt()
    +
    +    def set_base_prompt(
    +        self,
    +        pri_prompt_terminator: str = "#",
    +        alt_prompt_terminator: str = "#",
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"#",
    +    ) -> str:
    +        return super().set_base_prompt(
    +            pri_prompt_terminator=pri_prompt_terminator,
    +            alt_prompt_terminator=alt_prompt_terminator,
    +            delay_factor=delay_factor,
    +            pattern=pattern,
    +        )
    +
    +    def config_mode(
    +        self,
    +        config_command: str = "enter candidate private",
    +        pattern: str = r"#",
    +        re_flags: int = 0,
    +    ) -> str:
    +        return super().config_mode(
    +            config_command=config_command, pattern=pattern, re_flags=re_flags
    +        )
    +
    +    def check_config_mode(
    +        self,
    +        check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate",
    +        pattern: str = r"#",
    +        force_regex: bool = True,
    +    ) -> bool:
    +
    +        return super().check_config_mode(
    +            check_string=check_string, pattern=pattern, force_regex=force_regex
    +        )
    +
    +    def commit(self) -> str:
    +        """Commit changes by using 'commit stay'."""
    +        cmd = "commit stay"
    +        output = self._send_command_str(
    +            command_string=cmd, strip_prompt=False, strip_command=False
    +        )
    +        return output
    +
    +    def save_config(
    +        self,
    +        cmd: str = "save startup",
    +        confirm: bool = False,
    +        confirm_response: str = "",
    +    ) -> str:
    +        """Save current running configuration as initial (startup) configuration"""
    +        return self._send_command_str(
    +            command_string=cmd, strip_prompt=False, strip_command=False
    +        )
    +
    +    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
    +        """Exit the candidate private mode"""
    +        output = ""
    +        self.write_channel(self.RETURN)
    +        prompt = self.read_until_pattern(pattern="#")
    +
    +        if self._has_uncommitted_changes(prompt):
    +            # Changes were made but not committed. Discarding changes
    +            output += self._discard()
    +        # Switch to 'running' mode
    +        output += self._running_mode()
    +        return output
    +
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +        exit_config_mode: bool = False,
    +        **kwargs: Any,
    +    ) -> str:
    +        """Nokia SRL requires you not exit from configuration mode."""
    +        return super().send_config_set(
    +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +        )
    +
    +    def _discard(self) -> str:
    +        """Discard changes made in candidate private mode"""
    +        log.warning("Uncommitted changes will be discarted!")
    +        cmd = "discard stay"
    +        output = self._send_command_str(
    +            command_string=cmd, strip_prompt=False, strip_command=False
    +        )
    +        return output
    +
    +    def _running_mode(self) -> str:
    +        """Enter running mode"""
    +        cmd = "enter running"
    +        output = self._send_command_str(
    +            command_string=cmd, strip_prompt=False, strip_command=False
    +        )
    +        return output
    +
    +    def _has_uncommitted_changes(self, prompt: str) -> bool:
    +        """
    +        The asterix (*) next to the mode name indicates that the candidate configuration
    +        has changes that have not yet been committed.
    +
    +        The plus sign (+) in the prompt indicates that the running configuration differs
    +        from the startup configuration. After you enter the save startup command,
    +        the running configuration is synchronized with the startup configuration,
    +        and the plus sign is removed from the prompt.
    +
    +        The exclamation mark (!) in the prompt indicates that another user has commited
    +        changes to the running datastore.
    +        """
    +        matches = re.search(r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", prompt)
    +        return True if matches and "*" in matches.group() else False
    +
    +

    Ancestors

    + +

    Methods

    +
    +
    +def commit(self) ‑> str +
    +
    +

    Commit changes by using 'commit stay'.

    +
    + +Expand source code + +
    def commit(self) -> str:
    +    """Commit changes by using 'commit stay'."""
    +    cmd = "commit stay"
    +    output = self._send_command_str(
    +        command_string=cmd, strip_prompt=False, strip_command=False
    +    )
    +    return output
    +
    +
    +
    +def exit_config_mode(self, exit_config: str = '', pattern: str = '') ‑> str +
    +
    +

    Exit the candidate private mode

    +
    + +Expand source code + +
    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
    +    """Exit the candidate private mode"""
    +    output = ""
    +    self.write_channel(self.RETURN)
    +    prompt = self.read_until_pattern(pattern="#")
    +
    +    if self._has_uncommitted_changes(prompt):
    +        # Changes were made but not committed. Discarding changes
    +        output += self._discard()
    +    # Switch to 'running' mode
    +    output += self._running_mode()
    +    return output
    +
    +
    +
    +def save_config(self, cmd: str = 'save startup', confirm: bool = False, confirm_response: str = '') ‑> str +
    +
    +

    Save current running configuration as initial (startup) configuration

    +
    + +Expand source code + +
    def save_config(
    +    self,
    +    cmd: str = "save startup",
    +    confirm: bool = False,
    +    confirm_response: str = "",
    +) -> str:
    +    """Save current running configuration as initial (startup) configuration"""
    +    return self._send_command_str(
    +        command_string=cmd, strip_prompt=False, strip_command=False
    +    )
    +
    +
    +
    +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +
    +
    +

    Nokia SRL requires you not exit from configuration mode.

    +
    + +Expand source code + +
    def send_config_set(
    +    self,
    +    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    exit_config_mode: bool = False,
    +    **kwargs: Any,
    +) -> str:
    +    """Nokia SRL requires you not exit from configuration mode."""
    +    return super().send_config_set(
    +        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
    +    )
    +
    +
    +
    +

    Inherited members

    + +
    class NokiaSrosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=False) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False)
    -

    Class to manage SCP file transfer and associated SSH control channel.

    +

    Class to manage SCP file transfer and associated SSH control channel.

    -Source code + +Expand source code +
    class NokiaSrosFileTransfer(BaseFileTransfer):
         def __init__(
             self,
    @@ -190,12 +618,14 @@ 

    Ancestors

    Methods

    -def check_file_exists(self, remote_cmd='') +def check_file_exists(self, remote_cmd: str = '') ‑> bool
    -

    Check if destination file exists (returns boolean).

    +

    Check if destination file exists (returns boolean).

    -Source code + +Expand source code +
    def check_file_exists(self, remote_cmd: str = "") -> bool:
         """Check if destination file exists (returns boolean)."""
     
    @@ -219,12 +649,14 @@ 

    Methods

    -def verify_file(self) +def verify_file(self) ‑> bool
    -

    Verify the file has been transferred correctly based on filesize.

    +

    Verify the file has been transferred correctly based on filesize.

    -Source code + +Expand source code +
    def verify_file(self) -> bool:
         """Verify the file has been transferred correctly based on filesize."""
         if self.direction == "put":
    @@ -266,16 +698,16 @@ 

    Inherited members

    class NokiaSrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Nokia SR OS SSH driver.

    +

    Nokia SR OS SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -314,7 +746,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -359,12 +791,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -372,9 +804,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class NokiaSrosSSH(NokiaSros):
         """Nokia SR OS SSH driver."""
     
    @@ -436,16 +870,16 @@ 

    Inherited members

    class NokiaSrosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Nokia SR OS Telnet driver.

    +

    Nokia SR OS Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -484,7 +918,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -529,12 +963,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -542,9 +976,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class NokiaSrosTelnet(NokiaSros):
         """Nokia SR OS Telnet driver."""
     
    @@ -620,12 +1056,22 @@ 

    Index

  • Sub-modules

  • Classes

    • +

      NokiaSrlSSH

      + +
    • +
    • NokiaSrosFileTransfer

      • check_file_exists
      • @@ -644,9 +1090,7 @@

        -

        Generated by pdoc 0.6.3.

        +

        Generated by pdoc 0.10.0.

        - - \ No newline at end of file diff --git a/docs/netmiko/nokia/nokia_srl.html b/docs/netmiko/nokia/nokia_srl.html new file mode 100644 index 000000000..9013c670e --- /dev/null +++ b/docs/netmiko/nokia/nokia_srl.html @@ -0,0 +1,655 @@ + + + + + + +netmiko.nokia.nokia_srl API documentation + + + + + + + + + + + +
        +
        +
        +

        Module netmiko.nokia.nokia_srl

        +
        +
        +
        + +Expand source code + +
        #!/usr/bin/python
        +# -*- coding: utf-8 -*-
        +# Copyright (c) 2014 - 2022 Kirk Byers
        +# Copyright (c) 2014 - 2022 Twin Bridges Technology
        +# Copyright (c) 2019 - 2022 NOKIA Inc.
        +# MIT License - See License file at:
        +#   https://github.com/ktbyers/netmiko/blob/develop/LICENSE
        +
        +import re
        +from typing import Any, Optional, Sequence, TextIO, Union
        +from netmiko import log
        +from netmiko.no_enable import NoEnable
        +from netmiko.base_connection import BaseConnection
        +
        +
        +class NokiaSrlSSH(BaseConnection, NoEnable):
        +    """
        +    Implement methods for interacting with Nokia SRL devices for SSH.
        +
        +    Not applicable in Nokia SRL:
        +        - check_enable_mode()
        +        - enable()
        +        - exit_enable_mode()
        +
        +    By default, the SR Linux CLI prompt consists of two lines of text,
        +    indicating with an asterisk whether the configuration has been modified or
        +    a plus sign whether the configuration has been saved, the current mode and
        +    session type, the current CLI context, and the host name of the SR Linux device.
        +
        +    Examples:
        +
        +    --{ running }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    --{ * candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    --{ + candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    This class support the default prompt configuration.
        +    """
        +
        +    def session_preparation(self) -> None:
        +        self._test_channel_read(pattern=r"#")
        +        self.ansi_escape_codes = True
        +        # Bottom toolbar text not required
        +        commands = [
        +            "environment complete-on-space false",
        +            "environment cli-engine type basic",
        +        ]
        +        for command in commands:
        +            self.disable_paging(command=command, cmd_verify=True, pattern=r"#")
        +        self.set_base_prompt()
        +
        +    def set_base_prompt(
        +        self,
        +        pri_prompt_terminator: str = "#",
        +        alt_prompt_terminator: str = "#",
        +        delay_factor: float = 1.0,
        +        pattern: Optional[str] = r"#",
        +    ) -> str:
        +        return super().set_base_prompt(
        +            pri_prompt_terminator=pri_prompt_terminator,
        +            alt_prompt_terminator=alt_prompt_terminator,
        +            delay_factor=delay_factor,
        +            pattern=pattern,
        +        )
        +
        +    def config_mode(
        +        self,
        +        config_command: str = "enter candidate private",
        +        pattern: str = r"#",
        +        re_flags: int = 0,
        +    ) -> str:
        +        return super().config_mode(
        +            config_command=config_command, pattern=pattern, re_flags=re_flags
        +        )
        +
        +    def check_config_mode(
        +        self,
        +        check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate",
        +        pattern: str = r"#",
        +        force_regex: bool = True,
        +    ) -> bool:
        +
        +        return super().check_config_mode(
        +            check_string=check_string, pattern=pattern, force_regex=force_regex
        +        )
        +
        +    def commit(self) -> str:
        +        """Commit changes by using 'commit stay'."""
        +        cmd = "commit stay"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def save_config(
        +        self,
        +        cmd: str = "save startup",
        +        confirm: bool = False,
        +        confirm_response: str = "",
        +    ) -> str:
        +        """Save current running configuration as initial (startup) configuration"""
        +        return self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +
        +    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
        +        """Exit the candidate private mode"""
        +        output = ""
        +        self.write_channel(self.RETURN)
        +        prompt = self.read_until_pattern(pattern="#")
        +
        +        if self._has_uncommitted_changes(prompt):
        +            # Changes were made but not committed. Discarding changes
        +            output += self._discard()
        +        # Switch to 'running' mode
        +        output += self._running_mode()
        +        return output
        +
        +    def send_config_set(
        +        self,
        +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
        +        exit_config_mode: bool = False,
        +        **kwargs: Any,
        +    ) -> str:
        +        """Nokia SRL requires you not exit from configuration mode."""
        +        return super().send_config_set(
        +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
        +        )
        +
        +    def _discard(self) -> str:
        +        """Discard changes made in candidate private mode"""
        +        log.warning("Uncommitted changes will be discarted!")
        +        cmd = "discard stay"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def _running_mode(self) -> str:
        +        """Enter running mode"""
        +        cmd = "enter running"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def _has_uncommitted_changes(self, prompt: str) -> bool:
        +        """
        +        The asterix (*) next to the mode name indicates that the candidate configuration
        +        has changes that have not yet been committed.
        +
        +        The plus sign (+) in the prompt indicates that the running configuration differs
        +        from the startup configuration. After you enter the save startup command,
        +        the running configuration is synchronized with the startup configuration,
        +        and the plus sign is removed from the prompt.
        +
        +        The exclamation mark (!) in the prompt indicates that another user has commited
        +        changes to the running datastore.
        +        """
        +        matches = re.search(r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", prompt)
        +        return True if matches and "*" in matches.group() else False
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +

        Classes

        +
        +
        +class NokiaSrlSSH +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +
        +
        +

        Implement methods for interacting with Nokia SRL devices for SSH.

        +

        Not applicable in Nokia SRL: +- check_enable_mode() +- enable() +- exit_enable_mode()

        +

        By default, the SR Linux CLI prompt consists of two lines of text, +indicating with an asterisk whether the configuration has been modified or +a plus sign whether the configuration has been saved, the current mode and +session type, the current CLI context, and the host name of the SR Linux device.

        +

        Examples:

        +

        –{ running }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

        +

        –{ * candidate private private-admin }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

        +

        –{ + candidate private private-admin }–[ interface ethernet-1/1 subinterface 1 ]– +A:ams01#

        +

        This class support the default prompt configuration.

        +
            Initialize attributes for establishing connection to target device.
        +
        +    :param ip: IP address of target device. Not required if <code>host</code> is
        +        provided.
        +
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
        +            provided.
        +
        +    :param username: Username to authenticate against target device if
        +            required.
        +
        +    :param password: Password to authenticate against target device if
        +            required.
        +
        +    :param secret: The enable password if target device requires one.
        +
        +    :param port: The destination port used to connect to the target
        +            device.
        +
        +    :param device_type: Class selection based on device type.
        +
        +    :param verbose: Enable additional messages to standard output.
        +
        +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
        +
        +    :param use_keys: Connect to target device using SSH keys.
        +
        +    :param key_file: Filename path of the SSH key file to use.
        +
        +    :param pkey: SSH key object to use.
        +
        +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
        +            decryption if not specified.
        +
        +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
        +            documentation for a description of the expected format.
        +
        +    :param allow_agent: Enable use of SSH key-agent.
        +
        +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
        +            means unknown SSH host keys will be accepted).
        +
        +    :param system_host_keys: Load host keys from the users known_hosts file.
        +
        +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
        +            alt_key_file.
        +
        +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
        +
        +    :param ssh_config_file: File name of OpenSSH configuration file.
        +
        +    :param timeout: Connection timeout.
        +
        +    :param session_timeout: Set a timeout for parallel requests.
        +
        +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
        +
        +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
        +
        +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
        +            Currently defaults to 0, for backwards compatibility (it will not attempt
        +            to keep the connection alive).
        +
        +    :param default_enter: Character(s) to send to correspond to enter key (default:
        +
        +

        ).

        +
            :param response_return: Character(s) to use in normalized return data to represent
        +            enter key (default:
        +
        +

        )

        +
            :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
        +            to select smallest of global and specific. Sets default global_delay_factor to .1
        +            (default: True)
        +
        +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
        +
        +    :param session_log_record_writes: The session log generally only records channel reads due
        +            to eliminate command duplication due to command echo. You can enable this if you
        +            want to record both channel reads and channel writes in the log (default: False).
        +
        +    :param session_log_file_mode: "write" or "append" for session_log file mode
        +            (default: "write")
        +
        +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
        +            (default: False)
        +
        +    :param encoding: Encoding to be used when writing bytes to the output channel.
        +            (default: ascii)
        +
        +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
        +            communication to the target host (default: None).
        +
        +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
        +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
        +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
        +
        +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
        +            part of the object creation (default: True).
        +
        +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
        +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
        +            eliminated in Netmiko 5.x (default: False).
        +
        +
        + +Expand source code + +
        class NokiaSrlSSH(BaseConnection, NoEnable):
        +    """
        +    Implement methods for interacting with Nokia SRL devices for SSH.
        +
        +    Not applicable in Nokia SRL:
        +        - check_enable_mode()
        +        - enable()
        +        - exit_enable_mode()
        +
        +    By default, the SR Linux CLI prompt consists of two lines of text,
        +    indicating with an asterisk whether the configuration has been modified or
        +    a plus sign whether the configuration has been saved, the current mode and
        +    session type, the current CLI context, and the host name of the SR Linux device.
        +
        +    Examples:
        +
        +    --{ running }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    --{ * candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    --{ + candidate private private-admin }--[ interface ethernet-1/1 subinterface 1 ]--
        +    A:ams01#
        +
        +    This class support the default prompt configuration.
        +    """
        +
        +    def session_preparation(self) -> None:
        +        self._test_channel_read(pattern=r"#")
        +        self.ansi_escape_codes = True
        +        # Bottom toolbar text not required
        +        commands = [
        +            "environment complete-on-space false",
        +            "environment cli-engine type basic",
        +        ]
        +        for command in commands:
        +            self.disable_paging(command=command, cmd_verify=True, pattern=r"#")
        +        self.set_base_prompt()
        +
        +    def set_base_prompt(
        +        self,
        +        pri_prompt_terminator: str = "#",
        +        alt_prompt_terminator: str = "#",
        +        delay_factor: float = 1.0,
        +        pattern: Optional[str] = r"#",
        +    ) -> str:
        +        return super().set_base_prompt(
        +            pri_prompt_terminator=pri_prompt_terminator,
        +            alt_prompt_terminator=alt_prompt_terminator,
        +            delay_factor=delay_factor,
        +            pattern=pattern,
        +        )
        +
        +    def config_mode(
        +        self,
        +        config_command: str = "enter candidate private",
        +        pattern: str = r"#",
        +        re_flags: int = 0,
        +    ) -> str:
        +        return super().config_mode(
        +            config_command=config_command, pattern=pattern, re_flags=re_flags
        +        )
        +
        +    def check_config_mode(
        +        self,
        +        check_string: str = r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate",
        +        pattern: str = r"#",
        +        force_regex: bool = True,
        +    ) -> bool:
        +
        +        return super().check_config_mode(
        +            check_string=check_string, pattern=pattern, force_regex=force_regex
        +        )
        +
        +    def commit(self) -> str:
        +        """Commit changes by using 'commit stay'."""
        +        cmd = "commit stay"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def save_config(
        +        self,
        +        cmd: str = "save startup",
        +        confirm: bool = False,
        +        confirm_response: str = "",
        +    ) -> str:
        +        """Save current running configuration as initial (startup) configuration"""
        +        return self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +
        +    def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
        +        """Exit the candidate private mode"""
        +        output = ""
        +        self.write_channel(self.RETURN)
        +        prompt = self.read_until_pattern(pattern="#")
        +
        +        if self._has_uncommitted_changes(prompt):
        +            # Changes were made but not committed. Discarding changes
        +            output += self._discard()
        +        # Switch to 'running' mode
        +        output += self._running_mode()
        +        return output
        +
        +    def send_config_set(
        +        self,
        +        config_commands: Union[str, Sequence[str], TextIO, None] = None,
        +        exit_config_mode: bool = False,
        +        **kwargs: Any,
        +    ) -> str:
        +        """Nokia SRL requires you not exit from configuration mode."""
        +        return super().send_config_set(
        +            config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
        +        )
        +
        +    def _discard(self) -> str:
        +        """Discard changes made in candidate private mode"""
        +        log.warning("Uncommitted changes will be discarted!")
        +        cmd = "discard stay"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def _running_mode(self) -> str:
        +        """Enter running mode"""
        +        cmd = "enter running"
        +        output = self._send_command_str(
        +            command_string=cmd, strip_prompt=False, strip_command=False
        +        )
        +        return output
        +
        +    def _has_uncommitted_changes(self, prompt: str) -> bool:
        +        """
        +        The asterix (*) next to the mode name indicates that the candidate configuration
        +        has changes that have not yet been committed.
        +
        +        The plus sign (+) in the prompt indicates that the running configuration differs
        +        from the startup configuration. After you enter the save startup command,
        +        the running configuration is synchronized with the startup configuration,
        +        and the plus sign is removed from the prompt.
        +
        +        The exclamation mark (!) in the prompt indicates that another user has commited
        +        changes to the running datastore.
        +        """
        +        matches = re.search(r"\n--{( | \* | \+ | \+\* | \!\+ | \!\* )candidate", prompt)
        +        return True if matches and "*" in matches.group() else False
        +
        +

        Ancestors

        + +

        Methods

        +
        +
        +def commit(self) ‑> str +
        +
        +

        Commit changes by using 'commit stay'.

        +
        + +Expand source code + +
        def commit(self) -> str:
        +    """Commit changes by using 'commit stay'."""
        +    cmd = "commit stay"
        +    output = self._send_command_str(
        +        command_string=cmd, strip_prompt=False, strip_command=False
        +    )
        +    return output
        +
        +
        +
        +def exit_config_mode(self, exit_config: str = '', pattern: str = '') ‑> str +
        +
        +

        Exit the candidate private mode

        +
        + +Expand source code + +
        def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str:
        +    """Exit the candidate private mode"""
        +    output = ""
        +    self.write_channel(self.RETURN)
        +    prompt = self.read_until_pattern(pattern="#")
        +
        +    if self._has_uncommitted_changes(prompt):
        +        # Changes were made but not committed. Discarding changes
        +        output += self._discard()
        +    # Switch to 'running' mode
        +    output += self._running_mode()
        +    return output
        +
        +
        +
        +def save_config(self, cmd: str = 'save startup', confirm: bool = False, confirm_response: str = '') ‑> str +
        +
        +

        Save current running configuration as initial (startup) configuration

        +
        + +Expand source code + +
        def save_config(
        +    self,
        +    cmd: str = "save startup",
        +    confirm: bool = False,
        +    confirm_response: str = "",
        +) -> str:
        +    """Save current running configuration as initial (startup) configuration"""
        +    return self._send_command_str(
        +        command_string=cmd, strip_prompt=False, strip_command=False
        +    )
        +
        +
        +
        +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +
        +
        +

        Nokia SRL requires you not exit from configuration mode.

        +
        + +Expand source code + +
        def send_config_set(
        +    self,
        +    config_commands: Union[str, Sequence[str], TextIO, None] = None,
        +    exit_config_mode: bool = False,
        +    **kwargs: Any,
        +) -> str:
        +    """Nokia SRL requires you not exit from configuration mode."""
        +    return super().send_config_set(
        +        config_commands=config_commands, exit_config_mode=exit_config_mode, **kwargs
        +    )
        +
        +
        +
        +

        Inherited members

        + +
        +
        +
        +
        + +
        + + + \ No newline at end of file diff --git a/docs/netmiko/nokia/nokia_sros.html b/docs/netmiko/nokia/nokia_sros.html index e8d46e0f4..1d7740019 100644 --- a/docs/netmiko/nokia/nokia_sros.html +++ b/docs/netmiko/nokia/nokia_sros.html @@ -3,15 +3,17 @@ - + netmiko.nokia.nokia_sros API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.nokia.nokia_sros

        -Source code + +Expand source code +
        #!/usr/bin/python
         # -*- coding: utf-8 -*-
         # Copyright (c) 2014 - 2022 Kirk Byers
        @@ -177,7 +181,10 @@ 

        Module netmiko.nokia.nokia_sros

        return output def check_config_mode( - self, check_string: str = r"(ex)[", pattern: str = r"@" + self, + check_string: str = r"(ex)[", + pattern: str = r"@", + force_regex: bool = False, ) -> bool: """Check config mode for Nokia SR OS""" if "@" not in self.base_prompt: @@ -426,10 +433,10 @@

        Classes

        class NokiaSros -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Implement methods for interacting with Nokia SR OS devices +

        Implement methods for interacting with Nokia SR OS devices for both SSH and telnet.

        Not applicable in Nokia SR OS (disabled): - exit_enable_mode()

        @@ -446,10 +453,10 @@

        Classes

        - check_enable_mode()

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -488,7 +495,7 @@ 

        Classes

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -533,12 +540,12 @@

        Classes

        :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -546,9 +553,11 @@

        Classes

        :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
        +
        -Source code + +Expand source code +
        class NokiaSros(BaseConnection):
             """
             Implement methods for interacting with Nokia SR OS devices
        @@ -685,7 +694,10 @@ 

        Classes

        return output def check_config_mode( - self, check_string: str = r"(ex)[", pattern: str = r"@" + self, + check_string: str = r"(ex)[", + pattern: str = r"@", + force_regex: bool = False, ) -> bool: """Check config mode for Nokia SR OS""" if "@" not in self.base_prompt: @@ -793,14 +805,19 @@

        Subclasses

        Methods

        -def check_config_mode(self, check_string='(ex)[', pattern='@') +def check_config_mode(self, check_string: str = '(ex)[', pattern: str = '@', force_regex: bool = False) ‑> bool
        -

        Check config mode for Nokia SR OS

        +

        Check config mode for Nokia SR OS

        -Source code + +Expand source code +
        def check_config_mode(
        -    self, check_string: str = r"(ex)[", pattern: str = r"@"
        +    self,
        +    check_string: str = r"(ex)[",
        +    pattern: str = r"@",
        +    force_regex: bool = False,
         ) -> bool:
             """Check config mode for Nokia SR OS"""
             if "@" not in self.base_prompt:
        @@ -812,12 +829,14 @@ 

        Methods

        -def check_enable_mode(self, check_string='in admin mode') +def check_enable_mode(self, check_string: str = 'in admin mode') ‑> bool
        -

        Check if in enable mode.

        +

        Check if in enable mode.

        -Source code + +Expand source code +
        def check_enable_mode(self, check_string: str = "in admin mode") -> bool:
             """Check if in enable mode."""
             cmd = "enable"
        @@ -834,12 +853,14 @@ 

        Methods

        -def cleanup(self, command='logout') +def cleanup(self, command: str = 'logout') ‑> None
        -

        Gracefully exit the SSH session.

        +

        Gracefully exit the SSH session.

        -Source code + +Expand source code +
        def cleanup(self, command: str = "logout") -> None:
             """Gracefully exit the SSH session."""
             try:
        @@ -854,12 +875,14 @@ 

        Methods

        -def commit(self, *args, **kwargs) +def commit(self, *args: Any, **kwargs: Any) ‑> str
        -

        Activate changes from private candidate for Nokia SR OS

        +

        Activate changes from private candidate for Nokia SR OS

        -Source code + +Expand source code +
        def commit(self, *args: Any, **kwargs: Any) -> str:
             """Activate changes from private candidate for Nokia SR OS"""
             output = self._exit_all()
        @@ -877,12 +900,14 @@ 

        Methods

        -def config_mode(self, config_command='edit-config exclusive', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'edit-config exclusive', pattern: str = '', re_flags: int = 0) ‑> str
        -

        Enable config edit-mode for Nokia SR OS

        +

        Enable config edit-mode for Nokia SR OS

        -Source code + +Expand source code +
        def config_mode(
             self,
             config_command: str = "edit-config exclusive",
        @@ -903,12 +928,14 @@ 

        Methods

        -def enable(self, cmd='enable', pattern='ssword', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = 'ssword', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
        -

        Enable SR OS administrative mode

        +

        Enable SR OS administrative mode

        -Source code + +Expand source code +
        def enable(
             self,
             cmd: str = "enable",
        @@ -923,12 +950,14 @@ 

        Methods

        -def exit_config_mode(self, *args, **kwargs) +def exit_config_mode(self, *args: Any, **kwargs: Any) ‑> str
        -

        Disable config edit-mode for Nokia SR OS

        +

        Disable config edit-mode for Nokia SR OS

        -Source code + +Expand source code +
        def exit_config_mode(self, *args: Any, **kwargs: Any) -> str:
             """Disable config edit-mode for Nokia SR OS"""
             output = self._exit_all()
        @@ -951,36 +980,42 @@ 

        Methods

        -def exit_enable_mode(self, *args, **kwargs) +def exit_enable_mode(self, *args: Any, **kwargs: Any) ‑> str
        -

        Nokia SR OS does not have a notion of exiting administrative mode

        +

        Nokia SR OS does not have a notion of exiting administrative mode

        -Source code + +Expand source code +
        def exit_enable_mode(self, *args: Any, **kwargs: Any) -> str:
             """Nokia SR OS does not have a notion of exiting administrative mode"""
             return ""
        -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
        -

        Persist configuration to cflash for Nokia SR OS

        +

        Persist configuration to cflash for Nokia SR OS

        -Source code + +Expand source code +
        def save_config(self, *args: Any, **kwargs: Any) -> str:
             """Persist configuration to cflash for Nokia SR OS"""
             return self._send_command_str(command_string="/admin save", expect_string=r"#")
        -def send_config_set(self, config_commands=None, exit_config_mode=None, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = None, **kwargs: Any) ‑> str
        -

        Model driven CLI requires you not exit from configuration mode.

        +

        Model driven CLI requires you not exit from configuration mode.

        -Source code + +Expand source code +
        def send_config_set(
             self,
             config_commands: Union[str, Sequence[str], TextIO, None] = None,
        @@ -997,12 +1032,14 @@ 

        Methods

        -def set_base_prompt(self, *args, **kwargs) +def set_base_prompt(self, *args: Any, **kwargs: Any) ‑> str
        -

        Remove the > when navigating into the different config level.

        +

        Remove the > when navigating into the different config level.

        -Source code + +Expand source code +
        def set_base_prompt(self, *args: Any, **kwargs: Any) -> str:
             """Remove the > when navigating into the different config level."""
             cur_base_prompt = super().set_base_prompt(*args, **kwargs)
        @@ -1015,12 +1052,14 @@ 

        Methods

        -def strip_prompt(self, *args, **kwargs) +def strip_prompt(self, *args: Any, **kwargs: Any) ‑> str
        -

        Strip prompt from the output.

        +

        Strip prompt from the output.

        -Source code + +Expand source code +
        def strip_prompt(self, *args: Any, **kwargs: Any) -> str:
             """Strip prompt from the output."""
             output = super().strip_prompt(*args, **kwargs)
        @@ -1076,12 +1115,14 @@ 

        Inherited members

        class NokiaSrosFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=False) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = False)
        -

        Class to manage SCP file transfer and associated SSH control channel.

        +

        Class to manage SCP file transfer and associated SSH control channel.

        -Source code + +Expand source code +
        class NokiaSrosFileTransfer(BaseFileTransfer):
             def __init__(
                 self,
        @@ -1217,12 +1258,14 @@ 

        Ancestors

        Methods

        -def check_file_exists(self, remote_cmd='') +def check_file_exists(self, remote_cmd: str = '') ‑> bool
        -

        Check if destination file exists (returns boolean).

        +

        Check if destination file exists (returns boolean).

        -Source code + +Expand source code +
        def check_file_exists(self, remote_cmd: str = "") -> bool:
             """Check if destination file exists (returns boolean)."""
         
        @@ -1246,12 +1289,14 @@ 

        Methods

        -def verify_file(self) +def verify_file(self) ‑> bool
        -

        Verify the file has been transferred correctly based on filesize.

        +

        Verify the file has been transferred correctly based on filesize.

        -Source code + +Expand source code +
        def verify_file(self) -> bool:
             """Verify the file has been transferred correctly based on filesize."""
             if self.direction == "put":
        @@ -1293,16 +1338,16 @@ 

        Inherited members

        class NokiaSrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Nokia SR OS SSH driver.

        +

        Nokia SR OS SSH driver.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -1341,7 +1386,7 @@ 

        Inherited members

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1386,12 +1431,12 @@

        Inherited members

        :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1399,9 +1444,11 @@

        Inherited members

        :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
        +
        -Source code + +Expand source code +
        class NokiaSrosSSH(NokiaSros):
             """Nokia SR OS SSH driver."""
         
        @@ -1463,16 +1510,16 @@ 

        Inherited members

        class NokiaSrosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Nokia SR OS Telnet driver.

        +

        Nokia SR OS Telnet driver.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -1511,7 +1558,7 @@ 

        Inherited members

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1556,12 +1603,12 @@

        Inherited members

        :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1569,9 +1616,11 @@

        Inherited members

        :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
        +
        -Source code + +Expand source code +
        class NokiaSrosTelnet(NokiaSros):
             """Nokia SR OS Telnet driver."""
         
        @@ -1683,9 +1732,7 @@ 

        -

        Generated by pdoc 0.6.3.

        +

        Generated by pdoc 0.10.0.

        - - \ No newline at end of file diff --git a/docs/netmiko/oneaccess/index.html b/docs/netmiko/oneaccess/index.html index 612cc8cd3..51c103220 100644 --- a/docs/netmiko/oneaccess/index.html +++ b/docs/netmiko/oneaccess/index.html @@ -3,15 +3,17 @@ - + netmiko.oneaccess API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.oneaccess

        -Source code + +Expand source code +
        from netmiko.oneaccess.oneaccess_oneos import OneaccessOneOSSSH, OneaccessOneOSTelnet
         
         __all__ = ["OneaccessOneOSSSH", "OneaccessOneOSTelnet"]
        @@ -32,7 +36,7 @@

        Sub-modules

        netmiko.oneaccess.oneaccess_oneos
        -

        Netmiko driver for OneAccess ONEOS

        +

        Netmiko driver for OneAccess ONEOS

        @@ -45,13 +49,15 @@

        Classes

        class OneaccessOneOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSSSH(OneaccessOneOSBase):
             pass
        @@ -112,13 +118,15 @@

        Inherited members

        class OneaccessOneOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSTelnet(OneaccessOneOSBase):
             pass
        @@ -210,9 +218,7 @@

        -

        Generated by pdoc 0.6.3.

        +

        Generated by pdoc 0.10.0.

        - - \ No newline at end of file diff --git a/docs/netmiko/oneaccess/oneaccess_oneos.html b/docs/netmiko/oneaccess/oneaccess_oneos.html index 1d89ad497..f1a44b212 100644 --- a/docs/netmiko/oneaccess/oneaccess_oneos.html +++ b/docs/netmiko/oneaccess/oneaccess_oneos.html @@ -3,15 +3,17 @@ - + netmiko.oneaccess.oneaccess_oneos API documentation - - - - - + + + + + + +
        @@ -22,7 +24,9 @@

        Module netmiko.oneaccess.oneaccess_oneos

        Netmiko driver for OneAccess ONEOS

        -Source code + +Expand source code +
        """Netmiko driver for OneAccess ONEOS"""
         import time
         from typing import Any
        @@ -75,13 +79,15 @@ 

        Classes

        class OneaccessOneOSBase -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSBase(CiscoBaseConnection):
             def __init__(self, *args: Any, **kwargs: Any) -> None:
                 """Init connection - similar as Cisco"""
        @@ -120,12 +126,14 @@ 

        Subclasses

        Methods

        -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
        -

        Save config: write mem

        +

        Save config: write mem

        -Source code + +Expand source code +
        def save_config(
             self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
         ) -> str:
        @@ -136,12 +144,14 @@ 

        Methods

        -def session_preparation(self) +def session_preparation(self) ‑> None
        -

        Prepare connection - disable paging

        +

        Prepare connection - disable paging

        -Source code + +Expand source code +
        def session_preparation(self) -> None:
             """Prepare connection - disable paging"""
             self._test_channel_read()
        @@ -203,13 +213,15 @@ 

        Inherited members

        class OneaccessOneOSSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSSSH(OneaccessOneOSBase):
             pass
        @@ -270,13 +282,15 @@

        Inherited members

        class OneaccessOneOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
        -

        Base Class for cisco-like behavior.

        -

        Init connection - similar as Cisco

        +

        Base Class for cisco-like behavior.

        +

        Init connection - similar as Cisco

        -Source code + +Expand source code +
        class OneaccessOneOSTelnet(OneaccessOneOSBase):
             pass
        @@ -370,9 +384,7 @@

        - - \ No newline at end of file diff --git a/docs/netmiko/ovs/index.html b/docs/netmiko/ovs/index.html index b4c57ddae..d2f5f3c1a 100644 --- a/docs/netmiko/ovs/index.html +++ b/docs/netmiko/ovs/index.html @@ -3,15 +3,17 @@ - + netmiko.ovs API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.ovs

        -Source code + +Expand source code +
        from netmiko.ovs.ovs_linux_ssh import OvsLinuxSSH
         
         __all__ = ["OvsLinuxSSH"]
        @@ -32,7 +36,7 @@

        Sub-modules

        netmiko.ovs.ovs_linux_ssh
        -
        +
        @@ -45,16 +49,16 @@

        Classes

        class OvsLinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Base Class for cisco-like behavior.

        +

        Base Class for cisco-like behavior.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -93,7 +97,7 @@ 

        Classes

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

        Classes

        :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

        Classes

        :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
        +

        -Source code + +Expand source code +
        class OvsLinuxSSH(LinuxSSH):
             pass
        @@ -243,9 +249,7 @@

        Ovs

        - - \ No newline at end of file diff --git a/docs/netmiko/ovs/ovs_linux_ssh.html b/docs/netmiko/ovs/ovs_linux_ssh.html index 848615588..1aaf126a5 100644 --- a/docs/netmiko/ovs/ovs_linux_ssh.html +++ b/docs/netmiko/ovs/ovs_linux_ssh.html @@ -3,15 +3,17 @@ - + netmiko.ovs.ovs_linux_ssh API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.ovs.ovs_linux_ssh

        -Source code + +Expand source code +
        from netmiko.linux.linux_ssh import LinuxSSH
         
         
        @@ -40,16 +44,16 @@ 

        Classes

        class OvsLinuxSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Base Class for cisco-like behavior.

        +

        Base Class for cisco-like behavior.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -88,7 +92,7 @@ 

        Classes

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -133,12 +137,12 @@

        Classes

        :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -146,9 +150,11 @@

        Classes

        :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
        +
        -Source code + +Expand source code +
        class OvsLinuxSSH(LinuxSSH):
             pass
        @@ -233,9 +239,7 @@

        -

        Generated by pdoc 0.6.3.

        +

        Generated by pdoc 0.10.0.

        - - \ No newline at end of file diff --git a/docs/netmiko/paloalto/index.html b/docs/netmiko/paloalto/index.html index bea5de377..6ffb5c23f 100644 --- a/docs/netmiko/paloalto/index.html +++ b/docs/netmiko/paloalto/index.html @@ -3,15 +3,17 @@ - + netmiko.paloalto API documentation - - - - - + + + + + + +
        @@ -21,7 +23,9 @@

        Module netmiko.paloalto

        -Source code + +Expand source code +
        from netmiko.paloalto.paloalto_panos import PaloAltoPanosSSH, PaloAltoPanosTelnet
         
         __all__ = ["PaloAltoPanosSSH", "PaloAltoPanosTelnet"]
        @@ -32,7 +36,7 @@

        Sub-modules

        netmiko.paloalto.paloalto_panos
        -
        +
        @@ -45,19 +49,19 @@

        Classes

        class PaloAltoPanosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
        -

        Implement methods for interacting with PaloAlto devices.

        +

        Implement methods for interacting with PaloAlto devices.

        Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

            Initialize attributes for establishing connection to target device.
         
        -    :param ip: IP address of target device. Not required if `host` is
        +    :param ip: IP address of target device. Not required if <code>host</code> is
                 provided.
         
        -    :param host: Hostname of target device. Not required if `ip` is
        +    :param host: Hostname of target device. Not required if <code>ip</code> is
                     provided.
         
             :param username: Username to authenticate against target device if
        @@ -96,7 +100,7 @@ 

        Classes

        :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -141,12 +145,12 @@

        Classes

        :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -154,9 +158,11 @@

        Classes

        :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
        +

  • -Source code + +Expand source code +
    class PaloAltoPanosSSH(PaloAltoPanosBase):
         def _build_ssh_client(self) -> SSHClient:
             """Prepare for Paramiko SSH connection."""
    @@ -236,19 +242,19 @@ 

    Inherited members

    class PaloAltoPanosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with PaloAlto devices.

    +

    Implement methods for interacting with PaloAlto devices.

    Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -287,7 +293,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -332,12 +338,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -345,9 +351,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class PaloAltoPanosTelnet(PaloAltoPanosBase):
         pass
    @@ -440,9 +448,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/paloalto/paloalto_panos.html b/docs/netmiko/paloalto/paloalto_panos.html index 782396800..d62d8bf34 100644 --- a/docs/netmiko/paloalto/paloalto_panos.html +++ b/docs/netmiko/paloalto/paloalto_panos.html @@ -3,15 +3,17 @@ - + netmiko.paloalto.paloalto_panos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.paloalto.paloalto_panos

    -Source code + +Expand source code +
    from typing import Optional, List, Any, Tuple
     import re
     import warnings
    @@ -110,7 +114,9 @@ 

    Module netmiko.paloalto.paloalto_panos

    """PA devices can be very slow to respond (in certain situations)""" return super().find_prompt(delay_factor=delay_factor, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -287,19 +293,19 @@

    Classes

    class PaloAltoPanosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with PaloAlto devices.

    +

    Implement methods for interacting with PaloAlto devices.

    Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -338,7 +344,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -383,12 +389,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -396,9 +402,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class PaloAltoPanosBase(NoEnable, BaseConnection):
         """
         Implement methods for interacting with PaloAlto devices.
    @@ -436,7 +444,9 @@ 

    Classes

    """PA devices can be very slow to respond (in certain situations)""" return super().find_prompt(delay_factor=delay_factor, pattern=pattern) - def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "]", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -588,24 +598,30 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=']', pattern='') +def check_config_mode(self, check_string: str = ']', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = "]", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "]", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def cleanup(self, command='exit') +def cleanup(self, command: str = 'exit') ‑> None
    -

    Gracefully exit the SSH session.

    +

    Gracefully exit the SSH session.

    -Source code + +Expand source code +
    def cleanup(self, command: str = "exit") -> None:
         """Gracefully exit the SSH session."""
         try:
    @@ -620,10 +636,10 @@ 

    Methods

    -def commit(self, comment='', force=False, partial=False, device_and_network=False, policy_and_objects=False, vsys='', no_vsys=False, read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', force: bool = False, partial: bool = False, device_and_network: bool = False, policy_and_objects: bool = False, vsys: str = '', no_vsys: bool = False, read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    Automatically enters configuration mode

    @@ -632,9 +648,11 @@

    Methods

    (device_and_network or policy_and_objects or vsys or no_vsys) and not partial: Exception

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -713,12 +731,14 @@ 

    Methods

    -def config_mode(self, config_command='configure', pattern='#', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '#', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = r"#", re_flags: int = 0
     ) -> str:
    @@ -729,24 +749,28 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='>') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '>') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r">") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    -def find_prompt(self, delay_factor=5.0, pattern=None) +def find_prompt(self, delay_factor: float = 5.0, pattern: Optional[str] = None) ‑> str
    -

    PA devices can be very slow to respond (in certain situations)

    +

    PA devices can be very slow to respond (in certain situations)

    -Source code + +Expand source code +
    def find_prompt(
         self, delay_factor: float = 5.0, pattern: Optional[str] = None
     ) -> str:
    @@ -755,14 +779,16 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    Disable paging (the '–more–' prompts). -Set the base prompt for interaction ('>').

    +Set the base prompt for interaction ('>').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -788,12 +814,14 @@ 

    Methods

    -def strip_command(self, command_string, output) +def strip_command(self, command_string: str, output: str) ‑> str
    -

    Strip command_string from output string.

    +

    Strip command_string from output string.

    -Source code + +Expand source code +
    def strip_command(self, command_string: str, output: str) -> str:
         """Strip command_string from output string."""
         output_list = output.split(command_string)
    @@ -801,15 +829,17 @@ 

    Methods

    -def strip_context_items(self, a_string) +def strip_context_items(self, a_string: str) ‑> str
    -

    Strip PaloAlto-specific output.

    +

    Strip PaloAlto-specific output.

    PaloAlto will also put a configuration context: [edit]

    -

    This method removes those lines.

    +

    This method removes those lines.

    -Source code + +Expand source code +
    def strip_context_items(self, a_string: str) -> str:
         """Strip PaloAlto-specific output.
     
    @@ -831,12 +861,14 @@ 

    Methods

    -def strip_prompt(self, a_string) +def strip_prompt(self, a_string: str) ‑> str
    -

    Strip the trailing router prompt from the output.

    +

    Strip the trailing router prompt from the output.

    -Source code + +Expand source code +
    def strip_prompt(self, a_string: str) -> str:
         """Strip the trailing router prompt from the output."""
         response_list = a_string.split(self.RESPONSE_RETURN)
    @@ -892,19 +924,19 @@ 

    Inherited members

    class PaloAltoPanosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with PaloAlto devices.

    +

    Implement methods for interacting with PaloAlto devices.

    Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -943,7 +975,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -988,12 +1020,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1001,9 +1033,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class PaloAltoPanosSSH(PaloAltoPanosBase):
         def _build_ssh_client(self) -> SSHClient:
             """Prepare for Paramiko SSH connection."""
    @@ -1083,19 +1117,19 @@ 

    Inherited members

    class PaloAltoPanosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with PaloAlto devices.

    +

    Implement methods for interacting with PaloAlto devices.

    Disables enable() and check_enable_mode() methods. Overrides several methods for PaloAlto-specific compatibility.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -1134,7 +1168,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -1179,12 +1213,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -1192,9 +1226,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class PaloAltoPanosTelnet(PaloAltoPanosBase):
         pass
    @@ -1258,10 +1294,12 @@

    Inherited members

    class SSHClient_interactive
    -

    Set noauth when manually handling SSH authentication.

    -

    Create a new SSHClient.

    +

    Set noauth when manually handling SSH authentication.

    +

    Create a new SSHClient.

    -Source code + +Expand source code +
    class SSHClient_interactive(SSHClient):
         """Set noauth when manually handling SSH authentication."""
     
    @@ -1310,12 +1348,14 @@ 

    Ancestors

    Methods

    -def pa_banner_handler(self, title, instructions, prompt_list) +def pa_banner_handler(self, title: str, instructions: str, prompt_list: List[Tuple[str, bool]]) ‑> List[str]
    -
    +
    -Source code + +Expand source code +
    def pa_banner_handler(
         self, title: str, instructions: str, prompt_list: List[Tuple[str, bool]]
     ) -> List[str]:
    @@ -1381,9 +1421,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/pluribus/index.html b/docs/netmiko/pluribus/index.html index 3f5d5306a..5eb84d089 100644 --- a/docs/netmiko/pluribus/index.html +++ b/docs/netmiko/pluribus/index.html @@ -3,15 +3,17 @@ - + netmiko.pluribus API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.pluribus

    -Source code + +Expand source code +
    # -*- coding: utf-8 -*-
     from netmiko.pluribus.pluribus_ssh import PluribusSSH
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.pluribus.pluribus_ssh
    -
    +
    @@ -46,12 +50,14 @@

    Classes

    class PluribusSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Common methods for Pluribus.

    +

    Common methods for Pluribus.

    -Source code + +Expand source code +
    class PluribusSSH(NoConfig, BaseConnection):
         """Common methods for Pluribus."""
     
    @@ -76,12 +82,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the netmiko session.

    +

    Prepare the netmiko session.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the netmiko session."""
         self._test_channel_read()
    @@ -174,9 +182,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/pluribus/pluribus_ssh.html b/docs/netmiko/pluribus/pluribus_ssh.html index f9885b8cd..50ceebe09 100644 --- a/docs/netmiko/pluribus/pluribus_ssh.html +++ b/docs/netmiko/pluribus/pluribus_ssh.html @@ -3,15 +3,17 @@ - + netmiko.pluribus.pluribus_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.pluribus.pluribus_ssh

    -Source code + +Expand source code +
    import time
     from typing import Any
     
    @@ -57,12 +61,14 @@ 

    Classes

    class PluribusSSH -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Common methods for Pluribus.

    +

    Common methods for Pluribus.

    -Source code + +Expand source code +
    class PluribusSSH(NoConfig, BaseConnection):
         """Common methods for Pluribus."""
     
    @@ -87,12 +93,14 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the netmiko session.

    +

    Prepare the netmiko session.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the netmiko session."""
         self._test_channel_read()
    @@ -180,9 +188,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/quanta/index.html b/docs/netmiko/quanta/index.html index abfa144d1..898d79c14 100644 --- a/docs/netmiko/quanta/index.html +++ b/docs/netmiko/quanta/index.html @@ -3,15 +3,17 @@ - + netmiko.quanta API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.quanta

    -Source code + +Expand source code +
    from netmiko.quanta.quanta_mesh_ssh import QuantaMeshSSH
     
     __all__ = ["QuantaMeshSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.quanta.quanta_mesh_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class QuantaMeshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class QuantaMeshSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read()
    @@ -188,12 +194,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -288,9 +296,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/quanta/quanta_mesh_ssh.html b/docs/netmiko/quanta/quanta_mesh_ssh.html index e89fd5363..4ba8f38cf 100644 --- a/docs/netmiko/quanta/quanta_mesh_ssh.html +++ b/docs/netmiko/quanta/quanta_mesh_ssh.html @@ -3,15 +3,17 @@ - + netmiko.quanta.quanta_mesh_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.quanta.quanta_mesh_ssh

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoSSHConnection
     
     
    @@ -62,16 +66,16 @@ 

    Classes

    class QuantaMeshSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -110,7 +114,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -155,12 +159,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -168,9 +172,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class QuantaMeshSSH(CiscoSSHConnection):
         def session_preparation(self) -> None:
             self._test_channel_read()
    @@ -205,12 +211,14 @@ 

    Ancestors

    Methods

    -def save_config(self, cmd='copy running-config startup-config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'copy running-config startup-config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config

    +

    Saves Config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running-config startup-config",
    @@ -300,9 +308,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/rad/index.html b/docs/netmiko/rad/index.html index 1d449b3f4..567cec3b6 100644 --- a/docs/netmiko/rad/index.html +++ b/docs/netmiko/rad/index.html @@ -3,15 +3,17 @@ - + netmiko.rad API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.rad

    -Source code + +Expand source code +
    from netmiko.rad.rad_etx import RadETXSSH
     from netmiko.rad.rad_etx import RadETXTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.rad.rad_etx
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class RadETXSSH -(**kwargs) +(**kwargs: Any)
    -

    RAD ETX SSH Support.

    +

    RAD ETX SSH Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -139,12 +143,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -152,9 +156,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class RadETXSSH(RadETXBase):
         """RAD ETX SSH Support."""
     
    @@ -220,16 +226,16 @@ 

    Inherited members

    class RadETXTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    RAD ETX Telnet Support.

    +

    RAD ETX Telnet Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -268,7 +274,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -313,12 +319,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -326,9 +332,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RadETXTelnet(RadETXBase):
         """RAD ETX Telnet Support."""
     
    @@ -367,14 +375,16 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='#\\s*$', username_pattern='(?:user>)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '#\\s*$', username_pattern: str = '(?:user>)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    RAD presents with the following on login

    +

    RAD presents with the following on login

    user>

    -

    password> ****

    +

    password> ****

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"#\s*$",
    @@ -487,9 +497,7 @@ 

    R

    - - \ No newline at end of file diff --git a/docs/netmiko/rad/rad_etx.html b/docs/netmiko/rad/rad_etx.html index 234846db8..bb3a7d260 100644 --- a/docs/netmiko/rad/rad_etx.html +++ b/docs/netmiko/rad/rad_etx.html @@ -3,15 +3,17 @@ - + netmiko.rad.rad_etx API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.rad.rad_etx

    -Source code + +Expand source code +
    import time
     from typing import Any
     
    @@ -68,7 +72,10 @@ 

    Module netmiko.rad.rad_etx

    ) def check_config_mode( - self, check_string: str = ">config", pattern: str = "" + self, + check_string: str = ">config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -134,16 +141,16 @@

    Classes

    class RadETXBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    RAD ETX Support, Tested on RAD 203AX, 205A and 220A.

    +

    RAD ETX Support, Tested on RAD 203AX, 205A and 220A.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -182,7 +189,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -227,12 +234,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -240,9 +247,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RadETXBase(NoEnable, BaseConnection):
         """RAD ETX Support, Tested on RAD 203AX, 205A and 220A."""
     
    @@ -282,7 +291,10 @@ 

    Classes

    ) def check_config_mode( - self, check_string: str = ">config", pattern: str = "" + self, + check_string: str = ">config", + pattern: str = "", + force_regex: bool = False, ) -> bool: """ Checks if the device is in configuration mode or not. @@ -310,15 +322,20 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string='>config', pattern='') +def check_config_mode(self, check_string: str = '>config', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    -

    Rad config starts with baseprompt>config.

    +

    Checks if the device is in configuration mode or not.

    +

    Rad config starts with baseprompt>config.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = ">config", pattern: str = ""
    +    self,
    +    check_string: str = ">config",
    +    pattern: str = "",
    +    force_regex: bool = False,
     ) -> bool:
         """
         Checks if the device is in configuration mode or not.
    @@ -329,12 +346,14 @@ 

    Methods

    -def config_mode(self, config_command='config', pattern='>config', re_flags=0) +def config_mode(self, config_command: str = 'config', pattern: str = '>config', re_flags: int = 0) ‑> str
    -

    Enter into configuration mode on remote device.

    +

    Enter into configuration mode on remote device.

    -Source code + +Expand source code +
    def config_mode(
         self,
         config_command: str = "config",
    @@ -348,12 +367,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit all', pattern='#') +def exit_config_mode(self, exit_config: str = 'exit all', pattern: str = '#') ‑> str
    -

    Exit from configuration mode.

    +

    Exit from configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit all", pattern: str = "#"
     ) -> str:
    @@ -362,12 +383,14 @@ 

    Methods

    -def save_config(self, cmd='admin save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'admin save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using admin save.

    +

    Saves Config Using admin save.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "admin save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -433,16 +456,16 @@ 

    Inherited members

    class RadETXSSH -(**kwargs) +(**kwargs: Any)
    -

    RAD ETX SSH Support.

    +

    RAD ETX SSH Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -481,7 +504,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -526,12 +549,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -539,9 +562,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RadETXSSH(RadETXBase):
         """RAD ETX SSH Support."""
     
    @@ -607,16 +632,16 @@ 

    Inherited members

    class RadETXTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    RAD ETX Telnet Support.

    +

    RAD ETX Telnet Support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -655,7 +680,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -700,12 +725,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -713,9 +738,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RadETXTelnet(RadETXBase):
         """RAD ETX Telnet Support."""
     
    @@ -754,14 +781,16 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#\\s*$', alt_prompt_terminator='#\\s*$', username_pattern='(?:user>)', pwd_pattern='assword', delay_factor=1.0, max_loops=20) +def telnet_login(self, pri_prompt_terminator: str = '#\\s*$', alt_prompt_terminator: str = '#\\s*$', username_pattern: str = '(?:user>)', pwd_pattern: str = 'assword', delay_factor: float = 1.0, max_loops: int = 20) ‑> str
    -

    RAD presents with the following on login

    +

    RAD presents with the following on login

    user>

    -

    password> ****

    +

    password> ****

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = r"#\s*$",
    @@ -878,9 +907,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/raisecom/index.html b/docs/netmiko/raisecom/index.html index d41a2d803..12f855256 100644 --- a/docs/netmiko/raisecom/index.html +++ b/docs/netmiko/raisecom/index.html @@ -3,15 +3,17 @@ - + netmiko.raisecom API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.raisecom

    -Source code + +Expand source code +
    from netmiko.raisecom.raisecom_roap import RaisecomRoapSSH
     from netmiko.raisecom.raisecom_roap import RaisecomRoapTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.raisecom.raisecom_roap
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class RaisecomRoapSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -139,12 +143,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -152,9 +156,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class RaisecomRoapSSH(RaisecomRoapBase):
         def special_login_handler(self, delay_factor: float = 1.0) -> None:
             """
    @@ -190,14 +196,16 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Raisecom presents with the following on login (in certain OS versions) +

    Raisecom presents with the following on login (in certain OS versions) Login: user -Password:****

    +Password:****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """
         Raisecom presents with the following on login (in certain OS versions)
    @@ -275,16 +283,16 @@ 

    Inherited members

    class RaisecomRoapTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -323,7 +331,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -368,12 +376,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -381,9 +389,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RaisecomRoapTelnet(RaisecomRoapBase):
         @staticmethod
         def _process_option(telnet_sock: socket, cmd: bytes, opt: bytes) -> None:
    @@ -566,9 +576,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/raisecom/raisecom_roap.html b/docs/netmiko/raisecom/raisecom_roap.html index 2fce28543..2f91259e0 100644 --- a/docs/netmiko/raisecom/raisecom_roap.html +++ b/docs/netmiko/raisecom/raisecom_roap.html @@ -3,15 +3,17 @@ - + netmiko.raisecom.raisecom_roap API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.raisecom.raisecom_roap

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoBaseConnection
     import re
     import time
    @@ -42,7 +46,9 @@ 

    Module netmiko.raisecom.raisecom_roap

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ @@ -192,16 +198,16 @@

    Classes

    class RaisecomRoapBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -240,7 +246,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -285,12 +291,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -298,9 +304,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RaisecomRoapBase(CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -312,7 +320,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ @@ -344,13 +354,17 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +def check_config_mode(self, check_string: str = ')#', pattern: str = '#', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False
    +) -> bool:
         """
         Checks if the device is in configuration mode or not.
         """
    @@ -358,12 +372,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -425,16 +441,16 @@ 

    Inherited members

    class RaisecomRoapSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -473,7 +489,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -518,12 +534,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -531,9 +547,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RaisecomRoapSSH(RaisecomRoapBase):
         def special_login_handler(self, delay_factor: float = 1.0) -> None:
             """
    @@ -569,14 +587,16 @@ 

    Ancestors

    Methods

    -def special_login_handler(self, delay_factor=1.0) +def special_login_handler(self, delay_factor: float = 1.0) ‑> None
    -

    Raisecom presents with the following on login (in certain OS versions) +

    Raisecom presents with the following on login (in certain OS versions) Login: user -Password:****

    +Password:****

    -Source code + +Expand source code +
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
         """
         Raisecom presents with the following on login (in certain OS versions)
    @@ -654,16 +674,16 @@ 

    Inherited members

    class RaisecomRoapTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -702,7 +722,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -747,12 +767,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -760,9 +780,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RaisecomRoapTelnet(RaisecomRoapBase):
         @staticmethod
         def _process_option(telnet_sock: socket, cmd: bytes, opt: bytes) -> None:
    @@ -947,9 +969,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ruckus/index.html b/docs/netmiko/ruckus/index.html index cec5ffe17..ca808e4fd 100644 --- a/docs/netmiko/ruckus/index.html +++ b/docs/netmiko/ruckus/index.html @@ -3,15 +3,17 @@ - + netmiko.ruckus API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ruckus

    -Source code + +Expand source code +
    from netmiko.ruckus.ruckus_fastiron import RuckusFastironSSH
     from netmiko.ruckus.ruckus_fastiron import RuckusFastironTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.ruckus.ruckus_fastiron
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class RuckusFastironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -139,12 +143,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -152,9 +156,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class RuckusFastironSSH(RuckusFastironBase):
         pass
    @@ -216,16 +222,16 @@

    Inherited members

    class RuckusFastironTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -264,7 +270,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -309,12 +315,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -322,9 +328,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RuckusFastironTelnet(RuckusFastironBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -439,9 +447,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ruckus/ruckus_fastiron.html b/docs/netmiko/ruckus/ruckus_fastiron.html index 023186b1a..7a22001be 100644 --- a/docs/netmiko/ruckus/ruckus_fastiron.html +++ b/docs/netmiko/ruckus/ruckus_fastiron.html @@ -3,15 +3,17 @@ - + netmiko.ruckus.ruckus_fastiron API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ruckus.ruckus_fastiron

    -Source code + +Expand source code +
    import re
     import time
     from socket import socket
    @@ -145,16 +149,16 @@ 

    Classes

    class RuckusFastironBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -193,7 +197,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -238,12 +242,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -251,9 +255,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RuckusFastironBase(CiscoSSHConnection):
         """Ruckus FastIron aka ICX support."""
     
    @@ -334,23 +340,25 @@ 

    Ancestors

    Subclasses

    Methods

    -def enable(self, cmd='enable', pattern='(ssword|User Name)', enable_pattern=None, re_flags=re.IGNORECASE) +def enable(self, cmd: str = 'enable', pattern: str = '(ssword|User Name)', enable_pattern: Optional[str] = None, re_flags: int = re.IGNORECASE) ‑> str
    -

    Enter enable mode. +

    Enter enable mode. With RADIUS can prompt for User Name SSH@Lab-ICX7250>en User Name:service_netmiko Password: -SSH@Lab-ICX7250#

    +SSH@Lab-ICX7250#

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "enable",
    @@ -404,12 +412,14 @@ 

    Methods

    -def save_config(self, cmd='write mem', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write mem', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves configuration.

    +

    Saves configuration.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write mem", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -420,12 +430,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    FastIron requires to be enable mode to disable paging.

    +

    FastIron requires to be enable mode to disable paging.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """FastIron requires to be enable mode to disable paging."""
         self._test_channel_read()
    @@ -486,16 +498,16 @@ 

    Inherited members

    class RuckusFastironSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -534,7 +546,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -579,12 +591,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -592,9 +604,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RuckusFastironSSH(RuckusFastironBase):
         pass
    @@ -656,16 +670,16 @@

    Inherited members

    class RuckusFastironTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Ruckus FastIron aka ICX support.

    +

    Ruckus FastIron aka ICX support.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -704,7 +718,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -749,12 +763,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -762,9 +776,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RuckusFastironTelnet(RuckusFastironBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -882,9 +898,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ruijie/index.html b/docs/netmiko/ruijie/index.html index ec693b736..b22cfac3a 100644 --- a/docs/netmiko/ruijie/index.html +++ b/docs/netmiko/ruijie/index.html @@ -3,15 +3,17 @@ - + netmiko.ruijie API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ruijie

    -Source code + +Expand source code +
    from netmiko.ruijie.ruijie_os import RuijieOSSSH, RuijieOSTelnet
     
     __all__ = ["RuijieOSSSH", "RuijieOSTelnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.ruijie.ruijie_os
    -

    Ruijie RGOS Support

    +

    Ruijie RGOS Support

    @@ -45,16 +49,16 @@

    Classes

    class RuijieOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class RuijieOSSSH(RuijieOSBase):
     
         pass
    @@ -215,16 +221,16 @@

    Inherited members

    class RuijieOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -263,7 +269,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -308,12 +314,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -321,9 +327,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RuijieOSTelnet(RuijieOSBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -418,9 +426,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ruijie/ruijie_os.html b/docs/netmiko/ruijie/ruijie_os.html index 8d281c753..a7d61ff16 100644 --- a/docs/netmiko/ruijie/ruijie_os.html +++ b/docs/netmiko/ruijie/ruijie_os.html @@ -3,15 +3,17 @@ - + netmiko.ruijie.ruijie_os API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.ruijie.ruijie_os

    Ruijie RGOS Support

    -Source code + +Expand source code +
    """Ruijie RGOS Support"""
     import time
     from typing import Any
    @@ -75,16 +79,16 @@ 

    Classes

    class RuijieOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -123,7 +127,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -168,12 +172,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -181,9 +185,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RuijieOSBase(CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -218,12 +224,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save config: write

    +

    Save config: write

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -234,12 +242,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -303,16 +313,16 @@ 

    Inherited members

    class RuijieOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -351,7 +361,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -396,12 +406,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -409,9 +419,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RuijieOSSSH(RuijieOSBase):
     
         pass
    @@ -473,16 +485,16 @@

    Inherited members

    class RuijieOSTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -521,7 +533,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -566,12 +578,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -579,9 +591,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class RuijieOSTelnet(RuijieOSBase):
         def __init__(self, *args: Any, **kwargs: Any) -> None:
             default_enter = kwargs.get("default_enter")
    @@ -678,9 +692,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/scp_functions.html b/docs/netmiko/scp_functions.html index 2287195d7..d5fac3392 100644 --- a/docs/netmiko/scp_functions.html +++ b/docs/netmiko/scp_functions.html @@ -3,15 +3,17 @@ - + netmiko.scp_functions API documentation - - - - - + + + + + + +
    @@ -24,7 +26,9 @@

    Module netmiko.scp_functions

    Supports file get and file put operations.

    SCP requires a separate SSH connection for a control channel.

    -Source code + +Expand source code +
    """
     Netmiko SCP operations.
     
    @@ -192,18 +196,20 @@ 

    Module netmiko.scp_functions

    Functions

    -def file_transfer(ssh_conn, source_file, dest_file, file_system=None, direction='put', disable_md5=False, inline_transfer=False, overwrite_file=False, socket_timeout=10.0, progress=None, progress4=None, verify_file=None) +def file_transfer(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', disable_md5: bool = False, inline_transfer: bool = False, overwrite_file: bool = False, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, verify_file: Optional[bool] = None) ‑> Dict[str, bool]
    -

    Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices.

    +

    Use Secure Copy or Inline (IOS-only) to transfer files to/from network devices.

    inline_transfer ONLY SUPPORTS TEXT FILES and will not support binary file transfers.

    return { 'file_exists': boolean, 'file_transferred': boolean, 'file_verified': boolean, -}

    +}

    -Source code + +Expand source code +
    def file_transfer(
         ssh_conn: "BaseConnection",
         source_file: str,
    @@ -312,12 +318,14 @@ 

    Functions

    -def progress_bar(filename, size, sent, peername=None) +def progress_bar(filename: ~AnyStr, size: int, sent: int, peername: Optional[str] = None) ‑> None
    -
    +
    -Source code + +Expand source code +
    def progress_bar(
         filename: AnyStr, size: int, sent: int, peername: Optional[str] = None
     ) -> None:
    @@ -347,12 +355,14 @@ 

    Functions

    -def verifyspace_and_transferfile(scp_transfer) +def verifyspace_and_transferfile(scp_transfer: BaseFileTransfer) ‑> None
    -

    Verify space and transfer file.

    +

    Verify space and transfer file.

    -Source code + +Expand source code +
    def verifyspace_and_transferfile(scp_transfer: BaseFileTransfer) -> None:
         """Verify space and transfer file."""
         if not scp_transfer.verify_space_available():
    @@ -387,9 +397,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/scp_handler.html b/docs/netmiko/scp_handler.html index 83dd64efd..8a1d72f45 100644 --- a/docs/netmiko/scp_handler.html +++ b/docs/netmiko/scp_handler.html @@ -3,15 +3,17 @@ - + netmiko.scp_handler API documentation - - - - - + + + + + + +
    @@ -24,7 +26,9 @@

    Module netmiko.scp_handler

    Supports file get and file put operations.

    SCP requires a separate SSH connection for a control channel.

    -Source code + +Expand source code +
    """
     Netmiko SCP operations.
     
    @@ -467,12 +471,14 @@ 

    Classes

    class BaseFileTransfer -(ssh_conn, source_file, dest_file, file_system=None, direction='put', socket_timeout=10.0, progress=None, progress4=None, hash_supported=True) +(ssh_conn: BaseConnection, source_file: str, dest_file: str, file_system: Optional[str] = None, direction: str = 'put', socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None, hash_supported: bool = True)
    -

    Class to manage SCP file transfer and associated SSH control channel.

    +

    Class to manage SCP file transfer and associated SSH control channel.

    -Source code + +Expand source code +
    class BaseFileTransfer(object):
         """Class to manage SCP file transfer and associated SSH control channel."""
     
    @@ -835,25 +841,28 @@ 

    Classes

    Subclasses

    Static methods

    -def process_md5(md5_output, pattern='=\\s+(\\S+)') +def process_md5(md5_output: str, pattern: str = '=\\s+(\\S+)') ‑> str
    -

    Process the string to retrieve the MD5 hash

    +

    Process the string to retrieve the MD5 hash

    Output from Cisco IOS (ASA is similar) .MD5 of flash:file_name Done! -verify /md5 (flash:file_name) = 410db2a7015eaa42b1fe71f1bf3d59a2

    +verify /md5 (flash:file_name) = 410db2a7015eaa42b1fe71f1bf3d59a2

    -Source code + +Expand source code +
    @staticmethod
     def process_md5(md5_output: str, pattern: str = r"=\s+(\S+)") -> str:
         """
    @@ -874,12 +883,14 @@ 

    Static methods

    Methods

    -def check_file_exists(self, remote_cmd='') +def check_file_exists(self, remote_cmd: str = '') ‑> bool
    -

    Check if the dest_file already exists on the file system (return boolean).

    +

    Check if the dest_file already exists on the file system (return boolean).

    -Source code + +Expand source code +
    def check_file_exists(self, remote_cmd: str = "") -> bool:
         """Check if the dest_file already exists on the file system (return boolean)."""
         if self.direction == "put":
    @@ -904,12 +915,14 @@ 

    Methods

    -def close_scp_chan(self) +def close_scp_chan(self) ‑> None
    -

    Close the SCP connection to the remote network device.

    +

    Close the SCP connection to the remote network device.

    -Source code + +Expand source code +
    def close_scp_chan(self) -> None:
         """Close the SCP connection to the remote network device."""
         self.scp_conn.close()
    @@ -917,12 +930,14 @@ 

    Methods

    -def compare_md5(self) +def compare_md5(self) ‑> bool
    -

    Compare md5 of file on network device to md5 of local file.

    +

    Compare md5 of file on network device to md5 of local file.

    -Source code + +Expand source code +
    def compare_md5(self) -> bool:
         """Compare md5 of file on network device to md5 of local file."""
         if self.direction == "put":
    @@ -936,13 +951,15 @@ 

    Methods

    -def disable_scp(self, cmd='no ip scp server enable') +def disable_scp(self, cmd: str = 'no ip scp server enable') ‑> None
    -

    Disable SCP on remote device.

    -

    Defaults to Cisco IOS command

    +

    Disable SCP on remote device.

    +

    Defaults to Cisco IOS command

    -Source code + +Expand source code +
    def disable_scp(self, cmd: str = "no ip scp server enable") -> None:
         """
         Disable SCP on remote device.
    @@ -953,13 +970,15 @@ 

    Methods

    -def enable_scp(self, cmd='ip scp server enable') +def enable_scp(self, cmd: str = 'ip scp server enable') ‑> None
    -

    Enable SCP on remote device.

    -

    Defaults to Cisco IOS command

    +

    Enable SCP on remote device.

    +

    Defaults to Cisco IOS command

    -Source code + +Expand source code +
    def enable_scp(self, cmd: str = "ip scp server enable") -> None:
         """
         Enable SCP on remote device.
    @@ -970,12 +989,14 @@ 

    Methods

    -def establish_scp_conn(self) +def establish_scp_conn(self) ‑> None
    -

    Establish SCP connection.

    +

    Establish SCP connection.

    -Source code + +Expand source code +
    def establish_scp_conn(self) -> None:
         """Establish SCP connection."""
         self.scp_conn = SCPConn(
    @@ -987,10 +1008,10 @@ 

    Methods

    -def file_md5(self, file_name, add_newline=False) +def file_md5(self, file_name: str, add_newline: bool = False) ‑> str
    -

    Compute MD5 hash of file.

    +

    Compute MD5 hash of file.

    add_newline is needed to support Cisco IOS MD5 calculation which expects the newline in the string

    Args

    @@ -999,9 +1020,11 @@

    Args

    name of file to get md5 digest of
    add_newline
    add newline to end of file contents or not
    -

    +

    -Source code + +Expand source code +
    def file_md5(self, file_name: str, add_newline: bool = False) -> str:
         """Compute MD5 hash of file.
     
    @@ -1026,12 +1049,14 @@ 

    Args

    -def get_file(self) +def get_file(self) ‑> None
    -

    SCP copy the file from the remote device to local system.

    +

    SCP copy the file from the remote device to local system.

    -Source code + +Expand source code +
    def get_file(self) -> None:
         """SCP copy the file from the remote device to local system."""
         source_file = f"{self.file_system}/{self.source_file}"
    @@ -1040,12 +1065,14 @@ 

    Args

    -def local_space_available(self) +def local_space_available(self) ‑> int
    -

    Return space available on local filesystem.

    +

    Return space available on local filesystem.

    -Source code + +Expand source code +
    def local_space_available(self) -> int:
         """Return space available on local filesystem."""
         if sys.platform == "win32":
    @@ -1062,12 +1089,14 @@ 

    Args

    -def put_file(self) +def put_file(self) ‑> None
    -

    SCP copy the file from the local system to the remote device.

    +

    SCP copy the file from the local system to the remote device.

    -Source code + +Expand source code +
    def put_file(self) -> None:
         """SCP copy the file from the local system to the remote device."""
         destination = f"{self.file_system}/{self.dest_file}"
    @@ -1077,12 +1106,14 @@ 

    Args

    -def remote_file_size(self, remote_cmd='', remote_file=None) +def remote_file_size(self, remote_cmd: str = '', remote_file: Optional[str] = None) ‑> int
    -

    Get the file size of the remote file.

    +

    Get the file size of the remote file.

    -Source code + +Expand source code +
    def remote_file_size(
         self, remote_cmd: str = "", remote_file: Optional[str] = None
     ) -> int:
    @@ -1117,13 +1148,15 @@ 

    Args

    -def remote_md5(self, base_cmd='verify /md5', remote_file=None) +def remote_md5(self, base_cmd: str = 'verify /md5', remote_file: Optional[str] = None) ‑> str
    -

    Calculate remote MD5 and returns the hash.

    -

    This command can be CPU intensive on the remote device.

    +

    Calculate remote MD5 and returns the hash.

    +

    This command can be CPU intensive on the remote device.

    -Source code + +Expand source code +
    def remote_md5(
         self, base_cmd: str = "verify /md5", remote_file: Optional[str] = None
     ) -> str:
    @@ -1143,12 +1176,14 @@ 

    Args

    -def remote_space_available(self, search_pattern='(\\d+) \\w+ free') +def remote_space_available(self, search_pattern: str = '(\\d+) \\w+ free') ‑> int
    -

    Return space available on remote device.

    +

    Return space available on remote device.

    -Source code + +Expand source code +
    def remote_space_available(self, search_pattern: str = r"(\d+) \w+ free") -> int:
         """Return space available on remote device."""
         remote_cmd = f"dir {self.file_system}"
    @@ -1166,12 +1201,14 @@ 

    Args

    -def transfer_file(self) +def transfer_file(self) ‑> None
    -

    SCP transfer file.

    +

    SCP transfer file.

    -Source code + +Expand source code +
    def transfer_file(self) -> None:
         """SCP transfer file."""
         if self.direction == "put":
    @@ -1183,24 +1220,28 @@ 

    Args

    -def verify_file(self) +def verify_file(self) ‑> bool
    -

    Verify the file has been transferred correctly.

    +

    Verify the file has been transferred correctly.

    -Source code + +Expand source code +
    def verify_file(self) -> bool:
         """Verify the file has been transferred correctly."""
         return self.compare_md5()
    -def verify_space_available(self, search_pattern='(\\d+) \\w+ free') +def verify_space_available(self, search_pattern: str = '(\\d+) \\w+ free') ‑> bool
    -

    Verify sufficient space is available on destination file system (return boolean).

    +

    Verify sufficient space is available on destination file system (return boolean).

    -Source code + +Expand source code +
    def verify_space_available(self, search_pattern: str = r"(\d+) \w+ free") -> bool:
         """Verify sufficient space is available on destination file system (return boolean)."""
         if self.direction == "put":
    @@ -1216,13 +1257,15 @@ 

    Args

    class SCPConn -(ssh_conn, socket_timeout=10.0, progress=None, progress4=None) +(ssh_conn: BaseConnection, socket_timeout: float = 10.0, progress: Optional[Callable[..., Any]] = None, progress4: Optional[Callable[..., Any]] = None)
    -

    Establish a secure copy channel to the remote network device.

    -

    Must close the SCP connection to get the file to write to the remote filesystem

    +

    Establish a secure copy channel to the remote network device.

    +

    Must close the SCP connection to get the file to write to the remote filesystem

    -Source code + +Expand source code +
    class SCPConn(object):
         """
         Establish a secure copy channel to the remote network device.
    @@ -1274,24 +1317,28 @@ 

    Args

    Methods

    -def close(self) +def close(self) ‑> None
    -

    Close the SCP connection.

    +

    Close the SCP connection.

    -Source code + +Expand source code +
    def close(self) -> None:
         """Close the SCP connection."""
         self.scp_conn.close()
    -def establish_scp_conn(self) +def establish_scp_conn(self) ‑> None
    -

    Establish the secure copy connection.

    +

    Establish the secure copy connection.

    -Source code + +Expand source code +
    def establish_scp_conn(self) -> None:
         """Establish the secure copy connection."""
         ssh_connect_params = self.ssh_ctl_chan._connect_params_dict()
    @@ -1306,36 +1353,42 @@ 

    Methods

    -def scp_get_file(self, source_file, dest_file) +def scp_get_file(self, source_file: str, dest_file: str) ‑> None
    -

    Get file using SCP.

    +

    Get file using SCP.

    -Source code + +Expand source code +
    def scp_get_file(self, source_file: str, dest_file: str) -> None:
         """Get file using SCP."""
         self.scp_client.get(source_file, dest_file)
    -def scp_put_file(self, source_file, dest_file) +def scp_put_file(self, source_file: str, dest_file: str) ‑> None
    -

    Put file using SCP.

    +

    Put file using SCP.

    -Source code + +Expand source code +
    def scp_put_file(self, source_file: str, dest_file: str) -> None:
         """Put file using SCP."""
         self.scp_client.put(source_file, dest_file)
    -def scp_transfer_file(self, source_file, dest_file) +def scp_transfer_file(self, source_file: str, dest_file: str) ‑> None
    -

    Put file using SCP (for backwards compatibility).

    +

    Put file using SCP (for backwards compatibility).

    -Source code + +Expand source code +
    def scp_transfer_file(self, source_file: str, dest_file: str) -> None:
         """Put file using SCP (for backwards compatibility)."""
         self.scp_client.put(source_file, dest_file)
    @@ -1397,9 +1450,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/session_log.html b/docs/netmiko/session_log.html index 419f0ca7f..da58de640 100644 --- a/docs/netmiko/session_log.html +++ b/docs/netmiko/session_log.html @@ -3,15 +3,17 @@ - + netmiko.session_log API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.session_log

    -Source code + +Expand source code +
    import io
     from netmiko.utilities import write_bytes
     from typing import Dict, Any, Union, Optional, TextIO
    @@ -105,12 +109,14 @@ 

    Classes

    class SessionLog -(file_name=None, buffered_io=None, file_mode='write', file_encoding='utf-8', no_log=None, record_writes=False) +(file_name: Optional[str] = None, buffered_io: Optional[io.BufferedIOBase] = None, file_mode: str = 'write', file_encoding: str = 'utf-8', no_log: Dict[str, Any] = None, record_writes: bool = False)
    -
    +
    -Source code + +Expand source code +
    class SessionLog:
         def __init__(
             self,
    @@ -180,12 +186,14 @@ 

    Classes

    Methods

    -def close(self) +def close(self) ‑> None
    -

    Close the session_log file (if it is a file that we opened).

    +

    Close the session_log file (if it is a file that we opened).

    -Source code + +Expand source code +
    def close(self) -> None:
         """Close the session_log file (if it is a file that we opened)."""
         if self.session_log and self._session_log_close:
    @@ -194,12 +202,14 @@ 

    Methods

    -def open(self) +def open(self) ‑> None
    -

    Open the session_log file.

    +

    Open the session_log file.

    -Source code + +Expand source code +
    def open(self) -> None:
         """Open the session_log file."""
         if self.file_name is None:
    @@ -216,12 +226,14 @@ 

    Methods

    -def write(self, data) +def write(self, data: str) ‑> None
    -
    +
    -Source code + +Expand source code +
    def write(self, data: str) -> None:
         if self.session_log is not None and len(data) > 0:
             # Hide the password and secret in the session_log
    @@ -271,9 +283,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/sixwind/index.html b/docs/netmiko/sixwind/index.html index 68802591d..7f4ddb656 100644 --- a/docs/netmiko/sixwind/index.html +++ b/docs/netmiko/sixwind/index.html @@ -3,15 +3,17 @@ - + netmiko.sixwind API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.sixwind

    -Source code + +Expand source code +
    from netmiko.sixwind.sixwind_os import SixwindOSSSH
     
     __all__ = ["SixwindOSSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.sixwind.sixwind_os
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class SixwindOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -145,12 +149,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -158,9 +162,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class SixwindOSSSH(SixwindOSBase):
     
         pass
    @@ -251,9 +257,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/sixwind/sixwind_os.html b/docs/netmiko/sixwind/sixwind_os.html index 71fbc3476..1bb7eb40c 100644 --- a/docs/netmiko/sixwind/sixwind_os.html +++ b/docs/netmiko/sixwind/sixwind_os.html @@ -3,15 +3,17 @@ - + netmiko.sixwind.sixwind_os API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.sixwind.sixwind_os

    -Source code + +Expand source code +
    from typing import Optional, Any
     import time
     import warnings
    @@ -111,7 +115,9 @@ 

    Module netmiko.sixwind.sixwind_os

    return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -145,10 +151,10 @@

    Classes

    class SixwindOSBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -158,10 +164,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -200,7 +206,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -245,12 +251,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -258,9 +264,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class SixwindOSBase(NoEnable, CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -342,7 +350,9 @@ 

    Classes

    return super().exit_config_mode(exit_config=exit_config, pattern=pattern) - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks whether in configuration mode. Returns a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -372,27 +382,33 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string='#', pattern='') +def check_config_mode(self, check_string: str = '#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks whether in configuration mode. Returns a boolean.

    +

    Checks whether in configuration mode. Returns a boolean.

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks whether in configuration mode. Returns a boolean."""
     
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Raise an error and return the failure if the commit fails.

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -431,24 +447,28 @@ 

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    6WIND requires no-pager at the end of command, not implemented at this time.

    +

    6WIND requires no-pager at the end of command, not implemented at this time.

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """6WIND requires no-pager at the end of command, not implemented at this time."""
         pass
    -def exit_config_mode(self, exit_config='exit', pattern='>') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '>') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r">") -> str:
         """Exit configuration mode."""
     
    @@ -456,12 +476,14 @@ 

    Methods

    -def save_config(self, cmd='copy running startup', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'copy running startup', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    Save Config for 6WIND

    +

    Save Config for 6WIND

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "copy running startup",
    @@ -476,12 +498,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self.ansi_escape_codes = True
    @@ -493,12 +517,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='>', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '>', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -564,10 +590,10 @@ 

    Inherited members

    class SixwindOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -577,10 +603,10 @@

    Inherited members

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -619,7 +645,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -664,12 +690,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -677,9 +703,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class SixwindOSSSH(SixwindOSBase):
     
         pass
    @@ -777,9 +805,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/snmp_autodetect.html b/docs/netmiko/snmp_autodetect.html index 819d62b05..f4dbd0b4f 100644 --- a/docs/netmiko/snmp_autodetect.html +++ b/docs/netmiko/snmp_autodetect.html @@ -3,16 +3,18 @@ - + netmiko.snmp_autodetect API documentation - - - - - + + + + + + +
    @@ -35,7 +37,9 @@

    Example:

    Note, pysnmp is a required dependency for SNMPDetect and is intentionally not included in netmiko requirements. So installation of pysnmp might be required.

    -Source code + +Expand source code +
    """
     This module is used to auto-detect the type of a device in order to automatically create a
     Netmiko connection.
    @@ -382,6 +386,7 @@ 

    Example:

    self._response_cache[oid] = snmp_response # See if we had a match + assert isinstance(snmp_response, str) if re.search(regex, snmp_response): assert isinstance(device_type, str) return device_type @@ -400,16 +405,16 @@

    Classes

    class SNMPDetect -(hostname, snmp_version='v3', snmp_port=161, community=None, user='', auth_key='', encrypt_key='', auth_proto='sha', encrypt_proto='aes128') +(hostname: str, snmp_version: str = 'v3', snmp_port: int = 161, community: Optional[str] = None, user: str = '', auth_key: str = '', encrypt_key: str = '', auth_proto: str = 'sha', encrypt_proto: str = 'aes128')
    -

    The SNMPDetect class tries to automatically determine the device type.

    +

    The SNMPDetect class tries to automatically determine the device type.

    Typically this will use the MIB-2 SysDescr and regular expressions.

    Parameters

    hostname : str
    The name or IP address of the hostname we want to guess the type
    -
    snmp_version : str, optional ('v1', 'v2c' or 'v3')
    +
    snmp_version : str, optional ('v1', 'v2c' or 'v3')
    The SNMP version that is running on the device (default: 'v3')
    snmp_port : int, optional
    The UDP port on which SNMP is listening (default: 161)
    @@ -421,9 +426,9 @@

    Parameters

    The SNMPv3 authentication key (default: '')
    encrypt_key : str, optional
    The SNMPv3 encryption key (default: '')
    -
    auth_proto : str, optional ('des', '3des', 'aes128', 'aes192', 'aes256')
    +
    auth_proto : str, optional ('des', '3des', 'aes128', 'aes192', 'aes256')
    The SNMPv3 authentication protocol (default: 'aes128')
    -
    encrypt_proto : str, optional ('sha', 'md5')
    +
    encrypt_proto : str, optional ('sha', 'md5')
    The SNMPv3 encryption protocol (default: 'sha')

    Attributes

    @@ -449,9 +454,11 @@

    Attributes

    Methods

    autodetect() -Try to determine the device type.

    +Try to determine the device type.

    -Source code + +Expand source code +
    class SNMPDetect(object):
         """
         The SNMPDetect class tries to automatically determine the device type.
    @@ -672,6 +679,7 @@ 

    Methods

    self._response_cache[oid] = snmp_response # See if we had a match + assert isinstance(snmp_response, str) if re.search(regex, snmp_response): assert isinstance(device_type, str) return device_type @@ -681,10 +689,10 @@

    Methods

    Methods

    -def autodetect(self) +def autodetect(self) ‑> Optional[str]
    -

    Try to guess the device_type using SNMP GET based on the SNMP_MAPPER dict. The type which +

    Try to guess the device_type using SNMP GET based on the SNMP_MAPPER dict. The type which is returned is directly matching the name in netmiko.ssh_dispatcher.CLASS_MAPPER_BASE dict.

    Thus you can use this name to retrieve automatically the right ConnectionClass

    @@ -692,9 +700,11 @@

    Returns

    potential_type : str
    The name of the device_type that must be running.
    -
    +
    -Source code + +Expand source code +
    def autodetect(self) -> Optional[str]:
         """
         Try to guess the device_type using SNMP GET based on the SNMP_MAPPER dict. The type which
    @@ -730,6 +740,7 @@ 

    Returns

    self._response_cache[oid] = snmp_response # See if we had a match + assert isinstance(snmp_response, str) if re.search(regex, snmp_response): assert isinstance(device_type, str) return device_type @@ -769,9 +780,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/sophos/index.html b/docs/netmiko/sophos/index.html index 6b7b0b883..85d148422 100644 --- a/docs/netmiko/sophos/index.html +++ b/docs/netmiko/sophos/index.html @@ -3,15 +3,17 @@ - + netmiko.sophos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.sophos

    -Source code + +Expand source code +
    from netmiko.sophos.sophos_sfos_ssh import SophosSfosSSH
     
     __all__ = ["SophosSfosSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.sophos.sophos_sfos_ssh
    -

    SophosXG (SFOS) Firewall support

    +

    SophosXG (SFOS) Firewall support

    @@ -45,10 +49,10 @@

    Classes

    class SophosSfosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -145,12 +149,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -158,9 +162,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class SophosSfosSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -203,24 +209,28 @@ 

    Ancestors

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read()
    @@ -330,9 +340,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/sophos/sophos_sfos_ssh.html b/docs/netmiko/sophos/sophos_sfos_ssh.html index 85d1af375..47f51f0ce 100644 --- a/docs/netmiko/sophos/sophos_sfos_ssh.html +++ b/docs/netmiko/sophos/sophos_sfos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.sophos.sophos_sfos_ssh API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.sophos.sophos_sfos_ssh

    SophosXG (SFOS) Firewall support

    -Source code + +Expand source code +
    """SophosXG (SFOS) Firewall support"""
     import time
     from typing import Any
    @@ -75,10 +79,10 @@ 

    Classes

    class SophosSfosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -88,10 +92,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -130,7 +134,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -175,12 +179,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -188,9 +192,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class SophosSfosSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -233,24 +239,28 @@ 

    Ancestors

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    Not Implemented

    +

    Not Implemented

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """Not Implemented"""
         raise NotImplementedError
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read()
    @@ -355,9 +365,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ssh_auth.html b/docs/netmiko/ssh_auth.html index 3d3fe4ce8..db0413d5a 100644 --- a/docs/netmiko/ssh_auth.html +++ b/docs/netmiko/ssh_auth.html @@ -3,15 +3,17 @@ - + netmiko.ssh_auth API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ssh_auth

    -Source code + +Expand source code +
    from typing import Any
     from paramiko import SSHClient
     
    @@ -49,10 +53,12 @@ 

    Classes

    class SSHClient_noauth
    -

    Set noauth when manually handling SSH authentication.

    -

    Create a new SSHClient.

    +

    Set noauth when manually handling SSH authentication.

    +

    Create a new SSHClient.

    -Source code + +Expand source code +
    class SSHClient_noauth(SSHClient):
         """Set noauth when manually handling SSH authentication."""
     
    @@ -93,9 +99,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ssh_autodetect.html b/docs/netmiko/ssh_autodetect.html index 6b9969ef3..aae6d5ca3 100644 --- a/docs/netmiko/ssh_autodetect.html +++ b/docs/netmiko/ssh_autodetect.html @@ -3,16 +3,18 @@ - + netmiko.ssh_autodetect API documentation - - - - - + + + + + + +
    @@ -39,26 +41,25 @@

    Notes

    Examples

    Auto-detection section

    -
    >>> from netmiko.ssh_autodetect import SSHDetect
    +
    >>> from netmiko.ssh_autodetect import SSHDetect
     >>> from netmiko.ssh_dispatcher import ConnectHandler
     >>> remote_device = {'device_type': 'autodetect',
                          'host': 'remote.host',
    -
    -
    -                 'username': 'test',
    -                 'password': 'foo'}
    -
    +                     'username': 'test',
    +                     'password': 'foo'}
     >>> guesser = SSHDetect(**remote_device)
     >>> best_match = guesser.autodetect()
     >>> print(best_match) # Name of the best device_type to use further
     >>> print(guesser.potential_matches) # Dictionary of the whole matching result
     

    Netmiko connection creation section

    -
    >>> remote_device['device_type'] = best_match
    +
    >>> remote_device['device_type'] = best_match
     >>> connection = ConnectHandler(**remote_device)
     
    -Source code + +Expand source code +
    """
     The ssh_autodetect module is used to auto-detect the netmiko device_type to use to further initiate
     a new SSH connection with a remote host. This auto-detection is based on a unique class called
    @@ -560,10 +561,10 @@ 

    Classes

    class SSHDetect -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    The SSHDetect class tries to automatically guess the device type running on the SSH remote end. +

    The SSHDetect class tries to automatically guess the device type running on the SSH remote end. Be careful that the kwargs 'device_type' must be set to 'autodetect', otherwise it won't work at all.

    Parameters

    @@ -575,7 +576,7 @@

    Parameters

    Attributes

    -
    connection : TerminalServerSSH
    +
    connection : TerminalServerSSH
    A basic connection to the remote SSH end.
    potential_matches : dict
    Dict of (device_type, accuracy) that is populated through an interaction with the @@ -584,9 +585,11 @@

    Attributes

    Methods

    autodetect() Try to determine the device type.

    -

    Constructor of the SSHDetect class

    +

    Constructor of the SSHDetect class

    -Source code + +Expand source code +
    class SSHDetect(object):
         """
         The SSHDetect class tries to automatically guess the device type running on the SSH remote end.
    @@ -807,17 +810,19 @@ 

    Methods

    Methods

    -def autodetect(self) +def autodetect(self) ‑> Optional[str]
    -

    Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE

    +

    Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE

    Returns

    best_match : str or None
    The device type that is currently the best to use to interact with the device
    -
    +
    -Source code + +Expand source code +
    def autodetect(self) -> Union[str, None]:
         """
         Try to guess the best 'device_type' based on patterns defined in SSH_MAPPER_BASE
    @@ -892,9 +897,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/supermicro/index.html b/docs/netmiko/supermicro/index.html index 2e888cb54..7bb350bd8 100644 --- a/docs/netmiko/supermicro/index.html +++ b/docs/netmiko/supermicro/index.html @@ -3,15 +3,17 @@ - + netmiko.supermicro API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.supermicro

    -Source code + +Expand source code +
    from netmiko.supermicro.smci_smis import SmciSwitchSmisTelnet, SmciSwitchSmisSSH
     
     __all__ = ["SmciSwitchSmisSSH", "SmciSwitchSmisTelnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.supermicro.smci_smis
    -
    +
    @@ -45,10 +49,10 @@

    Classes

    class SmciSwitchSmisSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -58,10 +62,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -100,7 +104,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -145,12 +149,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -158,9 +162,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class SmciSwitchSmisSSH(SmciSwitchSmisBase):
         pass
    @@ -222,10 +228,10 @@

    Inherited members

    class SmciSwitchSmisTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -235,10 +241,10 @@

    Inherited members

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -277,7 +283,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -322,12 +328,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -335,9 +341,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class SmciSwitchSmisTelnet(SmciSwitchSmisBase):
         pass
    @@ -430,9 +438,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/supermicro/smci_smis.html b/docs/netmiko/supermicro/smci_smis.html index 8a0bed97b..46ca4b754 100644 --- a/docs/netmiko/supermicro/smci_smis.html +++ b/docs/netmiko/supermicro/smci_smis.html @@ -3,15 +3,17 @@ - + netmiko.supermicro.smci_smis API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.supermicro.smci_smis

    -Source code + +Expand source code +
    from netmiko.cisco_base_connection import CiscoBaseConnection
     from netmiko.no_enable import NoEnable
     import time
    @@ -75,10 +79,10 @@ 

    Classes

    class SmciSwitchSmisBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -88,10 +92,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -130,7 +134,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -175,12 +179,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -188,9 +192,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class SmciSwitchSmisBase(NoEnable, CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -233,12 +239,14 @@ 

    Subclasses

    Methods

    -def save_config(self, cmd='write startup-config', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write startup-config', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Save config

    +

    Save config

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write startup-config",
    @@ -252,12 +260,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -321,10 +331,10 @@ 

    Inherited members

    class SmciSwitchSmisSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -334,10 +344,10 @@

    Inherited members

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -376,7 +386,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -421,12 +431,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -434,9 +444,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class SmciSwitchSmisSSH(SmciSwitchSmisBase):
         pass
    @@ -498,10 +510,10 @@

    Inherited members

    class SmciSwitchSmisTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -511,10 +523,10 @@

    Inherited members

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -553,7 +565,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -598,12 +610,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -611,9 +623,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class SmciSwitchSmisTelnet(SmciSwitchSmisBase):
         pass
    @@ -708,9 +722,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/terminal_server/index.html b/docs/netmiko/terminal_server/index.html index a2f6147a1..90bf923ff 100644 --- a/docs/netmiko/terminal_server/index.html +++ b/docs/netmiko/terminal_server/index.html @@ -3,15 +3,17 @@ - + netmiko.terminal_server API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.terminal_server

    -Source code + +Expand source code +
    from netmiko.terminal_server.terminal_server import TerminalServerSSH
     from netmiko.terminal_server.terminal_server import TerminalServerTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.terminal_server.terminal_server
    -

    Generic Terminal Server driver.

    +

    Generic Terminal Server driver.

    @@ -46,16 +50,16 @@

    Classes

    class TerminalServerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver SSH.

    +

    Generic Terminal Server driver SSH.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -139,12 +143,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -152,9 +156,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class TerminalServerSSH(TerminalServer):
         """Generic Terminal Server driver SSH."""
     
    @@ -216,16 +222,16 @@ 

    Inherited members

    class TerminalServerTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver telnet.

    +

    Generic Terminal Server driver telnet.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -264,7 +270,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -309,12 +315,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -322,9 +328,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TerminalServerTelnet(TerminalServer):
         """Generic Terminal Server driver telnet."""
     
    @@ -343,12 +351,14 @@ 

    Ancestors

    Methods

    -def std_login(self, *args, **kwargs) +def std_login(self, *args: Any, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def std_login(self, *args: Any, **kwargs: Any) -> str:
         return super().telnet_login(*args, **kwargs)
    @@ -439,9 +449,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/terminal_server/terminal_server.html b/docs/netmiko/terminal_server/terminal_server.html index 609ba1d99..3ebdc59e0 100644 --- a/docs/netmiko/terminal_server/terminal_server.html +++ b/docs/netmiko/terminal_server/terminal_server.html @@ -3,15 +3,17 @@ - + netmiko.terminal_server.terminal_server API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.terminal_server.terminal_server

    Generic Terminal Server driver.

    -Source code + +Expand source code +
    """Generic Terminal Server driver."""
     from typing import Any
     
    @@ -69,18 +73,18 @@ 

    Classes

    class TerminalServer -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver.

    +

    Generic Terminal Server driver.

    Allow direct write_channel / read_channel operations without session_preparation causing an exception.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -119,7 +123,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -164,12 +168,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -177,9 +181,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TerminalServer(BaseConnection):
         """Generic Terminal Server driver.
     
    @@ -203,12 +209,14 @@ 

    Subclasses

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Do nothing here; base_prompt is not set; paging is not disabled.

    +

    Do nothing here; base_prompt is not set; paging is not disabled.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Do nothing here; base_prompt is not set; paging is not disabled."""
         pass
    @@ -265,16 +273,16 @@

    Inherited members

    class TerminalServerSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver SSH.

    +

    Generic Terminal Server driver SSH.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -313,7 +321,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -358,12 +366,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -371,9 +379,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TerminalServerSSH(TerminalServer):
         """Generic Terminal Server driver SSH."""
     
    @@ -435,16 +445,16 @@ 

    Inherited members

    class TerminalServerTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Generic Terminal Server driver telnet.

    +

    Generic Terminal Server driver telnet.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -483,7 +493,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -528,12 +538,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -541,9 +551,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TerminalServerTelnet(TerminalServer):
         """Generic Terminal Server driver telnet."""
     
    @@ -562,12 +574,14 @@ 

    Ancestors

    Methods

    -def std_login(self, *args, **kwargs) +def std_login(self, *args: Any, **kwargs: Any) ‑> str
    -
    +
    -Source code + +Expand source code +
    def std_login(self, *args: Any, **kwargs: Any) -> str:
         return super().telnet_login(*args, **kwargs)
    @@ -659,9 +673,7 @@

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/tplink/index.html b/docs/netmiko/tplink/index.html index dd01b0d60..e08b5783e 100644 --- a/docs/netmiko/tplink/index.html +++ b/docs/netmiko/tplink/index.html @@ -3,15 +3,17 @@ - + netmiko.tplink API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.tplink

    -Source code + +Expand source code +
    from netmiko.tplink.tplink_jetstream import TPLinkJetStreamSSH, TPLinkJetStreamTelnet
     
     __all__ = ["TPLinkJetStreamSSH", "TPLinkJetStreamTelnet"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.tplink.tplink_jetstream
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class TPLinkJetStreamSSH -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class TPLinkJetStreamSSH(TPLinkJetStreamBase):
         def __init__(self, **kwargs: Any) -> None:
             setattr(dsa, "_check_dsa_parameters", self._override_check_dsa_parameters)
    @@ -241,16 +247,16 @@ 

    Inherited members

    class TPLinkJetStreamTelnet -(**kwargs) +(**kwargs: Any)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -289,7 +295,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -334,12 +340,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -347,9 +353,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TPLinkJetStreamTelnet(TPLinkJetStreamBase):
         def telnet_login(
             self,
    @@ -380,12 +388,14 @@ 

    Ancestors

    Methods

    -def telnet_login(self, pri_prompt_terminator='#', alt_prompt_terminator='>', username_pattern='User:', pwd_pattern='Password:', delay_factor=1.0, max_loops=60) +def telnet_login(self, pri_prompt_terminator: str = '#', alt_prompt_terminator: str = '>', username_pattern: str = 'User:', pwd_pattern: str = 'Password:', delay_factor: float = 1.0, max_loops: int = 60) ‑> str
    -

    Telnet login: can be username/password or just password.

    +

    Telnet login: can be username/password or just password.

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = "#",
    @@ -491,9 +501,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/tplink/tplink_jetstream.html b/docs/netmiko/tplink/tplink_jetstream.html index f571e7c33..7e6df6b8c 100644 --- a/docs/netmiko/tplink/tplink_jetstream.html +++ b/docs/netmiko/tplink/tplink_jetstream.html @@ -3,15 +3,17 @@ - + netmiko.tplink.tplink_jetstream API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.tplink.tplink_jetstream

    -Source code + +Expand source code +
    import re
     import time
     from typing import Any, Optional
    @@ -133,7 +137,10 @@ 

    Module netmiko.tplink.tplink_jetstream

    return output def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -226,16 +233,16 @@

    Classes

    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -274,7 +281,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -319,12 +326,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -332,9 +339,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TPLinkJetStreamBase(CiscoSSHConnection):
         def __init__(self, **kwargs: Any) -> None:
             # TP-Link doesn't have a way to set terminal width which breaks cmd_verify
    @@ -434,7 +443,10 @@ 

    Classes

    return output def check_config_mode( - self, check_string: str = "(config", pattern: str = r"#" + self, + check_string: str = "(config", + pattern: str = r"#", + force_regex: bool = False, ) -> bool: """Check whether device is in configuration mode. Return a boolean.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -478,29 +490,36 @@

    Subclasses

    Methods

    -

    Check whether device is in configuration mode. Return a boolean.

    +

    Check whether device is in configuration mode. Return a boolean.

    -Source code + +Expand source code +
    def check_config_mode(
    -    self, check_string: str = "(config", pattern: str = r"#"
    +    self,
    +    check_string: str = "(config",
    +    pattern: str = r"#",
    +    force_regex: bool = False,
     ) -> bool:
         """Check whether device is in configuration mode. Return a boolean."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -

    TPLink JetStream requires you to first execute "enable" and then execute "enable-admin". +

    TPLink JetStream requires you to first execute "enable" and then execute "enable-admin". This is necessary as "configure" is generally only available at "enable-admin" level

    If the user does not have the Admin role, he will need to execute enable-admin to really -enable all functions.

    +enable all functions.

    -Source code + +Expand source code +
    def enable(
         self,
         cmd: str = "",
    @@ -544,15 +563,17 @@ 

    Methods

    -

    Exit config mode.

    +

    Exit config mode.

    Like the Mellanox equipment, the TP-Link Jetstream does not support a single command to completely exit the configuration mode.

    -

    Consequently, need to keep checking and sending "exit".

    +

    Consequently, need to keep checking and sending "exit".

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#") -> str:
         """
         Exit config mode.
    @@ -580,12 +601,14 @@ 

    Methods

    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -603,17 +626,19 @@ 

    Methods

    -

    Sets self.base_prompt

    +

    Sets self.base_prompt

    Used as delimiter for stripping of trailing prompt in output.

    Should be set to something that is general and applies in multiple contexts. For TP-Link this will be the router prompt with > or # stripped off.

    -

    This will be set on logging in, but not when entering system-view

    +

    This will be set on logging in, but not when entering system-view

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = ">",
    @@ -687,16 +712,16 @@ 

    Inherited members

    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -735,7 +760,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -780,12 +805,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -793,9 +818,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TPLinkJetStreamSSH(TPLinkJetStreamBase):
         def __init__(self, **kwargs: Any) -> None:
             setattr(dsa, "_check_dsa_parameters", self._override_check_dsa_parameters)
    @@ -883,16 +910,16 @@ 

    Inherited members

    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -931,7 +958,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -976,12 +1003,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -989,9 +1016,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class TPLinkJetStreamTelnet(TPLinkJetStreamBase):
         def telnet_login(
             self,
    @@ -1022,12 +1051,14 @@ 

    Ancestors

    Methods

    -

    Telnet login: can be username/password or just password.

    +

    Telnet login: can be username/password or just password.

    -Source code + +Expand source code +
    def telnet_login(
         self,
         pri_prompt_terminator: str = "#",
    @@ -1138,9 +1169,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/ubiquiti/edge_ssh.html b/docs/netmiko/ubiquiti/edge_ssh.html index cfc876d11..505160bf5 100644 --- a/docs/netmiko/ubiquiti/edge_ssh.html +++ b/docs/netmiko/ubiquiti/edge_ssh.html @@ -3,15 +3,17 @@ - + netmiko.ubiquiti.edge_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ubiquiti.edge_ssh

    -Source code + +Expand source code +
    import time
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -47,7 +51,9 @@ 

    Module netmiko.ubiquiti.edge_ssh

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -118,18 +124,18 @@

    Classes

    class UbiquitiEdgeSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Ubiquity EdgeSwitch devices.

    +

    Implements support for Ubiquity EdgeSwitch devices.

    Mostly conforms to Cisco IOS style syntax with a few minor changes.

    This is NOT for EdgeRouter devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -168,7 +174,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -213,12 +219,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -226,9 +232,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class UbiquitiEdgeSSH(CiscoSSHConnection):
         """
         Implements support for Ubiquity EdgeSwitch devices.
    @@ -250,7 +258,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -322,24 +332,30 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +def check_config_mode(self, check_string: str = ')#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -350,39 +366,45 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='#.*') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '#.*') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#.*") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
         return super().exit_enable_mode(exit_command=exit_command)
    -def save_config(self, cmd='write memory', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'write memory', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    EdgeSwitch might do the following:

    +

    EdgeSwitch might do the following:

    Are you sure you want to save? (y/n) y

    It is not clear to me that it always does this (or sometimes doesn't).

    -

    Consequently, save_config() handles both cases.

    +

    Consequently, save_config() handles both cases.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -500,9 +522,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ubiquiti/edgerouter_ssh.html b/docs/netmiko/ubiquiti/edgerouter_ssh.html index ddb2238a8..0808fa794 100644 --- a/docs/netmiko/ubiquiti/edgerouter_ssh.html +++ b/docs/netmiko/ubiquiti/edgerouter_ssh.html @@ -3,15 +3,17 @@ - + netmiko.ubiquiti.edgerouter_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ubiquiti.edgerouter_ssh

    -Source code + +Expand source code +
    import time
     from netmiko.vyos.vyos_ssh import VyOSSSH
     
    @@ -62,16 +66,16 @@ 

    Classes

    class UbiquitiEdgeRouterSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with EdgeOS EdgeRouter network devices.

    +

    Implement methods for interacting with EdgeOS EdgeRouter network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -110,7 +114,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -155,12 +159,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -168,9 +172,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class UbiquitiEdgeRouterSSH(VyOSSSH):
         """Implement methods for interacting with EdgeOS EdgeRouter network devices."""
     
    @@ -277,9 +283,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/ubiquiti/index.html b/docs/netmiko/ubiquiti/index.html index c5cb7867c..c55b63e7d 100644 --- a/docs/netmiko/ubiquiti/index.html +++ b/docs/netmiko/ubiquiti/index.html @@ -3,15 +3,17 @@ - + netmiko.ubiquiti API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ubiquiti

    -Source code + +Expand source code +
    from netmiko.ubiquiti.edge_ssh import UbiquitiEdgeSSH
     from netmiko.ubiquiti.edgerouter_ssh import UbiquitiEdgeRouterSSH
     from netmiko.ubiquiti.unifiswitch_ssh import UbiquitiUnifiSwitchSSH
    @@ -38,15 +42,15 @@ 

    Sub-modules

    netmiko.ubiquiti.edge_ssh
    -
    +
    netmiko.ubiquiti.edgerouter_ssh
    -
    +
    netmiko.ubiquiti.unifiswitch_ssh
    -
    +
    @@ -59,16 +63,16 @@

    Classes

    class UbiquitiEdgeRouterSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with EdgeOS EdgeRouter network devices.

    +

    Implement methods for interacting with EdgeOS EdgeRouter network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -107,7 +111,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -152,12 +156,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -165,9 +169,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class UbiquitiEdgeRouterSSH(VyOSSSH):
         """Implement methods for interacting with EdgeOS EdgeRouter network devices."""
     
    @@ -251,18 +257,18 @@ 

    Inherited members

    class UbiquitiEdgeSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Ubiquity EdgeSwitch devices.

    +

    Implements support for Ubiquity EdgeSwitch devices.

    Mostly conforms to Cisco IOS style syntax with a few minor changes.

    This is NOT for EdgeRouter devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -301,7 +307,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -346,12 +352,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -359,9 +365,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class UbiquitiEdgeSSH(CiscoSSHConnection):
         """
         Implements support for Ubiquity EdgeSwitch devices.
    @@ -383,7 +391,9 @@ 

    Inherited members

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -455,24 +465,30 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='') +def check_config_mode(self, check_string: str = ')#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def config_mode(self, config_command='configure', pattern='', re_flags=0) +def config_mode(self, config_command: str = 'configure', pattern: str = '', re_flags: int = 0) ‑> str
    -

    Enter configuration mode.

    +

    Enter configuration mode.

    -Source code + +Expand source code +
    def config_mode(
         self, config_command: str = "configure", pattern: str = "", re_flags: int = 0
     ) -> str:
    @@ -483,39 +499,45 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='#.*') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '#.*') ‑> str
    -

    Exit configuration mode.

    +

    Exit configuration mode.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#.*") -> str:
         """Exit configuration mode."""
         return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    Exit enable mode.

    +

    Exit enable mode.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """Exit enable mode."""
         return super().exit_enable_mode(exit_command=exit_command)
    -def save_config(self, cmd='write memory', confirm=True, confirm_response='y') +def save_config(self, cmd: str = 'write memory', confirm: bool = True, confirm_response: str = 'y') ‑> str
    -

    EdgeSwitch might do the following:

    +

    EdgeSwitch might do the following:

    Are you sure you want to save? (y/n) y

    It is not clear to me that it always does this (or sometimes doesn't).

    -

    Consequently, save_config() handles both cases.

    +

    Consequently, save_config() handles both cases.

    -Source code + +Expand source code +
    def save_config(
         self,
         cmd: str = "write memory",
    @@ -603,18 +625,18 @@ 

    Inherited members

    class UbiquitiUnifiSwitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Ubiquity EdgeSwitch devices.

    +

    Implements support for Ubiquity EdgeSwitch devices.

    Mostly conforms to Cisco IOS style syntax with a few minor changes.

    This is NOT for EdgeRouter devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -653,7 +675,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -698,12 +720,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -711,9 +733,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class UbiquitiUnifiSwitchSSH(UbiquitiEdgeSSH):
         def session_preparation(self) -> None:
             """
    @@ -761,16 +785,18 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established. +

    Prepare the session after the connection has been established. When SSHing to a UniFi switch, the session initially starts at a Linux shell. Nothing interesting can be done in this environment, however, running telnet localhost drops the session to a more familiar -environment.

    +environment.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -891,9 +917,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/ubiquiti/unifiswitch_ssh.html b/docs/netmiko/ubiquiti/unifiswitch_ssh.html index 13ea4fe67..e69e5bd1b 100644 --- a/docs/netmiko/ubiquiti/unifiswitch_ssh.html +++ b/docs/netmiko/ubiquiti/unifiswitch_ssh.html @@ -3,15 +3,17 @@ - + netmiko.ubiquiti.unifiswitch_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.ubiquiti.unifiswitch_ssh

    -Source code + +Expand source code +
    import time
     from netmiko.ubiquiti.edge_ssh import UbiquitiEdgeSSH
     
    @@ -75,18 +79,18 @@ 

    Classes

    class UbiquitiUnifiSwitchSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements support for Ubiquity EdgeSwitch devices.

    +

    Implements support for Ubiquity EdgeSwitch devices.

    Mostly conforms to Cisco IOS style syntax with a few minor changes.

    This is NOT for EdgeRouter devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -125,7 +129,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -170,12 +174,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -183,9 +187,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class UbiquitiUnifiSwitchSSH(UbiquitiEdgeSSH):
         def session_preparation(self) -> None:
             """
    @@ -233,16 +239,18 @@ 

    Ancestors

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established. +

    Prepare the session after the connection has been established. When SSHing to a UniFi switch, the session initially starts at a Linux shell. Nothing interesting can be done in this environment, however, running telnet localhost drops the session to a more familiar -environment.

    +environment.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -343,9 +351,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/utilities.html b/docs/netmiko/utilities.html index 0b1e54edc..f1e75721c 100644 --- a/docs/netmiko/utilities.html +++ b/docs/netmiko/utilities.html @@ -3,15 +3,17 @@ - + netmiko.utilities API documentation - - - - - + + + + + + +
    @@ -22,7 +24,9 @@

    Module netmiko.utilities

    Miscellaneous utility functions.

    -Source code + +Expand source code +
    """Miscellaneous utility functions."""
     from typing import (
         Any,
    @@ -323,7 +327,7 @@ 

    Module netmiko.utilities

    else: # Try 'pip installed' ntc-templates try: - with pkg_resources.path( # type: ignore + with pkg_resources.path( package="ntc_templates", resource="parse.py" ) as posix_path: # Example: /opt/venv/netmiko/lib/python3.8/site-packages/ntc_templates/templates @@ -700,19 +704,21 @@

    Module netmiko.utilities

    Functions

    -def calc_old_timeout(max_loops=None, delay_factor=None, loop_delay=0.2, old_timeout=100) +def calc_old_timeout(max_loops: Optional[int] = None, delay_factor: Optional[float] = None, loop_delay: float = 0.2, old_timeout: int = 100) ‑> float
    -

    loop_delay is .2 in Netmiko 3.x +

    loop_delay is .2 in Netmiko 3.x delay_factor would multiple the loop delay Number of loops was typically 500

    Thus each loop would sleep (loop_delay * delay_factor) seconds That sleep would happen max_loops time

    Formula is (loop_delay * delay_factor) * max_loops

    There was a way Netmiko's self.timeout could override the default settings and essentially be -used to adjust max_loops (this was probably rarely used).

    +used to adjust max_loops (this was probably rarely used).

    -Source code + +Expand source code +
    def calc_old_timeout(
         max_loops: Optional[int] = None,
         delay_factor: Optional[float] = None,
    @@ -744,12 +750,14 @@ 

    Functions

    -def check_serial_port(name) +def check_serial_port(name: str) ‑> str
    -

    returns valid COM Port.

    +

    returns valid COM Port.

    -Source code + +Expand source code +
    def check_serial_port(name: str) -> str:
         """returns valid COM Port."""
     
    @@ -775,12 +783,14 @@ 

    Functions

    -def clitable_to_dict(cli_table) +def clitable_to_dict(cli_table: textfsm.clitable.CliTable) ‑> List[Dict[str, str]]
    -

    Converts TextFSM cli_table object to list of dictionaries.

    +

    Converts TextFSM cli_table object to list of dictionaries.

    -Source code + +Expand source code +
    def clitable_to_dict(cli_table: clitable.CliTable) -> List[Dict[str, str]]:
         """Converts TextFSM cli_table object to list of dictionaries."""
         return_list = []
    @@ -793,12 +803,14 @@ 

    Functions

    -def display_inventory(my_devices) +def display_inventory(my_devices: Dict[str, Union[List[str], Dict[str, Any]]]) ‑> None
    -

    Print out inventory devices and groups.

    +

    Print out inventory devices and groups.

    -Source code + +Expand source code +
    def display_inventory(my_devices: Dict[str, Union[List[str], Dict[str, Any]]]) -> None:
         """Print out inventory devices and groups."""
         inventory_groups = ["all"]
    @@ -824,12 +836,14 @@ 

    Functions

    -def ensure_dir_exists(verify_dir) +def ensure_dir_exists(verify_dir: str) ‑> None
    -

    Ensure directory exists. Create if necessary.

    +

    Ensure directory exists. Create if necessary.

    -Source code + +Expand source code +
    def ensure_dir_exists(verify_dir: str) -> None:
         """Ensure directory exists. Create if necessary."""
         if not os.path.exists(verify_dir):
    @@ -843,12 +857,14 @@ 

    Functions

    -def f_exec_time(func) +def f_exec_time(func: ~F) ‑> ~F
    -
    +
    -Source code + +Expand source code +
    def f_exec_time(func: F) -> F:
         @functools.wraps(func)
         def wrapper_decorator(*args: Any, **kwargs: Any) -> Any:
    @@ -862,17 +878,19 @@ 

    Functions

    -def find_cfg_file(file_name=None) +def find_cfg_file(file_name: Union[str, bytes, ForwardRef('PathLike[Any]'), ForwardRef(None)] = None) ‑> Union[str, bytes, PathLike[Any]]
    -

    Search for netmiko_tools inventory file in the following order: +

    Search for netmiko_tools inventory file in the following order: NETMIKO_TOOLS_CFG environment variable Current directory Home directory Look for file named: .netmiko.yml or netmiko.yml -Also allow NETMIKO_TOOLS_CFG to point directly at a file

    +Also allow NETMIKO_TOOLS_CFG to point directly at a file

    -Source code + +Expand source code +
    def find_cfg_file(
         file_name: Union[str, bytes, "PathLike[Any]", None] = None
     ) -> Union[str, bytes, "PathLike[Any]"]:
    @@ -903,12 +921,14 @@ 

    Functions

    -def find_netmiko_dir() +def find_netmiko_dir() ‑> Tuple[str, str]
    -

    Check environment first, then default dir

    +

    Check environment first, then default dir

    -Source code + +Expand source code +
    def find_netmiko_dir() -> Tuple[str, str]:
         """Check environment first, then default dir"""
         try:
    @@ -923,14 +943,16 @@ 

    Functions

    -def get_structured_data(raw_output, platform=None, command=None, template=None) +def get_structured_data(raw_output: str, platform: Optional[str] = None, command: Optional[str] = None, template: Optional[str] = None) ‑> Union[str, List[Dict[str, str]]]
    -

    Convert raw CLI output to structured data using TextFSM template.

    +

    Convert raw CLI output to structured data using TextFSM template.

    You can use a straight TextFSM file i.e. specify "template". If no template is specified, -then you must use an CliTable index file.

    +then you must use an CliTable index file.

    -Source code + +Expand source code +
    def get_structured_data_textfsm(
         raw_output: str,
         platform: Optional[str] = None,
    @@ -976,12 +998,14 @@ 

    Functions

    -def get_structured_data_genie(raw_output, platform, command) +def get_structured_data_genie(raw_output: str, platform: str, command: str) ‑> Union[str, Dict[str, Any]]
    -
    +
    -Source code + +Expand source code +
    def get_structured_data_genie(
         raw_output: str, platform: str, command: str
     ) -> Union[str, Dict[str, Any]]:
    @@ -1033,14 +1057,16 @@ 

    Functions

    -def get_structured_data_textfsm(raw_output, platform=None, command=None, template=None) +def get_structured_data_textfsm(raw_output: str, platform: Optional[str] = None, command: Optional[str] = None, template: Optional[str] = None) ‑> Union[str, List[Dict[str, str]]]
    -

    Convert raw CLI output to structured data using TextFSM template.

    +

    Convert raw CLI output to structured data using TextFSM template.

    You can use a straight TextFSM file i.e. specify "template". If no template is specified, -then you must use an CliTable index file.

    +then you must use an CliTable index file.

    -Source code + +Expand source code +
    def get_structured_data_textfsm(
         raw_output: str,
         platform: Optional[str] = None,
    @@ -1086,13 +1112,15 @@ 

    Functions

    -def get_structured_data_ttp(raw_output, template) +def get_structured_data_ttp(raw_output: str, template: str) ‑> Union[str, List[Any]]
    -

    Convert raw CLI output to structured data using TTP template.

    -

    You can use a straight TextFSM file i.e. specify "template"

    +

    Convert raw CLI output to structured data using TTP template.

    +

    You can use a straight TextFSM file i.e. specify "template"

    -Source code + +Expand source code +
    def get_structured_data_ttp(raw_output: str, template: str) -> Union[str, List[Any]]:
         """
         Convert raw CLI output to structured data using TTP template.
    @@ -1113,18 +1141,20 @@ 

    Functions

    -def get_template_dir() +def get_template_dir() ‑> str
    -

    Find and return the directory containing the TextFSM index file.

    +

    Find and return the directory containing the TextFSM index file.

    Order of preference is: 1) Find directory in NET_TEXTFSM Environment Variable. 2) Check for pip installed ntc-templates location in this environment. 3) ~/ntc-templates/ntc_templates/templates.

    If index file is not found in any of these locations, raise ValueError

    -

    :return: directory containing the TextFSM index file

    +

    :return: directory containing the TextFSM index file

    -Source code + +Expand source code +
    def get_template_dir(_skip_ntc_package: bool = False) -> str:
         """
         Find and return the directory containing the TextFSM index file.
    @@ -1162,7 +1192,7 @@ 

    Functions

    else: # Try 'pip installed' ntc-templates try: - with pkg_resources.path( # type: ignore + with pkg_resources.path( package="ntc_templates", resource="parse.py" ) as posix_path: # Example: /opt/venv/netmiko/lib/python3.8/site-packages/ntc_templates/templates @@ -1185,12 +1215,14 @@

    Functions

    -def load_devices(file_name=None) +def load_devices(file_name: Union[str, bytes, ForwardRef('PathLike[Any]'), ForwardRef(None)] = None) ‑> Any
    -

    Find and load .netmiko.yml file.

    +

    Find and load .netmiko.yml file.

    -Source code + +Expand source code +
    def load_devices(file_name: Union[str, bytes, "PathLike[Any]", None] = None) -> Any:
         """Find and load .netmiko.yml file."""
         yaml_devices_file = find_cfg_file(file_name)
    @@ -1198,12 +1230,14 @@ 

    Functions

    -def load_yaml_file(yaml_file) +def load_yaml_file(yaml_file: Union[str, bytes, ForwardRef('PathLike[Any]')]) ‑> Any
    -

    Read YAML file.

    +

    Read YAML file.

    -Source code + +Expand source code +
    def load_yaml_file(yaml_file: Union[str, bytes, "PathLike[Any]"]) -> Any:
         """Read YAML file."""
         try:
    @@ -1218,12 +1252,14 @@ 

    Functions

    -def m_exec_time(func) +def m_exec_time(func: ~F) ‑> ~F
    -
    +
    -Source code + +Expand source code +
    def m_exec_time(func: F) -> F:
         @functools.wraps(func)
         def wrapper_decorator(self: Any, *args: Any, **kwargs: Any) -> Any:
    @@ -1238,15 +1274,17 @@ 

    Functions

    -def nokia_context_filter(data, re_flags=re.MULTILINE) +def nokia_context_filter(data: str, re_flags: int = re.MULTILINE) ‑> str
    -

    Nokia context from string. Examples:

    +

    Nokia context from string. Examples:

    (ro)[]

    (ex)[configure router "Base" bgp]

    -

    Converted over to a standalone function for easier unit testing.

    +

    Converted over to a standalone function for easier unit testing.

    -Source code + +Expand source code +
    def nokia_context_filter(data: str, re_flags: int = re.M) -> str:
         """
         Nokia context from string. Examples:
    @@ -1262,12 +1300,14 @@ 

    Functions

    -def obtain_all_devices(my_devices) +def obtain_all_devices(my_devices: Dict[str, Union[List[str], Dict[str, Any]]]) ‑> Dict[str, Dict[str, Any]]
    -

    Dynamically create 'all' group.

    +

    Dynamically create 'all' group.

    -Source code + +Expand source code +
    def obtain_all_devices(
         my_devices: Dict[str, Union[List[str], Dict[str, Any]]]
     ) -> Dict[str, Dict[str, Any]]:
    @@ -1281,12 +1321,14 @@ 

    Functions

    -def obtain_netmiko_filename(device_name) +def obtain_netmiko_filename(device_name: str) ‑> str
    -

    Create file name based on device_name.

    +

    Create file name based on device_name.

    -Source code + +Expand source code +
    def obtain_netmiko_filename(device_name: str) -> str:
         """Create file name based on device_name."""
         _, netmiko_full_dir = find_netmiko_dir()
    @@ -1294,16 +1336,18 @@ 

    Functions

    -def run_ttp_template(connection, template, res_kwargs, **kwargs) +def run_ttp_template(connection: BaseConnection, template: Union[str, bytes, ForwardRef('PathLike[Any]')], res_kwargs: Dict[str, Any], **kwargs: Any) ‑> Any
    -

    Helper function to run TTP template parsing.

    +

    Helper function to run TTP template parsing.

    :param connection: Netmiko connection object

    :param template: TTP template

    :param res_kwargs: **res_kwargs arguments for TTP result method

    -

    :param kwargs: **kwargs for TTP object instantiation

    +

    :param kwargs: **kwargs for TTP object instantiation

    -Source code + +Expand source code +
    def run_ttp_template(
         connection: "BaseConnection",
         template: Union[str, bytes, "PathLike[Any]"],
    @@ -1373,12 +1417,14 @@ 

    Functions

    -def select_cmd_verify(func) +def select_cmd_verify(func: ~F) ‑> ~F
    -

    Override function cmd_verify argument with global setting.

    +

    Override function cmd_verify argument with global setting.

    -Source code + +Expand source code +
    def select_cmd_verify(func: F) -> F:
         """Override function cmd_verify argument with global setting."""
     
    @@ -1392,13 +1438,15 @@ 

    Functions

    -def structured_data_converter(raw_data, command, platform, use_textfsm=False, use_ttp=False, use_genie=False, textfsm_template=None, ttp_template=None) +def structured_data_converter(raw_data: str, command: str, platform: str, use_textfsm: bool = False, use_ttp: bool = False, use_genie: bool = False, textfsm_template: Optional[str] = None, ttp_template: Optional[str] = None) ‑> Union[str, List[Any], Dict[str, Any]]
    -

    Try structured data converters in the following order: TextFSM, TTP, Genie.

    -

    Return the first structured data found, else return the raw_data as-is.

    +

    Try structured data converters in the following order: TextFSM, TTP, Genie.

    +

    Return the first structured data found, else return the raw_data as-is.

    -Source code + +Expand source code +
    def structured_data_converter(
         raw_data: str,
         command: str,
    @@ -1446,12 +1494,14 @@ 

    Functions

    -def write_bytes(out_data, encoding='ascii') +def write_bytes(out_data: ~AnyStr, encoding: str = 'ascii') ‑> bytes
    -

    Legacy for Python2 and Python3 compatible byte stream.

    +

    Legacy for Python2 and Python3 compatible byte stream.

    -Source code + +Expand source code +
    def write_bytes(out_data: AnyStr, encoding: str = "ascii") -> bytes:
         """Legacy for Python2 and Python3 compatible byte stream."""
         if sys.version_info[0] >= 3:
    @@ -1467,12 +1517,14 @@ 

    Functions

    -def write_tmp_file(device_name, output) +def write_tmp_file(device_name: str, output: str) ‑> str
    -
    +
    -Source code + +Expand source code +
    def write_tmp_file(device_name: str, output: str) -> str:
         file_name = obtain_netmiko_filename(device_name)
         with open(file_name, "w") as f:
    @@ -1528,9 +1580,7 @@ 

    Index

    - - \ No newline at end of file diff --git a/docs/netmiko/vyos/index.html b/docs/netmiko/vyos/index.html index 1512bfa58..596c68356 100644 --- a/docs/netmiko/vyos/index.html +++ b/docs/netmiko/vyos/index.html @@ -3,15 +3,17 @@ - + netmiko.vyos API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.vyos

    -Source code + +Expand source code +
    from netmiko.vyos.vyos_ssh import VyOSSSH
     
     __all__ = ["VyOSSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.vyos.vyos_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class VyOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with VyOS network devices.

    +

    Implement methods for interacting with VyOS network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class VyOSSSH(NoEnable, CiscoSSHConnection):
         """Implement methods for interacting with VyOS network devices."""
     
    @@ -167,7 +173,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -302,31 +310,37 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string='#', pattern='') +def check_config_mode(self, check_string: str = '#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode

    +

    Checks if the device is in configuration mode

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -371,12 +385,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='exit') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = 'exit') ‑> str
    -

    Exit configuration mode

    +

    Exit configuration mode

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit", pattern: str = r"exit"
     ) -> str:
    @@ -396,12 +412,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    Remain in configuration mode.

    +

    Remain in configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -415,12 +433,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read()
    @@ -433,12 +453,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "$",
    @@ -548,9 +570,7 @@ 

    VyOSSSH

    - - \ No newline at end of file diff --git a/docs/netmiko/vyos/vyos_ssh.html b/docs/netmiko/vyos/vyos_ssh.html index b11ac83d1..5d16530c3 100644 --- a/docs/netmiko/vyos/vyos_ssh.html +++ b/docs/netmiko/vyos/vyos_ssh.html @@ -3,15 +3,17 @@ - + netmiko.vyos.vyos_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.vyos.vyos_ssh

    -Source code + +Expand source code +
    from typing import Optional, Union, Sequence, TextIO, Any
     import time
     import warnings
    @@ -44,7 +48,9 @@ 

    Module netmiko.vyos.vyos_ssh

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -177,16 +183,16 @@

    Classes

    class VyOSSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implement methods for interacting with VyOS network devices.

    +

    Implement methods for interacting with VyOS network devices.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -225,7 +231,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -270,12 +276,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -283,9 +289,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class VyOSSSH(NoEnable, CiscoSSHConnection):
         """Implement methods for interacting with VyOS network devices."""
     
    @@ -299,7 +307,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in configuration mode""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -434,31 +444,37 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string='#', pattern='') +def check_config_mode(self, check_string: str = '#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode

    +

    Checks if the device is in configuration mode

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in configuration mode"""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def commit(self, comment='', read_timeout=120.0, delay_factor=None) +def commit(self, comment: str = '', read_timeout: float = 120.0, delay_factor: Optional[float] = None) ‑> str
    -

    Commit the candidate configuration.

    +

    Commit the candidate configuration.

    Commit the entered configuration. Raise an error and return the failure if the commit fails.

    default: command_string = commit comment: command_string = commit comment

    -

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    +

    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.

    -Source code + +Expand source code +
    def commit(
         self,
         comment: str = "",
    @@ -503,12 +519,14 @@ 

    Methods

    -def exit_config_mode(self, exit_config='exit', pattern='exit') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = 'exit') ‑> str
    -

    Exit configuration mode

    +

    Exit configuration mode

    -Source code + +Expand source code +
    def exit_config_mode(
         self, exit_config: str = "exit", pattern: str = r"exit"
     ) -> str:
    @@ -528,12 +546,14 @@ 

    Methods

    -def send_config_set(self, config_commands=None, exit_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    Remain in configuration mode.

    +

    Remain in configuration mode.

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -547,12 +567,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read()
    @@ -565,12 +587,14 @@ 

    Methods

    -def set_base_prompt(self, pri_prompt_terminator='$', alt_prompt_terminator='#', delay_factor=1.0, pattern=None) +def set_base_prompt(self, pri_prompt_terminator: str = '$', alt_prompt_terminator: str = '#', delay_factor: float = 1.0, pattern: Optional[str] = None) ‑> str
    -

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    +

    Sets self.base_prompt: used as delimiter for stripping of trailing prompt in output.

    -Source code + +Expand source code +
    def set_base_prompt(
         self,
         pri_prompt_terminator: str = "$",
    @@ -675,9 +699,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/watchguard/fireware_ssh.html b/docs/netmiko/watchguard/fireware_ssh.html index 8546dea8f..673592fe6 100644 --- a/docs/netmiko/watchguard/fireware_ssh.html +++ b/docs/netmiko/watchguard/fireware_ssh.html @@ -3,15 +3,17 @@ - + netmiko.watchguard.fireware_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.watchguard.fireware_ssh

    -Source code + +Expand source code +
    import time
     from typing import Any
     
    @@ -45,7 +49,9 @@ 

    Module netmiko.watchguard.fireware_ssh

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ @@ -77,16 +83,16 @@

    Classes

    class WatchguardFirewareSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements methods for communicating with Watchguard Firebox firewalls.

    +

    Implements methods for communicating with Watchguard Firebox firewalls.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -125,7 +131,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -170,12 +176,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -183,9 +189,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class WatchguardFirewareSSH(BaseConnection):
         """
         Implements methods for communicating with Watchguard Firebox firewalls.
    @@ -203,7 +211,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ @@ -230,13 +240,17 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +def check_config_mode(self, check_string: str = ')#', pattern: str = '#', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False
    +) -> bool:
         """
         Checks if the device is in configuration mode or not.
         """
    @@ -244,25 +258,29 @@ 

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    No save config on Watchguard.

    +

    No save config on Watchguard.

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """No save config on Watchguard."""
         pass
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    -

    Set the base prompt for interaction ('#').

    +

    Prepare the session after the connection has been established.

    +

    Set the base prompt for interaction ('#').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -353,9 +371,7 @@ 

    - - \ No newline at end of file diff --git a/docs/netmiko/watchguard/index.html b/docs/netmiko/watchguard/index.html index 083667d98..75b40aa4e 100644 --- a/docs/netmiko/watchguard/index.html +++ b/docs/netmiko/watchguard/index.html @@ -3,15 +3,17 @@ - + netmiko.watchguard API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.watchguard

    -Source code + +Expand source code +
    from netmiko.watchguard.fireware_ssh import WatchguardFirewareSSH
     
     __all__ = ["WatchguardFirewareSSH"]
    @@ -32,7 +36,7 @@

    Sub-modules

    netmiko.watchguard.fireware_ssh
    -
    +
    @@ -45,16 +49,16 @@

    Classes

    class WatchguardFirewareSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Implements methods for communicating with Watchguard Firebox firewalls.

    +

    Implements methods for communicating with Watchguard Firebox firewalls.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -93,7 +97,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -138,12 +142,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -151,9 +155,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class WatchguardFirewareSSH(BaseConnection):
         """
         Implements methods for communicating with Watchguard Firebox firewalls.
    @@ -171,7 +177,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ @@ -198,13 +206,17 @@

    Ancestors

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +def check_config_mode(self, check_string: str = ')#', pattern: str = '#', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False
    +) -> bool:
         """
         Checks if the device is in configuration mode or not.
         """
    @@ -212,25 +224,29 @@ 

    Methods

    -def save_config(self, *args, **kwargs) +def save_config(self, *args: Any, **kwargs: Any) ‑> str
    -

    No save config on Watchguard.

    +

    No save config on Watchguard.

    -Source code + +Expand source code +
    def save_config(self, *args: Any, **kwargs: Any) -> str:
         """No save config on Watchguard."""
         pass
    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    -

    Set the base prompt for interaction ('#').

    +

    Prepare the session after the connection has been established.

    +

    Set the base prompt for interaction ('#').

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """
         Prepare the session after the connection has been established.
    @@ -326,9 +342,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/yamaha/index.html b/docs/netmiko/yamaha/index.html index e491543f5..f8f64973b 100644 --- a/docs/netmiko/yamaha/index.html +++ b/docs/netmiko/yamaha/index.html @@ -3,15 +3,17 @@ - + netmiko.yamaha API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.yamaha

    -Source code + +Expand source code +
    from __future__ import unicode_literals
     from netmiko.yamaha.yamaha import YamahaSSH, YamahaTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.yamaha.yamaha
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class YamahaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Yamaha SSH driver.

    +

    Yamaha SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -139,12 +143,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -152,9 +156,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class YamahaSSH(YamahaBase):
         """Yamaha SSH driver."""
     
    @@ -216,16 +222,16 @@ 

    Inherited members

    class YamahaTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Yamaha Telnet driver.

    +

    Yamaha Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -264,7 +270,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -309,12 +315,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -322,9 +328,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class YamahaTelnet(YamahaBase):
         """Yamaha Telnet driver."""
     
    @@ -420,9 +428,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/yamaha/yamaha.html b/docs/netmiko/yamaha/yamaha.html index 44db311aa..ce141ee17 100644 --- a/docs/netmiko/yamaha/yamaha.html +++ b/docs/netmiko/yamaha/yamaha.html @@ -3,15 +3,17 @@ - + netmiko.yamaha.yamaha API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.yamaha.yamaha

    -Source code + +Expand source code +
    import time
     import re
     from typing import Any, Optional
    @@ -70,7 +74,9 @@ 

    Module netmiko.yamaha.yamaha

    raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in administrator mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -126,17 +132,17 @@

    Classes

    class YamahaBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Defines vendor independent methods.

    +

    Defines vendor independent methods.

    Otherwise method left as a stub method.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -175,7 +181,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -220,12 +226,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -233,9 +239,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class YamahaBase(BaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -277,7 +285,9 @@ 

    Classes

    raise ValueError("Failed to exit enable mode.") return output - def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool: + def check_config_mode( + self, check_string: str = "#", pattern: str = "", force_regex: bool = False + ) -> bool: """Checks if the device is in administrator mode or not.""" return super().check_config_mode(check_string=check_string, pattern=pattern) @@ -318,25 +328,31 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string='#', pattern='') +def check_config_mode(self, check_string: str = '#', pattern: str = '', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in administrator mode or not.

    +

    Checks if the device is in administrator mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = "#", pattern: str = "") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = "#", pattern: str = "", force_regex: bool = False
    +) -> bool:
         """Checks if the device is in administrator mode or not."""
         return super().check_config_mode(check_string=check_string, pattern=pattern)
    -def exit_config_mode(self, exit_config='exit', pattern='>') +def exit_config_mode(self, exit_config: str = 'exit', pattern: str = '>') ‑> str
    -

    No action taken. Call 'exit_enable_mode()' to explicitly exit Administration -Level.

    +

    No action taken. Call 'exit_enable_mode()' to explicitly exit Administration +Level.

    -Source code + +Expand source code +
    def exit_config_mode(self, exit_config: str = "exit", pattern: str = ">") -> str:
         """
         No action taken. Call 'exit_enable_mode()' to explicitly exit Administration
    @@ -346,13 +362,15 @@ 

    Methods

    -def exit_enable_mode(self, exit_command='exit') +def exit_enable_mode(self, exit_command: str = 'exit') ‑> str
    -

    When any changes have been made, the prompt 'Save new configuration ? (Y/N)' -appears before exiting. Ignore this by entering 'N'.

    +

    When any changes have been made, the prompt 'Save new configuration ? (Y/N)' +appears before exiting. Ignore this by entering 'N'.

    -Source code + +Expand source code +
    def exit_enable_mode(self, exit_command: str = "exit") -> str:
         """
         When any changes have been made, the prompt 'Save new configuration ? (Y/N)'
    @@ -373,12 +391,14 @@ 

    Methods

    -def save_config(self, cmd='save', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'save', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config.

    +

    Saves Config.

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "save", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -391,12 +411,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -453,16 +475,16 @@ 

    Inherited members

    class YamahaSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Yamaha SSH driver.

    +

    Yamaha SSH driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -501,7 +523,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -546,12 +568,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -559,9 +581,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class YamahaSSH(YamahaBase):
         """Yamaha SSH driver."""
     
    @@ -623,16 +647,16 @@ 

    Inherited members

    class YamahaTelnet -(*args, **kwargs) +(*args: Any, **kwargs: Any)
    -

    Yamaha Telnet driver.

    +

    Yamaha Telnet driver.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -671,7 +695,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -716,12 +740,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -729,9 +753,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class YamahaTelnet(YamahaBase):
         """Yamaha Telnet driver."""
     
    @@ -832,9 +858,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/zte/index.html b/docs/netmiko/zte/index.html index 737071577..651e8f62d 100644 --- a/docs/netmiko/zte/index.html +++ b/docs/netmiko/zte/index.html @@ -3,15 +3,17 @@ - + netmiko.zte API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.zte

    -Source code + +Expand source code +
    from netmiko.zte.zte_zxros import ZteZxrosSSH
     from netmiko.zte.zte_zxros import ZteZxrosTelnet
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.zte.zte_zxros
    -
    +
    @@ -46,16 +50,16 @@

    Classes

    class ZteZxrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -94,7 +98,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -139,12 +143,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -152,9 +156,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class ZteZxrosSSH(ZteZxrosBase):
         pass
    @@ -215,16 +221,16 @@

    Inherited members

    class ZteZxrosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -263,7 +269,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -308,12 +314,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -321,9 +327,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ZteZxrosTelnet(ZteZxrosBase):
         @staticmethod
         def _process_option(telnet_sock: socket, cmd: bytes, opt: bytes) -> None:
    @@ -440,9 +448,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/zte/zte_zxros.html b/docs/netmiko/zte/zte_zxros.html index 30039d1b7..6b54a5c76 100644 --- a/docs/netmiko/zte/zte_zxros.html +++ b/docs/netmiko/zte/zte_zxros.html @@ -3,15 +3,17 @@ - + netmiko.zte.zte_zxros API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.zte.zte_zxros

    -Source code + +Expand source code +
    import time
     from socket import socket
     from typing import Any
    @@ -40,7 +44,9 @@ 

    Module netmiko.zte.zte_zxros

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ @@ -99,16 +105,16 @@

    Classes

    class ZteZxrosBase -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -147,7 +153,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -192,12 +198,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -205,9 +211,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ZteZxrosBase(CiscoBaseConnection):
         def session_preparation(self) -> None:
             """Prepare the session after the connection has been established."""
    @@ -218,7 +226,9 @@ 

    Classes

    time.sleep(0.3 * self.global_delay_factor) self.clear_buffer() - def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool: + def check_config_mode( + self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False + ) -> bool: """ Checks if the device is in configuration mode or not. """ @@ -245,13 +255,17 @@

    Subclasses

    Methods

    -def check_config_mode(self, check_string=')#', pattern='#') +def check_config_mode(self, check_string: str = ')#', pattern: str = '#', force_regex: bool = False) ‑> bool
    -

    Checks if the device is in configuration mode or not.

    +

    Checks if the device is in configuration mode or not.

    -Source code -
    def check_config_mode(self, check_string: str = ")#", pattern: str = "#") -> bool:
    +
    +Expand source code
    +
    +
    def check_config_mode(
    +    self, check_string: str = ")#", pattern: str = "#", force_regex: bool = False
    +) -> bool:
         """
         Checks if the device is in configuration mode or not.
         """
    @@ -259,12 +273,14 @@ 

    Methods

    -def save_config(self, cmd='write', confirm=False, confirm_response='') +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str
    -

    Saves Config Using Copy Run Start

    +

    Saves Config Using Copy Run Start

    -Source code + +Expand source code +
    def save_config(
         self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
     ) -> str:
    @@ -275,12 +291,14 @@ 

    Methods

    -def session_preparation(self) +def session_preparation(self) ‑> None
    -

    Prepare the session after the connection has been established.

    +

    Prepare the session after the connection has been established.

    -Source code + +Expand source code +
    def session_preparation(self) -> None:
         """Prepare the session after the connection has been established."""
         self._test_channel_read(pattern=r"[>#]")
    @@ -340,16 +358,16 @@ 

    Inherited members

    class ZteZxrosSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -388,7 +406,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -433,12 +451,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -446,9 +464,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ZteZxrosSSH(ZteZxrosBase):
         pass
    @@ -509,16 +529,16 @@

    Inherited members

    class ZteZxrosTelnet -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Base Class for cisco-like behavior.

    +

    Base Class for cisco-like behavior.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -557,7 +577,7 @@ 

    Inherited members

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -602,12 +622,12 @@

    Inherited members

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -615,9 +635,11 @@

    Inherited members

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ZteZxrosTelnet(ZteZxrosBase):
         @staticmethod
         def _process_option(telnet_sock: socket, cmd: bytes, opt: bytes) -> None:
    @@ -737,9 +759,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/docs/netmiko/zyxel/index.html b/docs/netmiko/zyxel/index.html index 771c1a05e..8cfaac954 100644 --- a/docs/netmiko/zyxel/index.html +++ b/docs/netmiko/zyxel/index.html @@ -3,15 +3,17 @@ - + netmiko.zyxel API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.zyxel

    -Source code + +Expand source code +
    from netmiko.zyxel.zyxel_ssh import ZyxelSSH
     
     
    @@ -33,7 +37,7 @@ 

    Sub-modules

    netmiko.zyxel.zyxel_ssh
    -
    +
    @@ -46,10 +50,10 @@

    Classes

    class ZyxelSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -59,10 +63,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -101,7 +105,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -146,12 +150,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -159,9 +163,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +

    -Source code + +Expand source code +
    class ZyxelSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def disable_paging(self, *args: Any, **kwargs: Any) -> str:
             """No paging on Zyxel"""
    @@ -198,24 +204,28 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    No paging on Zyxel

    +

    No paging on Zyxel

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """No paging on Zyxel"""
         return ""
    -def send_config_set(self, config_commands=None, exit_config_mode=False, enter_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    No config mode on Zyxel

    +

    No config mode on Zyxel

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -314,9 +324,7 @@ 

    Zyxel

    - - \ No newline at end of file diff --git a/docs/netmiko/zyxel/zyxel_ssh.html b/docs/netmiko/zyxel/zyxel_ssh.html index 6dd88ccac..e6ad58db4 100644 --- a/docs/netmiko/zyxel/zyxel_ssh.html +++ b/docs/netmiko/zyxel/zyxel_ssh.html @@ -3,15 +3,17 @@ - + netmiko.zyxel.zyxel_ssh API documentation - - - - - + + + + + + +
    @@ -21,7 +23,9 @@

    Module netmiko.zyxel.zyxel_ssh

    -Source code + +Expand source code +
    from typing import Any, Sequence, TextIO, Union
     from netmiko.cisco_base_connection import CiscoSSHConnection
     from netmiko.no_enable import NoEnable
    @@ -65,10 +69,10 @@ 

    Classes

    class ZyxelSSH -(ip='', host='', username='', password=None, secret='', port=None, device_type='', verbose=False, global_delay_factor=1.0, global_cmd_verify=None, use_keys=False, key_file=None, pkey=None, passphrase=None, disabled_algorithms=None, allow_agent=False, ssh_strict=False, system_host_keys=False, alt_host_keys=False, alt_key_file='', ssh_config_file=None, conn_timeout=10, auth_timeout=None, banner_timeout=15, blocking_timeout=20, timeout=100, session_timeout=60, read_timeout_override=None, keepalive=0, default_enter=None, response_return=None, serial_settings=None, fast_cli=True, session_log=None, session_log_record_writes=False, session_log_file_mode='write', allow_auto_change=False, encoding='ascii', sock=None, auto_connect=True, delay_factor_compat=False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)
    -

    Class for platforms that have no enable mode.

    +

    Class for platforms that have no enable mode.

    Netmiko translates the meaning of "enable" mode to be a proxy for "can go into config mode". In other words, that you ultimately have privileges to execute configuration changes.

    @@ -78,10 +82,10 @@

    Classes

    don't explicitly support enable mode.

        Initialize attributes for establishing connection to target device.
     
    -    :param ip: IP address of target device. Not required if `host` is
    +    :param ip: IP address of target device. Not required if <code>host</code> is
             provided.
     
    -    :param host: Hostname of target device. Not required if `ip` is
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
                 provided.
     
         :param username: Username to authenticate against target device if
    @@ -120,7 +124,7 @@ 

    Classes

    :param system_host_keys: Load host keys from the users known_hosts file. - :param alt_host_keys: If `True` host keys will be loaded from the file specified in + :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in alt_key_file. :param alt_key_file: SSH host key file to use (if alt_host_keys=True). @@ -165,12 +169,12 @@

    Classes

    :param encoding: Encoding to be used when writing bytes to the output channel. (default: ascii) - :param sock: An open socket or socket-like object (such as a `.Channel`) to use for + :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for communication to the target host (default: None). :param global_cmd_verify: Control whether command echo verification is enabled or disabled - (default: None). Global attribute takes precedence over function `cmd_verify` - argument. Value of `None` indicates to use function `cmd_verify` argument. + (default: None). Global attribute takes precedence over function <code>cmd\_verify</code> + argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument. :param auto_connect: Control whether Netmiko automatically establishes the connection as part of the object creation (default: True). @@ -178,9 +182,11 @@

    Classes

    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko 3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be eliminated in Netmiko 5.x (default: False). -
    +
    -Source code + +Expand source code +
    class ZyxelSSH(NoEnable, NoConfig, CiscoSSHConnection):
         def disable_paging(self, *args: Any, **kwargs: Any) -> str:
             """No paging on Zyxel"""
    @@ -217,24 +223,28 @@ 

    Ancestors

    Methods

    -def disable_paging(self, *args, **kwargs) +def disable_paging(self, *args: Any, **kwargs: Any) ‑> str
    -

    No paging on Zyxel

    +

    No paging on Zyxel

    -Source code + +Expand source code +
    def disable_paging(self, *args: Any, **kwargs: Any) -> str:
         """No paging on Zyxel"""
         return ""
    -def send_config_set(self, config_commands=None, exit_config_mode=False, enter_config_mode=False, **kwargs) +def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any) ‑> str
    -

    No config mode on Zyxel

    +

    No config mode on Zyxel

    -Source code + +Expand source code +
    def send_config_set(
         self,
         config_commands: Union[str, Sequence[str], TextIO, None] = None,
    @@ -328,9 +338,7 @@ 

    -

    Generated by pdoc 0.6.3.

    +

    Generated by pdoc 0.10.0.

    - - \ No newline at end of file diff --git a/netmiko/__init__.py b/netmiko/__init__.py index 00ff2dc7b..3b3f80637 100644 --- a/netmiko/__init__.py +++ b/netmiko/__init__.py @@ -1,6 +1,6 @@ import sys -__version__ = "4.1.1-a1" +__version__ = "4.1.1" PY_MAJ_VER = 3 PY_MIN_VER = 7 MIN_PYTHON_VER = "3.7" diff --git a/release_process.txt b/release_process.txt index b1294e67e..f6d476429 100644 --- a/release_process.txt +++ b/release_process.txt @@ -1,5 +1,5 @@ -# Use pydev1 machine +# Use pydev2 machine # Use virtual environment = .venv # Run the following command to update docs: diff --git a/requirements-dev.txt b/requirements-dev.txt index 3b21b292c..2f7b6d332 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -6,6 +6,7 @@ pytest==7.1.2 pylama==8.3.8 twine==1.15.0 pysnmp==4.4.12 +pdoc3==0.10.0 # Black/click issue (can go away when black is upgraded to >= 22.3.0) # click==8.0.0 types-paramiko From 079b1b4f825838e10d110306a57c68b91d0cc9ce Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 6 Jul 2022 08:45:21 -0700 Subject: [PATCH 22/34] Improve disconnect behavior (#2846) --- netmiko/base_connection.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index c2813bdd6..90300bd7d 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -2308,6 +2308,11 @@ def disconnect(self) -> None: """Try to gracefully close the session.""" try: self.cleanup() + except Exception: + # Keep going on cleanup process even if exceptions + pass + + try: if self.protocol == "ssh": self.paramiko_cleanup() elif self.protocol == "telnet": From a64daac6884f51dabcb6e7a058df66528816a80c Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 6 Jul 2022 08:45:40 -0700 Subject: [PATCH 23/34] Improve encoding behavior (#2847) --- netmiko/base_connection.py | 2 +- netmiko/channel.py | 6 +++--- netmiko/utilities.py | 16 ++++++---------- tests/unit/test_utilities.py | 3 +++ 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 90300bd7d..1fa604aa3 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -176,7 +176,7 @@ def __init__( session_log_record_writes: bool = False, session_log_file_mode: str = "write", allow_auto_change: bool = False, - encoding: str = "ascii", + encoding: str = "utf-8", sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False, diff --git a/netmiko/channel.py b/netmiko/channel.py index d7bf759e1..bef9a78b1 100644 --- a/netmiko/channel.py +++ b/netmiko/channel.py @@ -82,7 +82,7 @@ def read_buffer(self) -> str: outbuf = self.remote_conn.recv(MAX_BUFFER) if len(outbuf) == 0: raise ReadException("Channel stream closed by remote device.") - output += outbuf.decode("utf-8", "ignore") + output += outbuf.decode(self.encoding, "ignore") return output def read_channel(self) -> str: @@ -123,7 +123,7 @@ def read_channel(self) -> str: """Read all of the available data from the channel.""" if self.remote_conn is None: raise ReadException("Attempt to read, but there is no active channel.") - return self.remote_conn.read_very_eager().decode("utf-8", "ignore") + return self.remote_conn.read_very_eager().decode(self.encoding, "ignore") class SerialChannel(Channel): @@ -150,7 +150,7 @@ def read_buffer(self) -> str: raise ReadException("Attempt to read, but there is no active channel.") if self.remote_conn.in_waiting > 0: output = self.remote_conn.read(self.remote_conn.in_waiting).decode( - "utf-8", "ignore" + self.encoding, "ignore" ) assert isinstance(output, str) return output diff --git a/netmiko/utilities.py b/netmiko/utilities.py index da7d000fa..a049a4a68 100644 --- a/netmiko/utilities.py +++ b/netmiko/utilities.py @@ -223,16 +223,12 @@ def find_netmiko_dir() -> Tuple[str, str]: return (netmiko_base_dir, netmiko_full_dir) -def write_bytes(out_data: AnyStr, encoding: str = "ascii") -> bytes: - """Legacy for Python2 and Python3 compatible byte stream.""" - if sys.version_info[0] >= 3: - if isinstance(out_data, str): - if encoding == "utf-8": - return out_data.encode("utf-8") - else: - return out_data.encode("ascii", "ignore") - elif isinstance(out_data, bytes): - return out_data +def write_bytes(out_data: AnyStr, encoding: str = "utf-8") -> bytes: + """Ensure output is properly encoded bytes.""" + if isinstance(out_data, str): + return out_data.encode(encoding) + elif isinstance(out_data, bytes): + return out_data msg = f"Invalid value for out_data neither unicode nor byte string: {str(out_data)}" raise ValueError(msg) diff --git a/tests/unit/test_utilities.py b/tests/unit/test_utilities.py index 6c8f1b330..b9cbc47e7 100755 --- a/tests/unit/test_utilities.py +++ b/tests/unit/test_utilities.py @@ -224,6 +224,9 @@ def test_ntc_templates_discovery(): ntc_path = utilities.get_template_dir() for py_path in sys.path: if "site-packages" in py_path: + _, suffix = py_path.split("site-packages") + if len(suffix) > 1: # Should be "" or "/" + continue packages_dir = py_path break assert ntc_path == f"{packages_dir}/ntc_templates/templates" From 859b43919b9e1067689e814f997dda46e0b33fdd Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 6 Jul 2022 09:17:27 -0700 Subject: [PATCH 24/34] Fix textfsm dependency issue by pinning to 1.1.2 (#2850) --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 928885cff..32512a143 100644 --- a/setup.py +++ b/setup.py @@ -52,7 +52,7 @@ def find_version(*file_paths): "scp>=0.13.3", "tenacity", "pyyaml>=5.3", - "textfsm>=1.1.2", + "textfsm==1.1.2", "ntc-templates>=2.0.0", "pyserial", ], From 330d15eedd843002f69411161cdd2728cbf5ae20 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 6 Jul 2022 10:10:26 -0700 Subject: [PATCH 25/34] Proposed Cisco WLC fix for session_preparation() problems (#2822) --- netmiko/cisco/cisco_wlc_ssh.py | 82 ++++++++++++++++-------------- netmiko/extreme/extreme_ers_ssh.py | 2 +- 2 files changed, 45 insertions(+), 39 deletions(-) diff --git a/netmiko/cisco/cisco_wlc_ssh.py b/netmiko/cisco/cisco_wlc_ssh.py index 20e9466ba..31eabdc37 100644 --- a/netmiko/cisco/cisco_wlc_ssh.py +++ b/netmiko/cisco/cisco_wlc_ssh.py @@ -11,11 +11,7 @@ class CiscoWlcSSH(BaseConnection): """Netmiko Cisco WLC support.""" - def __init__(self, *args: Any, **kwargs: Any) -> None: - # WLC/AireOS has an issue where you can get "No Existing Session" with - # the default conn_timeout (so increase conn_timeout to 10-seconds). - kwargs.setdefault("conn_timeout", 10) - return super().__init__(*args, **kwargs) + prompt_pattern = r"(?m:[>#]\s*$)" # force re.Multiline def special_login_handler(self, delay_factor: float = 1.0) -> None: """WLC presents with the following on login (in certain OS versions) @@ -28,25 +24,51 @@ def special_login_handler(self, delay_factor: float = 1.0) -> None: Password:**** """ - delay_factor = self.select_delay_factor(delay_factor) - i = 0 - time.sleep(delay_factor * 0.5) output = "" - while i <= 12: - output = self.read_channel() - if output: - if "login as" in output or "User:" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "Password" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(delay_factor * 1) + uname = "User:" + login = "login as" + password = "ssword" + pattern = rf"(?:{uname}|{login}|{password}|{self.prompt_pattern})" + + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if uname in new_data or login in new_data: + assert isinstance(self.username, str) + self.write_channel(self.username + self.RETURN) + elif password in new_data: + assert isinstance(self.password, str) + self.write_channel(self.password + self.RETURN) else: - # no output read, sleep and go for one more round of read channel - time.sleep(delay_factor * 1.5) - i += 1 + msg = f""" +Failed to login to Cisco WLC Device. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) + + def session_preparation(self) -> None: + """ + Prepare the session after the connection has been established + + Cisco WLC uses "config paging disable" to disable paging + """ + + # _test_channel_read() will happen in the special_login_handler() + try: + self.set_base_prompt() + except ValueError: + msg = f"Authentication failed: {self.host}" + raise NetmikoAuthenticationException(msg) + + self.disable_paging(command="config paging disable") def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str: """ @@ -145,22 +167,6 @@ def _send_command_w_yes(self, *args: Any, **kwargs: Any) -> str: output = self.strip_prompt(output) return output - def session_preparation(self) -> None: - """ - Prepare the session after the connection has been established - - Cisco WLC uses "config paging disable" to disable paging - """ - self._test_channel_read(pattern=r"[>#]") - - try: - self.set_base_prompt() - except ValueError: - msg = f"Authentication failed: {self.host}" - raise NetmikoAuthenticationException(msg) - - self.disable_paging(command="config paging disable") - def cleanup(self, command: str = "logout") -> None: """Reset WLC back to normal paging and gracefully close session.""" self.send_command_timing("config paging enable") diff --git a/netmiko/extreme/extreme_ers_ssh.py b/netmiko/extreme/extreme_ers_ssh.py index 186f52ad5..241f6b453 100644 --- a/netmiko/extreme/extreme_ers_ssh.py +++ b/netmiko/extreme/extreme_ers_ssh.py @@ -50,7 +50,7 @@ def special_login_handler(self, delay_factor: float = 1.0) -> None: self.write_channel(self.password + self.RETURN) else: msg = f""" -Failed to login to Extreme ERS Devices. +Failed to login to Extreme ERS Device. Pattern not detected: {pattern} output: From 307956987f9e34e6d47f09fcaa428fd2239b5646 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 6 Jul 2022 10:17:33 -0700 Subject: [PATCH 26/34] Added Versa FlexVNF platform to SSH autodetect (#2851) Co-authored-by: N:D <38920955+nagydaniel2@users.noreply.github.com> --- netmiko/ssh_autodetect.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/netmiko/ssh_autodetect.py b/netmiko/ssh_autodetect.py index 76153c17b..2aedd44d9 100644 --- a/netmiko/ssh_autodetect.py +++ b/netmiko/ssh_autodetect.py @@ -252,6 +252,12 @@ "priority": 99, "dispatch": "_autodetect_std", }, + "flexvnf": { + "cmd": "show system package-info", + "search_patterns": [r"Versa FlexVNF"], + "priority": 99, + "dispatch": "_autodetect_std", + }, } # Sort SSH_MAPPER_DICT such that the most common commands are first From f53a7a70725e539d1b5c4ee2a6c87050a1e045d0 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 12 Jul 2022 15:07:19 -0700 Subject: [PATCH 27/34] set self.global_cmd_verify=False only if None (#2856) Co-authored-by: lucas --- netmiko/nokia/nokia_sros.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netmiko/nokia/nokia_sros.py b/netmiko/nokia/nokia_sros.py index c9b3e84cd..ce8899b8b 100644 --- a/netmiko/nokia/nokia_sros.py +++ b/netmiko/nokia/nokia_sros.py @@ -53,7 +53,9 @@ def session_preparation(self) -> None: else: # Classical CLI has no method to set the terminal width nor to disable command # complete on space; consequently, cmd_verify needs disabled. - self.global_cmd_verify = False + # Only disabled if not set under the ConnectHandler. + if self.global_cmd_verify is None: + self.global_cmd_verify = False self.disable_paging(command="environment no more", pattern="environment") # Clear the read buffer From 5ad5bb42d3bd8501992d8c8c7967f1ab9fd129b3 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 27 Jul 2022 12:38:29 -0700 Subject: [PATCH 28/34] Fix issue with redispatch not working due to no data (#2867) * Fix issue with redispatch not working due to no data * Juniper improvements if logging in as 'root' --- netmiko/base_connection.py | 6 +++++- netmiko/juniper/juniper.py | 5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 1fa604aa3..44d4fed07 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -868,7 +868,7 @@ def telnet_login( self.remote_conn.close() raise NetmikoAuthenticationException(msg) - def _try_session_preparation(self) -> None: + def _try_session_preparation(self, force_data: bool = True) -> None: """ In case of an exception happening during `session_preparation()` Netmiko should gracefully clean-up after itself. This might be challenging for library users @@ -876,6 +876,10 @@ def _try_session_preparation(self) -> None: to threads used in Paramiko. """ try: + # Netmiko needs there to be data for session_preparation to work. + if force_data: + self.write_channel(self.RETURN) + time.sleep(0.1) self.session_preparation() except Exception: self.disconnect() diff --git a/netmiko/juniper/juniper.py b/netmiko/juniper/juniper.py index 77a03c776..8ead15849 100644 --- a/netmiko/juniper/juniper.py +++ b/netmiko/juniper/juniper.py @@ -47,7 +47,8 @@ def _determine_mode(self, data: str = "") -> str: self.write_channel(self.RETURN) data = self.read_until_pattern(pattern=pattern, read_timeout=10) - if "%" in data or "$" in data: + shell_pattern = r"(?:root@|%|\$)" + if re.search(shell_pattern, data): return "shell" elif ">" in data or "#" in data: return "cli" @@ -58,7 +59,7 @@ def enter_cli_mode(self) -> None: """Check if at shell prompt root@ and go into CLI.""" mode = self._determine_mode() if mode == "shell": - shell_pattern = r"[%$]" + shell_pattern = r"(?:root@|%|\$)" self.write_channel(self.RETURN) cur_prompt = self.read_until_pattern(pattern=shell_pattern, read_timeout=10) if re.search(r"root@", cur_prompt) or re.search(r"^%$", cur_prompt.strip()): From fdd6dbc709e9b3451794f1cdb15b5af1374487af Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Wed, 3 Aug 2022 14:42:46 -0700 Subject: [PATCH 29/34] Updated Audiocode Driver (#2869) Co-authored-by: Gatorjosh14 <51381009+Gatorjosh14@users.noreply.github.com> --- netmiko/audiocode/__init__.py | 17 + netmiko/audiocode/audiocode_ssh.py | 475 ++++++++++++++++++ netmiko/ssh_dispatcher.py | 14 + requirements-dev.txt | 4 +- tests/etc/commands.yml.example | 39 ++ tests/etc/responses.yml.example | 35 +- tests/etc/test_devices.yml.example | 22 +- .../netmiko_audiocode_driver_test_results.txt | 319 ++++++++++++ tests/test_netmiko_config.py | 22 +- tests/test_netmiko_show.py | 17 +- 10 files changed, 952 insertions(+), 12 deletions(-) create mode 100644 netmiko/audiocode/__init__.py create mode 100644 netmiko/audiocode/audiocode_ssh.py create mode 100644 tests/netmiko_audiocode_driver_test_results.txt diff --git a/netmiko/audiocode/__init__.py b/netmiko/audiocode/__init__.py new file mode 100644 index 000000000..b45720bb3 --- /dev/null +++ b/netmiko/audiocode/__init__.py @@ -0,0 +1,17 @@ +from netmiko.audiocode.audiocode_ssh import ( + Audiocode72SSH, + Audiocode66SSH, + AudiocodeShellSSH, + Audiocode72Telnet, + Audiocode66Telnet, + AudiocodeShellTelnet, +) + +__all__ = [ + "Audiocode72SSH", + "Audiocode66SSH", + "AudiocodeShellSSH", + "Audiocode72Telnet", + "Audiocode66Telnet", + "AudiocodeShellTelnet", +] diff --git a/netmiko/audiocode/audiocode_ssh.py b/netmiko/audiocode/audiocode_ssh.py new file mode 100644 index 000000000..875df8356 --- /dev/null +++ b/netmiko/audiocode/audiocode_ssh.py @@ -0,0 +1,475 @@ +from typing import Any, Optional, Sequence, TextIO, Union, List +import time +import re +from netmiko.base_connection import BaseConnection +from netmiko.no_enable import NoEnable + + +class AudiocodeBase(BaseConnection): + """Common Methods for AudioCode Drivers.""" + + def __init__(self, *args: Any, **kwargs: Any) -> None: + default_enter = kwargs.get("default_enter") + kwargs["default_enter"] = "\r" if default_enter is None else default_enter + super().__init__(*args, **kwargs) + + def session_preparation(self) -> None: + """Prepare the session after the connection has been established.""" + self._test_channel_read(pattern=r"[>#]") + self.set_base_prompt() + self.disable_paging() + # Clear the read buffer + self.clear_buffer() + + def set_base_prompt( + self, + pri_prompt_terminator: str = "#", + alt_prompt_terminator: str = ">", + delay_factor: float = 1.0, + pattern: Optional[str] = r"\*?(#|>)", + ) -> str: + return super().set_base_prompt( + pri_prompt_terminator=pri_prompt_terminator, + alt_prompt_terminator=alt_prompt_terminator, + delay_factor=delay_factor, + pattern=pattern, + ) + + def find_prompt( + self, + delay_factor: float = 1.0, + pattern: Optional[str] = r"\*?(#|>)", + ) -> str: + return super().find_prompt( + delay_factor=delay_factor, + pattern=pattern, + ) + + def _enable_paging( + self, + delay_factor: Optional[float] = 0.5, + ) -> str: + return "" + + def check_config_mode( + self, + check_string: str = r"(\)#|\)\*#)", + pattern: str = r"..#", + force_regex: bool = True, + ) -> bool: + + return super().check_config_mode( + check_string=check_string, pattern=pattern, force_regex=force_regex + ) + + def check_enable_mode(self, check_string: str = "#") -> bool: + return super().check_enable_mode(check_string=check_string) + + def cleanup(self, command: str = "exit") -> None: + """Gracefully exit the SSH session.""" + try: + self._enable_paging() + if self.check_config_mode(): + self.exit_config_mode() + except Exception: + pass + # Always try to send final 'exit' (command) + self._session_log_fin = True + self.write_channel(command + self.RETURN) + + def enable( + self, + cmd: str = "enable", + pattern: str = "ssword", + enable_pattern: Optional[str] = "#", + re_flags: int = re.IGNORECASE, + ) -> str: + return super().enable( + cmd=cmd, pattern=pattern, enable_pattern=enable_pattern, re_flags=re_flags + ) + + def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#") -> str: + output = "" + max_exit_depth = 10 + if self.check_config_mode(): + # Keep "exitting" until out of config mode + for _ in range(max_exit_depth): + self.write_channel(self.normalize_cmd(exit_config)) + + # Make sure you read until you detect the command echo (avoid getting out of sync) + if self.global_cmd_verify is not False: + output += self.read_until_pattern( + pattern=re.escape(exit_config.strip()) + ) + if pattern: + output += self.read_until_pattern(pattern=pattern) + else: + output += self.read_until_prompt(read_entire_line=True) + + if not self.check_config_mode(): + # No longer in config mode + break + else: # no-break + raise ValueError("Failed to exit configuration mode") + return output + + def exit_enable_mode(self, exit_command: str = "disable") -> str: + """Exit enable mode.""" + return super().exit_enable_mode(exit_command=exit_command) + + def send_config_set( + self, + config_commands: Union[str, Sequence[str], TextIO, None] = None, + *, + exit_config_mode: bool = True, + read_timeout: Optional[float] = None, + delay_factor: Optional[float] = 1.0, + max_loops: Optional[int] = 150, + strip_prompt: bool = False, + strip_command: bool = False, + config_mode_command: Optional[str] = None, + cmd_verify: bool = True, + enter_config_mode: bool = True, + error_pattern: str = "", + terminator: str = r"\*?#", + bypass_commands: Optional[str] = None, + ) -> str: + if enter_config_mode and config_mode_command is None: + msg = """ +send_config_set() for the Audiocode drivers require that you specify the +config_mode_command. For example, config_mode_command="configure system" +(or "configure voip" or "configure network" etc.) + """ + raise ValueError(msg) + return super().send_config_set( + config_commands=config_commands, + exit_config_mode=exit_config_mode, + read_timeout=read_timeout, + delay_factor=delay_factor, + max_loops=max_loops, + strip_prompt=strip_prompt, + strip_command=strip_command, + config_mode_command=config_mode_command, + cmd_verify=cmd_verify, + enter_config_mode=enter_config_mode, + error_pattern=error_pattern, + terminator=terminator, + bypass_commands=bypass_commands, + ) + + def save_config( + self, cmd: str = "write", confirm: bool = False, confirm_response: str = "" + ) -> str: + """Saves the running configuration.""" + + self.enable() + if confirm: + output = self._send_command_timing_str(command_string=cmd) + if confirm_response: + output += self._send_command_timing_str(confirm_response) + else: + # Send enter by default + output += self._send_command_timing_str(self.RETURN) + else: + # Some devices are slow so match on trailing-prompt if you can + output = self._send_command_str(command_string=cmd) + return output + + def _reload_device( + self, + cmd_save: str = "reload now", + cmd_no_save: str = "reload without-saving", + reload_save: bool = True, + ) -> str: + """Reloads the device.""" + if reload_save: + cmd = cmd_save + else: + cmd = cmd_no_save + self._enable_paging() + self.enable() + return self._send_command_timing_str(command_string=cmd) + + +class Audiocode72Base(AudiocodeBase): + """Common Methods for AudioCodes running 7.2 CLI.""" + + def disable_paging( + self, + command: str = "", + delay_factor: Optional[float] = 0.5, + cmd_verify: bool = True, + pattern: Optional[str] = None, + ) -> str: + + if command: + return super().disable_paging( + command=command, + delay_factor=delay_factor, + cmd_verify=cmd_verify, + pattern=pattern, + ) + else: + command_list: List[str] = [ + "cli-settings", + "window-height 0", + ] + + self.enable() + assert isinstance(delay_factor, float) + delay_factor = self.select_delay_factor(delay_factor) + time.sleep(delay_factor * 0.1) + self.clear_buffer() + return self.send_config_set( + config_commands=command_list, + config_mode_command="config system", + ) + + def _enable_paging( + self, + delay_factor: Optional[float] = 0.5, + ) -> str: + """This is designed to re-enable window paging.""" + + command_list: List[str] = [ + "cli-settings", + "window-height automatic", + ] + self.enable() + assert isinstance(delay_factor, float) + delay_factor = self.select_delay_factor(delay_factor) + time.sleep(delay_factor * 0.1) + self.clear_buffer() + + return self.send_config_set( + config_commands=command_list, + config_mode_command="config system", + ) + + +class Audiocode72Telnet(Audiocode72Base): + pass + + +class Audiocode72SSH(Audiocode72Base): + pass + + +class AudiocodeBase66(AudiocodeBase): + """Audiocode this applies to 6.6 Audiocode Firmware versions.""" + + def disable_paging( + self, + command: str = "", + delay_factor: Optional[float] = 0.5, + cmd_verify: bool = True, + pattern: Optional[str] = None, + ) -> str: + + if command: + return super().disable_paging( + command=command, + delay_factor=delay_factor, + cmd_verify=cmd_verify, + pattern=pattern, + ) + else: + command_list: List[str] = [ + "cli-terminal", + "set window-height 0", + ] + + self.enable() + assert isinstance(delay_factor, float) + delay_factor = self.select_delay_factor(delay_factor) + time.sleep(delay_factor * 0.1) + self.clear_buffer() + return self.send_config_set( + config_commands=command_list, + config_mode_command="config system", + ) + + def _enable_paging( + self, + delay_factor: Optional[float] = 0.5, + ) -> str: + + command_list: List[str] = [ + "cli-terminal", + "set window-height 100", + ] + self.enable() + assert isinstance(delay_factor, float) + delay_factor = self.select_delay_factor(delay_factor) + time.sleep(delay_factor * 0.1) + self.clear_buffer() + + return self.send_config_set( + config_commands=command_list, + config_mode_command="config system", + ) + + +class Audiocode66SSH(AudiocodeBase66): + pass + + +class Audiocode66Telnet(AudiocodeBase66): + pass + + +class AudiocodeShellBase(NoEnable, AudiocodeBase): + """Audiocode this applies to 6.6 Audiocode Firmware versions that only use the Shell.""" + + def session_preparation(self) -> None: + """Prepare the session after the connection has been established.""" + self.write_channel(self.RETURN) + self.write_channel(self.RETURN) + self._test_channel_read(pattern=r"/>") + self.set_base_prompt() + # Clear the read buffer + time.sleep(0.3 * self.global_delay_factor) + self.clear_buffer() + + def set_base_prompt( + self, + pri_prompt_terminator: str = r"/>", + alt_prompt_terminator: str = "", + delay_factor: float = 1.0, + pattern: Optional[str] = r"/>", + ) -> str: + prompt = self.find_prompt(delay_factor=delay_factor, pattern=pattern) + pattern = pri_prompt_terminator + if not re.search(pattern, prompt): + raise ValueError(f"Router prompt not found: {repr(prompt)}") + else: + # Strip off trailing terminator + self.base_prompt = prompt + return self.base_prompt + + def find_prompt( + self, + delay_factor: float = 1.0, + pattern: Optional[str] = r"/>", + ) -> str: + return super().find_prompt( + delay_factor=delay_factor, + pattern=pattern, + ) + + def send_config_set( + self, + config_commands: Union[str, Sequence[str], TextIO, None] = None, + *, + exit_config_mode: bool = True, + read_timeout: Optional[float] = None, + delay_factor: Optional[float] = 1.0, + max_loops: Optional[int] = 150, + strip_prompt: bool = False, + strip_command: bool = False, + config_mode_command: Optional[str] = None, + cmd_verify: bool = True, + enter_config_mode: bool = True, + error_pattern: str = "", + terminator: str = r"/.*>", + bypass_commands: str = None, + ) -> str: + + return super().send_config_set( + config_commands=config_commands, + exit_config_mode=exit_config_mode, + read_timeout=read_timeout, + delay_factor=delay_factor, + max_loops=max_loops, + strip_prompt=strip_prompt, + strip_command=strip_command, + config_mode_command=config_mode_command, + cmd_verify=cmd_verify, + enter_config_mode=enter_config_mode, + error_pattern=error_pattern, + terminator=terminator, + bypass_commands=bypass_commands, + ) + + def config_mode( + self, config_command: str = "", pattern: str = r"/.*>", re_flags: int = 0 + ) -> str: + return super().config_mode( + config_command=config_command, pattern=pattern, re_flags=re_flags + ) + + def check_config_mode( + self, + check_string: str = r"/CONFiguration>", + pattern: str = r"/.*>", + force_regex: bool = True, + ) -> bool: + return super().check_config_mode( + check_string=check_string, pattern=pattern, force_regex=force_regex + ) + + def exit_config_mode(self, exit_config: str = "..", pattern: str = r"/>") -> str: + return super().exit_config_mode(exit_config=exit_config, pattern=pattern) + + def disable_paging( + self, + command: str = "", + delay_factor: Optional[float] = 0.5, + cmd_verify: bool = True, + pattern: Optional[str] = None, + ) -> str: + """Not supported""" + return "" + + def save_config( + self, + cmd: str = "SaveConfiguration", + confirm: bool = False, + confirm_response: str = "", + ) -> str: + return super().save_config( + cmd=cmd, confirm=confirm, confirm_response=confirm_response + ) + + def _reload_device( + self, + cmd_save: str = "SaveAndReset", + cmd_no_save: str = "ReSetDevice", + reload_save: bool = True, + ) -> str: + """Reloads the device.""" + return super()._reload_device( + cmd_save=cmd_save, cmd_no_save=cmd_no_save, reload_save=reload_save + ) + + def _enable_paging( + self, + delay_factor: Optional[float] = 0.5, + ) -> str: + """Not supported""" + pass + + def strip_command(self, command_string: str, output: str) -> str: + # Support for Audiocode_Shell. + pattern = r"^SIP.*[\s\S]?PING.*>?.*[\s\S]?.*>?$" + output = re.sub(pattern, "", output, flags=re.M) + + cmd = command_string.strip() + pattern = re.escape(cmd) + output = re.sub(pattern, "", output, flags=re.M) + return super().strip_command(command_string=command_string, output=output) + + def strip_prompt(self, a_string: str) -> str: + pattern = r"^/>?" + a_string = re.sub(pattern, "", a_string, flags=re.M) + return super().strip_prompt( + a_string=a_string, + ) + + +class AudiocodeShellSSH(AudiocodeShellBase): + pass + + +class AudiocodeShellTelnet(AudiocodeShellBase): + pass diff --git a/netmiko/ssh_dispatcher.py b/netmiko/ssh_dispatcher.py index 36ff538a4..e3aaf4cbe 100755 --- a/netmiko/ssh_dispatcher.py +++ b/netmiko/ssh_dispatcher.py @@ -12,6 +12,14 @@ from netmiko.arista import AristaFileTransfer from netmiko.apresia import ApresiaAeosSSH, ApresiaAeosTelnet from netmiko.aruba import ArubaSSH +from netmiko.audiocode import ( + Audiocode72SSH, + Audiocode66SSH, + AudiocodeShellSSH, + Audiocode72Telnet, + Audiocode66Telnet, + AudiocodeShellTelnet, +) from netmiko.brocade import BrocadeFOSSSH from netmiko.broadcom import BroadcomIcosSSH from netmiko.calix import CalixB6SSH, CalixB6Telnet @@ -135,6 +143,9 @@ "aruba_os": ArubaSSH, "aruba_osswitch": HPProcurveSSH, "aruba_procurve": HPProcurveSSH, + "audiocode_72": Audiocode72SSH, + "audiocode_66": Audiocode66SSH, + "audiocode_shell": AudiocodeShellSSH, "avaya_ers": ExtremeErsSSH, "avaya_vsp": ExtremeVspSSH, "broadcom_icos": BroadcomIcosSSH, @@ -277,6 +288,9 @@ CLASS_MAPPER["apresia_aeos_telnet"] = ApresiaAeosTelnet CLASS_MAPPER["arista_eos_telnet"] = AristaTelnet CLASS_MAPPER["aruba_procurve_telnet"] = HPProcurveTelnet +CLASS_MAPPER["audiocode_72_telnet"] = Audiocode72Telnet +CLASS_MAPPER["audiocode_66_telnet"] = Audiocode66Telnet +CLASS_MAPPER["audiocode_shell_telnet"] = AudiocodeShellTelnet CLASS_MAPPER["brocade_fastiron_telnet"] = RuckusFastironTelnet CLASS_MAPPER["brocade_netiron_telnet"] = ExtremeNetironTelnet CLASS_MAPPER["calix_b6_telnet"] = CalixB6Telnet diff --git a/requirements-dev.txt b/requirements-dev.txt index 2f7b6d332..ec90032a4 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,12 +3,12 @@ mypy==0.961 mypy-extensions==0.4.3 PyYAML==5.4.1 pytest==7.1.2 +# Issue with build failure on pyflakes 2.5.0 +pyflakes==2.4.0 pylama==8.3.8 twine==1.15.0 pysnmp==4.4.12 pdoc3==0.10.0 -# Black/click issue (can go away when black is upgraded to >= 22.3.0) -# click==8.0.0 types-paramiko types-PyYAML -r requirements.txt diff --git a/tests/etc/commands.yml.example b/tests/etc/commands.yml.example index a67ab8534..f431a3d39 100644 --- a/tests/etc/commands.yml.example +++ b/tests/etc/commands.yml.example @@ -510,3 +510,42 @@ nokia_srl: - "interface ethernet-1/1 admin-state disable" - "interface ethernet-1/1 admin-state enable" config_verification: "show interface ethernet-1/1 brief" + +audiocode_72: + version: "show system version" + basic: "show data interfaces gigabitethernet 0/0" + extended_output: "show system version" # requires paging to be disabled + config: + - "ip domain name home" # base command + - "ip domain name house" # something you can verify has changed + config_verification: "show run data" + save_config_cmd: 'write' + save_config_confirm: False + save_config_response: 'Writing configuration...done' + config_mode_command: "config data" + +audiocode_66: + version: "show system version" + basic: "show data interfaces gigabitethernet 0/0" + extended_output: "show system version" # requires paging to be disabled + config: + - "no ip route 1.1.1.1 255.255.255.255 2.2.2.2 GigabitEthernet 0/0 1" # base command + - "no ip route 1.1.1.1 255.255.255.255 1.1.1.1 GigabitEthernet 0/0 1" + - "ip route 1.1.1.1 255.255.255.255 2.2.2.2 GigabitEthernet 0/0 1" + config_verification: "show run data" # something you can verify has changed + save_config_cmd: 'write' + save_config_confirm: False + save_config_response: 'Writing configuration...done' + config_mode_command: "config data" # only use if needed + +audiocode_shell: + version: "show info" + basic: "show ip conf" + extended_output: "show info" # requires paging to be disabled + config: + - "SCP SNMPSysContact Test_String2" # base command + config_verification: "cf get" # something you can verify has changed + save_config_cmd: 'SaveConfiguration' + save_config_confirm: False + save_config_response: 'Configuration has been saved' + config_mode_command: "conf" # only use if needed diff --git a/tests/etc/responses.yml.example b/tests/etc/responses.yml.example index bc0585244..8c072518a 100644 --- a/tests/etc/responses.yml.example +++ b/tests/etc/responses.yml.example @@ -362,4 +362,37 @@ nokia_srl: multiple_line_output: "Summary" cmd_response_init: "disable" cmd_response_final: "enable" - save_config: "Saved current running configuration as initial" \ No newline at end of file + save_config: "Saved current running configuration as initial" + +audiocode_72: + base_prompt: TESTROUTER + router_prompt : TESTROUTER> + enable_prompt: TESTROUTER# + interface_ip: 192.168.1.1 + version_banner: "Version info:" + multiple_line_output: "HardwareVersion: M500--4LG-CA1SF-2U" + save_config: 'Writing configuration...done' + cmd_response_init: "ip domain name home" + cmd_response_final: "ip domain name house" + +audiocode_66: + base_prompt: Mediant 800 + router_prompt : Mediant 800> + enable_prompt: Mediant 800# + interface_ip: 192.168.1.2 + version_banner: "Version info:" + multiple_line_output: "; 3 : FXS : 4" + save_config: 'Writing configuration...done' + cmd_response_init: "ip route 1.1.1.1 255.255.255.255 1.1.1.1 GigabitEthernet 0/0 1" + cmd_response_final: "ip route 1.1.1.1 255.255.255.255 2.2.2.2 GigabitEthernet 0/0 1" + +audiocode_shell: + base_prompt: /> + router_prompt : /> + enable_prompt: /> + interface_ip: 192.168.1.3 + version_banner: "Last reset reason:" + multiple_line_output: "Last reset reason:" + save_config: 'Configuration has been saved' + cmd_response_init: "Test_String1" + cmd_response_final: "Test_String2" diff --git a/tests/etc/test_devices.yml.example b/tests/etc/test_devices.yml.example index 1b0466dd6..38a6f92cd 100644 --- a/tests/etc/test_devices.yml.example +++ b/tests/etc/test_devices.yml.example @@ -268,4 +268,24 @@ nokia_srl: device_type: nokia_srl ip: clab-srltest-srl1 username: admin - password: 'admin' \ No newline at end of file + password: 'admin' + +audiocode_72: + device_type: audiocode_72 + ip: 192.168.1.1 + username: TestUser + password: TestPass + secret: TestPass + +audiocode_66: + device_type: audiocode_66 + ip: 192.168.1.2 + username: TestUser + password: TestPass + secret: TestPass + +audiocode_shell: + device_type: audiocode_shell + ip: 192.168.1.3 + username: TestUser + password: TestPass diff --git a/tests/netmiko_audiocode_driver_test_results.txt b/tests/netmiko_audiocode_driver_test_results.txt new file mode 100644 index 000000000..bd9512450 --- /dev/null +++ b/tests/netmiko_audiocode_driver_test_results.txt @@ -0,0 +1,319 @@ +############################ AUDIOCODE_BASE DRIVER RESULTS ################################## + + + +(venv) PS C:\Users\p2149451\Documents\Python Projects\venv\netmiko\tests> py.test -v test_netmiko_show.py --test_device audiocode_base +========================================= test session starts ========================================== +platform win32 -- Python 3.9.5, pytest-7.1.2, pluggy-1.0.0 -- c:\users\p2149451\documents\python projects\venv\scripts\python.exe +cachedir: .pytest_cache +rootdir: C:\Users\p2149451\Documents\Python Projects\venv\netmiko, configfile: setup.cfg +plugins: pylama-8.3.8, print-0.3.1, vscodedebug-0.1.0 +collected 24 items + +test_netmiko_show.py::test_disable_paging PASSED [ 4%] +test_netmiko_show.py::test_terminal_width PASSED [ 8%] +test_netmiko_show.py::test_ssh_connect PASSED [ 12%] +test_netmiko_show.py::test_ssh_connect_cm PASSED [ 16%] +test_netmiko_show.py::test_send_command_timing PASSED [ 20%] +test_netmiko_show.py::test_send_command_timing_no_cmd_verify SKIPPED [ 25%] +test_netmiko_show.py::test_send_command PASSED [ 29%] +test_netmiko_show.py::test_send_command_no_cmd_verify SKIPPED [ 33%] +test_netmiko_show.py::test_complete_on_space_disabled SKIPPED [ 37%] +test_netmiko_show.py::test_send_command_textfsm SKIPPED (TextFSM/ntc-templates not supported ...) [ 41%] +test_netmiko_show.py::test_send_command_ttp SKIPPED (TTP template not existing for this platform) [ 45%] +test_netmiko_show.py::test_send_command_genie SKIPPED (Genie not supported on this platform) [ 50%] +test_netmiko_show.py::test_send_multiline_timing SKIPPED [ 54%] +test_netmiko_show.py::test_send_multiline SKIPPED [ 58%] +test_netmiko_show.py::test_send_multiline_prompt SKIPPED [ 62%] +test_netmiko_show.py::test_send_multiline_simple SKIPPED [ 66%] +test_netmiko_show.py::test_base_prompt PASSED [ 70%] +test_netmiko_show.py::test_strip_prompt PASSED [ 75%] +test_netmiko_show.py::test_strip_command PASSED [ 79%] +test_netmiko_show.py::test_normalize_linefeeds PASSED [ 83%] +test_netmiko_show.py::test_clear_buffer PASSED [ 87%] +test_netmiko_show.py::test_enable_mode PASSED [ 91%] +test_netmiko_show.py::test_disconnect PASSED [ 95%] +test_netmiko_show.py::test_disconnect_no_enable SKIPPED [100%] + +=========================================== warnings summary =========================================== +tests/test_netmiko_show.py::test_disable_paging +tests/test_netmiko_show.py::test_ssh_connect_cm +tests/test_netmiko_show.py::test_disconnect_no_enable + c:\users\p2149451\documents\python projects\venv\netmiko\netmiko\base_connection.py:2088: DeprecationWarning: + + Netmiko 4.x and later has deprecated the use of delay_factor and/or + max_loops in this context. You should remove any use of delay_factor=x + from this method call. + + warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning) + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +======================================= short test summary info ======================================== +SKIPPED [1] test_netmiko_show.py:77: Skipped +SKIPPED [1] test_netmiko_show.py:95: Skipped +SKIPPED [1] test_netmiko_show.py:117: Skipped +SKIPPED [1] test_netmiko_show.py:138: TextFSM/ntc-templates not supported on this platform +SKIPPED [1] test_netmiko_show.py:160: TTP template not existing for this platform +SKIPPED [1] test_netmiko_show.py:200: Genie not supported on this platform +SKIPPED [1] test_netmiko_show.py:220: Skipped +SKIPPED [1] test_netmiko_show.py:236: Skipped +SKIPPED [1] test_netmiko_show.py:261: Skipped +SKIPPED [1] test_netmiko_show.py:285: Skipped +SKIPPED [1] test_netmiko_show.py:387: Skipped +============================= 13 passed, 11 skipped, 3 warnings in 41.87s ============================== + + + + +(venv) PS C:\Users\p2149451\Documents\Python Projects\venv\netmiko\tests> py.test -v test_netmiko_config.py --test_device audiocode_base +========================================= test session starts ========================================== +platform win32 -- Python 3.9.5, pytest-7.1.2, pluggy-1.0.0 -- c:\users\p2149451\documents\python projects\venv\scripts\python.exe +cachedir: .pytest_cache +rootdir: C:\Users\p2149451\Documents\Python Projects\venv\netmiko, configfile: setup.cfg +plugins: pylama-8.3.8, print-0.3.1, vscodedebug-0.1.0 +collected 12 items + +test_netmiko_config.py::test_ssh_connect PASSED [ 8%] +test_netmiko_config.py::test_enable_mode PASSED [ 16%] +test_netmiko_config.py::test_config_mode PASSED [ 25%] +test_netmiko_config.py::test_exit_config_mode PASSED [ 33%] +test_netmiko_config.py::test_config_set PASSED [ 41%] +test_netmiko_config.py::test_config_set_longcommand PASSED [ 50%] +test_netmiko_config.py::test_config_hostname PASSED [ 58%] +test_netmiko_config.py::test_config_from_file SKIPPED [ 66%] +test_netmiko_config.py::test_config_error_pattern SKIPPED (No error_pattern defined.) [ 75%] +test_netmiko_config.py::test_banner SKIPPED (No banner defined.) [ 83%] +test_netmiko_config.py::test_global_cmd_verify SKIPPED (No banner defined.) [ 91%] +test_netmiko_config.py::test_disconnect PASSED [100%] + +=========================================== warnings summary =========================================== +tests/test_netmiko_config.py::test_ssh_connect +tests/test_netmiko_config.py::test_config_set +tests/test_netmiko_config.py::test_config_set + c:\users\p2149451\documents\python projects\venv\netmiko\netmiko\base_connection.py:2088: DeprecationWarning: + + Netmiko 4.x and later has deprecated the use of delay_factor and/or + max_loops in this context. You should remove any use of delay_factor=x + from this method call. + + warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning) + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +======================================= short test summary info ======================================== +SKIPPED [1] test_netmiko_config.py:127: Skipped +SKIPPED [1] test_netmiko_config.py:139: No error_pattern defined. +SKIPPED [1] test_netmiko_config.py:173: No banner defined. +SKIPPED [1] test_netmiko_config.py:206: No banner defined. +============================== 8 passed, 4 skipped, 3 warnings in 18.56s =============================== + + + + +############################### AUDIOCODE_66 DRIVER RESULTS ########################################### + + + +(venv) PS C:\Users\p2149451\Documents\Python Projects\venv\netmiko\tests> py.test -v test_netmiko_show.py --test_device audiocode_66 +========================================= test session starts ========================================== +platform win32 -- Python 3.9.5, pytest-7.1.2, pluggy-1.0.0 -- c:\users\p2149451\documents\python projects\venv\scripts\python.exe +cachedir: .pytest_cache +rootdir: C:\Users\p2149451\Documents\Python Projects\venv\netmiko, configfile: setup.cfg +plugins: pylama-8.3.8, print-0.3.1, vscodedebug-0.1.0 +collected 24 items + +test_netmiko_show.py::test_disable_paging PASSED [ 4%] +test_netmiko_show.py::test_terminal_width PASSED [ 8%] +test_netmiko_show.py::test_ssh_connect PASSED [ 12%] +test_netmiko_show.py::test_ssh_connect_cm PASSED [ 16%] +test_netmiko_show.py::test_send_command_timing PASSED [ 20%] +test_netmiko_show.py::test_send_command_timing_no_cmd_verify SKIPPED [ 25%] +test_netmiko_show.py::test_send_command PASSED [ 29%] +test_netmiko_show.py::test_send_command_no_cmd_verify SKIPPED [ 33%] +test_netmiko_show.py::test_complete_on_space_disabled SKIPPED [ 37%] +test_netmiko_show.py::test_send_command_textfsm SKIPPED (TextFSM/ntc-templates not supported ...) [ 41%] +test_netmiko_show.py::test_send_command_ttp SKIPPED (TTP template not existing for this platform) [ 45%] +test_netmiko_show.py::test_send_command_genie SKIPPED (Genie not supported on this platform) [ 50%] +test_netmiko_show.py::test_send_multiline_timing SKIPPED [ 54%] +test_netmiko_show.py::test_send_multiline SKIPPED [ 58%] +test_netmiko_show.py::test_send_multiline_prompt SKIPPED [ 62%] +test_netmiko_show.py::test_send_multiline_simple SKIPPED [ 66%] +test_netmiko_show.py::test_base_prompt PASSED [ 70%] +test_netmiko_show.py::test_strip_prompt PASSED [ 75%] +test_netmiko_show.py::test_strip_command PASSED [ 79%] +test_netmiko_show.py::test_normalize_linefeeds PASSED [ 83%] +test_netmiko_show.py::test_clear_buffer PASSED [ 87%] +test_netmiko_show.py::test_enable_mode PASSED [ 91%] +test_netmiko_show.py::test_disconnect PASSED [ 95%] +test_netmiko_show.py::test_disconnect_no_enable SKIPPED [100%] + +=========================================== warnings summary =========================================== +tests/test_netmiko_show.py::test_disable_paging +tests/test_netmiko_show.py::test_ssh_connect_cm +tests/test_netmiko_show.py::test_disconnect_no_enable + c:\users\p2149451\documents\python projects\venv\netmiko\netmiko\base_connection.py:2088: DeprecationWarning: + + Netmiko 4.x and later has deprecated the use of delay_factor and/or + max_loops in this context. You should remove any use of delay_factor=x + from this method call. + + warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning) + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +======================================= short test summary info ======================================== +SKIPPED [1] test_netmiko_show.py:77: Skipped +SKIPPED [1] test_netmiko_show.py:95: Skipped +SKIPPED [1] test_netmiko_show.py:117: Skipped +SKIPPED [1] test_netmiko_show.py:138: TextFSM/ntc-templates not supported on this platform +SKIPPED [1] test_netmiko_show.py:160: TTP template not existing for this platform +SKIPPED [1] test_netmiko_show.py:200: Genie not supported on this platform +SKIPPED [1] test_netmiko_show.py:220: Skipped +SKIPPED [1] test_netmiko_show.py:236: Skipped +SKIPPED [1] test_netmiko_show.py:261: Skipped +SKIPPED [1] test_netmiko_show.py:285: Skipped +SKIPPED [1] test_netmiko_show.py:387: Skipped +======================== 13 passed, 11 skipped, 3 warnings in 62.62s (0:01:02) ========================= + + + + +(venv) PS C:\Users\p2149451\Documents\Python Projects\venv\netmiko\tests> py.test -v test_netmiko_config.py --test_device audiocode_66 +========================================= test session starts ========================================== +platform win32 -- Python 3.9.5, pytest-7.1.2, pluggy-1.0.0 -- c:\users\p2149451\documents\python projects\venv\scripts\python.exe +cachedir: .pytest_cache +rootdir: C:\Users\p2149451\Documents\Python Projects\venv\netmiko, configfile: setup.cfg +plugins: pylama-8.3.8, print-0.3.1, vscodedebug-0.1.0 +collected 12 items + +test_netmiko_config.py::test_ssh_connect PASSED [ 8%] +test_netmiko_config.py::test_enable_mode PASSED [ 16%] +test_netmiko_config.py::test_config_mode PASSED [ 25%] +test_netmiko_config.py::test_exit_config_mode PASSED [ 33%] +test_netmiko_config.py::test_config_set PASSED [ 41%] +test_netmiko_config.py::test_config_set_longcommand PASSED [ 50%] +test_netmiko_config.py::test_config_hostname PASSED [ 58%] +test_netmiko_config.py::test_config_from_file SKIPPED [ 66%] +test_netmiko_config.py::test_config_error_pattern SKIPPED (No error_pattern defined.) [ 75%] +test_netmiko_config.py::test_banner SKIPPED (No banner defined.) [ 83%] +test_netmiko_config.py::test_global_cmd_verify SKIPPED (No banner defined.) [ 91%] +test_netmiko_config.py::test_disconnect PASSED [100%] + +=========================================== warnings summary =========================================== +tests/test_netmiko_config.py::test_ssh_connect +tests/test_netmiko_config.py::test_config_set +tests/test_netmiko_config.py::test_config_set + c:\users\p2149451\documents\python projects\venv\netmiko\netmiko\base_connection.py:2088: DeprecationWarning: + + Netmiko 4.x and later has deprecated the use of delay_factor and/or + max_loops in this context. You should remove any use of delay_factor=x + from this method call. + + warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning) + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +======================================= short test summary info ======================================== +SKIPPED [1] test_netmiko_config.py:127: Skipped +SKIPPED [1] test_netmiko_config.py:139: No error_pattern defined. +SKIPPED [1] test_netmiko_config.py:173: No banner defined. +SKIPPED [1] test_netmiko_config.py:206: No banner defined. +============================== 8 passed, 4 skipped, 3 warnings in 25.29s =============================== + + + + + +################################## AUDIOCODE_SHELL DRIVER RESULTS ################################### + + + +(venv) PS C:\Users\p2149451\Documents\Python Projects\venv\netmiko\tests> py.test -v test_netmiko_show.py --test_device audiocode_shell + +========================================= test session starts ========================================== +platform win32 -- Python 3.9.5, pytest-7.1.2, pluggy-1.0.0 -- c:\users\p2149451\documents\python projects\venv\scripts\python.exe +cachedir: .pytest_cache +rootdir: C:\Users\p2149451\Documents\Python Projects\venv\netmiko, configfile: setup.cfg +plugins: pylama-8.3.8, print-0.3.1, vscodedebug-0.1.0 +collected 24 items + +test_netmiko_show.py::test_disable_paging SKIPPED (Disable Paging not supported on this platform) [ 4%] +test_netmiko_show.py::test_terminal_width PASSED [ 8%] +test_netmiko_show.py::test_ssh_connect PASSED [ 12%] +test_netmiko_show.py::test_ssh_connect_cm SKIPPED (Disable Paging not supported on this platform) [ 16%] +test_netmiko_show.py::test_send_command_timing PASSED [ 20%] +test_netmiko_show.py::test_send_command_timing_no_cmd_verify SKIPPED [ 25%] +test_netmiko_show.py::test_send_command PASSED [ 29%] +test_netmiko_show.py::test_send_command_no_cmd_verify SKIPPED [ 33%] +test_netmiko_show.py::test_complete_on_space_disabled SKIPPED [ 37%] +test_netmiko_show.py::test_send_command_textfsm SKIPPED (TextFSM/ntc-templates not supported ...) [ 41%] +test_netmiko_show.py::test_send_command_ttp SKIPPED (TTP template not existing for this platform) [ 45%] +test_netmiko_show.py::test_send_command_genie SKIPPED (Genie not supported on this platform) [ 50%] +test_netmiko_show.py::test_send_multiline_timing SKIPPED [ 54%] +test_netmiko_show.py::test_send_multiline SKIPPED [ 58%] +test_netmiko_show.py::test_send_multiline_prompt SKIPPED [ 62%] +test_netmiko_show.py::test_send_multiline_simple SKIPPED [ 66%] +test_netmiko_show.py::test_base_prompt PASSED [ 70%] +test_netmiko_show.py::test_strip_prompt PASSED [ 75%] +test_netmiko_show.py::test_strip_command PASSED [ 79%] +test_netmiko_show.py::test_normalize_linefeeds PASSED [ 83%] +test_netmiko_show.py::test_clear_buffer PASSED [ 87%] +test_netmiko_show.py::test_enable_mode PASSED [ 91%] +test_netmiko_show.py::test_disconnect PASSED [ 95%] +test_netmiko_show.py::test_disconnect_no_enable SKIPPED [100%] + +======================================= short test summary info ======================================== +SKIPPED [1] test_netmiko_show.py:35: Disable Paging not supported on this platform +SKIPPED [1] test_netmiko_show.py:60: Disable Paging not supported on this platform +SKIPPED [1] test_netmiko_show.py:77: Skipped +SKIPPED [1] test_netmiko_show.py:95: Skipped +SKIPPED [1] test_netmiko_show.py:117: Skipped +SKIPPED [1] test_netmiko_show.py:138: TextFSM/ntc-templates not supported on this platform +SKIPPED [1] test_netmiko_show.py:160: TTP template not existing for this platform +SKIPPED [1] test_netmiko_show.py:200: Genie not supported on this platform +SKIPPED [1] test_netmiko_show.py:220: Skipped +SKIPPED [1] test_netmiko_show.py:236: Skipped +SKIPPED [1] test_netmiko_show.py:261: Skipped +SKIPPED [1] test_netmiko_show.py:285: Skipped +SKIPPED [1] test_netmiko_show.py:387: Skipped +=================================== 11 passed, 13 skipped in 57.18s ==================================== + + + + +(venv) PS C:\Users\p2149451\Documents\Python Projects\venv\netmiko\tests> py.test -v test_netmiko_config.py --test_device audiocode_shell +========================================= test session starts ========================================== +platform win32 -- Python 3.9.5, pytest-7.1.2, pluggy-1.0.0 -- c:\users\p2149451\documents\python projects\venv\scripts\python.exe +cachedir: .pytest_cache +rootdir: C:\Users\p2149451\Documents\Python Projects\venv\netmiko, configfile: setup.cfg +plugins: pylama-8.3.8, print-0.3.1, vscodedebug-0.1.0 +collected 12 items + +test_netmiko_config.py::test_ssh_connect PASSED [ 8%] +test_netmiko_config.py::test_enable_mode PASSED [ 16%] +test_netmiko_config.py::test_config_mode PASSED [ 25%] +test_netmiko_config.py::test_exit_config_mode PASSED [ 33%] +test_netmiko_config.py::test_config_set PASSED [ 41%] +test_netmiko_config.py::test_config_set_longcommand PASSED [ 50%] +test_netmiko_config.py::test_config_hostname PASSED [ 58%] +test_netmiko_config.py::test_config_from_file SKIPPED [ 66%] +test_netmiko_config.py::test_config_error_pattern SKIPPED (No error_pattern defined.) [ 75%] +test_netmiko_config.py::test_banner SKIPPED (No banner defined.) [ 83%] +test_netmiko_config.py::test_global_cmd_verify SKIPPED (No banner defined.) [ 91%] +test_netmiko_config.py::test_disconnect PASSED [100%] + +=========================================== warnings summary =========================================== +tests/test_netmiko_config.py::test_config_set +tests/test_netmiko_config.py::test_config_set + c:\users\p2149451\documents\python projects\venv\netmiko\netmiko\base_connection.py:2088: DeprecationWarning: + + Netmiko 4.x and later has deprecated the use of delay_factor and/or + max_loops in this context. You should remove any use of delay_factor=x + from this method call. + + warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning) + +-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html +======================================= short test summary info ======================================== +SKIPPED [1] test_netmiko_config.py:127: Skipped +SKIPPED [1] test_netmiko_config.py:139: No error_pattern defined. +SKIPPED [1] test_netmiko_config.py:173: No banner defined. +SKIPPED [1] test_netmiko_config.py:206: No banner defined. +============================== 8 passed, 4 skipped, 2 warnings in 17.90s =============================== \ No newline at end of file diff --git a/tests/test_netmiko_config.py b/tests/test_netmiko_config.py index 5e3f04eee..5c5449333 100755 --- a/tests/test_netmiko_config.py +++ b/tests/test_netmiko_config.py @@ -32,7 +32,12 @@ def test_config_mode(net_connect, commands, expected_responses): Test enter config mode """ # Behavior for devices with no config mode is to return null string - if net_connect.config_mode() != "": + config_mode_command = commands.get("config_mode_command") + + if config_mode_command is not None: + if net_connect.config_mode(config_command=config_mode_command) != "": + assert net_connect.check_config_mode() is True + elif net_connect.config_mode() != "": assert net_connect.check_config_mode() is True else: pytest.skip("Platform doesn't support config mode.") @@ -51,11 +56,16 @@ def test_config_set(net_connect, commands, expected_responses): """Test sending configuration commands.""" config_commands = commands["config"] + config_mode_command = commands.get("config_mode_command") support_commit = commands.get("support_commit") config_verify = commands["config_verification"] # Set to initial value and testing sending command as a string - net_connect.send_config_set(config_commands[0]) + net_connect.send_config_set( + config_mode_command=config_mode_command, + config_commands=config_commands[0], + ) + if support_commit: net_connect.commit() cmd_response = expected_responses.get("cmd_response_init") @@ -64,7 +74,13 @@ def test_config_set(net_connect, commands, expected_responses): assert cmd_response in config_commands_output else: assert config_commands[0] in config_commands_output - net_connect.send_config_set(config_commands) + + # Test that something has changed. + net_connect.send_config_set( + config_commands=config_commands, + config_mode_command=config_mode_command, + ) + if support_commit: net_connect.commit() cmd_response = expected_responses.get("cmd_response_final") diff --git a/tests/test_netmiko_show.py b/tests/test_netmiko_show.py index 87cc74f74..86fc13840 100755 --- a/tests/test_netmiko_show.py +++ b/tests/test_netmiko_show.py @@ -29,10 +29,15 @@ def test_disable_paging(net_connect, commands, expected_responses): # NX-OS logging buffer gets enormous (NX-OS fails when testing very high-latency + # packet loss) net_connect.send_command("clear logging logfile") - multiple_line_output = net_connect.send_command( - commands["extended_output"], read_timeout=60 - ) - assert expected_responses["multiple_line_output"] in multiple_line_output + + if net_connect.device_type == "audiocode_shell": + # Not supported. + assert pytest.skip("Disable Paging not supported on this platform") + else: + multiple_line_output = net_connect.send_command( + commands["extended_output"], read_timeout=60 + ) + assert expected_responses["multiple_line_output"] in multiple_line_output def test_terminal_width(net_connect, commands, expected_responses): @@ -49,8 +54,10 @@ def test_ssh_connect(net_connect, commands, expected_responses): assert expected_responses["version_banner"] in show_version -def test_ssh_connect_cm(net_connect_cm, commands, expected_responses): +def test_ssh_connect_cm(net_connect_cm, net_connect, commands, expected_responses): """Test the context manager.""" + if net_connect.device_type == "audiocode_shell": + assert pytest.skip("Disable Paging not supported on this platform") prompt_str = net_connect_cm assert expected_responses["base_prompt"] in prompt_str From 4cbd83612b329322cae4f2dda9d86bd8d39cc456 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 8 Aug 2022 12:31:27 -0700 Subject: [PATCH 30/34] Fix generator bug in send_config_set (#2890) --- netmiko/audiocode/audiocode_ssh.py | 6 +++--- netmiko/base_connection.py | 8 +++++-- netmiko/cdot/cdot_cros_ssh.py | 4 ++-- netmiko/cisco/cisco_viptela.py | 4 ++-- netmiko/cisco/cisco_wlc_ssh.py | 4 ++-- netmiko/cisco/cisco_xr.py | 4 ++-- netmiko/cloudgenix/cloudgenix_ion.py | 4 ++-- netmiko/ericsson/ericsson_ipos.py | 4 ++-- netmiko/hp/hp_comware.py | 4 ++-- netmiko/huawei/huawei.py | 4 ++-- netmiko/linux/linux_ssh.py | 4 ++-- netmiko/nokia/nokia_srl.py | 4 ++-- netmiko/nokia/nokia_sros.py | 4 ++-- netmiko/vyos/vyos_ssh.py | 4 ++-- netmiko/zyxel/zyxel_ssh.py | 4 ++-- requirements-genie.txt | 4 ++-- tests/SLOG/cisco881_slog.log | 1 + tests/SLOG/cisco881_slog_append.log | 1 + tests/SLOG/netmiko.log | 20 ++++++++++------- tests/test_netmiko_config.py | 32 ++++++++++++++++++++++++++++ 20 files changed, 83 insertions(+), 41 deletions(-) diff --git a/netmiko/audiocode/audiocode_ssh.py b/netmiko/audiocode/audiocode_ssh.py index 875df8356..06ec4780e 100644 --- a/netmiko/audiocode/audiocode_ssh.py +++ b/netmiko/audiocode/audiocode_ssh.py @@ -1,4 +1,4 @@ -from typing import Any, Optional, Sequence, TextIO, Union, List +from typing import Any, Optional, Sequence, Iterator, TextIO, Union, List import time import re from netmiko.base_connection import BaseConnection @@ -119,7 +119,7 @@ def exit_enable_mode(self, exit_command: str = "disable") -> str: def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, @@ -359,7 +359,7 @@ def find_prompt( def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 44d4fed07..5a17e95b8 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -16,6 +16,7 @@ cast, Type, Sequence, + Iterator, TextIO, Union, Tuple, @@ -33,6 +34,7 @@ from threading import Lock import functools import logging +import itertools import paramiko import serial @@ -2032,7 +2034,7 @@ def send_config_from_file( def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, @@ -2129,8 +2131,10 @@ def send_config_set( # Set bypass_commands="" to force no-bypass (usually for testing) bypass_detected = False if bypass_commands: + # Make a copy of the iterator + config_commands, config_commands_tmp = itertools.tee(config_commands, 2) bypass_detected = any( - [True for cmd in config_commands if re.search(bypass_commands, cmd)] + [True for cmd in config_commands_tmp if re.search(bypass_commands, cmd)] ) if bypass_detected: cmd_verify = False diff --git a/netmiko/cdot/cdot_cros_ssh.py b/netmiko/cdot/cdot_cros_ssh.py index 9f1da9d0b..09a318206 100644 --- a/netmiko/cdot/cdot_cros_ssh.py +++ b/netmiko/cdot/cdot_cros_ssh.py @@ -7,7 +7,7 @@ # # Purpose: Provide basic SSH connection to CROS based router products -from typing import Optional, Union, Sequence, TextIO, Any +from typing import Optional, Union, Sequence, Iterator, TextIO, Any import time import warnings from netmiko.no_enable import NoEnable @@ -29,7 +29,7 @@ def session_preparation(self) -> None: def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: diff --git a/netmiko/cisco/cisco_viptela.py b/netmiko/cisco/cisco_viptela.py index 45eae20fd..86b058976 100644 --- a/netmiko/cisco/cisco_viptela.py +++ b/netmiko/cisco/cisco_viptela.py @@ -1,5 +1,5 @@ """Subclass specific to Cisco Viptela.""" -from typing import Union, Sequence, TextIO, Any +from typing import Union, Sequence, Iterator, TextIO, Any import re from netmiko.cisco_base_connection import CiscoSSHConnection @@ -38,7 +38,7 @@ def config_mode( def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: diff --git a/netmiko/cisco/cisco_wlc_ssh.py b/netmiko/cisco/cisco_wlc_ssh.py index 31eabdc37..8b184e0d4 100644 --- a/netmiko/cisco/cisco_wlc_ssh.py +++ b/netmiko/cisco/cisco_wlc_ssh.py @@ -1,5 +1,5 @@ """Netmiko Cisco WLC support.""" -from typing import Any, Union, Sequence, TextIO +from typing import Any, Union, Sequence, Iterator, TextIO import time import re import socket @@ -225,7 +225,7 @@ def exit_config_mode(self, exit_config: str = "exit", pattern: str = "") -> str: def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any, diff --git a/netmiko/cisco/cisco_xr.py b/netmiko/cisco/cisco_xr.py index b5e5e5f42..c864ad98c 100644 --- a/netmiko/cisco/cisco_xr.py +++ b/netmiko/cisco/cisco_xr.py @@ -1,4 +1,4 @@ -from typing import Optional, Any, Union, Sequence, TextIO +from typing import Optional, Any, Union, Sequence, Iterator, TextIO import re import warnings from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG @@ -43,7 +43,7 @@ def set_base_prompt( def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: diff --git a/netmiko/cloudgenix/cloudgenix_ion.py b/netmiko/cloudgenix/cloudgenix_ion.py index 0f188a877..232951e3f 100644 --- a/netmiko/cloudgenix/cloudgenix_ion.py +++ b/netmiko/cloudgenix/cloudgenix_ion.py @@ -1,4 +1,4 @@ -from typing import Any, Union, Sequence, TextIO, Optional +from typing import Any, Union, Sequence, Iterator, TextIO, Optional from netmiko.no_config import NoConfig from netmiko.cisco_base_connection import CiscoSSHConnection @@ -37,7 +37,7 @@ def save_config(self, *args: Any, **kwargs: Any) -> str: def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any ) -> str: diff --git a/netmiko/ericsson/ericsson_ipos.py b/netmiko/ericsson/ericsson_ipos.py index aac21a32a..5921c7afb 100644 --- a/netmiko/ericsson/ericsson_ipos.py +++ b/netmiko/ericsson/ericsson_ipos.py @@ -1,7 +1,7 @@ """ Ericsson Ipos looks like it was RedBack equipment. """ -from typing import Optional, Any, Union, Sequence, TextIO +from typing import Optional, Any, Union, Sequence, Iterator, TextIO import re import warnings @@ -54,7 +54,7 @@ def exit_config_mode(self, exit_config: str = "end", pattern: str = "#") -> str: def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: diff --git a/netmiko/hp/hp_comware.py b/netmiko/hp/hp_comware.py index c7726397b..b6e7b8174 100644 --- a/netmiko/hp/hp_comware.py +++ b/netmiko/hp/hp_comware.py @@ -1,5 +1,5 @@ import re -from typing import Union, Sequence, TextIO, Any, Optional +from typing import Union, Sequence, Iterator, TextIO, Any, Optional from netmiko.cisco_base_connection import CiscoSSHConnection @@ -44,7 +44,7 @@ def check_config_mode( def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, diff --git a/netmiko/huawei/huawei.py b/netmiko/huawei/huawei.py index f80cd1a42..625ce1ae5 100644 --- a/netmiko/huawei/huawei.py +++ b/netmiko/huawei/huawei.py @@ -1,4 +1,4 @@ -from typing import Optional, Any, Union, Sequence, TextIO +from typing import Optional, Any, Union, Sequence, Iterator, TextIO import time import re import warnings @@ -196,7 +196,7 @@ def telnet_login( class HuaweiVrpv8SSH(HuaweiSSH): def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: diff --git a/netmiko/linux/linux_ssh.py b/netmiko/linux/linux_ssh.py index b782c6499..56ee22df6 100644 --- a/netmiko/linux/linux_ssh.py +++ b/netmiko/linux/linux_ssh.py @@ -1,4 +1,4 @@ -from typing import Any, Optional, TYPE_CHECKING, Union, Sequence, TextIO +from typing import Any, Optional, TYPE_CHECKING, Union, Sequence, Iterator, TextIO import os import re @@ -61,7 +61,7 @@ def set_base_prompt( def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = True, **kwargs: Any, ) -> str: diff --git a/netmiko/nokia/nokia_srl.py b/netmiko/nokia/nokia_srl.py index a3bee5330..781467aeb 100644 --- a/netmiko/nokia/nokia_srl.py +++ b/netmiko/nokia/nokia_srl.py @@ -7,7 +7,7 @@ # https://github.com/ktbyers/netmiko/blob/develop/LICENSE import re -from typing import Any, Optional, Sequence, TextIO, Union +from typing import Any, Optional, Sequence, Iterator, TextIO, Union from netmiko import log from netmiko.no_enable import NoEnable from netmiko.base_connection import BaseConnection @@ -122,7 +122,7 @@ def exit_config_mode(self, exit_config: str = "", pattern: str = "") -> str: def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: diff --git a/netmiko/nokia/nokia_sros.py b/netmiko/nokia/nokia_sros.py index ce8899b8b..5ddda2b9b 100644 --- a/netmiko/nokia/nokia_sros.py +++ b/netmiko/nokia/nokia_sros.py @@ -9,7 +9,7 @@ import re import os import time -from typing import Any, Optional, Union, Sequence, TextIO, Callable +from typing import Any, Optional, Union, Sequence, Iterator, TextIO, Callable from netmiko import log from netmiko.base_connection import BaseConnection @@ -174,7 +174,7 @@ def save_config(self, *args: Any, **kwargs: Any) -> str: def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = None, **kwargs: Any, ) -> str: diff --git a/netmiko/vyos/vyos_ssh.py b/netmiko/vyos/vyos_ssh.py index 37420124b..727650669 100644 --- a/netmiko/vyos/vyos_ssh.py +++ b/netmiko/vyos/vyos_ssh.py @@ -1,4 +1,4 @@ -from typing import Optional, Union, Sequence, TextIO, Any +from typing import Optional, Union, Sequence, Iterator, TextIO, Any import time import warnings import re @@ -123,7 +123,7 @@ def set_base_prompt( def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: diff --git a/netmiko/zyxel/zyxel_ssh.py b/netmiko/zyxel/zyxel_ssh.py index 79fb4292c..7ac0005dc 100644 --- a/netmiko/zyxel/zyxel_ssh.py +++ b/netmiko/zyxel/zyxel_ssh.py @@ -1,4 +1,4 @@ -from typing import Any, Sequence, TextIO, Union +from typing import Any, Sequence, Iterator, TextIO, Union from netmiko.cisco_base_connection import CiscoSSHConnection from netmiko.no_enable import NoEnable from netmiko.no_config import NoConfig @@ -11,7 +11,7 @@ def disable_paging(self, *args: Any, **kwargs: Any) -> str: def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any diff --git a/requirements-genie.txt b/requirements-genie.txt index 97ad60ce4..259345278 100644 --- a/requirements-genie.txt +++ b/requirements-genie.txt @@ -1,2 +1,2 @@ -pyats==22.5 -genie==22.5 +pyats==22.7.1 +genie==22.7 diff --git a/tests/SLOG/cisco881_slog.log b/tests/SLOG/cisco881_slog.log index 2e5125e58..d5b8cbca6 100644 --- a/tests/SLOG/cisco881_slog.log +++ b/tests/SLOG/cisco881_slog.log @@ -1,3 +1,4 @@ + cisco1>terminal width 511 cisco1>terminal length 0 cisco1> diff --git a/tests/SLOG/cisco881_slog_append.log b/tests/SLOG/cisco881_slog_append.log index d12914df3..215ba1dd0 100644 --- a/tests/SLOG/cisco881_slog_append.log +++ b/tests/SLOG/cisco881_slog_append.log @@ -21,6 +21,7 @@ cisco1> Testing password and secret replacement This is my password ******** This is my secret ******** + cisco1>terminal width 511 cisco1>terminal length 0 cisco1> diff --git a/tests/SLOG/netmiko.log b/tests/SLOG/netmiko.log index 79adf1d71..5efa47834 100644 --- a/tests/SLOG/netmiko.log +++ b/tests/SLOG/netmiko.log @@ -35,17 +35,19 @@ cisco1# write_channel: b'exit\n' write_channel: b'terminal width 511\n' read_channel: -read_channel: cisco1>terminal width +read_channel: +cisco1>terminal width read_channel: 511 cisco1> -Pattern found: (terminal width 511) cisco1>terminal width 511 +Pattern found: (terminal width 511) +cisco1>terminal width 511 In disable_paging Command: terminal length 0 write_channel: b'terminal length 0\n' read_channel: -read_channel: terminal length -read_channel: 0 +read_channel: terminal lengt +read_channel: h 0 cisco1> Pattern found: (terminal\ length\ 0) cisco1>terminal length 0 @@ -65,10 +67,12 @@ read_channel: [find_prompt()]: prompt is cisco1> write_channel: b'terminal width 511\n' read_channel: -read_channel: cisco1>terminal width +read_channel: +cisco1>terminal width read_channel: 511 cisco1> -Pattern found: (terminal width 511) cisco1>terminal width 511 +Pattern found: (terminal width 511) +cisco1>terminal width 511 In disable_paging Command: terminal length 0 @@ -102,8 +106,8 @@ read_channel: [find_prompt()]: prompt is cisco1> write_channel: b'show ip interface brief\n' read_channel: -read_channel: show ip interf -read_channel: ace brief +read_channel: show ip interfa +read_channel: ce brief Interface IP-Address OK? Method Status Protocol FastEthernet0 unassigned YES unset down down FastEthernet1 unassigned YES unset down down diff --git a/tests/test_netmiko_config.py b/tests/test_netmiko_config.py index 5c5449333..490c69e78 100755 --- a/tests/test_netmiko_config.py +++ b/tests/test_netmiko_config.py @@ -91,6 +91,38 @@ def test_config_set(net_connect, commands, expected_responses): assert config_commands[-1] in config_commands_output +def test_config_set_generator(net_connect, commands, expected_responses): + """Test sending configuration commands as a generator.""" + + config_commands = commands["config"] + # Make a generator out of the config commands (to verify no issues with generators) + config_commands_gen = (cmd for cmd in config_commands) + support_commit = commands.get("support_commit") + config_verify = commands["config_verification"] + + # Set to initial value and testing sending command as a string + net_connect.send_config_set(config_commands[0]) + if support_commit: + net_connect.commit() + cmd_response = expected_responses.get("cmd_response_init") + config_commands_output = net_connect.send_command(config_verify) + if cmd_response: + assert cmd_response in config_commands_output + else: + assert config_commands[0] in config_commands_output + + # Send the config commands as a generator + net_connect.send_config_set(config_commands_gen) + if support_commit: + net_connect.commit() + cmd_response = expected_responses.get("cmd_response_final") + config_commands_output = net_connect.send_command_expect(config_verify) + if cmd_response: + assert cmd_response in config_commands_output + else: + assert config_commands[-1] in config_commands_output + + def test_config_set_longcommand(net_connect, commands, expected_responses): """Test sending configuration commands using long commands""" config_commands = commands.get("config_long_command") From fd5dbbebaa8db2288faebce6d9c48a4e126b9166 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 8 Aug 2022 14:41:49 -0700 Subject: [PATCH 31/34] Fix to accommodate single character prompts (#2891) --- netmiko/base_connection.py | 9 +++++++-- tests/test_netmiko_show.py | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index 5a17e95b8..aac75849b 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -1291,8 +1291,13 @@ def set_base_prompt( if not prompt[-1] in (pri_prompt_terminator, alt_prompt_terminator): raise ValueError(f"Router prompt not found: {repr(prompt)}") - # Strip off trailing terminator - self.base_prompt = prompt[:-1] + + # If all we have is the 'terminator' just use that :-( + if len(prompt) == 1: + self.base_prompt = prompt + else: + # Strip off trailing terminator + self.base_prompt = prompt[:-1] return self.base_prompt def find_prompt( diff --git a/tests/test_netmiko_show.py b/tests/test_netmiko_show.py index 86fc13840..f01e59961 100755 --- a/tests/test_netmiko_show.py +++ b/tests/test_netmiko_show.py @@ -354,6 +354,9 @@ def test_enable_mode(net_connect, commands, expected_responses): Catch exception for devices that don't support enable """ + # testuser on pynetqa does not have root access + if net_connect.username == "testuser" and net_connect.host == "3.15.148.177": + assert pytest.skip() try: net_connect.enable() enable_prompt = net_connect.find_prompt() From 0a8ea1d93f41da95b026294766ffe6834352dc73 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Mon, 8 Aug 2022 19:04:59 -0700 Subject: [PATCH 32/34] Adding check that key_file exists if use_keys is True (#2892) --- .github/workflows/commit.yaml | 5 +- netmiko/base_connection.py | 19 ++++++ tests/conftest.py | 11 ++++ tests/foo.sh | 106 ++++++++++++++++++++++++++++++++++ tests/test_netmiko_show.py | 11 ++++ tests/unit/test_utilities.py | 1 - 6 files changed, 150 insertions(+), 3 deletions(-) create mode 100755 tests/foo.sh diff --git a/.github/workflows/commit.yaml b/.github/workflows/commit.yaml index dde11c354..937430caf 100644 --- a/.github/workflows/commit.yaml +++ b/.github/workflows/commit.yaml @@ -10,7 +10,8 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] + # python-version: ["3.7", "3.8", "3.9", "3.10", "3.11-dev"] + python-version: ["3.7", "3.8", "3.9", "3.10"] steps: - name: Checkout repository @@ -26,7 +27,7 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt pip install -r requirements-dev.txt - # pip install -r requirements-genie.txt + pip install -r requirements-genie.txt - name: Run black run: | diff --git a/netmiko/base_connection.py b/netmiko/base_connection.py index aac75849b..54f94ae96 100644 --- a/netmiko/base_connection.py +++ b/netmiko/base_connection.py @@ -31,6 +31,7 @@ import time from collections import deque from os import path +from pathlib import Path from threading import Lock import functools import logging @@ -420,6 +421,8 @@ def __init__( self.key_file = ( path.abspath(path.expanduser(key_file)) if key_file else None ) + if self.use_keys is True: + self._key_check() self.pkey = pkey self.passphrase = passphrase self.allow_agent = allow_agent @@ -507,6 +510,22 @@ def _enter_shell(self) -> str: def _return_cli(self) -> str: raise NotImplementedError + def _key_check(self) -> bool: + """Verify key_file exists.""" + msg = f""" +use_keys has been set to True, but specified key_file does not exist: + +use_keys: {self.use_keys} +key_file: {self.key_file} +""" + if self.key_file is None: + raise ValueError(msg) + + my_key_file = Path(self.key_file) + if not my_key_file.is_file(): + raise ValueError(msg) + return True + @lock_channel @log_writes def write_channel(self, out_data: str) -> None: diff --git a/tests/conftest.py b/tests/conftest.py index a6410e12e..3ec81e948 100755 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -131,6 +131,17 @@ def device_slog(request): return device +@pytest.fixture(scope="module") +def device_failed_key(request): + """ + Return the netmiko device (not connected). + """ + device_under_test = request.config.getoption("test_device") + test_devices = parse_yaml(PWD + "/etc/test_devices.yml") + device = test_devices[device_under_test] + return device + + @pytest.fixture(scope="module") def expected_responses(request): """ diff --git a/tests/foo.sh b/tests/foo.sh new file mode 100755 index 000000000..00e04d2fc --- /dev/null +++ b/tests/foo.sh @@ -0,0 +1,106 @@ +#!/bin/sh + +RETURN_CODE=0 +PYTEST='py.test -s -v -x' + +# Exit on the first test failure and set RETURN_CODE = 1 +echo "Starting tests...good luck:" \ +\ +&& echo "Cisco IOS using SSH config with SSH Proxy" \ +&& $PYTEST test_netmiko_show.py --test_device cisco881_ssh_config \ +&& $PYTEST test_netmiko_config.py --test_device cisco881_ssh_config \ +&& $PYTEST test_netmiko_config_acl.py --test_device cisco881_ssh_config \ +\ +&& echo "Cisco IOS using SSH config with SSH Proxy using ProxyJump" \ +&& $PYTEST test_netmiko_show.py --test_device cisco881_ssh_proxyjump \ +&& $PYTEST test_netmiko_config.py --test_device cisco881_ssh_proxyjump \ +&& $PYTEST test_netmiko_config_acl.py --test_device cisco881_ssh_proxyjump \ +\ +&& echo "Cisco IOS session log testing" \ +&& $PYTEST test_netmiko_session_log.py --test_device cisco881_slog \ +\ +&& echo "Cisco IOS telnet" \ +&& $PYTEST test_netmiko_show.py --test_device cisco881_telnet \ +&& $PYTEST test_netmiko_config.py --test_device cisco881_telnet \ +&& $PYTEST test_netmiko_config_acl.py --test_device cisco881_telnet \ +\ +&& echo "Cisco SG300" \ +&& $PYTEST test_netmiko_show.py --test_device cisco_s300 \ +&& $PYTEST test_netmiko_config.py --test_device cisco_s300 \ +\ +&& echo "Arista" \ +&& $PYTEST test_netmiko_scp.py --test_device arista_sw \ +&& $PYTEST test_netmiko_show.py --test_device arista_sw \ +&& $PYTEST test_netmiko_config.py --test_device arista_sw \ +&& $PYTEST test_netmiko_config_acl.py --test_device arista_sw \ +\ +&& echo "Juniper" \ +&& $PYTEST test_netmiko_scp.py --test_device juniper_srx \ +&& $PYTEST test_netmiko_show.py --test_device juniper_srx \ +&& $PYTEST test_netmiko_config.py --test_device juniper_srx \ +&& $PYTEST test_netmiko_commit.py --test_device juniper_srx \ +\ +&& echo "Cisco IOS-XR" \ +&& $PYTEST test_netmiko_scp.py --test_device cisco_xrv \ +&& $PYTEST test_netmiko_show.py --test_device cisco_xrv \ +&& $PYTEST test_netmiko_config.py --test_device cisco_xrv \ +&& $PYTEST test_netmiko_commit.py --test_device cisco_xrv \ +\ +&& echo "Cisco NXOS" \ +&& $PYTEST test_netmiko_scp.py --test_device nxos1 \ +&& $PYTEST test_netmiko_show.py --test_device nxos1 \ +&& $PYTEST test_netmiko_config.py --test_device nxos1 \ +\ +&& echo "Linux SSH (using keys)" \ +&& $PYTEST test_netmiko_scp.py --test_device linux_srv1 \ +&& $PYTEST test_netmiko_show.py --test_device linux_srv1 \ +\ +&& echo "Test read_timeout on Cisco3 (slow, slow, and more slow)" \ +&& $PYTEST test_timeout_read_until_pattern.py --test_device cisco3 \ +&& $PYTEST test_timeout_send_command.py --test_device cisco3 \ +&& $PYTEST test_timeout_read_timing.py --test_device cisco3 \ +&& $PYTEST test_timeout_send_command_timing.py --test_device cisco3 \ +\ +&& echo "Autodetect tests" \ +&& $PYTEST test_netmiko_autodetect.py --test_device cisco1 \ +&& $PYTEST test_netmiko_autodetect.py --test_device arista_sw \ +&& $PYTEST test_netmiko_autodetect.py --test_device juniper_srx \ +&& $PYTEST test_netmiko_autodetect.py --test_device cisco_asa \ +&& $PYTEST test_netmiko_autodetect.py --test_device cisco_xrv \ +&& $PYTEST test_netmiko_autodetect.py --test_device cisco_xr_azure \ +\ +&& echo "HP ProCurve" \ +&& $PYTEST test_netmiko_show.py --test_device hp_procurve \ +&& $PYTEST test_netmiko_config.py --test_device hp_procurve \ +\ +|| RETURN_CODE=1 + +exit $RETURN_CODE + +# && echo "HP Comware7" \ +# && py.test -v test_netmiko_show.py --test_device hp_comware \ +# && py.test -v test_netmiko_config.py --test_device hp_comware \ +# \ +# Can't get Cisco IOS and SCP get to run reliably--IOS bug? +# && py.test -v test_netmiko_scp.py --test_device cisco881_key \ +# && py.test -v test_netmiko_scp.py --test_device cisco881_fast \ +# && $PYTEST test_netmiko_scp.py --test_device cisco881_key \ +# +# +#&& echo "Nokia SR-OS CLI" \ +#&& py.test -x -s -v test_netmiko_show.py --test_device sros2 \ +#&& py.test -x -s -v test_netmiko_config.py --test_device sros2 \ +#&& py.test -x -s -v test_netmiko_scp.py --test_device sros2 \ +#\ +#&& echo "SR-OS MD" \ +#&& py.test -x -s -v test_netmiko_show.py --test_device sros1_md \ +#&& py.test -x -s -v test_netmiko_config.py --test_device sros1_md \ +#&& py.test -x -s -v test_netmiko_scp.py --test_device sros1_md \ +#&& py.test -x -s -v test_netmiko_commit.py --test_device sros1_md \ +#\ +# && echo "Cisco ASA" \ +# && $PYTEST test_netmiko_show.py --test_device cisco_asa \ +# && $PYTEST test_netmiko_config.py --test_device cisco_asa \ +# && $PYTEST test_netmiko_show.py --test_device cisco_asa_login \ +# && $PYTEST test_netmiko_config.py --test_device cisco_asa_login \ +#\ diff --git a/tests/test_netmiko_show.py b/tests/test_netmiko_show.py index f01e59961..c050db6c0 100755 --- a/tests/test_netmiko_show.py +++ b/tests/test_netmiko_show.py @@ -17,6 +17,17 @@ import pytest import time from datetime import datetime +from netmiko import ConnectHandler + + +def test_failed_key(device_failed_key, commands, expected_responses): + if device_failed_key.get("use_keys") is not True: + assert pytest.skip("Not using SSH-keys") + + device_failed_key["key_file"] = "bogus_key_file_name" + + with pytest.raises(ValueError): + ConnectHandler(**device_failed_key) def test_disable_paging(net_connect, commands, expected_responses): diff --git a/tests/unit/test_utilities.py b/tests/unit/test_utilities.py index b9cbc47e7..c9e67becf 100755 --- a/tests/unit/test_utilities.py +++ b/tests/unit/test_utilities.py @@ -295,7 +295,6 @@ def test_textfsm_missing_template(): assert result == raw_output -@pytest.mark.skip(reason="pyats/genie lacks PY3.10 support") def test_get_structured_data_genie(): """Convert raw CLI output to structured data using Genie""" From c6921d8165cc73e50b9d69d92146725155967305 Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 9 Aug 2022 13:55:27 -0700 Subject: [PATCH 33/34] Minor session_log test updates (#2894) --- tests/SLOG/cisco881_slog.log | 1 + tests/SLOG/cisco881_slog_append.log | 3 + tests/SLOG/cisco881_slog_append_compare.log | 1 + tests/SLOG/cisco881_slog_compare.log | 2 + tests/SLOG/cisco881_slog_wr.log | 2 + tests/SLOG/netmiko.log | 24 +++-- tests/foo.sh | 106 -------------------- 7 files changed, 23 insertions(+), 116 deletions(-) delete mode 100755 tests/foo.sh diff --git a/tests/SLOG/cisco881_slog.log b/tests/SLOG/cisco881_slog.log index d5b8cbca6..1e00df96e 100644 --- a/tests/SLOG/cisco881_slog.log +++ b/tests/SLOG/cisco881_slog.log @@ -1,4 +1,5 @@ +cisco1> cisco1>terminal width 511 cisco1>terminal length 0 cisco1> diff --git a/tests/SLOG/cisco881_slog_append.log b/tests/SLOG/cisco881_slog_append.log index 215ba1dd0..a0f8de102 100644 --- a/tests/SLOG/cisco881_slog_append.log +++ b/tests/SLOG/cisco881_slog_append.log @@ -1,5 +1,6 @@ Initial file contents +cisco1> cisco1>terminal width 511 cisco1>terminal length 0 cisco1> @@ -14,6 +15,7 @@ FastEthernet4 10.220.88.20 YES NVRAM up up Vlan1 unassigned YES unset down down cisco1> cisco1>exit +cisco1> cisco1>terminal width 511 cisco1>terminal length 0 cisco1> @@ -22,6 +24,7 @@ Testing password and secret replacement This is my password ******** This is my secret ******** +cisco1> cisco1>terminal width 511 cisco1>terminal length 0 cisco1> diff --git a/tests/SLOG/cisco881_slog_append_compare.log b/tests/SLOG/cisco881_slog_append_compare.log index 2e5125e58..00bb16745 100644 --- a/tests/SLOG/cisco881_slog_append_compare.log +++ b/tests/SLOG/cisco881_slog_append_compare.log @@ -1,3 +1,4 @@ +cisco1> cisco1>terminal width 511 cisco1>terminal length 0 cisco1> diff --git a/tests/SLOG/cisco881_slog_compare.log b/tests/SLOG/cisco881_slog_compare.log index 2e5125e58..1e00df96e 100644 --- a/tests/SLOG/cisco881_slog_compare.log +++ b/tests/SLOG/cisco881_slog_compare.log @@ -1,3 +1,5 @@ + +cisco1> cisco1>terminal width 511 cisco1>terminal length 0 cisco1> diff --git a/tests/SLOG/cisco881_slog_wr.log b/tests/SLOG/cisco881_slog_wr.log index ab3382ce1..71a29c32b 100644 --- a/tests/SLOG/cisco881_slog_wr.log +++ b/tests/SLOG/cisco881_slog_wr.log @@ -1,4 +1,6 @@ + terminal width 511 +cisco1> cisco1>terminal width 511 cisco1>terminal length 0 terminal length 0 diff --git a/tests/SLOG/netmiko.log b/tests/SLOG/netmiko.log index 5efa47834..3c3c8b275 100644 --- a/tests/SLOG/netmiko.log +++ b/tests/SLOG/netmiko.log @@ -33,13 +33,16 @@ cisco1# Pattern found: ([>#]) cisco1# write_channel: b'exit\n' +write_channel: b'\n' write_channel: b'terminal width 511\n' read_channel: -read_channel: -cisco1>terminal width -read_channel: 511 +cisco1> +cisco1> +read_channel: terminal widt +read_channel: h 511 cisco1> Pattern found: (terminal width 511) +cisco1> cisco1>terminal width 511 In disable_paging Command: terminal length 0 @@ -65,13 +68,14 @@ Pattern found: (\#|>) cisco1> read_channel: [find_prompt()]: prompt is cisco1> +write_channel: b'\n' write_channel: b'terminal width 511\n' -read_channel: -read_channel: -cisco1>terminal width -read_channel: 511 +read_channel: cisco1> cisco1> -Pattern found: (terminal width 511) +read_channel: terminal wid +read_channel: th 511 +cisco1> +Pattern found: (terminal width 511) cisco1> cisco1>terminal width 511 In disable_paging Command: terminal length 0 @@ -106,8 +110,8 @@ read_channel: [find_prompt()]: prompt is cisco1> write_channel: b'show ip interface brief\n' read_channel: -read_channel: show ip interfa -read_channel: ce brief +read_channel: show ip inter +read_channel: face brief Interface IP-Address OK? Method Status Protocol FastEthernet0 unassigned YES unset down down FastEthernet1 unassigned YES unset down down diff --git a/tests/foo.sh b/tests/foo.sh deleted file mode 100755 index 00e04d2fc..000000000 --- a/tests/foo.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh - -RETURN_CODE=0 -PYTEST='py.test -s -v -x' - -# Exit on the first test failure and set RETURN_CODE = 1 -echo "Starting tests...good luck:" \ -\ -&& echo "Cisco IOS using SSH config with SSH Proxy" \ -&& $PYTEST test_netmiko_show.py --test_device cisco881_ssh_config \ -&& $PYTEST test_netmiko_config.py --test_device cisco881_ssh_config \ -&& $PYTEST test_netmiko_config_acl.py --test_device cisco881_ssh_config \ -\ -&& echo "Cisco IOS using SSH config with SSH Proxy using ProxyJump" \ -&& $PYTEST test_netmiko_show.py --test_device cisco881_ssh_proxyjump \ -&& $PYTEST test_netmiko_config.py --test_device cisco881_ssh_proxyjump \ -&& $PYTEST test_netmiko_config_acl.py --test_device cisco881_ssh_proxyjump \ -\ -&& echo "Cisco IOS session log testing" \ -&& $PYTEST test_netmiko_session_log.py --test_device cisco881_slog \ -\ -&& echo "Cisco IOS telnet" \ -&& $PYTEST test_netmiko_show.py --test_device cisco881_telnet \ -&& $PYTEST test_netmiko_config.py --test_device cisco881_telnet \ -&& $PYTEST test_netmiko_config_acl.py --test_device cisco881_telnet \ -\ -&& echo "Cisco SG300" \ -&& $PYTEST test_netmiko_show.py --test_device cisco_s300 \ -&& $PYTEST test_netmiko_config.py --test_device cisco_s300 \ -\ -&& echo "Arista" \ -&& $PYTEST test_netmiko_scp.py --test_device arista_sw \ -&& $PYTEST test_netmiko_show.py --test_device arista_sw \ -&& $PYTEST test_netmiko_config.py --test_device arista_sw \ -&& $PYTEST test_netmiko_config_acl.py --test_device arista_sw \ -\ -&& echo "Juniper" \ -&& $PYTEST test_netmiko_scp.py --test_device juniper_srx \ -&& $PYTEST test_netmiko_show.py --test_device juniper_srx \ -&& $PYTEST test_netmiko_config.py --test_device juniper_srx \ -&& $PYTEST test_netmiko_commit.py --test_device juniper_srx \ -\ -&& echo "Cisco IOS-XR" \ -&& $PYTEST test_netmiko_scp.py --test_device cisco_xrv \ -&& $PYTEST test_netmiko_show.py --test_device cisco_xrv \ -&& $PYTEST test_netmiko_config.py --test_device cisco_xrv \ -&& $PYTEST test_netmiko_commit.py --test_device cisco_xrv \ -\ -&& echo "Cisco NXOS" \ -&& $PYTEST test_netmiko_scp.py --test_device nxos1 \ -&& $PYTEST test_netmiko_show.py --test_device nxos1 \ -&& $PYTEST test_netmiko_config.py --test_device nxos1 \ -\ -&& echo "Linux SSH (using keys)" \ -&& $PYTEST test_netmiko_scp.py --test_device linux_srv1 \ -&& $PYTEST test_netmiko_show.py --test_device linux_srv1 \ -\ -&& echo "Test read_timeout on Cisco3 (slow, slow, and more slow)" \ -&& $PYTEST test_timeout_read_until_pattern.py --test_device cisco3 \ -&& $PYTEST test_timeout_send_command.py --test_device cisco3 \ -&& $PYTEST test_timeout_read_timing.py --test_device cisco3 \ -&& $PYTEST test_timeout_send_command_timing.py --test_device cisco3 \ -\ -&& echo "Autodetect tests" \ -&& $PYTEST test_netmiko_autodetect.py --test_device cisco1 \ -&& $PYTEST test_netmiko_autodetect.py --test_device arista_sw \ -&& $PYTEST test_netmiko_autodetect.py --test_device juniper_srx \ -&& $PYTEST test_netmiko_autodetect.py --test_device cisco_asa \ -&& $PYTEST test_netmiko_autodetect.py --test_device cisco_xrv \ -&& $PYTEST test_netmiko_autodetect.py --test_device cisco_xr_azure \ -\ -&& echo "HP ProCurve" \ -&& $PYTEST test_netmiko_show.py --test_device hp_procurve \ -&& $PYTEST test_netmiko_config.py --test_device hp_procurve \ -\ -|| RETURN_CODE=1 - -exit $RETURN_CODE - -# && echo "HP Comware7" \ -# && py.test -v test_netmiko_show.py --test_device hp_comware \ -# && py.test -v test_netmiko_config.py --test_device hp_comware \ -# \ -# Can't get Cisco IOS and SCP get to run reliably--IOS bug? -# && py.test -v test_netmiko_scp.py --test_device cisco881_key \ -# && py.test -v test_netmiko_scp.py --test_device cisco881_fast \ -# && $PYTEST test_netmiko_scp.py --test_device cisco881_key \ -# -# -#&& echo "Nokia SR-OS CLI" \ -#&& py.test -x -s -v test_netmiko_show.py --test_device sros2 \ -#&& py.test -x -s -v test_netmiko_config.py --test_device sros2 \ -#&& py.test -x -s -v test_netmiko_scp.py --test_device sros2 \ -#\ -#&& echo "SR-OS MD" \ -#&& py.test -x -s -v test_netmiko_show.py --test_device sros1_md \ -#&& py.test -x -s -v test_netmiko_config.py --test_device sros1_md \ -#&& py.test -x -s -v test_netmiko_scp.py --test_device sros1_md \ -#&& py.test -x -s -v test_netmiko_commit.py --test_device sros1_md \ -#\ -# && echo "Cisco ASA" \ -# && $PYTEST test_netmiko_show.py --test_device cisco_asa \ -# && $PYTEST test_netmiko_config.py --test_device cisco_asa \ -# && $PYTEST test_netmiko_show.py --test_device cisco_asa_login \ -# && $PYTEST test_netmiko_config.py --test_device cisco_asa_login \ -#\ From 53802b22512ee7477045f5c1a60f12bac7753fdc Mon Sep 17 00:00:00 2001 From: Kirk Byers Date: Tue, 9 Aug 2022 13:58:28 -0700 Subject: [PATCH 34/34] Release 4.1.2 (#2895) --- docs/netmiko/a10/a10_ssh.html | 2 +- docs/netmiko/a10/index.html | 2 +- docs/netmiko/accedian/accedian_ssh.html | 2 +- docs/netmiko/accedian/index.html | 2 +- docs/netmiko/alcatel/alcatel_aos_ssh.html | 2 +- docs/netmiko/alcatel/index.html | 2 +- .../allied_telesis/allied_telesis_awplus.html | 4 +- docs/netmiko/allied_telesis/index.html | 2 +- docs/netmiko/apresia/apresia_aeos.html | 4 +- docs/netmiko/apresia/index.html | 2 +- docs/netmiko/arista/arista.html | 4 +- docs/netmiko/arista/index.html | 2 +- docs/netmiko/audiocode/audiocode_ssh.html | 2841 +++++++++++++++++ docs/netmiko/audiocode/index.html | 1140 +++++++ docs/netmiko/base_connection.html | 122 +- docs/netmiko/broadcom/broadcom_icos_ssh.html | 2 +- docs/netmiko/broadcom/index.html | 2 +- docs/netmiko/cdot/cdot_cros_ssh.html | 12 +- docs/netmiko/cdot/index.html | 8 +- docs/netmiko/centec/centec_os.html | 6 +- docs/netmiko/centec/index.html | 4 +- docs/netmiko/channel.html | 12 +- .../checkpoint/checkpoint_gaia_ssh.html | 2 +- docs/netmiko/checkpoint/index.html | 2 +- docs/netmiko/ciena/ciena_saos.html | 4 +- docs/netmiko/ciena/index.html | 2 +- docs/netmiko/cisco/cisco_ftd_ssh.html | 2 +- docs/netmiko/cisco/cisco_ios.html | 8 +- docs/netmiko/cisco/cisco_nxos_ssh.html | 2 +- docs/netmiko/cisco/cisco_s300.html | 6 +- docs/netmiko/cisco/cisco_viptela.html | 8 +- docs/netmiko/cisco/cisco_wlc_ssh.html | 236 +- docs/netmiko/cisco/cisco_xr.html | 16 +- docs/netmiko/cisco/index.html | 174 +- docs/netmiko/cisco_base_connection.html | 4 +- docs/netmiko/citrix/index.html | 2 +- docs/netmiko/citrix/netscaler_ssh.html | 2 +- docs/netmiko/cloudgenix/cloudgenix_ion.html | 8 +- docs/netmiko/cloudgenix/index.html | 4 +- docs/netmiko/coriant/coriant_ssh.html | 2 +- docs/netmiko/coriant/index.html | 2 +- docs/netmiko/dell/dell_dnos6.html | 6 +- docs/netmiko/dell/dell_force10_ssh.html | 2 +- docs/netmiko/dell/dell_isilon_ssh.html | 2 +- docs/netmiko/dell/dell_os10_ssh.html | 2 +- docs/netmiko/dell/dell_powerconnect.html | 6 +- docs/netmiko/dell/dell_sonic_ssh.html | 2 +- docs/netmiko/dell/index.html | 16 +- docs/netmiko/dlink/dlink_ds.html | 4 +- docs/netmiko/dlink/index.html | 2 +- docs/netmiko/eltex/eltex_esr_ssh.html | 2 +- docs/netmiko/eltex/eltex_ssh.html | 2 +- docs/netmiko/eltex/index.html | 4 +- docs/netmiko/endace/endace_ssh.html | 2 +- docs/netmiko/endace/index.html | 2 +- docs/netmiko/enterasys/enterasys_ssh.html | 2 +- docs/netmiko/enterasys/index.html | 2 +- docs/netmiko/ericsson/ericsson_ipos.html | 12 +- docs/netmiko/ericsson/index.html | 8 +- docs/netmiko/extreme/extreme_ers_ssh.html | 8 +- docs/netmiko/extreme/extreme_exos.html | 4 +- docs/netmiko/extreme/extreme_netiron.html | 4 +- docs/netmiko/extreme/extreme_nos_ssh.html | 2 +- docs/netmiko/extreme/extreme_slx_ssh.html | 2 +- .../netmiko/extreme/extreme_tierraos_ssh.html | 2 +- docs/netmiko/extreme/extreme_vsp_ssh.html | 2 +- docs/netmiko/extreme/extreme_wing_ssh.html | 2 +- docs/netmiko/extreme/index.html | 20 +- docs/netmiko/f5/f5_linux_ssh.html | 2 +- docs/netmiko/f5/f5_tmsh_ssh.html | 2 +- docs/netmiko/f5/index.html | 4 +- docs/netmiko/flexvnf/flexvnf_ssh.html | 2 +- docs/netmiko/flexvnf/index.html | 2 +- docs/netmiko/fortinet/fortinet_ssh.html | 2 +- docs/netmiko/fortinet/index.html | 2 +- docs/netmiko/hp/hp_comware.html | 6 +- docs/netmiko/huawei/huawei.html | 18 +- docs/netmiko/huawei/huawei_smartax.html | 2 +- docs/netmiko/huawei/index.html | 14 +- docs/netmiko/index.html | 78 +- docs/netmiko/juniper/index.html | 4 +- docs/netmiko/juniper/juniper.html | 16 +- docs/netmiko/juniper/juniper_screenos.html | 2 +- docs/netmiko/keymile/index.html | 2 +- docs/netmiko/keymile/keymile_nos_ssh.html | 2 +- docs/netmiko/linux/index.html | 8 +- docs/netmiko/linux/linux_ssh.html | 12 +- docs/netmiko/mellanox/index.html | 2 +- .../netmiko/mellanox/mellanox_mlnxos_ssh.html | 2 +- docs/netmiko/mrv/index.html | 4 +- docs/netmiko/mrv/mrv_lx.html | 2 +- docs/netmiko/mrv/mrv_ssh.html | 2 +- docs/netmiko/netapp/index.html | 2 +- docs/netmiko/netapp/netapp_cdot_ssh.html | 2 +- docs/netmiko/no_enable.html | 1 + docs/netmiko/nokia/index.html | 12 +- docs/netmiko/nokia/nokia_srl.html | 12 +- docs/netmiko/nokia/nokia_sros.html | 24 +- docs/netmiko/ovs/index.html | 2 +- docs/netmiko/ovs/ovs_linux_ssh.html | 2 +- docs/netmiko/paloalto/index.html | 4 +- docs/netmiko/paloalto/paloalto_panos.html | 6 +- docs/netmiko/quanta/index.html | 2 +- docs/netmiko/quanta/quanta_mesh_ssh.html | 2 +- docs/netmiko/rad/index.html | 2 +- docs/netmiko/rad/rad_etx.html | 4 +- docs/netmiko/raisecom/index.html | 4 +- docs/netmiko/raisecom/raisecom_roap.html | 6 +- docs/netmiko/ruckus/index.html | 2 +- docs/netmiko/ruckus/ruckus_fastiron.html | 4 +- docs/netmiko/ruijie/index.html | 2 +- docs/netmiko/ruijie/ruijie_os.html | 4 +- docs/netmiko/sixwind/index.html | 2 +- docs/netmiko/sixwind/sixwind_os.html | 4 +- docs/netmiko/sophos/index.html | 2 +- docs/netmiko/sophos/sophos_sfos_ssh.html | 2 +- docs/netmiko/ssh_autodetect.html | 6 + docs/netmiko/supermicro/index.html | 4 +- docs/netmiko/supermicro/smci_smis.html | 6 +- docs/netmiko/terminal_server/index.html | 4 +- .../terminal_server/terminal_server.html | 6 +- docs/netmiko/ubiquiti/edge_ssh.html | 2 +- docs/netmiko/ubiquiti/edgerouter_ssh.html | 2 +- docs/netmiko/ubiquiti/index.html | 6 +- docs/netmiko/ubiquiti/unifiswitch_ssh.html | 2 +- docs/netmiko/utilities.html | 36 +- docs/netmiko/vyos/index.html | 8 +- docs/netmiko/vyos/vyos_ssh.html | 12 +- docs/netmiko/watchguard/fireware_ssh.html | 2 +- docs/netmiko/watchguard/index.html | 2 +- docs/netmiko/yamaha/index.html | 2 +- docs/netmiko/yamaha/yamaha.html | 4 +- docs/netmiko/zte/index.html | 4 +- docs/netmiko/zte/zte_zxros.html | 6 +- docs/netmiko/zyxel/index.html | 8 +- docs/netmiko/zyxel/zyxel_ssh.html | 12 +- netmiko/__init__.py | 2 +- 137 files changed, 4701 insertions(+), 525 deletions(-) create mode 100644 docs/netmiko/audiocode/audiocode_ssh.html create mode 100644 docs/netmiko/audiocode/index.html diff --git a/docs/netmiko/a10/a10_ssh.html b/docs/netmiko/a10/a10_ssh.html index 2cdb73fc9..1b357462e 100644 --- a/docs/netmiko/a10/a10_ssh.html +++ b/docs/netmiko/a10/a10_ssh.html @@ -62,7 +62,7 @@

    Classes

    class A10SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    A10 support.

    diff --git a/docs/netmiko/a10/index.html b/docs/netmiko/a10/index.html index bc1357df4..3b0a98f36 100644 --- a/docs/netmiko/a10/index.html +++ b/docs/netmiko/a10/index.html @@ -49,7 +49,7 @@

    Classes

    class A10SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    A10 support.

    diff --git a/docs/netmiko/accedian/accedian_ssh.html b/docs/netmiko/accedian/accedian_ssh.html index 1cd246623..0f448b5d2 100644 --- a/docs/netmiko/accedian/accedian_ssh.html +++ b/docs/netmiko/accedian/accedian_ssh.html @@ -71,7 +71,7 @@

    Classes

    class AccedianSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    diff --git a/docs/netmiko/accedian/index.html b/docs/netmiko/accedian/index.html index 7465dd262..1986aa5a5 100644 --- a/docs/netmiko/accedian/index.html +++ b/docs/netmiko/accedian/index.html @@ -49,7 +49,7 @@

    Classes

    class AccedianSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    diff --git a/docs/netmiko/alcatel/alcatel_aos_ssh.html b/docs/netmiko/alcatel/alcatel_aos_ssh.html index d83e146e6..f323391d1 100644 --- a/docs/netmiko/alcatel/alcatel_aos_ssh.html +++ b/docs/netmiko/alcatel/alcatel_aos_ssh.html @@ -64,7 +64,7 @@

    Classes

    class AlcatelAosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

    diff --git a/docs/netmiko/alcatel/index.html b/docs/netmiko/alcatel/index.html index 2800dd5de..1b5ec2f3e 100644 --- a/docs/netmiko/alcatel/index.html +++ b/docs/netmiko/alcatel/index.html @@ -49,7 +49,7 @@

    Classes

    class AlcatelAosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Alcatel-Lucent Enterprise AOS support (AOS6 and AOS8).

    diff --git a/docs/netmiko/allied_telesis/allied_telesis_awplus.html b/docs/netmiko/allied_telesis/allied_telesis_awplus.html index 9738c3a80..51f09d344 100644 --- a/docs/netmiko/allied_telesis/allied_telesis_awplus.html +++ b/docs/netmiko/allied_telesis/allied_telesis_awplus.html @@ -85,7 +85,7 @@

    Classes

    class AlliedTelesisAwplusBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with Allied Telesis devices.

    @@ -346,7 +346,7 @@

    Inherited members

    class AlliedTelesisAwplusSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with Allied Telesis devices.

    diff --git a/docs/netmiko/allied_telesis/index.html b/docs/netmiko/allied_telesis/index.html index 59302927c..b9bbe06bb 100644 --- a/docs/netmiko/allied_telesis/index.html +++ b/docs/netmiko/allied_telesis/index.html @@ -49,7 +49,7 @@

    Classes

    class AlliedTelesisAwplusSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with Allied Telesis devices.

    diff --git a/docs/netmiko/apresia/apresia_aeos.html b/docs/netmiko/apresia/apresia_aeos.html index 5e3823a77..a2e001b6b 100644 --- a/docs/netmiko/apresia/apresia_aeos.html +++ b/docs/netmiko/apresia/apresia_aeos.html @@ -83,7 +83,7 @@

    Classes

    class ApresiaAeosBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -304,7 +304,7 @@

    Inherited members

    class ApresiaAeosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/apresia/index.html b/docs/netmiko/apresia/index.html index faec52b44..08962eb1f 100644 --- a/docs/netmiko/apresia/index.html +++ b/docs/netmiko/apresia/index.html @@ -49,7 +49,7 @@

    Classes

    class ApresiaAeosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/arista/arista.html b/docs/netmiko/arista/arista.html index b16c1d4c4..2df353133 100644 --- a/docs/netmiko/arista/arista.html +++ b/docs/netmiko/arista/arista.html @@ -185,7 +185,7 @@

    Classes

    class AristaBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -603,7 +603,7 @@

    Inherited members

    class AristaSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/arista/index.html b/docs/netmiko/arista/index.html index b5196e6cd..8d3953f8e 100644 --- a/docs/netmiko/arista/index.html +++ b/docs/netmiko/arista/index.html @@ -145,7 +145,7 @@

    Inherited members

    class AristaSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/audiocode/audiocode_ssh.html b/docs/netmiko/audiocode/audiocode_ssh.html new file mode 100644 index 000000000..0a11b2586 --- /dev/null +++ b/docs/netmiko/audiocode/audiocode_ssh.html @@ -0,0 +1,2841 @@ + + + + + + +netmiko.audiocode.audiocode_ssh API documentation + + + + + + + + + + + +
    +
    +
    +

    Module netmiko.audiocode.audiocode_ssh

    +
    +
    +
    + +Expand source code + +
    from typing import Any, Optional, Sequence, Iterator, TextIO, Union, List
    +import time
    +import re
    +from netmiko.base_connection import BaseConnection
    +from netmiko.no_enable import NoEnable
    +
    +
    +class AudiocodeBase(BaseConnection):
    +    """Common Methods for AudioCode Drivers."""
    +
    +    def __init__(self, *args: Any, **kwargs: Any) -> None:
    +        default_enter = kwargs.get("default_enter")
    +        kwargs["default_enter"] = "\r" if default_enter is None else default_enter
    +        super().__init__(*args, **kwargs)
    +
    +    def session_preparation(self) -> None:
    +        """Prepare the session after the connection has been established."""
    +        self._test_channel_read(pattern=r"[>#]")
    +        self.set_base_prompt()
    +        self.disable_paging()
    +        # Clear the read buffer
    +        self.clear_buffer()
    +
    +    def set_base_prompt(
    +        self,
    +        pri_prompt_terminator: str = "#",
    +        alt_prompt_terminator: str = ">",
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"\*?(#|>)",
    +    ) -> str:
    +        return super().set_base_prompt(
    +            pri_prompt_terminator=pri_prompt_terminator,
    +            alt_prompt_terminator=alt_prompt_terminator,
    +            delay_factor=delay_factor,
    +            pattern=pattern,
    +        )
    +
    +    def find_prompt(
    +        self,
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"\*?(#|>)",
    +    ) -> str:
    +        return super().find_prompt(
    +            delay_factor=delay_factor,
    +            pattern=pattern,
    +        )
    +
    +    def _enable_paging(
    +        self,
    +        delay_factor: Optional[float] = 0.5,
    +    ) -> str:
    +        return ""
    +
    +    def check_config_mode(
    +        self,
    +        check_string: str = r"(\)#|\)\*#)",
    +        pattern: str = r"..#",
    +        force_regex: bool = True,
    +    ) -> bool:
    +
    +        return super().check_config_mode(
    +            check_string=check_string, pattern=pattern, force_regex=force_regex
    +        )
    +
    +    def check_enable_mode(self, check_string: str = "#") -> bool:
    +        return super().check_enable_mode(check_string=check_string)
    +
    +    def cleanup(self, command: str = "exit") -> None:
    +        """Gracefully exit the SSH session."""
    +        try:
    +            self._enable_paging()
    +            if self.check_config_mode():
    +                self.exit_config_mode()
    +        except Exception:
    +            pass
    +        # Always try to send final 'exit' (command)
    +        self._session_log_fin = True
    +        self.write_channel(command + self.RETURN)
    +
    +    def enable(
    +        self,
    +        cmd: str = "enable",
    +        pattern: str = "ssword",
    +        enable_pattern: Optional[str] = "#",
    +        re_flags: int = re.IGNORECASE,
    +    ) -> str:
    +        return super().enable(
    +            cmd=cmd, pattern=pattern, enable_pattern=enable_pattern, re_flags=re_flags
    +        )
    +
    +    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#") -> str:
    +        output = ""
    +        max_exit_depth = 10
    +        if self.check_config_mode():
    +            # Keep "exitting" until out of config mode
    +            for _ in range(max_exit_depth):
    +                self.write_channel(self.normalize_cmd(exit_config))
    +
    +                # Make sure you read until you detect the command echo (avoid getting out of sync)
    +                if self.global_cmd_verify is not False:
    +                    output += self.read_until_pattern(
    +                        pattern=re.escape(exit_config.strip())
    +                    )
    +                if pattern:
    +                    output += self.read_until_pattern(pattern=pattern)
    +                else:
    +                    output += self.read_until_prompt(read_entire_line=True)
    +
    +                if not self.check_config_mode():
    +                    # No longer in config mode
    +                    break
    +            else:  # no-break
    +                raise ValueError("Failed to exit configuration mode")
    +        return output
    +
    +    def exit_enable_mode(self, exit_command: str = "disable") -> str:
    +        """Exit enable mode."""
    +        return super().exit_enable_mode(exit_command=exit_command)
    +
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
    +        *,
    +        exit_config_mode: bool = True,
    +        read_timeout: Optional[float] = None,
    +        delay_factor: Optional[float] = 1.0,
    +        max_loops: Optional[int] = 150,
    +        strip_prompt: bool = False,
    +        strip_command: bool = False,
    +        config_mode_command: Optional[str] = None,
    +        cmd_verify: bool = True,
    +        enter_config_mode: bool = True,
    +        error_pattern: str = "",
    +        terminator: str = r"\*?#",
    +        bypass_commands: Optional[str] = None,
    +    ) -> str:
    +        if enter_config_mode and config_mode_command is None:
    +            msg = """
    +send_config_set() for the Audiocode drivers require that you specify the
    +config_mode_command. For example, config_mode_command="configure system"
    +(or "configure voip" or "configure network" etc.)
    +            """
    +            raise ValueError(msg)
    +        return super().send_config_set(
    +            config_commands=config_commands,
    +            exit_config_mode=exit_config_mode,
    +            read_timeout=read_timeout,
    +            delay_factor=delay_factor,
    +            max_loops=max_loops,
    +            strip_prompt=strip_prompt,
    +            strip_command=strip_command,
    +            config_mode_command=config_mode_command,
    +            cmd_verify=cmd_verify,
    +            enter_config_mode=enter_config_mode,
    +            error_pattern=error_pattern,
    +            terminator=terminator,
    +            bypass_commands=bypass_commands,
    +        )
    +
    +    def save_config(
    +        self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
    +    ) -> str:
    +        """Saves the running configuration."""
    +
    +        self.enable()
    +        if confirm:
    +            output = self._send_command_timing_str(command_string=cmd)
    +            if confirm_response:
    +                output += self._send_command_timing_str(confirm_response)
    +            else:
    +                # Send enter by default
    +                output += self._send_command_timing_str(self.RETURN)
    +        else:
    +            # Some devices are slow so match on trailing-prompt if you can
    +            output = self._send_command_str(command_string=cmd)
    +        return output
    +
    +    def _reload_device(
    +        self,
    +        cmd_save: str = "reload now",
    +        cmd_no_save: str = "reload without-saving",
    +        reload_save: bool = True,
    +    ) -> str:
    +        """Reloads the device."""
    +        if reload_save:
    +            cmd = cmd_save
    +        else:
    +            cmd = cmd_no_save
    +        self._enable_paging()
    +        self.enable()
    +        return self._send_command_timing_str(command_string=cmd)
    +
    +
    +class Audiocode72Base(AudiocodeBase):
    +    """Common Methods for AudioCodes running 7.2 CLI."""
    +
    +    def disable_paging(
    +        self,
    +        command: str = "",
    +        delay_factor: Optional[float] = 0.5,
    +        cmd_verify: bool = True,
    +        pattern: Optional[str] = None,
    +    ) -> str:
    +
    +        if command:
    +            return super().disable_paging(
    +                command=command,
    +                delay_factor=delay_factor,
    +                cmd_verify=cmd_verify,
    +                pattern=pattern,
    +            )
    +        else:
    +            command_list: List[str] = [
    +                "cli-settings",
    +                "window-height 0",
    +            ]
    +
    +        self.enable()
    +        assert isinstance(delay_factor, float)
    +        delay_factor = self.select_delay_factor(delay_factor)
    +        time.sleep(delay_factor * 0.1)
    +        self.clear_buffer()
    +        return self.send_config_set(
    +            config_commands=command_list,
    +            config_mode_command="config system",
    +        )
    +
    +    def _enable_paging(
    +        self,
    +        delay_factor: Optional[float] = 0.5,
    +    ) -> str:
    +        """This is designed to re-enable window paging."""
    +
    +        command_list: List[str] = [
    +            "cli-settings",
    +            "window-height automatic",
    +        ]
    +        self.enable()
    +        assert isinstance(delay_factor, float)
    +        delay_factor = self.select_delay_factor(delay_factor)
    +        time.sleep(delay_factor * 0.1)
    +        self.clear_buffer()
    +
    +        return self.send_config_set(
    +            config_commands=command_list,
    +            config_mode_command="config system",
    +        )
    +
    +
    +class Audiocode72Telnet(Audiocode72Base):
    +    pass
    +
    +
    +class Audiocode72SSH(Audiocode72Base):
    +    pass
    +
    +
    +class AudiocodeBase66(AudiocodeBase):
    +    """Audiocode this applies to 6.6 Audiocode Firmware versions."""
    +
    +    def disable_paging(
    +        self,
    +        command: str = "",
    +        delay_factor: Optional[float] = 0.5,
    +        cmd_verify: bool = True,
    +        pattern: Optional[str] = None,
    +    ) -> str:
    +
    +        if command:
    +            return super().disable_paging(
    +                command=command,
    +                delay_factor=delay_factor,
    +                cmd_verify=cmd_verify,
    +                pattern=pattern,
    +            )
    +        else:
    +            command_list: List[str] = [
    +                "cli-terminal",
    +                "set window-height 0",
    +            ]
    +
    +            self.enable()
    +            assert isinstance(delay_factor, float)
    +            delay_factor = self.select_delay_factor(delay_factor)
    +            time.sleep(delay_factor * 0.1)
    +            self.clear_buffer()
    +            return self.send_config_set(
    +                config_commands=command_list,
    +                config_mode_command="config system",
    +            )
    +
    +    def _enable_paging(
    +        self,
    +        delay_factor: Optional[float] = 0.5,
    +    ) -> str:
    +
    +        command_list: List[str] = [
    +            "cli-terminal",
    +            "set window-height 100",
    +        ]
    +        self.enable()
    +        assert isinstance(delay_factor, float)
    +        delay_factor = self.select_delay_factor(delay_factor)
    +        time.sleep(delay_factor * 0.1)
    +        self.clear_buffer()
    +
    +        return self.send_config_set(
    +            config_commands=command_list,
    +            config_mode_command="config system",
    +        )
    +
    +
    +class Audiocode66SSH(AudiocodeBase66):
    +    pass
    +
    +
    +class Audiocode66Telnet(AudiocodeBase66):
    +    pass
    +
    +
    +class AudiocodeShellBase(NoEnable, AudiocodeBase):
    +    """Audiocode this applies to 6.6 Audiocode Firmware versions that only use the Shell."""
    +
    +    def session_preparation(self) -> None:
    +        """Prepare the session after the connection has been established."""
    +        self.write_channel(self.RETURN)
    +        self.write_channel(self.RETURN)
    +        self._test_channel_read(pattern=r"/>")
    +        self.set_base_prompt()
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def set_base_prompt(
    +        self,
    +        pri_prompt_terminator: str = r"/>",
    +        alt_prompt_terminator: str = "",
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"/>",
    +    ) -> str:
    +        prompt = self.find_prompt(delay_factor=delay_factor, pattern=pattern)
    +        pattern = pri_prompt_terminator
    +        if not re.search(pattern, prompt):
    +            raise ValueError(f"Router prompt not found: {repr(prompt)}")
    +        else:
    +            # Strip off trailing terminator
    +            self.base_prompt = prompt
    +            return self.base_prompt
    +
    +    def find_prompt(
    +        self,
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"/>",
    +    ) -> str:
    +        return super().find_prompt(
    +            delay_factor=delay_factor,
    +            pattern=pattern,
    +        )
    +
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
    +        *,
    +        exit_config_mode: bool = True,
    +        read_timeout: Optional[float] = None,
    +        delay_factor: Optional[float] = 1.0,
    +        max_loops: Optional[int] = 150,
    +        strip_prompt: bool = False,
    +        strip_command: bool = False,
    +        config_mode_command: Optional[str] = None,
    +        cmd_verify: bool = True,
    +        enter_config_mode: bool = True,
    +        error_pattern: str = "",
    +        terminator: str = r"/.*>",
    +        bypass_commands: str = None,
    +    ) -> str:
    +
    +        return super().send_config_set(
    +            config_commands=config_commands,
    +            exit_config_mode=exit_config_mode,
    +            read_timeout=read_timeout,
    +            delay_factor=delay_factor,
    +            max_loops=max_loops,
    +            strip_prompt=strip_prompt,
    +            strip_command=strip_command,
    +            config_mode_command=config_mode_command,
    +            cmd_verify=cmd_verify,
    +            enter_config_mode=enter_config_mode,
    +            error_pattern=error_pattern,
    +            terminator=terminator,
    +            bypass_commands=bypass_commands,
    +        )
    +
    +    def config_mode(
    +        self, config_command: str = "", pattern: str = r"/.*>", re_flags: int = 0
    +    ) -> str:
    +        return super().config_mode(
    +            config_command=config_command, pattern=pattern, re_flags=re_flags
    +        )
    +
    +    def check_config_mode(
    +        self,
    +        check_string: str = r"/CONFiguration>",
    +        pattern: str = r"/.*>",
    +        force_regex: bool = True,
    +    ) -> bool:
    +        return super().check_config_mode(
    +            check_string=check_string, pattern=pattern, force_regex=force_regex
    +        )
    +
    +    def exit_config_mode(self, exit_config: str = "..", pattern: str = r"/>") -> str:
    +        return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    +
    +    def disable_paging(
    +        self,
    +        command: str = "",
    +        delay_factor: Optional[float] = 0.5,
    +        cmd_verify: bool = True,
    +        pattern: Optional[str] = None,
    +    ) -> str:
    +        """Not supported"""
    +        return ""
    +
    +    def save_config(
    +        self,
    +        cmd: str = "SaveConfiguration",
    +        confirm: bool = False,
    +        confirm_response: str = "",
    +    ) -> str:
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +    def _reload_device(
    +        self,
    +        cmd_save: str = "SaveAndReset",
    +        cmd_no_save: str = "ReSetDevice",
    +        reload_save: bool = True,
    +    ) -> str:
    +        """Reloads the device."""
    +        return super()._reload_device(
    +            cmd_save=cmd_save, cmd_no_save=cmd_no_save, reload_save=reload_save
    +        )
    +
    +    def _enable_paging(
    +        self,
    +        delay_factor: Optional[float] = 0.5,
    +    ) -> str:
    +        """Not supported"""
    +        pass
    +
    +    def strip_command(self, command_string: str, output: str) -> str:
    +        # Support for Audiocode_Shell.
    +        pattern = r"^SIP.*[\s\S]?PING.*>?.*[\s\S]?.*>?$"
    +        output = re.sub(pattern, "", output, flags=re.M)
    +
    +        cmd = command_string.strip()
    +        pattern = re.escape(cmd)
    +        output = re.sub(pattern, "", output, flags=re.M)
    +        return super().strip_command(command_string=command_string, output=output)
    +
    +    def strip_prompt(self, a_string: str) -> str:
    +        pattern = r"^/>?"
    +        a_string = re.sub(pattern, "", a_string, flags=re.M)
    +        return super().strip_prompt(
    +            a_string=a_string,
    +        )
    +
    +
    +class AudiocodeShellSSH(AudiocodeShellBase):
    +    pass
    +
    +
    +class AudiocodeShellTelnet(AudiocodeShellBase):
    +    pass
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class Audiocode66SSH +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode66SSH(AudiocodeBase66):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class Audiocode66Telnet +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode66Telnet(AudiocodeBase66):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class Audiocode72Base +(*args: Any, **kwargs: Any) +
    +
    +

    Common Methods for AudioCodes running 7.2 CLI.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode72Base(AudiocodeBase):
    +    """Common Methods for AudioCodes running 7.2 CLI."""
    +
    +    def disable_paging(
    +        self,
    +        command: str = "",
    +        delay_factor: Optional[float] = 0.5,
    +        cmd_verify: bool = True,
    +        pattern: Optional[str] = None,
    +    ) -> str:
    +
    +        if command:
    +            return super().disable_paging(
    +                command=command,
    +                delay_factor=delay_factor,
    +                cmd_verify=cmd_verify,
    +                pattern=pattern,
    +            )
    +        else:
    +            command_list: List[str] = [
    +                "cli-settings",
    +                "window-height 0",
    +            ]
    +
    +        self.enable()
    +        assert isinstance(delay_factor, float)
    +        delay_factor = self.select_delay_factor(delay_factor)
    +        time.sleep(delay_factor * 0.1)
    +        self.clear_buffer()
    +        return self.send_config_set(
    +            config_commands=command_list,
    +            config_mode_command="config system",
    +        )
    +
    +    def _enable_paging(
    +        self,
    +        delay_factor: Optional[float] = 0.5,
    +    ) -> str:
    +        """This is designed to re-enable window paging."""
    +
    +        command_list: List[str] = [
    +            "cli-settings",
    +            "window-height automatic",
    +        ]
    +        self.enable()
    +        assert isinstance(delay_factor, float)
    +        delay_factor = self.select_delay_factor(delay_factor)
    +        time.sleep(delay_factor * 0.1)
    +        self.clear_buffer()
    +
    +        return self.send_config_set(
    +            config_commands=command_list,
    +            config_mode_command="config system",
    +        )
    +
    +

    Ancestors

    + +

    Subclasses

    + +

    Inherited members

    + +
    +
    +class Audiocode72SSH +(*args: Any, **kwargs: Any) +
    +
    +

    Common Methods for AudioCodes running 7.2 CLI.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode72SSH(Audiocode72Base):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class Audiocode72Telnet +(*args: Any, **kwargs: Any) +
    +
    +

    Common Methods for AudioCodes running 7.2 CLI.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode72Telnet(Audiocode72Base):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class AudiocodeBase +(*args: Any, **kwargs: Any) +
    +
    +

    Common Methods for AudioCode Drivers.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class AudiocodeBase(BaseConnection):
    +    """Common Methods for AudioCode Drivers."""
    +
    +    def __init__(self, *args: Any, **kwargs: Any) -> None:
    +        default_enter = kwargs.get("default_enter")
    +        kwargs["default_enter"] = "\r" if default_enter is None else default_enter
    +        super().__init__(*args, **kwargs)
    +
    +    def session_preparation(self) -> None:
    +        """Prepare the session after the connection has been established."""
    +        self._test_channel_read(pattern=r"[>#]")
    +        self.set_base_prompt()
    +        self.disable_paging()
    +        # Clear the read buffer
    +        self.clear_buffer()
    +
    +    def set_base_prompt(
    +        self,
    +        pri_prompt_terminator: str = "#",
    +        alt_prompt_terminator: str = ">",
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"\*?(#|>)",
    +    ) -> str:
    +        return super().set_base_prompt(
    +            pri_prompt_terminator=pri_prompt_terminator,
    +            alt_prompt_terminator=alt_prompt_terminator,
    +            delay_factor=delay_factor,
    +            pattern=pattern,
    +        )
    +
    +    def find_prompt(
    +        self,
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"\*?(#|>)",
    +    ) -> str:
    +        return super().find_prompt(
    +            delay_factor=delay_factor,
    +            pattern=pattern,
    +        )
    +
    +    def _enable_paging(
    +        self,
    +        delay_factor: Optional[float] = 0.5,
    +    ) -> str:
    +        return ""
    +
    +    def check_config_mode(
    +        self,
    +        check_string: str = r"(\)#|\)\*#)",
    +        pattern: str = r"..#",
    +        force_regex: bool = True,
    +    ) -> bool:
    +
    +        return super().check_config_mode(
    +            check_string=check_string, pattern=pattern, force_regex=force_regex
    +        )
    +
    +    def check_enable_mode(self, check_string: str = "#") -> bool:
    +        return super().check_enable_mode(check_string=check_string)
    +
    +    def cleanup(self, command: str = "exit") -> None:
    +        """Gracefully exit the SSH session."""
    +        try:
    +            self._enable_paging()
    +            if self.check_config_mode():
    +                self.exit_config_mode()
    +        except Exception:
    +            pass
    +        # Always try to send final 'exit' (command)
    +        self._session_log_fin = True
    +        self.write_channel(command + self.RETURN)
    +
    +    def enable(
    +        self,
    +        cmd: str = "enable",
    +        pattern: str = "ssword",
    +        enable_pattern: Optional[str] = "#",
    +        re_flags: int = re.IGNORECASE,
    +    ) -> str:
    +        return super().enable(
    +            cmd=cmd, pattern=pattern, enable_pattern=enable_pattern, re_flags=re_flags
    +        )
    +
    +    def exit_config_mode(self, exit_config: str = "exit", pattern: str = r"#") -> str:
    +        output = ""
    +        max_exit_depth = 10
    +        if self.check_config_mode():
    +            # Keep "exitting" until out of config mode
    +            for _ in range(max_exit_depth):
    +                self.write_channel(self.normalize_cmd(exit_config))
    +
    +                # Make sure you read until you detect the command echo (avoid getting out of sync)
    +                if self.global_cmd_verify is not False:
    +                    output += self.read_until_pattern(
    +                        pattern=re.escape(exit_config.strip())
    +                    )
    +                if pattern:
    +                    output += self.read_until_pattern(pattern=pattern)
    +                else:
    +                    output += self.read_until_prompt(read_entire_line=True)
    +
    +                if not self.check_config_mode():
    +                    # No longer in config mode
    +                    break
    +            else:  # no-break
    +                raise ValueError("Failed to exit configuration mode")
    +        return output
    +
    +    def exit_enable_mode(self, exit_command: str = "disable") -> str:
    +        """Exit enable mode."""
    +        return super().exit_enable_mode(exit_command=exit_command)
    +
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
    +        *,
    +        exit_config_mode: bool = True,
    +        read_timeout: Optional[float] = None,
    +        delay_factor: Optional[float] = 1.0,
    +        max_loops: Optional[int] = 150,
    +        strip_prompt: bool = False,
    +        strip_command: bool = False,
    +        config_mode_command: Optional[str] = None,
    +        cmd_verify: bool = True,
    +        enter_config_mode: bool = True,
    +        error_pattern: str = "",
    +        terminator: str = r"\*?#",
    +        bypass_commands: Optional[str] = None,
    +    ) -> str:
    +        if enter_config_mode and config_mode_command is None:
    +            msg = """
    +send_config_set() for the Audiocode drivers require that you specify the
    +config_mode_command. For example, config_mode_command="configure system"
    +(or "configure voip" or "configure network" etc.)
    +            """
    +            raise ValueError(msg)
    +        return super().send_config_set(
    +            config_commands=config_commands,
    +            exit_config_mode=exit_config_mode,
    +            read_timeout=read_timeout,
    +            delay_factor=delay_factor,
    +            max_loops=max_loops,
    +            strip_prompt=strip_prompt,
    +            strip_command=strip_command,
    +            config_mode_command=config_mode_command,
    +            cmd_verify=cmd_verify,
    +            enter_config_mode=enter_config_mode,
    +            error_pattern=error_pattern,
    +            terminator=terminator,
    +            bypass_commands=bypass_commands,
    +        )
    +
    +    def save_config(
    +        self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
    +    ) -> str:
    +        """Saves the running configuration."""
    +
    +        self.enable()
    +        if confirm:
    +            output = self._send_command_timing_str(command_string=cmd)
    +            if confirm_response:
    +                output += self._send_command_timing_str(confirm_response)
    +            else:
    +                # Send enter by default
    +                output += self._send_command_timing_str(self.RETURN)
    +        else:
    +            # Some devices are slow so match on trailing-prompt if you can
    +            output = self._send_command_str(command_string=cmd)
    +        return output
    +
    +    def _reload_device(
    +        self,
    +        cmd_save: str = "reload now",
    +        cmd_no_save: str = "reload without-saving",
    +        reload_save: bool = True,
    +    ) -> str:
    +        """Reloads the device."""
    +        if reload_save:
    +            cmd = cmd_save
    +        else:
    +            cmd = cmd_no_save
    +        self._enable_paging()
    +        self.enable()
    +        return self._send_command_timing_str(command_string=cmd)
    +
    +

    Ancestors

    + +

    Subclasses

    + +

    Methods

    +
    +
    +def cleanup(self, command: str = 'exit') ‑> None +
    +
    +

    Gracefully exit the SSH session.

    +
    + +Expand source code + +
    def cleanup(self, command: str = "exit") -> None:
    +    """Gracefully exit the SSH session."""
    +    try:
    +        self._enable_paging()
    +        if self.check_config_mode():
    +            self.exit_config_mode()
    +    except Exception:
    +        pass
    +    # Always try to send final 'exit' (command)
    +    self._session_log_fin = True
    +    self.write_channel(command + self.RETURN)
    +
    +
    +
    +def exit_enable_mode(self, exit_command: str = 'disable') ‑> str +
    +
    +

    Exit enable mode.

    +
    + +Expand source code + +
    def exit_enable_mode(self, exit_command: str = "disable") -> str:
    +    """Exit enable mode."""
    +    return super().exit_enable_mode(exit_command=exit_command)
    +
    +
    +
    +def save_config(self, cmd: str = 'write', confirm: bool = False, confirm_response: str = '') ‑> str +
    +
    +

    Saves the running configuration.

    +
    + +Expand source code + +
    def save_config(
    +    self, cmd: str = "write", confirm: bool = False, confirm_response: str = ""
    +) -> str:
    +    """Saves the running configuration."""
    +
    +    self.enable()
    +    if confirm:
    +        output = self._send_command_timing_str(command_string=cmd)
    +        if confirm_response:
    +            output += self._send_command_timing_str(confirm_response)
    +        else:
    +            # Send enter by default
    +            output += self._send_command_timing_str(self.RETURN)
    +    else:
    +        # Some devices are slow so match on trailing-prompt if you can
    +        output = self._send_command_str(command_string=cmd)
    +    return output
    +
    +
    +
    +def session_preparation(self) ‑> None +
    +
    +

    Prepare the session after the connection has been established.

    +
    + +Expand source code + +
    def session_preparation(self) -> None:
    +    """Prepare the session after the connection has been established."""
    +    self._test_channel_read(pattern=r"[>#]")
    +    self.set_base_prompt()
    +    self.disable_paging()
    +    # Clear the read buffer
    +    self.clear_buffer()
    +
    +
    +
    +

    Inherited members

    + +
    +
    +class AudiocodeBase66 +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class AudiocodeBase66(AudiocodeBase):
    +    """Audiocode this applies to 6.6 Audiocode Firmware versions."""
    +
    +    def disable_paging(
    +        self,
    +        command: str = "",
    +        delay_factor: Optional[float] = 0.5,
    +        cmd_verify: bool = True,
    +        pattern: Optional[str] = None,
    +    ) -> str:
    +
    +        if command:
    +            return super().disable_paging(
    +                command=command,
    +                delay_factor=delay_factor,
    +                cmd_verify=cmd_verify,
    +                pattern=pattern,
    +            )
    +        else:
    +            command_list: List[str] = [
    +                "cli-terminal",
    +                "set window-height 0",
    +            ]
    +
    +            self.enable()
    +            assert isinstance(delay_factor, float)
    +            delay_factor = self.select_delay_factor(delay_factor)
    +            time.sleep(delay_factor * 0.1)
    +            self.clear_buffer()
    +            return self.send_config_set(
    +                config_commands=command_list,
    +                config_mode_command="config system",
    +            )
    +
    +    def _enable_paging(
    +        self,
    +        delay_factor: Optional[float] = 0.5,
    +    ) -> str:
    +
    +        command_list: List[str] = [
    +            "cli-terminal",
    +            "set window-height 100",
    +        ]
    +        self.enable()
    +        assert isinstance(delay_factor, float)
    +        delay_factor = self.select_delay_factor(delay_factor)
    +        time.sleep(delay_factor * 0.1)
    +        self.clear_buffer()
    +
    +        return self.send_config_set(
    +            config_commands=command_list,
    +            config_mode_command="config system",
    +        )
    +
    +

    Ancestors

    + +

    Subclasses

    + +

    Inherited members

    + +
    +
    +class AudiocodeShellBase +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions that only use the Shell.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class AudiocodeShellBase(NoEnable, AudiocodeBase):
    +    """Audiocode this applies to 6.6 Audiocode Firmware versions that only use the Shell."""
    +
    +    def session_preparation(self) -> None:
    +        """Prepare the session after the connection has been established."""
    +        self.write_channel(self.RETURN)
    +        self.write_channel(self.RETURN)
    +        self._test_channel_read(pattern=r"/>")
    +        self.set_base_prompt()
    +        # Clear the read buffer
    +        time.sleep(0.3 * self.global_delay_factor)
    +        self.clear_buffer()
    +
    +    def set_base_prompt(
    +        self,
    +        pri_prompt_terminator: str = r"/>",
    +        alt_prompt_terminator: str = "",
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"/>",
    +    ) -> str:
    +        prompt = self.find_prompt(delay_factor=delay_factor, pattern=pattern)
    +        pattern = pri_prompt_terminator
    +        if not re.search(pattern, prompt):
    +            raise ValueError(f"Router prompt not found: {repr(prompt)}")
    +        else:
    +            # Strip off trailing terminator
    +            self.base_prompt = prompt
    +            return self.base_prompt
    +
    +    def find_prompt(
    +        self,
    +        delay_factor: float = 1.0,
    +        pattern: Optional[str] = r"/>",
    +    ) -> str:
    +        return super().find_prompt(
    +            delay_factor=delay_factor,
    +            pattern=pattern,
    +        )
    +
    +    def send_config_set(
    +        self,
    +        config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
    +        *,
    +        exit_config_mode: bool = True,
    +        read_timeout: Optional[float] = None,
    +        delay_factor: Optional[float] = 1.0,
    +        max_loops: Optional[int] = 150,
    +        strip_prompt: bool = False,
    +        strip_command: bool = False,
    +        config_mode_command: Optional[str] = None,
    +        cmd_verify: bool = True,
    +        enter_config_mode: bool = True,
    +        error_pattern: str = "",
    +        terminator: str = r"/.*>",
    +        bypass_commands: str = None,
    +    ) -> str:
    +
    +        return super().send_config_set(
    +            config_commands=config_commands,
    +            exit_config_mode=exit_config_mode,
    +            read_timeout=read_timeout,
    +            delay_factor=delay_factor,
    +            max_loops=max_loops,
    +            strip_prompt=strip_prompt,
    +            strip_command=strip_command,
    +            config_mode_command=config_mode_command,
    +            cmd_verify=cmd_verify,
    +            enter_config_mode=enter_config_mode,
    +            error_pattern=error_pattern,
    +            terminator=terminator,
    +            bypass_commands=bypass_commands,
    +        )
    +
    +    def config_mode(
    +        self, config_command: str = "", pattern: str = r"/.*>", re_flags: int = 0
    +    ) -> str:
    +        return super().config_mode(
    +            config_command=config_command, pattern=pattern, re_flags=re_flags
    +        )
    +
    +    def check_config_mode(
    +        self,
    +        check_string: str = r"/CONFiguration>",
    +        pattern: str = r"/.*>",
    +        force_regex: bool = True,
    +    ) -> bool:
    +        return super().check_config_mode(
    +            check_string=check_string, pattern=pattern, force_regex=force_regex
    +        )
    +
    +    def exit_config_mode(self, exit_config: str = "..", pattern: str = r"/>") -> str:
    +        return super().exit_config_mode(exit_config=exit_config, pattern=pattern)
    +
    +    def disable_paging(
    +        self,
    +        command: str = "",
    +        delay_factor: Optional[float] = 0.5,
    +        cmd_verify: bool = True,
    +        pattern: Optional[str] = None,
    +    ) -> str:
    +        """Not supported"""
    +        return ""
    +
    +    def save_config(
    +        self,
    +        cmd: str = "SaveConfiguration",
    +        confirm: bool = False,
    +        confirm_response: str = "",
    +    ) -> str:
    +        return super().save_config(
    +            cmd=cmd, confirm=confirm, confirm_response=confirm_response
    +        )
    +
    +    def _reload_device(
    +        self,
    +        cmd_save: str = "SaveAndReset",
    +        cmd_no_save: str = "ReSetDevice",
    +        reload_save: bool = True,
    +    ) -> str:
    +        """Reloads the device."""
    +        return super()._reload_device(
    +            cmd_save=cmd_save, cmd_no_save=cmd_no_save, reload_save=reload_save
    +        )
    +
    +    def _enable_paging(
    +        self,
    +        delay_factor: Optional[float] = 0.5,
    +    ) -> str:
    +        """Not supported"""
    +        pass
    +
    +    def strip_command(self, command_string: str, output: str) -> str:
    +        # Support for Audiocode_Shell.
    +        pattern = r"^SIP.*[\s\S]?PING.*>?.*[\s\S]?.*>?$"
    +        output = re.sub(pattern, "", output, flags=re.M)
    +
    +        cmd = command_string.strip()
    +        pattern = re.escape(cmd)
    +        output = re.sub(pattern, "", output, flags=re.M)
    +        return super().strip_command(command_string=command_string, output=output)
    +
    +    def strip_prompt(self, a_string: str) -> str:
    +        pattern = r"^/>?"
    +        a_string = re.sub(pattern, "", a_string, flags=re.M)
    +        return super().strip_prompt(
    +            a_string=a_string,
    +        )
    +
    +

    Ancestors

    + +

    Subclasses

    + +

    Methods

    +
    +
    +def disable_paging(self, command: str = '', delay_factor: Optional[float] = 0.5, cmd_verify: bool = True, pattern: Optional[str] = None) ‑> str +
    +
    +

    Not supported

    +
    + +Expand source code + +
    def disable_paging(
    +    self,
    +    command: str = "",
    +    delay_factor: Optional[float] = 0.5,
    +    cmd_verify: bool = True,
    +    pattern: Optional[str] = None,
    +) -> str:
    +    """Not supported"""
    +    return ""
    +
    +
    +
    +

    Inherited members

    + +
    +
    +class AudiocodeShellSSH +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions that only use the Shell.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class AudiocodeShellSSH(AudiocodeShellBase):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class AudiocodeShellTelnet +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions that only use the Shell.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class AudiocodeShellTelnet(AudiocodeShellBase):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/docs/netmiko/audiocode/index.html b/docs/netmiko/audiocode/index.html new file mode 100644 index 000000000..b3d07d7df --- /dev/null +++ b/docs/netmiko/audiocode/index.html @@ -0,0 +1,1140 @@ + + + + + + +netmiko.audiocode API documentation + + + + + + + + + + + +
    +
    +
    +

    Module netmiko.audiocode

    +
    +
    +
    + +Expand source code + +
    from netmiko.audiocode.audiocode_ssh import (
    +    Audiocode72SSH,
    +    Audiocode66SSH,
    +    AudiocodeShellSSH,
    +    Audiocode72Telnet,
    +    Audiocode66Telnet,
    +    AudiocodeShellTelnet,
    +)
    +
    +__all__ = [
    +    "Audiocode72SSH",
    +    "Audiocode66SSH",
    +    "AudiocodeShellSSH",
    +    "Audiocode72Telnet",
    +    "Audiocode66Telnet",
    +    "AudiocodeShellTelnet",
    +]
    +
    +
    +
    +

    Sub-modules

    +
    +
    netmiko.audiocode.audiocode_ssh
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    Classes

    +
    +
    +class Audiocode66SSH +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode66SSH(AudiocodeBase66):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class Audiocode66Telnet +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode66Telnet(AudiocodeBase66):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class Audiocode72SSH +(*args: Any, **kwargs: Any) +
    +
    +

    Common Methods for AudioCodes running 7.2 CLI.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode72SSH(Audiocode72Base):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class Audiocode72Telnet +(*args: Any, **kwargs: Any) +
    +
    +

    Common Methods for AudioCodes running 7.2 CLI.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class Audiocode72Telnet(Audiocode72Base):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class AudiocodeShellSSH +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions that only use the Shell.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class AudiocodeShellSSH(AudiocodeShellBase):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +class AudiocodeShellTelnet +(*args: Any, **kwargs: Any) +
    +
    +

    Audiocode this applies to 6.6 Audiocode Firmware versions that only use the Shell.

    +
        Initialize attributes for establishing connection to target device.
    +
    +    :param ip: IP address of target device. Not required if <code>host</code> is
    +        provided.
    +
    +    :param host: Hostname of target device. Not required if <code>ip</code> is
    +            provided.
    +
    +    :param username: Username to authenticate against target device if
    +            required.
    +
    +    :param password: Password to authenticate against target device if
    +            required.
    +
    +    :param secret: The enable password if target device requires one.
    +
    +    :param port: The destination port used to connect to the target
    +            device.
    +
    +    :param device_type: Class selection based on device type.
    +
    +    :param verbose: Enable additional messages to standard output.
    +
    +    :param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
    +
    +    :param use_keys: Connect to target device using SSH keys.
    +
    +    :param key_file: Filename path of the SSH key file to use.
    +
    +    :param pkey: SSH key object to use.
    +
    +    :param passphrase: Passphrase to use for encrypted key; password will be used for key
    +            decryption if not specified.
    +
    +    :param disabled_algorithms: Dictionary of SSH algorithms to disable. Refer to the Paramiko
    +            documentation for a description of the expected format.
    +
    +    :param allow_agent: Enable use of SSH key-agent.
    +
    +    :param ssh_strict: Automatically reject unknown SSH host keys (default: False, which
    +            means unknown SSH host keys will be accepted).
    +
    +    :param system_host_keys: Load host keys from the users known_hosts file.
    +
    +    :param alt_host_keys: If <code>True</code> host keys will be loaded from the file specified in
    +            alt_key_file.
    +
    +    :param alt_key_file: SSH host key file to use (if alt_host_keys=True).
    +
    +    :param ssh_config_file: File name of OpenSSH configuration file.
    +
    +    :param timeout: Connection timeout.
    +
    +    :param session_timeout: Set a timeout for parallel requests.
    +
    +    :param auth_timeout: Set a timeout (in seconds) to wait for an authentication response.
    +
    +    :param banner_timeout: Set a timeout to wait for the SSH banner (pass to Paramiko).
    +
    +    :param keepalive: Send SSH keepalive packets at a specific interval, in seconds.
    +            Currently defaults to 0, for backwards compatibility (it will not attempt
    +            to keep the connection alive).
    +
    +    :param default_enter: Character(s) to send to correspond to enter key (default:
    +
    +

    ).

    +
        :param response_return: Character(s) to use in normalized return data to represent
    +            enter key (default:
    +
    +

    )

    +
        :param fast_cli: Provide a way to optimize for performance. Converts select_delay_factor
    +            to select smallest of global and specific. Sets default global_delay_factor to .1
    +            (default: True)
    +
    +    :param session_log: File path or BufferedIOBase subclass object to write the session log to.
    +
    +    :param session_log_record_writes: The session log generally only records channel reads due
    +            to eliminate command duplication due to command echo. You can enable this if you
    +            want to record both channel reads and channel writes in the log (default: False).
    +
    +    :param session_log_file_mode: "write" or "append" for session_log file mode
    +            (default: "write")
    +
    +    :param allow_auto_change: Allow automatic configuration changes for terminal settings.
    +            (default: False)
    +
    +    :param encoding: Encoding to be used when writing bytes to the output channel.
    +            (default: ascii)
    +
    +    :param sock: An open socket or socket-like object (such as a <code>.Channel</code>) to use for
    +            communication to the target host (default: None).
    +
    +    :param global_cmd_verify: Control whether command echo verification is enabled or disabled
    +            (default: None). Global attribute takes precedence over function <code>cmd\_verify</code>
    +            argument. Value of <code>None</code> indicates to use function <code>cmd\_verify</code> argument.
    +
    +    :param auto_connect: Control whether Netmiko automatically establishes the connection as
    +            part of the object creation (default: True).
    +
    +    :param delay_factor_compat: Set send_command and send_command_timing back to using Netmiko
    +            3.x behavior for delay_factor/global_delay_factor/max_loops. This argument will be
    +            eliminated in Netmiko 5.x (default: False).
    +
    +
    + +Expand source code + +
    class AudiocodeShellTelnet(AudiocodeShellBase):
    +    pass
    +
    +

    Ancestors

    + +

    Inherited members

    + +
    +
    +
    +
    + +
    + + + \ No newline at end of file diff --git a/docs/netmiko/base_connection.html b/docs/netmiko/base_connection.html index 1a2544a1f..e96e8b775 100644 --- a/docs/netmiko/base_connection.html +++ b/docs/netmiko/base_connection.html @@ -48,6 +48,7 @@

    Module netmiko.base_connection

    cast, Type, Sequence, + Iterator, TextIO, Union, Tuple, @@ -62,9 +63,11 @@

    Module netmiko.base_connection

    import time from collections import deque from os import path +from pathlib import Path from threading import Lock import functools import logging +import itertools import paramiko import serial @@ -208,7 +211,7 @@

    Module netmiko.base_connection

    session_log_record_writes: bool = False, session_log_file_mode: str = "write", allow_auto_change: bool = False, - encoding: str = "ascii", + encoding: str = "utf-8", sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False, @@ -450,6 +453,8 @@

    Module netmiko.base_connection

    self.key_file = ( path.abspath(path.expanduser(key_file)) if key_file else None ) + if self.use_keys is True: + self._key_check() self.pkey = pkey self.passphrase = passphrase self.allow_agent = allow_agent @@ -537,6 +542,22 @@

    Module netmiko.base_connection

    def _return_cli(self) -> str: raise NotImplementedError + def _key_check(self) -> bool: + """Verify key_file exists.""" + msg = f""" +use_keys has been set to True, but specified key_file does not exist: + +use_keys: {self.use_keys} +key_file: {self.key_file} +""" + if self.key_file is None: + raise ValueError(msg) + + my_key_file = Path(self.key_file) + if not my_key_file.is_file(): + raise ValueError(msg) + return True + @lock_channel @log_writes def write_channel(self, out_data: str) -> None: @@ -900,7 +921,7 @@

    Module netmiko.base_connection

    self.remote_conn.close() raise NetmikoAuthenticationException(msg) - def _try_session_preparation(self) -> None: + def _try_session_preparation(self, force_data: bool = True) -> None: """ In case of an exception happening during `session_preparation()` Netmiko should gracefully clean-up after itself. This might be challenging for library users @@ -908,6 +929,10 @@

    Module netmiko.base_connection

    to threads used in Paramiko. """ try: + # Netmiko needs there to be data for session_preparation to work. + if force_data: + self.write_channel(self.RETURN) + time.sleep(0.1) self.session_preparation() except Exception: self.disconnect() @@ -1317,8 +1342,13 @@

    Module netmiko.base_connection

    if not prompt[-1] in (pri_prompt_terminator, alt_prompt_terminator): raise ValueError(f"Router prompt not found: {repr(prompt)}") - # Strip off trailing terminator - self.base_prompt = prompt[:-1] + + # If all we have is the 'terminator' just use that :-( + if len(prompt) == 1: + self.base_prompt = prompt + else: + # Strip off trailing terminator + self.base_prompt = prompt[:-1] return self.base_prompt def find_prompt( @@ -2060,7 +2090,7 @@

    Module netmiko.base_connection

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, @@ -2157,8 +2187,10 @@

    Module netmiko.base_connection

    # Set bypass_commands="" to force no-bypass (usually for testing) bypass_detected = False if bypass_commands: + # Make a copy of the iterator + config_commands, config_commands_tmp = itertools.tee(config_commands, 2) bypass_detected = any( - [True for cmd in config_commands if re.search(bypass_commands, cmd)] + [True for cmd in config_commands_tmp if re.search(bypass_commands, cmd)] ) if bypass_detected: cmd_verify = False @@ -2340,6 +2372,11 @@

    Module netmiko.base_connection

    """Try to gracefully close the session.""" try: self.cleanup() + except Exception: + # Keep going on cleanup process even if exceptions + pass + + try: if self.protocol == "ssh": self.paramiko_cleanup() elif self.protocol == "telnet": @@ -2477,7 +2514,7 @@

    Classes

    class BaseConnection -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Defines vendor independent methods.

    @@ -2642,7 +2679,7 @@

    Classes

    session_log_record_writes: bool = False, session_log_file_mode: str = "write", allow_auto_change: bool = False, - encoding: str = "ascii", + encoding: str = "utf-8", sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False, @@ -2884,6 +2921,8 @@

    Classes

    self.key_file = ( path.abspath(path.expanduser(key_file)) if key_file else None ) + if self.use_keys is True: + self._key_check() self.pkey = pkey self.passphrase = passphrase self.allow_agent = allow_agent @@ -2971,6 +3010,22 @@

    Classes

    def _return_cli(self) -> str: raise NotImplementedError + def _key_check(self) -> bool: + """Verify key_file exists.""" + msg = f""" +use_keys has been set to True, but specified key_file does not exist: + +use_keys: {self.use_keys} +key_file: {self.key_file} +""" + if self.key_file is None: + raise ValueError(msg) + + my_key_file = Path(self.key_file) + if not my_key_file.is_file(): + raise ValueError(msg) + return True + @lock_channel @log_writes def write_channel(self, out_data: str) -> None: @@ -3334,7 +3389,7 @@

    Classes

    self.remote_conn.close() raise NetmikoAuthenticationException(msg) - def _try_session_preparation(self) -> None: + def _try_session_preparation(self, force_data: bool = True) -> None: """ In case of an exception happening during `session_preparation()` Netmiko should gracefully clean-up after itself. This might be challenging for library users @@ -3342,6 +3397,10 @@

    Classes

    to threads used in Paramiko. """ try: + # Netmiko needs there to be data for session_preparation to work. + if force_data: + self.write_channel(self.RETURN) + time.sleep(0.1) self.session_preparation() except Exception: self.disconnect() @@ -3751,8 +3810,13 @@

    Classes

    if not prompt[-1] in (pri_prompt_terminator, alt_prompt_terminator): raise ValueError(f"Router prompt not found: {repr(prompt)}") - # Strip off trailing terminator - self.base_prompt = prompt[:-1] + + # If all we have is the 'terminator' just use that :-( + if len(prompt) == 1: + self.base_prompt = prompt + else: + # Strip off trailing terminator + self.base_prompt = prompt[:-1] return self.base_prompt def find_prompt( @@ -4494,7 +4558,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, @@ -4591,8 +4655,10 @@

    Classes

    # Set bypass_commands="" to force no-bypass (usually for testing) bypass_detected = False if bypass_commands: + # Make a copy of the iterator + config_commands, config_commands_tmp = itertools.tee(config_commands, 2) bypass_detected = any( - [True for cmd in config_commands if re.search(bypass_commands, cmd)] + [True for cmd in config_commands_tmp if re.search(bypass_commands, cmd)] ) if bypass_detected: cmd_verify = False @@ -4774,6 +4840,11 @@

    Classes

    """Try to gracefully close the session.""" try: self.cleanup() + except Exception: + # Keep going on cleanup process even if exceptions + pass + + try: if self.protocol == "ssh": self.paramiko_cleanup() elif self.protocol == "telnet": @@ -4839,6 +4910,7 @@

    Classes

    Subclasses

      +
    • AudiocodeBase
    • TelnetConnection
    • CheckPointGaiaSSH
    • CienaSaosBase
    • @@ -5144,6 +5216,11 @@

      Methods

      """Try to gracefully close the session.""" try: self.cleanup() + except Exception: + # Keep going on cleanup process even if exceptions + pass + + try: if self.protocol == "ssh": self.paramiko_cleanup() elif self.protocol == "telnet": @@ -6356,7 +6433,7 @@

      Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = False, strip_command: bool = False, config_mode_command: Optional[str] = None, cmd_verify: bool = True, enter_config_mode: bool = True, error_pattern: str = '', terminator: str = '#', bypass_commands: Optional[str] = None) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = False, strip_command: bool = False, config_mode_command: Optional[str] = None, cmd_verify: bool = True, enter_config_mode: bool = True, error_pattern: str = '', terminator: str = '#', bypass_commands: Optional[str] = None) ‑> str

    Send configuration commands down the SSH channel.

    @@ -6385,7 +6462,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         *,
         exit_config_mode: bool = True,
         read_timeout: Optional[float] = None,
    @@ -6482,8 +6559,10 @@ 

    Methods

    # Set bypass_commands="" to force no-bypass (usually for testing) bypass_detected = False if bypass_commands: + # Make a copy of the iterator + config_commands, config_commands_tmp = itertools.tee(config_commands, 2) bypass_detected = any( - [True for cmd in config_commands if re.search(bypass_commands, cmd)] + [True for cmd in config_commands_tmp if re.search(bypass_commands, cmd)] ) if bypass_detected: cmd_verify = False @@ -6755,8 +6834,13 @@

    Methods

    if not prompt[-1] in (pri_prompt_terminator, alt_prompt_terminator): raise ValueError(f"Router prompt not found: {repr(prompt)}") - # Strip off trailing terminator - self.base_prompt = prompt[:-1] + + # If all we have is the 'terminator' just use that :-( + if len(prompt) == 1: + self.base_prompt = prompt + else: + # Strip off trailing terminator + self.base_prompt = prompt[:-1] return self.base_prompt
    @@ -7233,7 +7317,7 @@

    Methods

    class TelnetConnection -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Defines vendor independent methods.

    diff --git a/docs/netmiko/broadcom/broadcom_icos_ssh.html b/docs/netmiko/broadcom/broadcom_icos_ssh.html index 049871dcb..5bef3d957 100644 --- a/docs/netmiko/broadcom/broadcom_icos_ssh.html +++ b/docs/netmiko/broadcom/broadcom_icos_ssh.html @@ -88,7 +88,7 @@

    Classes

    class BroadcomIcosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implements support for Broadcom Icos devices. diff --git a/docs/netmiko/broadcom/index.html b/docs/netmiko/broadcom/index.html index 9678f9f85..8310a446a 100644 --- a/docs/netmiko/broadcom/index.html +++ b/docs/netmiko/broadcom/index.html @@ -50,7 +50,7 @@

    Classes

    class BroadcomIcosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implements support for Broadcom Icos devices. diff --git a/docs/netmiko/cdot/cdot_cros_ssh.html b/docs/netmiko/cdot/cdot_cros_ssh.html index 2a7a0f147..921a2289f 100644 --- a/docs/netmiko/cdot/cdot_cros_ssh.html +++ b/docs/netmiko/cdot/cdot_cros_ssh.html @@ -35,7 +35,7 @@

    Module netmiko.cdot.cdot_cros_ssh

    # # Purpose: Provide basic SSH connection to CROS based router products -from typing import Optional, Union, Sequence, TextIO, Any +from typing import Optional, Union, Sequence, Iterator, TextIO, Any import time import warnings from netmiko.no_enable import NoEnable @@ -57,7 +57,7 @@

    Module netmiko.cdot.cdot_cros_ssh

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -157,7 +157,7 @@

    Classes

    class CdotCrosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with CROS network devices.

    @@ -282,7 +282,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -480,7 +480,7 @@

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

    CROS requires you not exit from configuration mode.

    @@ -490,7 +490,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = False,
         **kwargs: Any,
     ) -> str:
    diff --git a/docs/netmiko/cdot/index.html b/docs/netmiko/cdot/index.html
    index 90985abf4..48675d206 100644
    --- a/docs/netmiko/cdot/index.html
    +++ b/docs/netmiko/cdot/index.html
    @@ -49,7 +49,7 @@ 

    Classes

    class CdotCrosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with CROS network devices.

    @@ -174,7 +174,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -372,7 +372,7 @@

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

    CROS requires you not exit from configuration mode.

    @@ -382,7 +382,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = False,
         **kwargs: Any,
     ) -> str:
    diff --git a/docs/netmiko/centec/centec_os.html b/docs/netmiko/centec/centec_os.html
    index 1caeec650..39762410d 100644
    --- a/docs/netmiko/centec/centec_os.html
    +++ b/docs/netmiko/centec/centec_os.html
    @@ -68,7 +68,7 @@ 

    Classes

    class CentecOSBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -290,7 +290,7 @@

    Inherited members

    class CentecOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -462,7 +462,7 @@

    Inherited members

    class CentecOSTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/centec/index.html b/docs/netmiko/centec/index.html index d0e2ef76a..56fedca45 100644 --- a/docs/netmiko/centec/index.html +++ b/docs/netmiko/centec/index.html @@ -49,7 +49,7 @@

    Classes

    class CentecOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -221,7 +221,7 @@

    Inherited members

    class CentecOSTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/channel.html b/docs/netmiko/channel.html index f5e635a2d..2bbe38fbd 100644 --- a/docs/netmiko/channel.html +++ b/docs/netmiko/channel.html @@ -110,7 +110,7 @@

    Module netmiko.channel

    outbuf = self.remote_conn.recv(MAX_BUFFER) if len(outbuf) == 0: raise ReadException("Channel stream closed by remote device.") - output += outbuf.decode("utf-8", "ignore") + output += outbuf.decode(self.encoding, "ignore") return output def read_channel(self) -> str: @@ -151,7 +151,7 @@

    Module netmiko.channel

    """Read all of the available data from the channel.""" if self.remote_conn is None: raise ReadException("Attempt to read, but there is no active channel.") - return self.remote_conn.read_very_eager().decode("utf-8", "ignore") + return self.remote_conn.read_very_eager().decode(self.encoding, "ignore") class SerialChannel(Channel): @@ -178,7 +178,7 @@

    Module netmiko.channel

    raise ReadException("Attempt to read, but there is no active channel.") if self.remote_conn.in_waiting > 0: output = self.remote_conn.read(self.remote_conn.in_waiting).decode( - "utf-8", "ignore" + self.encoding, "ignore" ) assert isinstance(output, str) return output @@ -360,7 +360,7 @@

    Methods

    outbuf = self.remote_conn.recv(MAX_BUFFER) if len(outbuf) == 0: raise ReadException("Channel stream closed by remote device.") - output += outbuf.decode("utf-8", "ignore") + output += outbuf.decode(self.encoding, "ignore") return output def read_channel(self) -> str: @@ -428,7 +428,7 @@

    Inherited members

    raise ReadException("Attempt to read, but there is no active channel.") if self.remote_conn.in_waiting > 0: output = self.remote_conn.read(self.remote_conn.in_waiting).decode( - "utf-8", "ignore" + self.encoding, "ignore" ) assert isinstance(output, str) return output @@ -498,7 +498,7 @@

    Inherited members

    """Read all of the available data from the channel.""" if self.remote_conn is None: raise ReadException("Attempt to read, but there is no active channel.") - return self.remote_conn.read_very_eager().decode("utf-8", "ignore")
    + return self.remote_conn.read_very_eager().decode(self.encoding, "ignore")

    Ancestors

      diff --git a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html index 42c87c360..0da1ec18d 100644 --- a/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html +++ b/docs/netmiko/checkpoint/checkpoint_gaia_ssh.html @@ -63,7 +63,7 @@

      Classes

      class CheckPointGaiaSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implements methods for communicating with Check Point Gaia diff --git a/docs/netmiko/checkpoint/index.html b/docs/netmiko/checkpoint/index.html index e1db4bb61..b359b3eee 100644 --- a/docs/netmiko/checkpoint/index.html +++ b/docs/netmiko/checkpoint/index.html @@ -49,7 +49,7 @@

      Classes

      class CheckPointGaiaSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implements methods for communicating with Check Point Gaia diff --git a/docs/netmiko/ciena/ciena_saos.html b/docs/netmiko/ciena/ciena_saos.html index d28416295..8247a5a87 100644 --- a/docs/netmiko/ciena/ciena_saos.html +++ b/docs/netmiko/ciena/ciena_saos.html @@ -239,7 +239,7 @@

      Classes

      class CienaSaosBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Ciena SAOS support.

      @@ -714,7 +714,7 @@

      Inherited members

      class CienaSaosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Ciena SAOS support.

      diff --git a/docs/netmiko/ciena/index.html b/docs/netmiko/ciena/index.html index 14911476e..d941cd790 100644 --- a/docs/netmiko/ciena/index.html +++ b/docs/netmiko/ciena/index.html @@ -296,7 +296,7 @@

      Inherited members

      class CienaSaosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Ciena SAOS support.

      diff --git a/docs/netmiko/cisco/cisco_ftd_ssh.html b/docs/netmiko/cisco/cisco_ftd_ssh.html index 64344b92f..f6c712b76 100644 --- a/docs/netmiko/cisco/cisco_ftd_ssh.html +++ b/docs/netmiko/cisco/cisco_ftd_ssh.html @@ -64,7 +64,7 @@

      Classes

      class CiscoFtdSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Subclass specific to Cisco FTD.

      diff --git a/docs/netmiko/cisco/cisco_ios.html b/docs/netmiko/cisco/cisco_ios.html index 6ed5d40ba..1e07fb403 100644 --- a/docs/netmiko/cisco/cisco_ios.html +++ b/docs/netmiko/cisco/cisco_ios.html @@ -330,7 +330,7 @@

      Classes

      class CiscoIosBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Common Methods for IOS (both SSH and telnet).

      @@ -673,7 +673,7 @@

      Inherited members

      class CiscoIosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Cisco IOS SSH driver.

      @@ -846,7 +846,7 @@

      Inherited members

      class CiscoIosSerial -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Cisco IOS Serial driver.

      @@ -1019,7 +1019,7 @@

      Inherited members

      class CiscoIosTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Cisco IOS Telnet driver.

      diff --git a/docs/netmiko/cisco/cisco_nxos_ssh.html b/docs/netmiko/cisco/cisco_nxos_ssh.html index 4c5042c9c..7e012bef5 100644 --- a/docs/netmiko/cisco/cisco_nxos_ssh.html +++ b/docs/netmiko/cisco/cisco_nxos_ssh.html @@ -387,7 +387,7 @@

      Inherited members

      class CiscoNxosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/cisco/cisco_s300.html b/docs/netmiko/cisco/cisco_s300.html index bfea0c194..f310ddd5e 100644 --- a/docs/netmiko/cisco/cisco_s300.html +++ b/docs/netmiko/cisco/cisco_s300.html @@ -82,7 +82,7 @@

      Classes

      class CiscoS300Base -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Support for Cisco SG300 series of devices.

      @@ -306,7 +306,7 @@

      Inherited members

      class CiscoS300SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Support for Cisco SG300 series of devices.

      @@ -481,7 +481,7 @@

      Inherited members

      class CiscoS300Telnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Support for Cisco SG300 series of devices, with telnet. diff --git a/docs/netmiko/cisco/cisco_viptela.html b/docs/netmiko/cisco/cisco_viptela.html index 19ee321b9..a74f26f17 100644 --- a/docs/netmiko/cisco/cisco_viptela.html +++ b/docs/netmiko/cisco/cisco_viptela.html @@ -28,7 +28,7 @@

      Module netmiko.cisco.cisco_viptela

      Expand source code
      """Subclass specific to Cisco Viptela."""
      -from typing import Union, Sequence, TextIO, Any
      +from typing import Union, Sequence, Iterator, TextIO, Any
       import re
       
       from netmiko.cisco_base_connection import CiscoSSHConnection
      @@ -67,7 +67,7 @@ 

      Module netmiko.cisco.cisco_viptela

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -122,7 +122,7 @@

      Classes

      class CiscoViptelaSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Subclass specific to Cisco Viptela.

      @@ -266,7 +266,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: diff --git a/docs/netmiko/cisco/cisco_wlc_ssh.html b/docs/netmiko/cisco/cisco_wlc_ssh.html index 9095c3788..1a5f91750 100644 --- a/docs/netmiko/cisco/cisco_wlc_ssh.html +++ b/docs/netmiko/cisco/cisco_wlc_ssh.html @@ -28,7 +28,7 @@

      Module netmiko.cisco.cisco_wlc_ssh

      Expand source code
      """Netmiko Cisco WLC support."""
      -from typing import Any, Union, Sequence, TextIO
      +from typing import Any, Union, Sequence, Iterator, TextIO
       import time
       import re
       import socket
      @@ -40,11 +40,7 @@ 

      Module netmiko.cisco.cisco_wlc_ssh

      class CiscoWlcSSH(BaseConnection): """Netmiko Cisco WLC support.""" - def __init__(self, *args: Any, **kwargs: Any) -> None: - # WLC/AireOS has an issue where you can get "No Existing Session" with - # the default conn_timeout (so increase conn_timeout to 10-seconds). - kwargs.setdefault("conn_timeout", 10) - return super().__init__(*args, **kwargs) + prompt_pattern = r"(?m:[>#]\s*$)" # force re.Multiline def special_login_handler(self, delay_factor: float = 1.0) -> None: """WLC presents with the following on login (in certain OS versions) @@ -57,25 +53,51 @@

      Module netmiko.cisco.cisco_wlc_ssh

      Password:**** """ - delay_factor = self.select_delay_factor(delay_factor) - i = 0 - time.sleep(delay_factor * 0.5) output = "" - while i <= 12: - output = self.read_channel() - if output: - if "login as" in output or "User:" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "Password" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(delay_factor * 1) + uname = "User:" + login = "login as" + password = "ssword" + pattern = rf"(?:{uname}|{login}|{password}|{self.prompt_pattern})" + + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if uname in new_data or login in new_data: + assert isinstance(self.username, str) + self.write_channel(self.username + self.RETURN) + elif password in new_data: + assert isinstance(self.password, str) + self.write_channel(self.password + self.RETURN) else: - # no output read, sleep and go for one more round of read channel - time.sleep(delay_factor * 1.5) - i += 1 + msg = f""" +Failed to login to Cisco WLC Device. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) + + def session_preparation(self) -> None: + """ + Prepare the session after the connection has been established + + Cisco WLC uses "config paging disable" to disable paging + """ + + # _test_channel_read() will happen in the special_login_handler() + try: + self.set_base_prompt() + except ValueError: + msg = f"Authentication failed: {self.host}" + raise NetmikoAuthenticationException(msg) + + self.disable_paging(command="config paging disable") def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str: """ @@ -174,22 +196,6 @@

      Module netmiko.cisco.cisco_wlc_ssh

      output = self.strip_prompt(output) return output - def session_preparation(self) -> None: - """ - Prepare the session after the connection has been established - - Cisco WLC uses "config paging disable" to disable paging - """ - self._test_channel_read(pattern=r"[>#]") - - try: - self.set_base_prompt() - except ValueError: - msg = f"Authentication failed: {self.host}" - raise NetmikoAuthenticationException(msg) - - self.disable_paging(command="config paging disable") - def cleanup(self, command: str = "logout") -> None: """Reset WLC back to normal paging and gracefully close session.""" self.send_command_timing("config paging enable") @@ -248,7 +254,7 @@

      Module netmiko.cisco.cisco_wlc_ssh

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any, @@ -292,7 +298,7 @@

      Classes

      class CiscoWlcSSH -(*args: Any, **kwargs: Any) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Netmiko Cisco WLC support.

      @@ -406,11 +412,7 @@

      Classes

      class CiscoWlcSSH(BaseConnection):
           """Netmiko Cisco WLC support."""
       
      -    def __init__(self, *args: Any, **kwargs: Any) -> None:
      -        # WLC/AireOS has an issue where you can get "No Existing Session" with
      -        # the default conn_timeout (so increase conn_timeout to 10-seconds).
      -        kwargs.setdefault("conn_timeout", 10)
      -        return super().__init__(*args, **kwargs)
      +    prompt_pattern = r"(?m:[>#]\s*$)"  # force re.Multiline
       
           def special_login_handler(self, delay_factor: float = 1.0) -> None:
               """WLC presents with the following on login (in certain OS versions)
      @@ -423,25 +425,51 @@ 

      Classes

      Password:**** """ - delay_factor = self.select_delay_factor(delay_factor) - i = 0 - time.sleep(delay_factor * 0.5) output = "" - while i <= 12: - output = self.read_channel() - if output: - if "login as" in output or "User:" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "Password" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(delay_factor * 1) + uname = "User:" + login = "login as" + password = "ssword" + pattern = rf"(?:{uname}|{login}|{password}|{self.prompt_pattern})" + + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if uname in new_data or login in new_data: + assert isinstance(self.username, str) + self.write_channel(self.username + self.RETURN) + elif password in new_data: + assert isinstance(self.password, str) + self.write_channel(self.password + self.RETURN) else: - # no output read, sleep and go for one more round of read channel - time.sleep(delay_factor * 1.5) - i += 1 + msg = f""" +Failed to login to Cisco WLC Device. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) + + def session_preparation(self) -> None: + """ + Prepare the session after the connection has been established + + Cisco WLC uses "config paging disable" to disable paging + """ + + # _test_channel_read() will happen in the special_login_handler() + try: + self.set_base_prompt() + except ValueError: + msg = f"Authentication failed: {self.host}" + raise NetmikoAuthenticationException(msg) + + self.disable_paging(command="config paging disable") def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str: """ @@ -540,22 +568,6 @@

      Classes

      output = self.strip_prompt(output) return output - def session_preparation(self) -> None: - """ - Prepare the session after the connection has been established - - Cisco WLC uses "config paging disable" to disable paging - """ - self._test_channel_read(pattern=r"[>#]") - - try: - self.set_base_prompt() - except ValueError: - msg = f"Authentication failed: {self.host}" - raise NetmikoAuthenticationException(msg) - - self.disable_paging(command="config paging disable") - def cleanup(self, command: str = "logout") -> None: """Reset WLC back to normal paging and gracefully close session.""" self.send_command_timing("config paging enable") @@ -614,7 +626,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any, @@ -650,6 +662,13 @@

      Ancestors

      +

      Class variables

      +
      +
      var prompt_pattern
      +
      +
      +
      +

      Methods

      @@ -863,8 +882,8 @@

      Methods

      Cisco WLC uses "config paging disable" to disable paging """ - self._test_channel_read(pattern=r"[>#]") + # _test_channel_read() will happen in the special_login_handler() try: self.set_base_prompt() except ValueError: @@ -887,36 +906,46 @@

      Methods

      Expand source code -
      def special_login_handler(self, delay_factor: float = 1.0) -> None:
      -    """WLC presents with the following on login (in certain OS versions)
      +
          def special_login_handler(self, delay_factor: float = 1.0) -> None:
      +        """WLC presents with the following on login (in certain OS versions)
       
      -    login as: user
      +        login as: user
       
      -    (Cisco Controller)
      +        (Cisco Controller)
       
      -    User: user
      +        User: user
       
      -    Password:****
      -    """
      -    delay_factor = self.select_delay_factor(delay_factor)
      -    i = 0
      -    time.sleep(delay_factor * 0.5)
      -    output = ""
      -    while i <= 12:
      -        output = self.read_channel()
      -        if output:
      -            if "login as" in output or "User:" in output:
      +        Password:****
      +        """
      +        output = ""
      +        uname = "User:"
      +        login = "login as"
      +        password = "ssword"
      +        pattern = rf"(?:{uname}|{login}|{password}|{self.prompt_pattern})"
      +
      +        while True:
      +            new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0)
      +            output += new_data
      +            if re.search(self.prompt_pattern, new_data):
      +                return
      +
      +            if uname in new_data or login in new_data:
                       assert isinstance(self.username, str)
                       self.write_channel(self.username + self.RETURN)
      -            elif "Password" in output:
      +            elif password in new_data:
                       assert isinstance(self.password, str)
                       self.write_channel(self.password + self.RETURN)
      -                break
      -            time.sleep(delay_factor * 1)
      -        else:
      -            # no output read, sleep and go for one more round of read channel
      -            time.sleep(delay_factor * 1.5)
      -        i += 1
      + else: + msg = f""" +Failed to login to Cisco WLC Device. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg)

    @@ -985,6 +1014,7 @@

    cleanup
  • config_mode
  • exit_config_mode
  • +
  • prompt_pattern
  • save_config
  • send_command_w_enter
  • session_preparation
  • diff --git a/docs/netmiko/cisco/cisco_xr.html b/docs/netmiko/cisco/cisco_xr.html index a98088050..021af7ce8 100644 --- a/docs/netmiko/cisco/cisco_xr.html +++ b/docs/netmiko/cisco/cisco_xr.html @@ -26,7 +26,7 @@

    Module netmiko.cisco.cisco_xr

    Expand source code -
    from typing import Optional, Any, Union, Sequence, TextIO
    +
    from typing import Optional, Any, Union, Sequence, Iterator, TextIO
     import re
     import warnings
     from netmiko.base_connection import DELAY_FACTOR_DEPR_SIMPLE_MSG
    @@ -71,7 +71,7 @@ 

    Module netmiko.cisco.cisco_xr

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -299,7 +299,7 @@

    Classes

    class CiscoXrBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -448,7 +448,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -853,7 +853,7 @@

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

    IOS-XR requires you not exit from configuration mode.

    @@ -863,7 +863,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = False,
         **kwargs: Any,
     ) -> str:
    @@ -1115,7 +1115,7 @@ 

    Inherited members

    class CiscoXrSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Cisco XR SSH driver.

    @@ -1288,7 +1288,7 @@

    Inherited members

    class CiscoXrTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Cisco XR Telnet driver.

    diff --git a/docs/netmiko/cisco/index.html b/docs/netmiko/cisco/index.html index 94741eea2..eff4b4f09 100644 --- a/docs/netmiko/cisco/index.html +++ b/docs/netmiko/cisco/index.html @@ -708,7 +708,7 @@

    Inherited members

    class CiscoFtdSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Subclass specific to Cisco FTD.

    @@ -941,7 +941,7 @@

    Inherited members

    class CiscoIosBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Common Methods for IOS (both SSH and telnet).

    @@ -1284,7 +1284,7 @@

    Inherited members

    class CiscoIosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Cisco IOS SSH driver.

    @@ -1457,7 +1457,7 @@

    Inherited members

    class CiscoIosSerial -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Cisco IOS Serial driver.

    @@ -1630,7 +1630,7 @@

    Inherited members

    class CiscoIosTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Cisco IOS Telnet driver.

    @@ -1972,7 +1972,7 @@

    Inherited members

    class CiscoNxosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -2259,7 +2259,7 @@

    Inherited members

    class CiscoS300SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Support for Cisco SG300 series of devices.

    @@ -2434,7 +2434,7 @@

    Inherited members

    class CiscoS300Telnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Support for Cisco SG300 series of devices, with telnet. @@ -3000,7 +3000,7 @@

    Inherited members

    class CiscoViptelaSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Subclass specific to Cisco Viptela.

    @@ -3144,7 +3144,7 @@

    Inherited members

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -3332,7 +3332,7 @@

    Inherited members

    class CiscoWlcSSH -(*args: Any, **kwargs: Any) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Netmiko Cisco WLC support.

    @@ -3446,11 +3446,7 @@

    Inherited members

    class CiscoWlcSSH(BaseConnection):
         """Netmiko Cisco WLC support."""
     
    -    def __init__(self, *args: Any, **kwargs: Any) -> None:
    -        # WLC/AireOS has an issue where you can get "No Existing Session" with
    -        # the default conn_timeout (so increase conn_timeout to 10-seconds).
    -        kwargs.setdefault("conn_timeout", 10)
    -        return super().__init__(*args, **kwargs)
    +    prompt_pattern = r"(?m:[>#]\s*$)"  # force re.Multiline
     
         def special_login_handler(self, delay_factor: float = 1.0) -> None:
             """WLC presents with the following on login (in certain OS versions)
    @@ -3463,25 +3459,51 @@ 

    Inherited members

    Password:**** """ - delay_factor = self.select_delay_factor(delay_factor) - i = 0 - time.sleep(delay_factor * 0.5) output = "" - while i <= 12: - output = self.read_channel() - if output: - if "login as" in output or "User:" in output: - assert isinstance(self.username, str) - self.write_channel(self.username + self.RETURN) - elif "Password" in output: - assert isinstance(self.password, str) - self.write_channel(self.password + self.RETURN) - break - time.sleep(delay_factor * 1) + uname = "User:" + login = "login as" + password = "ssword" + pattern = rf"(?:{uname}|{login}|{password}|{self.prompt_pattern})" + + while True: + new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0) + output += new_data + if re.search(self.prompt_pattern, new_data): + return + + if uname in new_data or login in new_data: + assert isinstance(self.username, str) + self.write_channel(self.username + self.RETURN) + elif password in new_data: + assert isinstance(self.password, str) + self.write_channel(self.password + self.RETURN) else: - # no output read, sleep and go for one more round of read channel - time.sleep(delay_factor * 1.5) - i += 1 + msg = f""" +Failed to login to Cisco WLC Device. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg) + + def session_preparation(self) -> None: + """ + Prepare the session after the connection has been established + + Cisco WLC uses "config paging disable" to disable paging + """ + + # _test_channel_read() will happen in the special_login_handler() + try: + self.set_base_prompt() + except ValueError: + msg = f"Authentication failed: {self.host}" + raise NetmikoAuthenticationException(msg) + + self.disable_paging(command="config paging disable") def send_command_w_enter(self, *args: Any, **kwargs: Any) -> str: """ @@ -3580,22 +3602,6 @@

    Inherited members

    output = self.strip_prompt(output) return output - def session_preparation(self) -> None: - """ - Prepare the session after the connection has been established - - Cisco WLC uses "config paging disable" to disable paging - """ - self._test_channel_read(pattern=r"[>#]") - - try: - self.set_base_prompt() - except ValueError: - msg = f"Authentication failed: {self.host}" - raise NetmikoAuthenticationException(msg) - - self.disable_paging(command="config paging disable") - def cleanup(self, command: str = "logout") -> None: """Reset WLC back to normal paging and gracefully close session.""" self.send_command_timing("config paging enable") @@ -3654,7 +3660,7 @@

    Inherited members

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any, @@ -3690,6 +3696,13 @@

    Ancestors

    +

    Class variables

    +
    +
    var prompt_pattern
    +
    +
    +
    +

    Methods

    @@ -3903,8 +3916,8 @@

    Methods

    Cisco WLC uses "config paging disable" to disable paging """ - self._test_channel_read(pattern=r"[>#]") + # _test_channel_read() will happen in the special_login_handler() try: self.set_base_prompt() except ValueError: @@ -3927,36 +3940,46 @@

    Methods

    Expand source code -
    def special_login_handler(self, delay_factor: float = 1.0) -> None:
    -    """WLC presents with the following on login (in certain OS versions)
    +
        def special_login_handler(self, delay_factor: float = 1.0) -> None:
    +        """WLC presents with the following on login (in certain OS versions)
    +
    +        login as: user
     
    -    login as: user
    +        (Cisco Controller)
     
    -    (Cisco Controller)
    +        User: user
     
    -    User: user
    +        Password:****
    +        """
    +        output = ""
    +        uname = "User:"
    +        login = "login as"
    +        password = "ssword"
    +        pattern = rf"(?:{uname}|{login}|{password}|{self.prompt_pattern})"
     
    -    Password:****
    -    """
    -    delay_factor = self.select_delay_factor(delay_factor)
    -    i = 0
    -    time.sleep(delay_factor * 0.5)
    -    output = ""
    -    while i <= 12:
    -        output = self.read_channel()
    -        if output:
    -            if "login as" in output or "User:" in output:
    +        while True:
    +            new_data = self.read_until_pattern(pattern=pattern, read_timeout=25.0)
    +            output += new_data
    +            if re.search(self.prompt_pattern, new_data):
    +                return
    +
    +            if uname in new_data or login in new_data:
                     assert isinstance(self.username, str)
                     self.write_channel(self.username + self.RETURN)
    -            elif "Password" in output:
    +            elif password in new_data:
                     assert isinstance(self.password, str)
                     self.write_channel(self.password + self.RETURN)
    -                break
    -            time.sleep(delay_factor * 1)
    -        else:
    -            # no output read, sleep and go for one more round of read channel
    -            time.sleep(delay_factor * 1.5)
    -        i += 1
    + else: + msg = f""" +Failed to login to Cisco WLC Device. + +Pattern not detected: {pattern} +output: + +{output} + +""" + raise NetmikoAuthenticationException(msg)

    @@ -4150,7 +4173,7 @@

    Inherited members

    class CiscoXrSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Cisco XR SSH driver.

    @@ -4323,7 +4346,7 @@

    Inherited members

    class CiscoXrTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Cisco XR Telnet driver.

    @@ -4897,6 +4920,7 @@

    cleanup
  • config_mode
  • exit_config_mode
  • +
  • prompt_pattern
  • save_config
  • send_command_w_enter
  • session_preparation
  • diff --git a/docs/netmiko/cisco_base_connection.html b/docs/netmiko/cisco_base_connection.html index e8ed54bf5..150d9201c 100644 --- a/docs/netmiko/cisco_base_connection.html +++ b/docs/netmiko/cisco_base_connection.html @@ -308,7 +308,7 @@

    Classes

    class CiscoBaseConnection -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -1096,7 +1096,7 @@

    Inherited members

    class CiscoSSHConnection -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/citrix/index.html b/docs/netmiko/citrix/index.html index 9cb5a51e1..24849768a 100644 --- a/docs/netmiko/citrix/index.html +++ b/docs/netmiko/citrix/index.html @@ -49,7 +49,7 @@

    Classes

    class NetscalerSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Netscaler SSH class.

    diff --git a/docs/netmiko/citrix/netscaler_ssh.html b/docs/netmiko/citrix/netscaler_ssh.html index 73536d398..ee4242575 100644 --- a/docs/netmiko/citrix/netscaler_ssh.html +++ b/docs/netmiko/citrix/netscaler_ssh.html @@ -85,7 +85,7 @@

    Classes

    class NetscalerSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Netscaler SSH class.

    diff --git a/docs/netmiko/cloudgenix/cloudgenix_ion.html b/docs/netmiko/cloudgenix/cloudgenix_ion.html index b5462e653..0e212d92f 100644 --- a/docs/netmiko/cloudgenix/cloudgenix_ion.html +++ b/docs/netmiko/cloudgenix/cloudgenix_ion.html @@ -26,7 +26,7 @@

    Module netmiko.cloudgenix.cloudgenix_ion

    Expand source code -
    from typing import Any, Union, Sequence, TextIO, Optional
    +
    from typing import Any, Union, Sequence, Iterator, TextIO, Optional
     from netmiko.no_config import NoConfig
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -65,7 +65,7 @@ 

    Module netmiko.cloudgenix.cloudgenix_ion

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any ) -> str: @@ -85,7 +85,7 @@

    Classes

    class CloudGenixIonSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no config mode.

    @@ -235,7 +235,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any ) -> str: diff --git a/docs/netmiko/cloudgenix/index.html b/docs/netmiko/cloudgenix/index.html index 9fa98d7de..b9e40c4d7 100644 --- a/docs/netmiko/cloudgenix/index.html +++ b/docs/netmiko/cloudgenix/index.html @@ -49,7 +49,7 @@

    Classes

    class CloudGenixIonSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no config mode.

    @@ -199,7 +199,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any ) -> str: diff --git a/docs/netmiko/coriant/coriant_ssh.html b/docs/netmiko/coriant/coriant_ssh.html index bd75a5b81..ac35a26a8 100644 --- a/docs/netmiko/coriant/coriant_ssh.html +++ b/docs/netmiko/coriant/coriant_ssh.html @@ -69,7 +69,7 @@

    Classes

    class CoriantSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    diff --git a/docs/netmiko/coriant/index.html b/docs/netmiko/coriant/index.html index 8c46c9c4a..6b8fdc6e0 100644 --- a/docs/netmiko/coriant/index.html +++ b/docs/netmiko/coriant/index.html @@ -49,7 +49,7 @@

    Classes

    class CoriantSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    diff --git a/docs/netmiko/dell/dell_dnos6.html b/docs/netmiko/dell/dell_dnos6.html index b76c02c6d..a9069ece9 100644 --- a/docs/netmiko/dell/dell_dnos6.html +++ b/docs/netmiko/dell/dell_dnos6.html @@ -72,7 +72,7 @@

    Classes

    class DellDNOS6Base -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Driver.

    @@ -289,7 +289,7 @@

    Inherited members

    class DellDNOS6SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Driver.

    @@ -461,7 +461,7 @@

    Inherited members

    class DellDNOS6Telnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Driver.

    diff --git a/docs/netmiko/dell/dell_force10_ssh.html b/docs/netmiko/dell/dell_force10_ssh.html index 43f9265a5..656a315fa 100644 --- a/docs/netmiko/dell/dell_force10_ssh.html +++ b/docs/netmiko/dell/dell_force10_ssh.html @@ -57,7 +57,7 @@

    Classes

    class DellForce10SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell Force10 Driver - supports DNOS9.

    diff --git a/docs/netmiko/dell/dell_isilon_ssh.html b/docs/netmiko/dell/dell_isilon_ssh.html index 08b206f75..9bdb4b1bb 100644 --- a/docs/netmiko/dell/dell_isilon_ssh.html +++ b/docs/netmiko/dell/dell_isilon_ssh.html @@ -143,7 +143,7 @@

    Classes

    class DellIsilonSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Defines vendor independent methods.

    diff --git a/docs/netmiko/dell/dell_os10_ssh.html b/docs/netmiko/dell/dell_os10_ssh.html index bc5721298..00701b9e3 100644 --- a/docs/netmiko/dell/dell_os10_ssh.html +++ b/docs/netmiko/dell/dell_os10_ssh.html @@ -330,7 +330,7 @@

    Inherited members

    class DellOS10SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell EMC Networking OS10 Driver - supports dellos10.

    diff --git a/docs/netmiko/dell/dell_powerconnect.html b/docs/netmiko/dell/dell_powerconnect.html index aac828647..b5d8344b7 100644 --- a/docs/netmiko/dell/dell_powerconnect.html +++ b/docs/netmiko/dell/dell_powerconnect.html @@ -158,7 +158,7 @@

    Classes

    class DellPowerConnectBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Driver.

    @@ -441,7 +441,7 @@

    Inherited members

    class DellPowerConnectSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Driver.

    @@ -711,7 +711,7 @@

    Inherited members

    class DellPowerConnectTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Telnet Driver.

    diff --git a/docs/netmiko/dell/dell_sonic_ssh.html b/docs/netmiko/dell/dell_sonic_ssh.html index ec31f2f92..81348d63f 100644 --- a/docs/netmiko/dell/dell_sonic_ssh.html +++ b/docs/netmiko/dell/dell_sonic_ssh.html @@ -82,7 +82,7 @@

    Classes

    class DellSonicSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution diff --git a/docs/netmiko/dell/index.html b/docs/netmiko/dell/index.html index 40f7e89c1..5d87d7758 100644 --- a/docs/netmiko/dell/index.html +++ b/docs/netmiko/dell/index.html @@ -87,7 +87,7 @@

    Classes

    class DellDNOS6SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Driver.

    @@ -259,7 +259,7 @@

    Inherited members

    class DellDNOS6Telnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Driver.

    @@ -431,7 +431,7 @@

    Inherited members

    class DellForce10SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell Force10 Driver - supports DNOS9.

    @@ -636,7 +636,7 @@

    Inherited members

    class DellIsilonSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Defines vendor independent methods.

    @@ -1185,7 +1185,7 @@

    Inherited members

    class DellOS10SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell EMC Networking OS10 Driver - supports dellos10.

    @@ -1390,7 +1390,7 @@

    Inherited members

    class DellPowerConnectSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Driver.

    @@ -1660,7 +1660,7 @@

    Inherited members

    class DellPowerConnectTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell PowerConnect Telnet Driver.

    @@ -1833,7 +1833,7 @@

    Inherited members

    class DellSonicSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Dell EMC PowerSwitch platforms running Enterprise SONiC Distribution diff --git a/docs/netmiko/dlink/dlink_ds.html b/docs/netmiko/dlink/dlink_ds.html index e9308a4b0..5456c8033 100644 --- a/docs/netmiko/dlink/dlink_ds.html +++ b/docs/netmiko/dlink/dlink_ds.html @@ -78,7 +78,7 @@

    Classes

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    @@ -326,7 +326,7 @@

    Inherited members

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    diff --git a/docs/netmiko/dlink/index.html b/docs/netmiko/dlink/index.html index 32be79183..f3b048885 100644 --- a/docs/netmiko/dlink/index.html +++ b/docs/netmiko/dlink/index.html @@ -49,7 +49,7 @@

    Classes

    class DlinkDSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Supports D-Link DGS/DES device series (there are some DGS/DES devices that are web-only)

    diff --git a/docs/netmiko/eltex/eltex_esr_ssh.html b/docs/netmiko/eltex/eltex_esr_ssh.html index 4a9a48bd5..de0132468 100644 --- a/docs/netmiko/eltex/eltex_esr_ssh.html +++ b/docs/netmiko/eltex/eltex_esr_ssh.html @@ -173,7 +173,7 @@

    Classes

    class EltexEsrSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Netmiko support for routers Eltex ESR.

    diff --git a/docs/netmiko/eltex/eltex_ssh.html b/docs/netmiko/eltex/eltex_ssh.html index 0b39b8ae2..b98d164f3 100644 --- a/docs/netmiko/eltex/eltex_ssh.html +++ b/docs/netmiko/eltex/eltex_ssh.html @@ -54,7 +54,7 @@

    Classes

    class EltexSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/eltex/index.html b/docs/netmiko/eltex/index.html index b178c848a..7130af5c7 100644 --- a/docs/netmiko/eltex/index.html +++ b/docs/netmiko/eltex/index.html @@ -54,7 +54,7 @@

    Classes

    class EltexEsrSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Netmiko support for routers Eltex ESR.

    @@ -470,7 +470,7 @@

    Inherited members

    class EltexSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/endace/endace_ssh.html b/docs/netmiko/endace/endace_ssh.html index 3d1a48f5b..1178a7fbe 100644 --- a/docs/netmiko/endace/endace_ssh.html +++ b/docs/netmiko/endace/endace_ssh.html @@ -100,7 +100,7 @@

    Classes

    class EndaceSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/endace/index.html b/docs/netmiko/endace/index.html index ff4d45127..c30a660aa 100644 --- a/docs/netmiko/endace/index.html +++ b/docs/netmiko/endace/index.html @@ -49,7 +49,7 @@

    Classes

    class EndaceSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/enterasys/enterasys_ssh.html b/docs/netmiko/enterasys/enterasys_ssh.html index 435193e52..a237542dd 100644 --- a/docs/netmiko/enterasys/enterasys_ssh.html +++ b/docs/netmiko/enterasys/enterasys_ssh.html @@ -57,7 +57,7 @@

    Classes

    class EnterasysSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Enterasys support.

    diff --git a/docs/netmiko/enterasys/index.html b/docs/netmiko/enterasys/index.html index 1ab380551..89a4bb022 100644 --- a/docs/netmiko/enterasys/index.html +++ b/docs/netmiko/enterasys/index.html @@ -49,7 +49,7 @@

    Classes

    class EnterasysSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Enterasys support.

    diff --git a/docs/netmiko/ericsson/ericsson_ipos.html b/docs/netmiko/ericsson/ericsson_ipos.html index ea249833f..dd3735f05 100644 --- a/docs/netmiko/ericsson/ericsson_ipos.html +++ b/docs/netmiko/ericsson/ericsson_ipos.html @@ -30,7 +30,7 @@

    Module netmiko.ericsson.ericsson_ipos

    """
     Ericsson Ipos looks like it was RedBack equipment.
     """
    -from typing import Optional, Any, Union, Sequence, TextIO
    +from typing import Optional, Any, Union, Sequence, Iterator, TextIO
     import re
     import warnings
     
    @@ -83,7 +83,7 @@ 

    Module netmiko.ericsson.ericsson_ipos

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -188,7 +188,7 @@

    Classes

    class EricssonIposSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Defines vendor independent methods.

    @@ -346,7 +346,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -575,7 +575,7 @@

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

    Ericsson IPOS requires you not exit from configuration mode.

    @@ -585,7 +585,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = False,
         **kwargs: Any,
     ) -> str:
    diff --git a/docs/netmiko/ericsson/index.html b/docs/netmiko/ericsson/index.html
    index 6d7992990..1b786c7a4 100644
    --- a/docs/netmiko/ericsson/index.html
    +++ b/docs/netmiko/ericsson/index.html
    @@ -49,7 +49,7 @@ 

    Classes

    class EricssonIposSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Defines vendor independent methods.

    @@ -207,7 +207,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -436,7 +436,7 @@

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

    Ericsson IPOS requires you not exit from configuration mode.

    @@ -446,7 +446,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = False,
         **kwargs: Any,
     ) -> str:
    diff --git a/docs/netmiko/extreme/extreme_ers_ssh.html b/docs/netmiko/extreme/extreme_ers_ssh.html
    index 97f37e317..29d165b64 100644
    --- a/docs/netmiko/extreme/extreme_ers_ssh.html
    +++ b/docs/netmiko/extreme/extreme_ers_ssh.html
    @@ -79,7 +79,7 @@ 

    Module netmiko.extreme.extreme_ers_ssh

    self.write_channel(self.password + self.RETURN) else: msg = f""" -Failed to login to Extreme ERS Devices. +Failed to login to Extreme ERS Device. Pattern not detected: {pattern} output: @@ -112,7 +112,7 @@

    Classes

    class ExtremeErsSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Netmiko support for Extreme Ethernet Routing Switch.

    @@ -266,7 +266,7 @@

    Classes

    self.write_channel(self.password + self.RETURN) else: msg = f""" -Failed to login to Extreme ERS Devices. +Failed to login to Extreme ERS Device. Pattern not detected: {pattern} output: @@ -367,7 +367,7 @@

    Methods

    self.write_channel(self.password + self.RETURN) else: msg = f""" -Failed to login to Extreme ERS Devices. +Failed to login to Extreme ERS Device. Pattern not detected: {pattern} output: diff --git a/docs/netmiko/extreme/extreme_exos.html b/docs/netmiko/extreme/extreme_exos.html index 8d4a89c11..e6415ce57 100644 --- a/docs/netmiko/extreme/extreme_exos.html +++ b/docs/netmiko/extreme/extreme_exos.html @@ -258,7 +258,7 @@

    Classes

    class ExtremeExosBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Extreme Exos support.

    @@ -782,7 +782,7 @@

    Inherited members

    class ExtremeExosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Extreme Exos support.

    diff --git a/docs/netmiko/extreme/extreme_netiron.html b/docs/netmiko/extreme/extreme_netiron.html index b3e7d244e..c8c16af19 100644 --- a/docs/netmiko/extreme/extreme_netiron.html +++ b/docs/netmiko/extreme/extreme_netiron.html @@ -72,7 +72,7 @@

    Classes

    class ExtremeNetironBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -303,7 +303,7 @@

    Inherited members

    class ExtremeNetironSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/extreme/extreme_nos_ssh.html b/docs/netmiko/extreme/extreme_nos_ssh.html index 7d3891c0a..d47f035ae 100644 --- a/docs/netmiko/extreme/extreme_nos_ssh.html +++ b/docs/netmiko/extreme/extreme_nos_ssh.html @@ -71,7 +71,7 @@

    Classes

    class ExtremeNosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Support for Extreme NOS/VDX.

    diff --git a/docs/netmiko/extreme/extreme_slx_ssh.html b/docs/netmiko/extreme/extreme_slx_ssh.html index b30e52f49..c80d89ad6 100644 --- a/docs/netmiko/extreme/extreme_slx_ssh.html +++ b/docs/netmiko/extreme/extreme_slx_ssh.html @@ -71,7 +71,7 @@

    Classes

    class ExtremeSlxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Support for Extreme SLX.

    diff --git a/docs/netmiko/extreme/extreme_tierraos_ssh.html b/docs/netmiko/extreme/extreme_tierraos_ssh.html index deaf1d54c..5bcc2221f 100644 --- a/docs/netmiko/extreme/extreme_tierraos_ssh.html +++ b/docs/netmiko/extreme/extreme_tierraos_ssh.html @@ -71,7 +71,7 @@

    Classes

    class ExtremeTierraSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Support for Extreme TierraOS.

    diff --git a/docs/netmiko/extreme/extreme_vsp_ssh.html b/docs/netmiko/extreme/extreme_vsp_ssh.html index 6e78144e3..9aadd6c2a 100644 --- a/docs/netmiko/extreme/extreme_vsp_ssh.html +++ b/docs/netmiko/extreme/extreme_vsp_ssh.html @@ -63,7 +63,7 @@

    Classes

    class ExtremeVspSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Extreme Virtual Services Platform Support.

    diff --git a/docs/netmiko/extreme/extreme_wing_ssh.html b/docs/netmiko/extreme/extreme_wing_ssh.html index caf599fa6..55c24aa9a 100644 --- a/docs/netmiko/extreme/extreme_wing_ssh.html +++ b/docs/netmiko/extreme/extreme_wing_ssh.html @@ -51,7 +51,7 @@

    Classes

    class ExtremeWingSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Extreme WiNG support.

    diff --git a/docs/netmiko/extreme/index.html b/docs/netmiko/extreme/index.html index 90c7c1df2..c5b39dd9b 100644 --- a/docs/netmiko/extreme/index.html +++ b/docs/netmiko/extreme/index.html @@ -98,7 +98,7 @@

    Classes

    class ExtremeErsSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Netmiko support for Extreme Ethernet Routing Switch.

    @@ -252,7 +252,7 @@

    Classes

    self.write_channel(self.password + self.RETURN) else: msg = f""" -Failed to login to Extreme ERS Devices. +Failed to login to Extreme ERS Device. Pattern not detected: {pattern} output: @@ -353,7 +353,7 @@

    Methods

    self.write_channel(self.password + self.RETURN) else: msg = f""" -Failed to login to Extreme ERS Devices. +Failed to login to Extreme ERS Device. Pattern not detected: {pattern} output: @@ -617,7 +617,7 @@

    Inherited members

    class ExtremeExosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Extreme Exos support.

    @@ -968,7 +968,7 @@

    Inherited members

    class ExtremeNetironSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -1315,7 +1315,7 @@

    Inherited members

    class ExtremeNosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Support for Extreme NOS/VDX.

    @@ -1548,7 +1548,7 @@

    Inherited members

    class ExtremeSlxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Support for Extreme SLX.

    @@ -1781,7 +1781,7 @@

    Inherited members

    class ExtremeTierraSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Support for Extreme TierraOS.

    @@ -2014,7 +2014,7 @@

    Inherited members

    class ExtremeVspSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Extreme Virtual Services Platform Support.

    @@ -2240,7 +2240,7 @@

    Inherited members

    class ExtremeWingSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Extreme WiNG support.

    diff --git a/docs/netmiko/f5/f5_linux_ssh.html b/docs/netmiko/f5/f5_linux_ssh.html index b82e3ed28..78b9ec940 100644 --- a/docs/netmiko/f5/f5_linux_ssh.html +++ b/docs/netmiko/f5/f5_linux_ssh.html @@ -44,7 +44,7 @@

    Classes

    class F5LinuxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    diff --git a/docs/netmiko/f5/f5_tmsh_ssh.html b/docs/netmiko/f5/f5_tmsh_ssh.html index dd42839d2..d649db9ff 100644 --- a/docs/netmiko/f5/f5_tmsh_ssh.html +++ b/docs/netmiko/f5/f5_tmsh_ssh.html @@ -77,7 +77,7 @@

    Classes

    class F5TmshSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no config mode.

    diff --git a/docs/netmiko/f5/index.html b/docs/netmiko/f5/index.html index 9c853fd23..08988b52c 100644 --- a/docs/netmiko/f5/index.html +++ b/docs/netmiko/f5/index.html @@ -54,7 +54,7 @@

    Classes

    class F5LinuxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -226,7 +226,7 @@

    Inherited members

    class F5TmshSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no config mode.

    diff --git a/docs/netmiko/flexvnf/flexvnf_ssh.html b/docs/netmiko/flexvnf/flexvnf_ssh.html index 0ae715f57..e392eafa2 100644 --- a/docs/netmiko/flexvnf/flexvnf_ssh.html +++ b/docs/netmiko/flexvnf/flexvnf_ssh.html @@ -244,7 +244,7 @@

    Classes

    class FlexvnfSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    diff --git a/docs/netmiko/flexvnf/index.html b/docs/netmiko/flexvnf/index.html index 9abe604d7..bcd9279d7 100644 --- a/docs/netmiko/flexvnf/index.html +++ b/docs/netmiko/flexvnf/index.html @@ -49,7 +49,7 @@

    Classes

    class FlexvnfSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    diff --git a/docs/netmiko/fortinet/fortinet_ssh.html b/docs/netmiko/fortinet/fortinet_ssh.html index c48125159..d96a20e0c 100644 --- a/docs/netmiko/fortinet/fortinet_ssh.html +++ b/docs/netmiko/fortinet/fortinet_ssh.html @@ -143,7 +143,7 @@

    Classes

    class FortinetSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no config mode.

    diff --git a/docs/netmiko/fortinet/index.html b/docs/netmiko/fortinet/index.html index 7ac34acf0..9e13dcea0 100644 --- a/docs/netmiko/fortinet/index.html +++ b/docs/netmiko/fortinet/index.html @@ -49,7 +49,7 @@

    Classes

    class FortinetSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no config mode.

    diff --git a/docs/netmiko/hp/hp_comware.html b/docs/netmiko/hp/hp_comware.html index b9e6fc888..183d77dbf 100644 --- a/docs/netmiko/hp/hp_comware.html +++ b/docs/netmiko/hp/hp_comware.html @@ -27,7 +27,7 @@

    Module netmiko.hp.hp_comware

    Expand source code
    import re
    -from typing import Union, Sequence, TextIO, Any, Optional
    +from typing import Union, Sequence, Iterator, TextIO, Any, Optional
     
     from netmiko.cisco_base_connection import CiscoSSHConnection
     
    @@ -72,7 +72,7 @@ 

    Module netmiko.hp.hp_comware

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, @@ -335,7 +335,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, diff --git a/docs/netmiko/huawei/huawei.html b/docs/netmiko/huawei/huawei.html index ba74869a3..fc30c2e55 100644 --- a/docs/netmiko/huawei/huawei.html +++ b/docs/netmiko/huawei/huawei.html @@ -26,7 +26,7 @@

    Module netmiko.huawei.huawei

    Expand source code -
    from typing import Optional, Any, Union, Sequence, TextIO
    +
    from typing import Optional, Any, Union, Sequence, Iterator, TextIO
     import time
     import re
     import warnings
    @@ -224,7 +224,7 @@ 

    Module netmiko.huawei.huawei

    class HuaweiVrpv8SSH(HuaweiSSH): def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -292,7 +292,7 @@

    Classes

    class HuaweiBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    @@ -697,7 +697,7 @@

    Inherited members

    class HuaweiSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Huawei SSH driver.

    @@ -883,7 +883,7 @@

    Inherited members

    class HuaweiTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Huawei Telnet driver.

    @@ -1219,7 +1219,7 @@

    Inherited members

    class HuaweiVrpv8SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Huawei SSH driver.

    @@ -1333,7 +1333,7 @@

    Inherited members

    class HuaweiVrpv8SSH(HuaweiSSH):
         def send_config_set(
             self,
    -        config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +        config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
             exit_config_mode: bool = False,
             **kwargs: Any,
         ) -> str:
    @@ -1474,7 +1474,7 @@ 

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

    Huawei VRPv8 requires you not exit from configuration mode.

    @@ -1484,7 +1484,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = False,
         **kwargs: Any,
     ) -> str:
    diff --git a/docs/netmiko/huawei/huawei_smartax.html b/docs/netmiko/huawei/huawei_smartax.html
    index 5eb00adad..c919e0319 100644
    --- a/docs/netmiko/huawei/huawei_smartax.html
    +++ b/docs/netmiko/huawei/huawei_smartax.html
    @@ -159,7 +159,7 @@ 

    Classes

    class HuaweiSmartAXSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Supports Huawei SmartAX and OLT.

    diff --git a/docs/netmiko/huawei/index.html b/docs/netmiko/huawei/index.html index 0aa2e01be..9718c059e 100644 --- a/docs/netmiko/huawei/index.html +++ b/docs/netmiko/huawei/index.html @@ -55,7 +55,7 @@

    Classes

    class HuaweiSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Huawei SSH driver.

    @@ -241,7 +241,7 @@

    Inherited members

    class HuaweiSmartAXSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Supports Huawei SmartAX and OLT.

    @@ -585,7 +585,7 @@

    Inherited members

    class HuaweiTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Huawei Telnet driver.

    @@ -921,7 +921,7 @@

    Inherited members

    class HuaweiVrpv8SSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Huawei SSH driver.

    @@ -1035,7 +1035,7 @@

    Inherited members

    class HuaweiVrpv8SSH(HuaweiSSH):
         def send_config_set(
             self,
    -        config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +        config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
             exit_config_mode: bool = False,
             **kwargs: Any,
         ) -> str:
    @@ -1176,7 +1176,7 @@ 

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

    Huawei VRPv8 requires you not exit from configuration mode.

    @@ -1186,7 +1186,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = False,
         **kwargs: Any,
     ) -> str:
    diff --git a/docs/netmiko/index.html b/docs/netmiko/index.html
    index a893bdab6..2187f5266 100644
    --- a/docs/netmiko/index.html
    +++ b/docs/netmiko/index.html
    @@ -28,7 +28,7 @@ 

    Package netmiko

    import sys
     
    -__version__ = "4.1.1"
    +__version__ = "4.1.2"
     PY_MAJ_VER = 3
     PY_MIN_VER = 7
     MIN_PYTHON_VER = "3.7"
    @@ -157,6 +157,10 @@ 

    Sub-modules

    +
    netmiko.audiocode
    +
    +
    +
    netmiko.base_connection

    Base connection class for netmiko …

    @@ -817,7 +821,7 @@

    Classes

    class BaseConnection -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Defines vendor independent methods.

    @@ -982,7 +986,7 @@

    Classes

    session_log_record_writes: bool = False, session_log_file_mode: str = "write", allow_auto_change: bool = False, - encoding: str = "ascii", + encoding: str = "utf-8", sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False, @@ -1224,6 +1228,8 @@

    Classes

    self.key_file = ( path.abspath(path.expanduser(key_file)) if key_file else None ) + if self.use_keys is True: + self._key_check() self.pkey = pkey self.passphrase = passphrase self.allow_agent = allow_agent @@ -1311,6 +1317,22 @@

    Classes

    def _return_cli(self) -> str: raise NotImplementedError + def _key_check(self) -> bool: + """Verify key_file exists.""" + msg = f""" +use_keys has been set to True, but specified key_file does not exist: + +use_keys: {self.use_keys} +key_file: {self.key_file} +""" + if self.key_file is None: + raise ValueError(msg) + + my_key_file = Path(self.key_file) + if not my_key_file.is_file(): + raise ValueError(msg) + return True + @lock_channel @log_writes def write_channel(self, out_data: str) -> None: @@ -1674,7 +1696,7 @@

    Classes

    self.remote_conn.close() raise NetmikoAuthenticationException(msg) - def _try_session_preparation(self) -> None: + def _try_session_preparation(self, force_data: bool = True) -> None: """ In case of an exception happening during `session_preparation()` Netmiko should gracefully clean-up after itself. This might be challenging for library users @@ -1682,6 +1704,10 @@

    Classes

    to threads used in Paramiko. """ try: + # Netmiko needs there to be data for session_preparation to work. + if force_data: + self.write_channel(self.RETURN) + time.sleep(0.1) self.session_preparation() except Exception: self.disconnect() @@ -2091,8 +2117,13 @@

    Classes

    if not prompt[-1] in (pri_prompt_terminator, alt_prompt_terminator): raise ValueError(f"Router prompt not found: {repr(prompt)}") - # Strip off trailing terminator - self.base_prompt = prompt[:-1] + + # If all we have is the 'terminator' just use that :-( + if len(prompt) == 1: + self.base_prompt = prompt + else: + # Strip off trailing terminator + self.base_prompt = prompt[:-1] return self.base_prompt def find_prompt( @@ -2834,7 +2865,7 @@

    Classes

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, @@ -2931,8 +2962,10 @@

    Classes

    # Set bypass_commands="" to force no-bypass (usually for testing) bypass_detected = False if bypass_commands: + # Make a copy of the iterator + config_commands, config_commands_tmp = itertools.tee(config_commands, 2) bypass_detected = any( - [True for cmd in config_commands if re.search(bypass_commands, cmd)] + [True for cmd in config_commands_tmp if re.search(bypass_commands, cmd)] ) if bypass_detected: cmd_verify = False @@ -3114,6 +3147,11 @@

    Classes

    """Try to gracefully close the session.""" try: self.cleanup() + except Exception: + # Keep going on cleanup process even if exceptions + pass + + try: if self.protocol == "ssh": self.paramiko_cleanup() elif self.protocol == "telnet": @@ -3179,6 +3217,7 @@

    Classes

    Subclasses

      +
    • AudiocodeBase
    • TelnetConnection
    • CheckPointGaiaSSH
    • CienaSaosBase
    • @@ -3484,6 +3523,11 @@

      Methods

      """Try to gracefully close the session.""" try: self.cleanup() + except Exception: + # Keep going on cleanup process even if exceptions + pass + + try: if self.protocol == "ssh": self.paramiko_cleanup() elif self.protocol == "telnet": @@ -4696,7 +4740,7 @@

      Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = False, strip_command: bool = False, config_mode_command: Optional[str] = None, cmd_verify: bool = True, enter_config_mode: bool = True, error_pattern: str = '', terminator: str = '#', bypass_commands: Optional[str] = None) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, *, exit_config_mode: bool = True, read_timeout: Optional[float] = None, delay_factor: Optional[float] = None, max_loops: Optional[int] = None, strip_prompt: bool = False, strip_command: bool = False, config_mode_command: Optional[str] = None, cmd_verify: bool = True, enter_config_mode: bool = True, error_pattern: str = '', terminator: str = '#', bypass_commands: Optional[str] = None) ‑> str

    Send configuration commands down the SSH channel.

    @@ -4725,7 +4769,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         *,
         exit_config_mode: bool = True,
         read_timeout: Optional[float] = None,
    @@ -4822,8 +4866,10 @@ 

    Methods

    # Set bypass_commands="" to force no-bypass (usually for testing) bypass_detected = False if bypass_commands: + # Make a copy of the iterator + config_commands, config_commands_tmp = itertools.tee(config_commands, 2) bypass_detected = any( - [True for cmd in config_commands if re.search(bypass_commands, cmd)] + [True for cmd in config_commands_tmp if re.search(bypass_commands, cmd)] ) if bypass_detected: cmd_verify = False @@ -5095,8 +5141,13 @@

    Methods

    if not prompt[-1] in (pri_prompt_terminator, alt_prompt_terminator): raise ValueError(f"Router prompt not found: {repr(prompt)}") - # Strip off trailing terminator - self.base_prompt = prompt[:-1] + + # If all we have is the 'terminator' just use that :-( + if len(prompt) == 1: + self.base_prompt = prompt + else: + # Strip off trailing terminator + self.base_prompt = prompt[:-1] return self.base_prompt
    @@ -6474,6 +6525,7 @@

    Index

  • netmiko.apresia
  • netmiko.arista
  • netmiko.aruba
  • +
  • netmiko.audiocode
  • netmiko.base_connection
  • netmiko.broadcom
  • netmiko.brocade
  • diff --git a/docs/netmiko/juniper/index.html b/docs/netmiko/juniper/index.html index c2e7a2486..df76c1177 100644 --- a/docs/netmiko/juniper/index.html +++ b/docs/netmiko/juniper/index.html @@ -141,7 +141,7 @@

    Inherited members

    class JuniperSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with Juniper Networks devices.

    @@ -316,7 +316,7 @@

    Inherited members

    class JuniperScreenOsSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with Juniper ScreenOS devices.

    diff --git a/docs/netmiko/juniper/juniper.html b/docs/netmiko/juniper/juniper.html index 8f8ad21ff..ce2fe205a 100644 --- a/docs/netmiko/juniper/juniper.html +++ b/docs/netmiko/juniper/juniper.html @@ -75,7 +75,8 @@

    Module netmiko.juniper.juniper

    self.write_channel(self.RETURN) data = self.read_until_pattern(pattern=pattern, read_timeout=10) - if "%" in data or "$" in data: + shell_pattern = r"(?:root@|%|\$)" + if re.search(shell_pattern, data): return "shell" elif ">" in data or "#" in data: return "cli" @@ -86,7 +87,7 @@

    Module netmiko.juniper.juniper

    """Check if at shell prompt root@ and go into CLI.""" mode = self._determine_mode() if mode == "shell": - shell_pattern = r"[%$]" + shell_pattern = r"(?:root@|%|\$)" self.write_channel(self.RETURN) cur_prompt = self.read_until_pattern(pattern=shell_pattern, read_timeout=10) if re.search(r"root@", cur_prompt) or re.search(r"^%$", cur_prompt.strip()): @@ -350,7 +351,7 @@

    Classes

    class JuniperBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with Juniper Networks devices.

    @@ -503,7 +504,8 @@

    Classes

    self.write_channel(self.RETURN) data = self.read_until_pattern(pattern=pattern, read_timeout=10) - if "%" in data or "$" in data: + shell_pattern = r"(?:root@|%|\$)" + if re.search(shell_pattern, data): return "shell" elif ">" in data or "#" in data: return "cli" @@ -514,7 +516,7 @@

    Classes

    """Check if at shell prompt root@ and go into CLI.""" mode = self._determine_mode() if mode == "shell": - shell_pattern = r"[%$]" + shell_pattern = r"(?:root@|%|\$)" self.write_channel(self.RETURN) cur_prompt = self.read_until_pattern(pattern=shell_pattern, read_timeout=10) if re.search(r"root@", cur_prompt) or re.search(r"^%$", cur_prompt.strip()): @@ -920,7 +922,7 @@

    Methods

    """Check if at shell prompt root@ and go into CLI.""" mode = self._determine_mode() if mode == "shell": - shell_pattern = r"[%$]" + shell_pattern = r"(?:root@|%|\$)" self.write_channel(self.RETURN) cur_prompt = self.read_until_pattern(pattern=shell_pattern, read_timeout=10) if re.search(r"root@", cur_prompt) or re.search(r"^%$", cur_prompt.strip()): @@ -1179,7 +1181,7 @@

    Inherited members

    class JuniperSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with Juniper Networks devices.

    diff --git a/docs/netmiko/juniper/juniper_screenos.html b/docs/netmiko/juniper/juniper_screenos.html index ca4e2d937..3287235fb 100644 --- a/docs/netmiko/juniper/juniper_screenos.html +++ b/docs/netmiko/juniper/juniper_screenos.html @@ -71,7 +71,7 @@

    Classes

    class JuniperScreenOsSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Implement methods for interacting with Juniper ScreenOS devices.

    diff --git a/docs/netmiko/keymile/index.html b/docs/netmiko/keymile/index.html index 483518d89..de92acc7a 100644 --- a/docs/netmiko/keymile/index.html +++ b/docs/netmiko/keymile/index.html @@ -54,7 +54,7 @@

    Classes

    class KeymileNOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Common Methods for IOS (both SSH and telnet).

    diff --git a/docs/netmiko/keymile/keymile_nos_ssh.html b/docs/netmiko/keymile/keymile_nos_ssh.html index 09bc067ff..712724def 100644 --- a/docs/netmiko/keymile/keymile_nos_ssh.html +++ b/docs/netmiko/keymile/keymile_nos_ssh.html @@ -73,7 +73,7 @@

    Classes

    class KeymileNOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Common Methods for IOS (both SSH and telnet).

    diff --git a/docs/netmiko/linux/index.html b/docs/netmiko/linux/index.html index 00ff46677..eb1c16255 100644 --- a/docs/netmiko/linux/index.html +++ b/docs/netmiko/linux/index.html @@ -156,7 +156,7 @@

    Inherited members

    class LinuxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -314,7 +314,7 @@

    Inherited members

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = True, **kwargs: Any, ) -> str: @@ -593,7 +593,7 @@

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = True, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = True, **kwargs: Any) ‑> str

    Can't exit from root (if root)

    @@ -603,7 +603,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = True,
         **kwargs: Any,
     ) -> str:
    diff --git a/docs/netmiko/linux/linux_ssh.html b/docs/netmiko/linux/linux_ssh.html
    index 4de939de2..03a85e5f8 100644
    --- a/docs/netmiko/linux/linux_ssh.html
    +++ b/docs/netmiko/linux/linux_ssh.html
    @@ -26,7 +26,7 @@ 

    Module netmiko.linux.linux_ssh

    Expand source code -
    from typing import Any, Optional, TYPE_CHECKING, Union, Sequence, TextIO
    +
    from typing import Any, Optional, TYPE_CHECKING, Union, Sequence, Iterator, TextIO
     import os
     import re
     
    @@ -89,7 +89,7 @@ 

    Module netmiko.linux.linux_ssh

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = True, **kwargs: Any, ) -> str: @@ -369,7 +369,7 @@

    Inherited members

    class LinuxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Base Class for cisco-like behavior.

    @@ -527,7 +527,7 @@

    Inherited members

    def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = True, **kwargs: Any, ) -> str: @@ -806,7 +806,7 @@

    Methods

    -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = True, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = True, **kwargs: Any) ‑> str

    Can't exit from root (if root)

    @@ -816,7 +816,7 @@

    Methods

    def send_config_set(
         self,
    -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
    +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
         exit_config_mode: bool = True,
         **kwargs: Any,
     ) -> str:
    diff --git a/docs/netmiko/mellanox/index.html b/docs/netmiko/mellanox/index.html
    index 7bf77e8a0..c4db642cd 100644
    --- a/docs/netmiko/mellanox/index.html
    +++ b/docs/netmiko/mellanox/index.html
    @@ -49,7 +49,7 @@ 

    Classes

    class MellanoxMlnxosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Mellanox MLNX-OS Switch support.

    diff --git a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html index 368a4f770..bf7a8bc32 100644 --- a/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html +++ b/docs/netmiko/mellanox/mellanox_mlnxos_ssh.html @@ -135,7 +135,7 @@

    Classes

    class MellanoxMlnxosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Mellanox MLNX-OS Switch support.

    diff --git a/docs/netmiko/mrv/index.html b/docs/netmiko/mrv/index.html index c8a455162..6318e65df 100644 --- a/docs/netmiko/mrv/index.html +++ b/docs/netmiko/mrv/index.html @@ -54,7 +54,7 @@

    Classes

    class MrvLxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    MRV Communications Driver (LX).

    @@ -315,7 +315,7 @@

    Inherited members

    class MrvOptiswitchSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    MRV Communications Driver (OptiSwitch).

    diff --git a/docs/netmiko/mrv/mrv_lx.html b/docs/netmiko/mrv/mrv_lx.html index 2392a4859..e2e00f810 100644 --- a/docs/netmiko/mrv/mrv_lx.html +++ b/docs/netmiko/mrv/mrv_lx.html @@ -85,7 +85,7 @@

    Classes

    class MrvLxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    MRV Communications Driver (LX).

    diff --git a/docs/netmiko/mrv/mrv_ssh.html b/docs/netmiko/mrv/mrv_ssh.html index 5b7d53d76..216509a1d 100644 --- a/docs/netmiko/mrv/mrv_ssh.html +++ b/docs/netmiko/mrv/mrv_ssh.html @@ -94,7 +94,7 @@

    Classes

    class MrvOptiswitchSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    MRV Communications Driver (OptiSwitch).

    diff --git a/docs/netmiko/netapp/index.html b/docs/netmiko/netapp/index.html index 46fc428fe..5208e5ce8 100644 --- a/docs/netmiko/netapp/index.html +++ b/docs/netmiko/netapp/index.html @@ -49,7 +49,7 @@

    Classes

    class NetAppcDotSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    diff --git a/docs/netmiko/netapp/netapp_cdot_ssh.html b/docs/netmiko/netapp/netapp_cdot_ssh.html index 1cf774341..84b50f189 100644 --- a/docs/netmiko/netapp/netapp_cdot_ssh.html +++ b/docs/netmiko/netapp/netapp_cdot_ssh.html @@ -81,7 +81,7 @@

    Classes

    class NetAppcDotSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

    Class for platforms that have no enable mode.

    diff --git a/docs/netmiko/no_enable.html b/docs/netmiko/no_enable.html index 2534109fe..8182af25d 100644 --- a/docs/netmiko/no_enable.html +++ b/docs/netmiko/no_enable.html @@ -120,6 +120,7 @@

    Subclasses

    • AccedianSSH
    • AlcatelAosSSH
    • +
    • AudiocodeShellBase
    • BrocadeFOSSSH
    • CdotCrosSSH
    • CienaSaosBase
    • diff --git a/docs/netmiko/nokia/index.html b/docs/netmiko/nokia/index.html index e6ce6f7d1..3489a2c81 100644 --- a/docs/netmiko/nokia/index.html +++ b/docs/netmiko/nokia/index.html @@ -59,7 +59,7 @@

      Classes

      class NokiaSrlSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with Nokia SRL devices for SSH.

      @@ -295,7 +295,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -407,7 +407,7 @@

      Methods

      -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

      Nokia SRL requires you not exit from configuration mode.

      @@ -417,7 +417,7 @@

      Methods

      def send_config_set(
           self,
      -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
      +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
           exit_config_mode: bool = False,
           **kwargs: Any,
       ) -> str:
      @@ -698,7 +698,7 @@ 

      Inherited members

      class NokiaSrosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Nokia SR OS SSH driver.

      @@ -870,7 +870,7 @@

      Inherited members

      class NokiaSrosTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Nokia SR OS Telnet driver.

      diff --git a/docs/netmiko/nokia/nokia_srl.html b/docs/netmiko/nokia/nokia_srl.html index 9013c670e..ef536899b 100644 --- a/docs/netmiko/nokia/nokia_srl.html +++ b/docs/netmiko/nokia/nokia_srl.html @@ -35,7 +35,7 @@

      Module netmiko.nokia.nokia_srl

      # https://github.com/ktbyers/netmiko/blob/develop/LICENSE import re -from typing import Any, Optional, Sequence, TextIO, Union +from typing import Any, Optional, Sequence, Iterator, TextIO, Union from netmiko import log from netmiko.no_enable import NoEnable from netmiko.base_connection import BaseConnection @@ -150,7 +150,7 @@

      Module netmiko.nokia.nokia_srl

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -204,7 +204,7 @@

      Classes

      class NokiaSrlSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with Nokia SRL devices for SSH.

      @@ -440,7 +440,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -552,7 +552,7 @@

      Methods

      -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

      Nokia SRL requires you not exit from configuration mode.

      @@ -562,7 +562,7 @@

      Methods

      def send_config_set(
           self,
      -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
      +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
           exit_config_mode: bool = False,
           **kwargs: Any,
       ) -> str:
      diff --git a/docs/netmiko/nokia/nokia_sros.html b/docs/netmiko/nokia/nokia_sros.html
      index 1d7740019..4fa16b720 100644
      --- a/docs/netmiko/nokia/nokia_sros.html
      +++ b/docs/netmiko/nokia/nokia_sros.html
      @@ -37,7 +37,7 @@ 

      Module netmiko.nokia.nokia_sros

      import re import os import time -from typing import Any, Optional, Union, Sequence, TextIO, Callable +from typing import Any, Optional, Union, Sequence, Iterator, TextIO, Callable from netmiko import log from netmiko.base_connection import BaseConnection @@ -81,7 +81,9 @@

      Module netmiko.nokia.nokia_sros

      else: # Classical CLI has no method to set the terminal width nor to disable command # complete on space; consequently, cmd_verify needs disabled. - self.global_cmd_verify = False + # Only disabled if not set under the ConnectHandler. + if self.global_cmd_verify is None: + self.global_cmd_verify = False self.disable_paging(command="environment no more", pattern="environment") # Clear the read buffer @@ -200,7 +202,7 @@

      Module netmiko.nokia.nokia_sros

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = None, **kwargs: Any, ) -> str: @@ -433,7 +435,7 @@

      Classes

      class NokiaSros -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with Nokia SR OS devices @@ -594,7 +596,9 @@

      Classes

      else: # Classical CLI has no method to set the terminal width nor to disable command # complete on space; consequently, cmd_verify needs disabled. - self.global_cmd_verify = False + # Only disabled if not set under the ConnectHandler. + if self.global_cmd_verify is None: + self.global_cmd_verify = False self.disable_paging(command="environment no more", pattern="environment") # Clear the read buffer @@ -713,7 +717,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = None, **kwargs: Any, ) -> str: @@ -1008,7 +1012,7 @@

      Methods

      -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = None, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = None, **kwargs: Any) ‑> str

      Model driven CLI requires you not exit from configuration mode.

      @@ -1018,7 +1022,7 @@

      Methods

      def send_config_set(
           self,
      -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
      +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
           exit_config_mode: bool = None,
           **kwargs: Any,
       ) -> str:
      @@ -1338,7 +1342,7 @@ 

      Inherited members

      class NokiaSrosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Nokia SR OS SSH driver.

      @@ -1510,7 +1514,7 @@

      Inherited members

      class NokiaSrosTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Nokia SR OS Telnet driver.

      diff --git a/docs/netmiko/ovs/index.html b/docs/netmiko/ovs/index.html index d2f5f3c1a..1b7920709 100644 --- a/docs/netmiko/ovs/index.html +++ b/docs/netmiko/ovs/index.html @@ -49,7 +49,7 @@

      Classes

      class OvsLinuxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/ovs/ovs_linux_ssh.html b/docs/netmiko/ovs/ovs_linux_ssh.html index 1aaf126a5..94acf563b 100644 --- a/docs/netmiko/ovs/ovs_linux_ssh.html +++ b/docs/netmiko/ovs/ovs_linux_ssh.html @@ -44,7 +44,7 @@

      Classes

      class OvsLinuxSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/paloalto/index.html b/docs/netmiko/paloalto/index.html index 6ffb5c23f..48ace0572 100644 --- a/docs/netmiko/paloalto/index.html +++ b/docs/netmiko/paloalto/index.html @@ -49,7 +49,7 @@

      Classes

      class PaloAltoPanosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with PaloAlto devices.

      @@ -242,7 +242,7 @@

      Inherited members

      class PaloAltoPanosTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with PaloAlto devices.

      diff --git a/docs/netmiko/paloalto/paloalto_panos.html b/docs/netmiko/paloalto/paloalto_panos.html index d62d8bf34..5e946f90a 100644 --- a/docs/netmiko/paloalto/paloalto_panos.html +++ b/docs/netmiko/paloalto/paloalto_panos.html @@ -293,7 +293,7 @@

      Classes

      class PaloAltoPanosBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with PaloAlto devices.

      @@ -924,7 +924,7 @@

      Inherited members

      class PaloAltoPanosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with PaloAlto devices.

      @@ -1117,7 +1117,7 @@

      Inherited members

      class PaloAltoPanosTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with PaloAlto devices.

      diff --git a/docs/netmiko/quanta/index.html b/docs/netmiko/quanta/index.html index 898d79c14..343285b22 100644 --- a/docs/netmiko/quanta/index.html +++ b/docs/netmiko/quanta/index.html @@ -49,7 +49,7 @@

      Classes

      class QuantaMeshSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/quanta/quanta_mesh_ssh.html b/docs/netmiko/quanta/quanta_mesh_ssh.html index 4ba8f38cf..1084b4b43 100644 --- a/docs/netmiko/quanta/quanta_mesh_ssh.html +++ b/docs/netmiko/quanta/quanta_mesh_ssh.html @@ -66,7 +66,7 @@

      Classes

      class QuantaMeshSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/rad/index.html b/docs/netmiko/rad/index.html index 567cec3b6..b0c280834 100644 --- a/docs/netmiko/rad/index.html +++ b/docs/netmiko/rad/index.html @@ -226,7 +226,7 @@

      Inherited members

      class RadETXTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      RAD ETX Telnet Support.

      diff --git a/docs/netmiko/rad/rad_etx.html b/docs/netmiko/rad/rad_etx.html index bb3a7d260..dc0c1f614 100644 --- a/docs/netmiko/rad/rad_etx.html +++ b/docs/netmiko/rad/rad_etx.html @@ -141,7 +141,7 @@

      Classes

      class RadETXBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      RAD ETX Support, Tested on RAD 203AX, 205A and 220A.

      @@ -632,7 +632,7 @@

      Inherited members

      class RadETXTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      RAD ETX Telnet Support.

      diff --git a/docs/netmiko/raisecom/index.html b/docs/netmiko/raisecom/index.html index 12f855256..692ca3bec 100644 --- a/docs/netmiko/raisecom/index.html +++ b/docs/netmiko/raisecom/index.html @@ -50,7 +50,7 @@

      Classes

      class RaisecomRoapSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      @@ -283,7 +283,7 @@

      Inherited members

      class RaisecomRoapTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/raisecom/raisecom_roap.html b/docs/netmiko/raisecom/raisecom_roap.html index 2f91259e0..a8d4852c8 100644 --- a/docs/netmiko/raisecom/raisecom_roap.html +++ b/docs/netmiko/raisecom/raisecom_roap.html @@ -198,7 +198,7 @@

      Classes

      class RaisecomRoapBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      @@ -441,7 +441,7 @@

      Inherited members

      class RaisecomRoapSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      @@ -674,7 +674,7 @@

      Inherited members

      class RaisecomRoapTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/ruckus/index.html b/docs/netmiko/ruckus/index.html index ca808e4fd..96c5dd7b8 100644 --- a/docs/netmiko/ruckus/index.html +++ b/docs/netmiko/ruckus/index.html @@ -50,7 +50,7 @@

      Classes

      class RuckusFastironSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Ruckus FastIron aka ICX support.

      diff --git a/docs/netmiko/ruckus/ruckus_fastiron.html b/docs/netmiko/ruckus/ruckus_fastiron.html index 7a22001be..f75e66d40 100644 --- a/docs/netmiko/ruckus/ruckus_fastiron.html +++ b/docs/netmiko/ruckus/ruckus_fastiron.html @@ -149,7 +149,7 @@

      Classes

      class RuckusFastironBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Ruckus FastIron aka ICX support.

      @@ -498,7 +498,7 @@

      Inherited members

      class RuckusFastironSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Ruckus FastIron aka ICX support.

      diff --git a/docs/netmiko/ruijie/index.html b/docs/netmiko/ruijie/index.html index b22cfac3a..e942ac255 100644 --- a/docs/netmiko/ruijie/index.html +++ b/docs/netmiko/ruijie/index.html @@ -49,7 +49,7 @@

      Classes

      class RuijieOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/ruijie/ruijie_os.html b/docs/netmiko/ruijie/ruijie_os.html index a7d61ff16..dc0085845 100644 --- a/docs/netmiko/ruijie/ruijie_os.html +++ b/docs/netmiko/ruijie/ruijie_os.html @@ -79,7 +79,7 @@

      Classes

      class RuijieOSBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      @@ -313,7 +313,7 @@

      Inherited members

      class RuijieOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/sixwind/index.html b/docs/netmiko/sixwind/index.html index 7f4ddb656..28d9e6824 100644 --- a/docs/netmiko/sixwind/index.html +++ b/docs/netmiko/sixwind/index.html @@ -49,7 +49,7 @@

      Classes

      class SixwindOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      diff --git a/docs/netmiko/sixwind/sixwind_os.html b/docs/netmiko/sixwind/sixwind_os.html index 1bb7eb40c..f11f72163 100644 --- a/docs/netmiko/sixwind/sixwind_os.html +++ b/docs/netmiko/sixwind/sixwind_os.html @@ -151,7 +151,7 @@

      Classes

      class SixwindOSBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      @@ -590,7 +590,7 @@

      Inherited members

      class SixwindOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      diff --git a/docs/netmiko/sophos/index.html b/docs/netmiko/sophos/index.html index 85d148422..5d4f6b4d8 100644 --- a/docs/netmiko/sophos/index.html +++ b/docs/netmiko/sophos/index.html @@ -49,7 +49,7 @@

      Classes

      class SophosSfosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      diff --git a/docs/netmiko/sophos/sophos_sfos_ssh.html b/docs/netmiko/sophos/sophos_sfos_ssh.html index 47f51f0ce..4362e3d12 100644 --- a/docs/netmiko/sophos/sophos_sfos_ssh.html +++ b/docs/netmiko/sophos/sophos_sfos_ssh.html @@ -79,7 +79,7 @@

      Classes

      class SophosSfosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      diff --git a/docs/netmiko/ssh_autodetect.html b/docs/netmiko/ssh_autodetect.html index aae6d5ca3..b56a63dc6 100644 --- a/docs/netmiko/ssh_autodetect.html +++ b/docs/netmiko/ssh_autodetect.html @@ -314,6 +314,12 @@

      Netmiko connection creation section "priority": 99, "dispatch": "_autodetect_std", }, + "flexvnf": { + "cmd": "show system package-info", + "search_patterns": [r"Versa FlexVNF"], + "priority": 99, + "dispatch": "_autodetect_std", + }, } # Sort SSH_MAPPER_DICT such that the most common commands are first diff --git a/docs/netmiko/supermicro/index.html b/docs/netmiko/supermicro/index.html index 7bb350bd8..32d424896 100644 --- a/docs/netmiko/supermicro/index.html +++ b/docs/netmiko/supermicro/index.html @@ -49,7 +49,7 @@

      Classes

      class SmciSwitchSmisSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      @@ -228,7 +228,7 @@

      Inherited members

      class SmciSwitchSmisTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      diff --git a/docs/netmiko/supermicro/smci_smis.html b/docs/netmiko/supermicro/smci_smis.html index 46ca4b754..8bcd9d5cd 100644 --- a/docs/netmiko/supermicro/smci_smis.html +++ b/docs/netmiko/supermicro/smci_smis.html @@ -79,7 +79,7 @@

      Classes

      class SmciSwitchSmisBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      @@ -331,7 +331,7 @@

      Inherited members

      class SmciSwitchSmisSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      @@ -510,7 +510,7 @@

      Inherited members

      class SmciSwitchSmisTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      diff --git a/docs/netmiko/terminal_server/index.html b/docs/netmiko/terminal_server/index.html index 90bf923ff..d873ec193 100644 --- a/docs/netmiko/terminal_server/index.html +++ b/docs/netmiko/terminal_server/index.html @@ -50,7 +50,7 @@

      Classes

      class TerminalServerSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Generic Terminal Server driver SSH.

      @@ -222,7 +222,7 @@

      Inherited members

      class TerminalServerTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Generic Terminal Server driver telnet.

      diff --git a/docs/netmiko/terminal_server/terminal_server.html b/docs/netmiko/terminal_server/terminal_server.html index 3ebdc59e0..956432450 100644 --- a/docs/netmiko/terminal_server/terminal_server.html +++ b/docs/netmiko/terminal_server/terminal_server.html @@ -73,7 +73,7 @@

      Classes

      class TerminalServer -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Generic Terminal Server driver.

      @@ -273,7 +273,7 @@

      Inherited members

      class TerminalServerSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Generic Terminal Server driver SSH.

      @@ -445,7 +445,7 @@

      Inherited members

      class TerminalServerTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Generic Terminal Server driver telnet.

      diff --git a/docs/netmiko/ubiquiti/edge_ssh.html b/docs/netmiko/ubiquiti/edge_ssh.html index 505160bf5..8d7b1e8b0 100644 --- a/docs/netmiko/ubiquiti/edge_ssh.html +++ b/docs/netmiko/ubiquiti/edge_ssh.html @@ -124,7 +124,7 @@

      Classes

      class UbiquitiEdgeSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implements support for Ubiquity EdgeSwitch devices.

      diff --git a/docs/netmiko/ubiquiti/edgerouter_ssh.html b/docs/netmiko/ubiquiti/edgerouter_ssh.html index 0808fa794..d0e25d43d 100644 --- a/docs/netmiko/ubiquiti/edgerouter_ssh.html +++ b/docs/netmiko/ubiquiti/edgerouter_ssh.html @@ -66,7 +66,7 @@

      Classes

      class UbiquitiEdgeRouterSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with EdgeOS EdgeRouter network devices.

      diff --git a/docs/netmiko/ubiquiti/index.html b/docs/netmiko/ubiquiti/index.html index c55b63e7d..0ccd17b6d 100644 --- a/docs/netmiko/ubiquiti/index.html +++ b/docs/netmiko/ubiquiti/index.html @@ -63,7 +63,7 @@

      Classes

      class UbiquitiEdgeRouterSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with EdgeOS EdgeRouter network devices.

      @@ -257,7 +257,7 @@

      Inherited members

      class UbiquitiEdgeSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implements support for Ubiquity EdgeSwitch devices.

      @@ -625,7 +625,7 @@

      Inherited members

      class UbiquitiUnifiSwitchSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implements support for Ubiquity EdgeSwitch devices.

      diff --git a/docs/netmiko/ubiquiti/unifiswitch_ssh.html b/docs/netmiko/ubiquiti/unifiswitch_ssh.html index e69e5bd1b..90ca95ef9 100644 --- a/docs/netmiko/ubiquiti/unifiswitch_ssh.html +++ b/docs/netmiko/ubiquiti/unifiswitch_ssh.html @@ -79,7 +79,7 @@

      Classes

      class UbiquitiUnifiSwitchSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implements support for Ubiquity EdgeSwitch devices.

      diff --git a/docs/netmiko/utilities.html b/docs/netmiko/utilities.html index f1e75721c..9aa2b7c93 100644 --- a/docs/netmiko/utilities.html +++ b/docs/netmiko/utilities.html @@ -252,16 +252,12 @@

      Module netmiko.utilities

      return (netmiko_base_dir, netmiko_full_dir) -def write_bytes(out_data: AnyStr, encoding: str = "ascii") -> bytes: - """Legacy for Python2 and Python3 compatible byte stream.""" - if sys.version_info[0] >= 3: - if isinstance(out_data, str): - if encoding == "utf-8": - return out_data.encode("utf-8") - else: - return out_data.encode("ascii", "ignore") - elif isinstance(out_data, bytes): - return out_data +def write_bytes(out_data: AnyStr, encoding: str = "utf-8") -> bytes: + """Ensure output is properly encoded bytes.""" + if isinstance(out_data, str): + return out_data.encode(encoding) + elif isinstance(out_data, bytes): + return out_data msg = f"Invalid value for out_data neither unicode nor byte string: {str(out_data)}" raise ValueError(msg) @@ -1494,24 +1490,20 @@

      Functions

      -def write_bytes(out_data: ~AnyStr, encoding: str = 'ascii') ‑> bytes +def write_bytes(out_data: ~AnyStr, encoding: str = 'utf-8') ‑> bytes
      -

      Legacy for Python2 and Python3 compatible byte stream.

      +

      Ensure output is properly encoded bytes.

      Expand source code -
      def write_bytes(out_data: AnyStr, encoding: str = "ascii") -> bytes:
      -    """Legacy for Python2 and Python3 compatible byte stream."""
      -    if sys.version_info[0] >= 3:
      -        if isinstance(out_data, str):
      -            if encoding == "utf-8":
      -                return out_data.encode("utf-8")
      -            else:
      -                return out_data.encode("ascii", "ignore")
      -        elif isinstance(out_data, bytes):
      -            return out_data
      +
      def write_bytes(out_data: AnyStr, encoding: str = "utf-8") -> bytes:
      +    """Ensure output is properly encoded bytes."""
      +    if isinstance(out_data, str):
      +        return out_data.encode(encoding)
      +    elif isinstance(out_data, bytes):
      +        return out_data
           msg = f"Invalid value for out_data neither unicode nor byte string: {str(out_data)}"
           raise ValueError(msg)
      diff --git a/docs/netmiko/vyos/index.html b/docs/netmiko/vyos/index.html index 596c68356..904d5c50c 100644 --- a/docs/netmiko/vyos/index.html +++ b/docs/netmiko/vyos/index.html @@ -49,7 +49,7 @@

      Classes

      class VyOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with VyOS network devices.

      @@ -276,7 +276,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -412,7 +412,7 @@

      Methods

      -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

      Remain in configuration mode.

      @@ -422,7 +422,7 @@

      Methods

      def send_config_set(
           self,
      -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
      +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
           exit_config_mode: bool = False,
           **kwargs: Any,
       ) -> str:
      diff --git a/docs/netmiko/vyos/vyos_ssh.html b/docs/netmiko/vyos/vyos_ssh.html
      index 5d16530c3..51c13650e 100644
      --- a/docs/netmiko/vyos/vyos_ssh.html
      +++ b/docs/netmiko/vyos/vyos_ssh.html
      @@ -26,7 +26,7 @@ 

      Module netmiko.vyos.vyos_ssh

      Expand source code -
      from typing import Optional, Union, Sequence, TextIO, Any
      +
      from typing import Optional, Union, Sequence, Iterator, TextIO, Any
       import time
       import warnings
       import re
      @@ -151,7 +151,7 @@ 

      Module netmiko.vyos.vyos_ssh

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -183,7 +183,7 @@

      Classes

      class VyOSSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implement methods for interacting with VyOS network devices.

      @@ -410,7 +410,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, **kwargs: Any, ) -> str: @@ -546,7 +546,7 @@

      Methods

      -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, **kwargs: Any) ‑> str

      Remain in configuration mode.

      @@ -556,7 +556,7 @@

      Methods

      def send_config_set(
           self,
      -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
      +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
           exit_config_mode: bool = False,
           **kwargs: Any,
       ) -> str:
      diff --git a/docs/netmiko/watchguard/fireware_ssh.html b/docs/netmiko/watchguard/fireware_ssh.html
      index 673592fe6..26553d066 100644
      --- a/docs/netmiko/watchguard/fireware_ssh.html
      +++ b/docs/netmiko/watchguard/fireware_ssh.html
      @@ -83,7 +83,7 @@ 

      Classes

      class WatchguardFirewareSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implements methods for communicating with Watchguard Firebox firewalls.

      diff --git a/docs/netmiko/watchguard/index.html b/docs/netmiko/watchguard/index.html index 75b40aa4e..bcd31d359 100644 --- a/docs/netmiko/watchguard/index.html +++ b/docs/netmiko/watchguard/index.html @@ -49,7 +49,7 @@

      Classes

      class WatchguardFirewareSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Implements methods for communicating with Watchguard Firebox firewalls.

      diff --git a/docs/netmiko/yamaha/index.html b/docs/netmiko/yamaha/index.html index f8f64973b..cd72bde51 100644 --- a/docs/netmiko/yamaha/index.html +++ b/docs/netmiko/yamaha/index.html @@ -50,7 +50,7 @@

      Classes

      class YamahaSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Yamaha SSH driver.

      diff --git a/docs/netmiko/yamaha/yamaha.html b/docs/netmiko/yamaha/yamaha.html index ce141ee17..4af4182f1 100644 --- a/docs/netmiko/yamaha/yamaha.html +++ b/docs/netmiko/yamaha/yamaha.html @@ -132,7 +132,7 @@

      Classes

      class YamahaBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Defines vendor independent methods.

      @@ -475,7 +475,7 @@

      Inherited members

      class YamahaSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Yamaha SSH driver.

      diff --git a/docs/netmiko/zte/index.html b/docs/netmiko/zte/index.html index 651e8f62d..232b0a093 100644 --- a/docs/netmiko/zte/index.html +++ b/docs/netmiko/zte/index.html @@ -50,7 +50,7 @@

      Classes

      class ZteZxrosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      @@ -221,7 +221,7 @@

      Inherited members

      class ZteZxrosTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/zte/zte_zxros.html b/docs/netmiko/zte/zte_zxros.html index 6b54a5c76..72f3a0b19 100644 --- a/docs/netmiko/zte/zte_zxros.html +++ b/docs/netmiko/zte/zte_zxros.html @@ -105,7 +105,7 @@

      Classes

      class ZteZxrosBase -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      @@ -358,7 +358,7 @@

      Inherited members

      class ZteZxrosSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      @@ -529,7 +529,7 @@

      Inherited members

      class ZteZxrosTelnet -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Base Class for cisco-like behavior.

      diff --git a/docs/netmiko/zyxel/index.html b/docs/netmiko/zyxel/index.html index 8cfaac954..8f0a628b1 100644 --- a/docs/netmiko/zyxel/index.html +++ b/docs/netmiko/zyxel/index.html @@ -50,7 +50,7 @@

      Classes

      class ZyxelSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      @@ -175,7 +175,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any @@ -218,7 +218,7 @@

      Methods

      -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any) ‑> str

      No config mode on Zyxel

      @@ -228,7 +228,7 @@

      Methods

      def send_config_set(
           self,
      -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
      +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
           exit_config_mode: bool = False,
           enter_config_mode: bool = False,
           **kwargs: Any
      diff --git a/docs/netmiko/zyxel/zyxel_ssh.html b/docs/netmiko/zyxel/zyxel_ssh.html
      index e6ad58db4..b984e9ec4 100644
      --- a/docs/netmiko/zyxel/zyxel_ssh.html
      +++ b/docs/netmiko/zyxel/zyxel_ssh.html
      @@ -26,7 +26,7 @@ 

      Module netmiko.zyxel.zyxel_ssh

      Expand source code -
      from typing import Any, Sequence, TextIO, Union
      +
      from typing import Any, Sequence, Iterator, TextIO, Union
       from netmiko.cisco_base_connection import CiscoSSHConnection
       from netmiko.no_enable import NoEnable
       from netmiko.no_config import NoConfig
      @@ -39,7 +39,7 @@ 

      Module netmiko.zyxel.zyxel_ssh

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any @@ -69,7 +69,7 @@

      Classes

      class ZyxelSSH -(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'ascii', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False) +(ip: str = '', host: str = '', username: str = '', password: Optional[str] = None, secret: str = '', port: Optional[int] = None, device_type: str = '', verbose: bool = False, global_delay_factor: float = 1.0, global_cmd_verify: Optional[bool] = None, use_keys: bool = False, key_file: Optional[str] = None, pkey: Optional[paramiko.pkey.PKey] = None, passphrase: Optional[str] = None, disabled_algorithms: Optional[Dict[str, Any]] = None, allow_agent: bool = False, ssh_strict: bool = False, system_host_keys: bool = False, alt_host_keys: bool = False, alt_key_file: str = '', ssh_config_file: Optional[str] = None, conn_timeout: int = 10, auth_timeout: Optional[int] = None, banner_timeout: int = 15, blocking_timeout: int = 20, timeout: int = 100, session_timeout: int = 60, read_timeout_override: Optional[float] = None, keepalive: int = 0, default_enter: Optional[str] = None, response_return: Optional[str] = None, serial_settings: Optional[Dict[str, Any]] = None, fast_cli: bool = True, session_log: Optional[SessionLog] = None, session_log_record_writes: bool = False, session_log_file_mode: str = 'write', allow_auto_change: bool = False, encoding: str = 'utf-8', sock: Optional[socket.socket] = None, auto_connect: bool = True, delay_factor_compat: bool = False)

      Class for platforms that have no enable mode.

      @@ -194,7 +194,7 @@

      Classes

      def send_config_set( self, - config_commands: Union[str, Sequence[str], TextIO, None] = None, + config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any @@ -237,7 +237,7 @@

      Methods

      -def send_config_set(self, config_commands: Union[str, Sequence[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any) ‑> str +def send_config_set(self, config_commands: Union[str, Sequence[str], Iterator[str], TextIO, ForwardRef(None)] = None, exit_config_mode: bool = False, enter_config_mode: bool = False, **kwargs: Any) ‑> str

      No config mode on Zyxel

      @@ -247,7 +247,7 @@

      Methods

      def send_config_set(
           self,
      -    config_commands: Union[str, Sequence[str], TextIO, None] = None,
      +    config_commands: Union[str, Sequence[str], Iterator[str], TextIO, None] = None,
           exit_config_mode: bool = False,
           enter_config_mode: bool = False,
           **kwargs: Any
      diff --git a/netmiko/__init__.py b/netmiko/__init__.py
      index 3b3f80637..ce656cf8b 100644
      --- a/netmiko/__init__.py
      +++ b/netmiko/__init__.py
      @@ -1,6 +1,6 @@
       import sys
       
      -__version__ = "4.1.1"
      +__version__ = "4.1.2"
       PY_MAJ_VER = 3
       PY_MIN_VER = 7
       MIN_PYTHON_VER = "3.7"