Skip to content

Commit fbcd501

Browse files
authored
Merge branch 'ktbyers:develop' into develop
2 parents a46a7ff + a8fb494 commit fbcd501

File tree

118 files changed

+18017
-1790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+18017
-1790
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ bin/.netmiko.cfg
2626

2727
# Virtual Environment files
2828
.venv/
29+
.venv_old/
2930
bin/
3031
lib/
3132
pyvenv.cfg

MANIFEST.in

Lines changed: 0 additions & 5 deletions
This file was deleted.

PLATFORMS.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
- Dell OS9 (Force10)
3333
- Dell OS10
3434
- Dell PowerConnect
35+
- Ekinops 360
3536
- Ericsson IPOS
3637
- Ericsson MINI-LINK 66XX & 63XX
3738
- Extreme ERS (Avaya)
@@ -46,6 +47,7 @@
4647
- Huawei
4748
- Huawei OLT
4849
- Huawei SmartAX
50+
- Infinera Packet
4951
- IP Infusion OcNOS
5052
- Juniper ScreenOS
5153
- Maipu
@@ -79,19 +81,25 @@
7981
- Arris CER
8082
- Aruba OS (Wireless Controllers/WAPs)
8183
- Aruba AOS-CX
84+
- AsterFusion AsterNOS SONiC
8285
- Bintec BOSS (Bintec/Funkwerk)
8386
- Brocade Fabric OS
8487
- C-DOT CROS
8588
- Ciena SAOS
89+
- Ciena SAOS10
90+
- Ciena Waveserver
8691
- Citrix Netscaler
8792
- Cisco APIC (Linux)
8893
- Cisco Telepresence
8994
- Cisco Viptela
9095
- Check Point GAiA
96+
- Corelight Linux
9197
- Coriant
98+
- Cumulus VX Linux
9299
- Dell OS6
93100
- Dell EMC Isilon
94101
- Digi TransPort Routers
102+
- Edgecore SONiC
95103
- Eltex
96104
- Enterasys
97105
- Endace
@@ -100,18 +108,24 @@
100108
- Extreme SLX (Brocade)
101109
- F5 TMSH
102110
- F5 Linux
111+
- Fiberstore NetworkOS
112+
- Fiberstore FS-OS (V2)
103113
- Fortinet
104114
- Garderos GRS
105115
- Genexis Saturn SOLT33 (telnet only)
116+
- Lancom LCOS SX4
106117
- MRV Communications OptiSwitch
107118
- MRV LX
108119
- Nokia/Alcatel SR-OS
109120
- Nokia SR Linux
121+
- Perle IOLAN Console Server
110122
- Optilink EOLT 9702 (telnet only)
111123
- QuantaMesh
112124
- Rad ETX
113125
- Raisecom ROAP
126+
- Silver Peak VXOA
114127
- Sophos SFOS
128+
- Telco Systems BiNOS
115129
- Ubiquiti Unifi Switch
116130
- Versa Networks FlexVNF
117131
- Vertiv MPH Power Distribution Units
@@ -138,6 +152,7 @@
138152
- aruba_os
139153
- aruba_osswitch
140154
- aruba_procurve
155+
- asterfusion_asternos
141156
- audiocode_66
142157
- audiocode_72
143158
- audiocode_shell
@@ -157,6 +172,8 @@
157172
- centec_os
158173
- checkpoint_gaia
159174
- ciena_saos
175+
- ciena_saos10
176+
- ciena_waveserver
160177
- cisco_apic
161178
- cisco_asa
162179
- cisco_ftd
@@ -170,7 +187,9 @@
170187
- cisco_xe
171188
- cisco_xr
172189
- cloudgenix_ion
190+
- corelight_linux
173191
- coriant
192+
- cumulus_linux
174193
- dell_dnos9
175194
- dell_force10
176195
- dell_isilon
@@ -181,6 +200,8 @@
181200
- dell_sonic
182201
- digi_transport
183202
- dlink_ds
203+
- edgecore_sonic
204+
- ekinops_ek360
184205
- eltex
185206
- eltex_esr
186207
- endace
@@ -202,25 +223,31 @@
202223
- f5_ltm
203224
- f5_tmsh
204225
- fiberstore_fsos
226+
- fiberstore_fsosv2
227+
- fiberstore_networkos
205228
- flexvnf
206229
- fortinet
207230
- garderos_grs
208231
- generic
209232
- generic_termserver
233+
- h3c_comware
210234
- hillstone_stoneos
211235
- hp_comware
212236
- hp_procurve
213237
- huawei
214238
- huawei_olt
215239
- huawei_smartax
240+
- huawei_smartaxmmi
216241
- huawei_vrp
217242
- huawei_vrpv8
243+
- infinera_packet
218244
- ipinfusion_ocnos
219245
- juniper
220246
- juniper_junos
221247
- juniper_screenos
222248
- keymile
223249
- keymile_nos
250+
- lancom_lcossx4
224251
- linux
225252
- maipu
226253
- mellanox
@@ -229,6 +256,7 @@
229256
- mikrotik_switchos
230257
- mrv_lx
231258
- mrv_optiswitch
259+
- nec_ix
232260
- netapp_cdot
233261
- netgear_prosafe
234262
- netscaler
@@ -243,9 +271,11 @@
243271
- raisecom_roap
244272
- ruckus_fastiron
245273
- ruijie_os
274+
- silverpeak_vxoa
246275
- sixwind_os
247276
- sophos_sfos
248277
- supermicro_smis
278+
- telcosystems_binos
249279
- teldat_cit
250280
- tplink_jetstream
251281
- ubiquiti_edge
@@ -276,6 +306,7 @@
276306
- centec_os_telnet
277307
- ciena_saos_telnet
278308
- cisco_ios_telnet
309+
- cisco_nxos_telnet
279310
- cisco_s200_telnet
280311
- cisco_s300_telnet
281312
- cisco_xr_telnet
@@ -285,32 +316,38 @@
285316
- extreme_exos_telnet
286317
- extreme_netiron_telnet
287318
- extreme_telnet
319+
- fiberstore_fsosv2_telnet
288320
- generic_telnet
289321
- generic_termserver_telnet
290322
- genexis_solt33_telnet
291323
- hp_comware_telnet
292324
- hp_procurve_telnet
293325
- huawei_olt_telnet
294326
- huawei_telnet
327+
- infinera_packet_telnet
295328
- ipinfusion_ocnos_telnet
296329
- juniper_junos_telnet
297330
- maipu_telnet
331+
- nec_ix_telnet
298332
- nokia_sros_telnet
299333
- oneaccess_oneos_telnet
334+
- optilink_eolt11444_telnet
300335
- optilink_eolt9702_telnet
301336
- paloalto_panos_telnet
302337
- rad_etx_telnet
303338
- raisecom_telnet
304339
- ruckus_fastiron_telnet
305340
- ruijie_os_telnet
306341
- supermicro_smis_telnet
342+
- telcosystems_binos_telnet
307343
- teldat_cit_telnet
308344
- tplink_jetstream_telnet
309345
- yamaha_telnet
310346
- zte_zxros_telnet
311347

312348
###### Supported Secure Copy device_type values
313349

350+
- aruba_os
314351
- arista_eos
315352
- ciena_saos
316353
- cisco_asa
@@ -319,9 +356,11 @@
319356
- cisco_xe
320357
- cisco_xr
321358
- dell_os10
359+
- dell_sonic
322360
- extreme_exos
323361
- juniper_junos
324362
- linux
325-
- mikrotik_routeros
326363
- nokia_sros
364+
- mikrotik_routeros
327365
- ubiquiti_edgerouter
366+

docs/netmiko/a10/a10_ssh.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,27 @@ <h2 class="section-title" id="header-classes">Classes</h2>
178178
# self.set_terminal_width()
179179
self.disable_paging(command=&#34;terminal length 0&#34;)
180180

181+
def check_config_mode(
182+
self, check_string: str = &#34;)#&#34;, pattern: str = &#34;)#&#34;, force_regex: bool = False
183+
) -&gt; bool:
184+
self.write_channel(self.RETURN)
185+
186+
# You can encounter an issue here (on router name changes) prefer delay-based solution
187+
if not pattern:
188+
output = self.read_channel_timing(read_timeout=10.0)
189+
else:
190+
output = self.read_until_pattern(pattern=pattern)
191+
192+
# A10 can do this &#39;LBR1_PROD-EXT_(NOLICENSE)#&#39; when not licensed (e.g. gns3)
193+
# Example, config: LBR1_PROD-EXT_(config)(NOLICENSE)#
194+
# Example, outside of config LBR1_PROD-EXT_(NOLICENSE)#
195+
output = output.replace(&#34;(NOLICENSE)&#34;, &#34;&#34;)
196+
197+
if force_regex:
198+
return bool(re.search(check_string, output))
199+
else:
200+
return check_string in output
201+
181202
def save_config(
182203
self, cmd: str = &#34;&#34;, confirm: bool = False, confirm_response: str = &#34;&#34;
183204
) -&gt; str:

docs/netmiko/a10/index.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,27 @@ <h2 class="section-title" id="header-classes">Classes</h2>
184184
# self.set_terminal_width()
185185
self.disable_paging(command=&#34;terminal length 0&#34;)
186186

187+
def check_config_mode(
188+
self, check_string: str = &#34;)#&#34;, pattern: str = &#34;)#&#34;, force_regex: bool = False
189+
) -&gt; bool:
190+
self.write_channel(self.RETURN)
191+
192+
# You can encounter an issue here (on router name changes) prefer delay-based solution
193+
if not pattern:
194+
output = self.read_channel_timing(read_timeout=10.0)
195+
else:
196+
output = self.read_until_pattern(pattern=pattern)
197+
198+
# A10 can do this &#39;LBR1_PROD-EXT_(NOLICENSE)#&#39; when not licensed (e.g. gns3)
199+
# Example, config: LBR1_PROD-EXT_(config)(NOLICENSE)#
200+
# Example, outside of config LBR1_PROD-EXT_(NOLICENSE)#
201+
output = output.replace(&#34;(NOLICENSE)&#34;, &#34;&#34;)
202+
203+
if force_regex:
204+
return bool(re.search(check_string, output))
205+
else:
206+
return check_string in output
207+
187208
def save_config(
188209
self, cmd: str = &#34;&#34;, confirm: bool = False, confirm_response: str = &#34;&#34;
189210
) -&gt; str:

docs/netmiko/arista/arista.html

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,12 @@ <h2 class="section-title" id="header-classes">Classes</h2>
171171
&#34;&#34;&#34;Prepare the session after the connection has been established.&#34;&#34;&#34;
172172
self.ansi_escape_codes = True
173173
self._test_channel_read(pattern=self.prompt_pattern)
174-
cmd = &#34;terminal width 511&#34;
175-
self.set_terminal_width(command=cmd, pattern=r&#34;Width set to&#34;)
174+
try:
175+
cmd = &#34;terminal width 511&#34;
176+
self.set_terminal_width(command=cmd, pattern=r&#34;Width set to&#34;)
177+
except NetmikoTimeoutException:
178+
# Continue on if setting &#39;terminal width&#39; fails
179+
pass
176180
self.disable_paging(cmd_verify=False, pattern=r&#34;Pagination disabled&#34;)
177181
self.set_base_prompt()
178182

@@ -369,6 +373,8 @@ <h3>Inherited members</h3>
369373
<pre><code class="python">class AristaFileTransfer(CiscoFileTransfer):
370374
&#34;&#34;&#34;Arista SCP File Transfer driver.&#34;&#34;&#34;
371375

376+
prompt_pattern = r&#34;[$&gt;#]&#34;
377+
372378
def __init__(
373379
self,
374380
ssh_conn: &#34;BaseConnection&#34;,
@@ -389,6 +395,7 @@ <h3>Inherited members</h3>
389395

390396
def remote_space_available(self, search_pattern: str = &#34;&#34;) -&gt; int:
391397
&#34;&#34;&#34;Return space available on remote device.&#34;&#34;&#34;
398+
search_pattern = self.prompt_pattern
392399
return self._remote_space_available_unix(search_pattern=search_pattern)
393400

394401
def check_file_exists(self, remote_cmd: str = &#34;&#34;) -&gt; bool:
@@ -427,6 +434,13 @@ <h3>Ancestors</h3>
427434
<li><a title="netmiko.cisco_base_connection.CiscoFileTransfer" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoFileTransfer">CiscoFileTransfer</a></li>
428435
<li><a title="netmiko.scp_handler.BaseFileTransfer" href="../scp_handler.html#netmiko.scp_handler.BaseFileTransfer">BaseFileTransfer</a></li>
429436
</ul>
437+
<h3>Class variables</h3>
438+
<dl>
439+
<dt id="netmiko.arista.arista.AristaFileTransfer.prompt_pattern"><code class="name">var <span class="ident">prompt_pattern</span></code></dt>
440+
<dd>
441+
<div class="desc"></div>
442+
</dd>
443+
</dl>
430444
<h3>Inherited members</h3>
431445
<ul class="hlist">
432446
<li><code><b><a title="netmiko.cisco_base_connection.CiscoFileTransfer" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoFileTransfer">CiscoFileTransfer</a></b></code>:
@@ -858,6 +872,9 @@ <h4><code><a title="netmiko.arista.arista.AristaBase" href="#netmiko.arista.aris
858872
</li>
859873
<li>
860874
<h4><code><a title="netmiko.arista.arista.AristaFileTransfer" href="#netmiko.arista.arista.AristaFileTransfer">AristaFileTransfer</a></code></h4>
875+
<ul class="">
876+
<li><code><a title="netmiko.arista.arista.AristaFileTransfer.prompt_pattern" href="#netmiko.arista.arista.AristaFileTransfer.prompt_pattern">prompt_pattern</a></code></li>
877+
</ul>
861878
</li>
862879
<li>
863880
<h4><code><a title="netmiko.arista.arista.AristaSSH" href="#netmiko.arista.arista.AristaSSH">AristaSSH</a></code></h4>

docs/netmiko/arista/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ <h2 class="section-title" id="header-classes">Classes</h2>
5555
<pre><code class="python">class AristaFileTransfer(CiscoFileTransfer):
5656
&#34;&#34;&#34;Arista SCP File Transfer driver.&#34;&#34;&#34;
5757

58+
prompt_pattern = r&#34;[$&gt;#]&#34;
59+
5860
def __init__(
5961
self,
6062
ssh_conn: &#34;BaseConnection&#34;,
@@ -75,6 +77,7 @@ <h2 class="section-title" id="header-classes">Classes</h2>
7577

7678
def remote_space_available(self, search_pattern: str = &#34;&#34;) -&gt; int:
7779
&#34;&#34;&#34;Return space available on remote device.&#34;&#34;&#34;
80+
search_pattern = self.prompt_pattern
7881
return self._remote_space_available_unix(search_pattern=search_pattern)
7982

8083
def check_file_exists(self, remote_cmd: str = &#34;&#34;) -&gt; bool:
@@ -113,6 +116,13 @@ <h3>Ancestors</h3>
113116
<li><a title="netmiko.cisco_base_connection.CiscoFileTransfer" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoFileTransfer">CiscoFileTransfer</a></li>
114117
<li><a title="netmiko.scp_handler.BaseFileTransfer" href="../scp_handler.html#netmiko.scp_handler.BaseFileTransfer">BaseFileTransfer</a></li>
115118
</ul>
119+
<h3>Class variables</h3>
120+
<dl>
121+
<dt id="netmiko.arista.AristaFileTransfer.prompt_pattern"><code class="name">var <span class="ident">prompt_pattern</span></code></dt>
122+
<dd>
123+
<div class="desc"></div>
124+
</dd>
125+
</dl>
116126
<h3>Inherited members</h3>
117127
<ul class="hlist">
118128
<li><code><b><a title="netmiko.cisco_base_connection.CiscoFileTransfer" href="../cisco_base_connection.html#netmiko.cisco_base_connection.CiscoFileTransfer">CiscoFileTransfer</a></b></code>:
@@ -539,6 +549,9 @@ <h3>Inherited members</h3>
539549
<ul>
540550
<li>
541551
<h4><code><a title="netmiko.arista.AristaFileTransfer" href="#netmiko.arista.AristaFileTransfer">AristaFileTransfer</a></code></h4>
552+
<ul class="">
553+
<li><code><a title="netmiko.arista.AristaFileTransfer.prompt_pattern" href="#netmiko.arista.AristaFileTransfer.prompt_pattern">prompt_pattern</a></code></li>
554+
</ul>
542555
</li>
543556
<li>
544557
<h4><code><a title="netmiko.arista.AristaSSH" href="#netmiko.arista.AristaSSH">AristaSSH</a></code></h4>

0 commit comments

Comments
 (0)