scrapli 2.0.0a4__py3-none-manylinux2010_x86_64.whl → 2.0.0a5__py3-none-manylinux2010_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scrapli/__init__.py +5 -6
- scrapli/auth.py +14 -7
- scrapli/cli.py +300 -0
- scrapli/cli_parse.py +1 -1
- scrapli/cli_result.py +42 -0
- scrapli/definitions/aethra_atosnt.yaml +9 -0
- scrapli/definitions/alcatel_aos.yaml +9 -0
- scrapli/definitions/arista_eos.yaml +1 -0
- scrapli/definitions/aruba_aoscx.yaml +33 -0
- scrapli/definitions/cisco_aireos.yaml +31 -0
- scrapli/definitions/cisco_asa.yaml +48 -0
- scrapli/definitions/cisco_cbs.yaml +50 -0
- scrapli/definitions/cisco_ftd.yaml +42 -0
- scrapli/definitions/cisco_nxos.yaml +2 -0
- scrapli/definitions/cumulus_linux.yaml +28 -0
- scrapli/definitions/cumulus_vtysh.yaml +42 -0
- scrapli/definitions/datacom_dmos.yaml +30 -0
- scrapli/definitions/datacom_dmswitch.yaml +32 -0
- scrapli/definitions/default.yaml +9 -0
- scrapli/definitions/dell_emc.yaml +46 -0
- scrapli/definitions/dell_enterprisesonic.yaml +40 -0
- scrapli/definitions/dlink_os.yaml +46 -0
- scrapli/definitions/edgecore_ecs.yaml +35 -0
- scrapli/definitions/eltex_esr.yaml +43 -0
- scrapli/definitions/fortinet_fortios.yaml +20 -0
- scrapli/definitions/fortinet_wlc.yaml +33 -0
- scrapli/definitions/hp_comware.yaml +31 -0
- scrapli/definitions/huawei_smartax.yaml +61 -0
- scrapli/definitions/huawei_vrp.yaml +56 -0
- scrapli/definitions/juniper_junos.yaml +3 -0
- scrapli/definitions/nokia_srlinux.yaml +13 -2
- scrapli/definitions/nokia_sros.yaml +31 -0
- scrapli/definitions/nokia_sros_classic.yaml +33 -0
- scrapli/definitions/nokia_sros_classic_aram.yaml +25 -0
- scrapli/definitions/paloalto_panos.yaml +36 -0
- scrapli/definitions/raisecom_ros.yaml +45 -0
- scrapli/definitions/ruckus_fastiron.yaml +45 -0
- scrapli/definitions/ruckus_unleashed.yaml +64 -0
- scrapli/definitions/siemens_roxii.yaml +28 -0
- scrapli/definitions/versa_flexvnf.yaml +45 -0
- scrapli/definitions/vyos_vyos.yaml +35 -0
- scrapli/definitions/zyxel_dslam.yaml +18 -0
- scrapli/ffi.py +1 -1
- scrapli/ffi_mapping.py +89 -33
- scrapli/ffi_mapping_cli.py +104 -0
- scrapli/ffi_mapping_options.py +38 -6
- scrapli/ffi_types.py +1 -1
- scrapli/helper.py +56 -0
- scrapli/lib/{libscrapli.0.0.1-alpha.13.dylib → libscrapli.0.0.1-alpha.17.dylib} +0 -0
- scrapli/lib/{libscrapli.so.0.0.1-alpha.13 → libscrapli.so.0.0.1-alpha.17} +0 -0
- {scrapli-2.0.0a4.dist-info → scrapli-2.0.0a5.dist-info}/METADATA +1 -1
- scrapli-2.0.0a5.dist-info/RECORD +68 -0
- scrapli-2.0.0a4.dist-info/RECORD +0 -35
- {scrapli-2.0.0a4.dist-info → scrapli-2.0.0a5.dist-info}/WHEEL +0 -0
- {scrapli-2.0.0a4.dist-info → scrapli-2.0.0a5.dist-info}/licenses/LICENSE +0 -0
- {scrapli-2.0.0a4.dist-info → scrapli-2.0.0a5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '^>\s*'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'expert'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'expert'
|
12
|
+
- name: 'expert'
|
13
|
+
prompt_pattern: '^[\w.-]{1,63}@[^$]+\$\s*$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'exec'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'exit'
|
19
|
+
- name: 'root'
|
20
|
+
instructions:
|
21
|
+
- send_prompted_input:
|
22
|
+
input: 'sudo su -'
|
23
|
+
prompt_exact: '^Password:\s?$'
|
24
|
+
response: '__lookup::root'
|
25
|
+
- name: 'root'
|
26
|
+
prompt_pattern: '^root@[^#]+#\s*$'
|
27
|
+
accessible_modes:
|
28
|
+
- name: 'expert'
|
29
|
+
instructions:
|
30
|
+
- send_input:
|
31
|
+
input: 'exit'
|
32
|
+
failure_indicators:
|
33
|
+
- 'Syntax error:'
|
34
|
+
on_open_instructions:
|
35
|
+
- enter_mode:
|
36
|
+
requested_mode: 'exec'
|
37
|
+
on_close_instructions:
|
38
|
+
- enter_mode:
|
39
|
+
requested_mode: 'privileged_exec'
|
40
|
+
- write:
|
41
|
+
input: 'logout'
|
42
|
+
ntc_templates_platform: 'cisco_ftd'
|
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '^\S+@\S+:\S+:\S+[\$|#]\s*$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'root'
|
9
|
+
instructions:
|
10
|
+
- send_prompted_input:
|
11
|
+
input: 'sudo su'
|
12
|
+
prompt_exact: ':'
|
13
|
+
response: '__lookup::enable'
|
14
|
+
- name: 'root'
|
15
|
+
prompt_pattern: '^\S+@\S+:\S+:\S+#\s*$'
|
16
|
+
accessible_modes:
|
17
|
+
- name: 'exec'
|
18
|
+
instructions:
|
19
|
+
- send_input:
|
20
|
+
input: 'exit'
|
21
|
+
failure_indicators:
|
22
|
+
- 'Permission denied'
|
23
|
+
- 'ERROR:'
|
24
|
+
on_close_instructions:
|
25
|
+
- enter_mode:
|
26
|
+
requested_mode: 'root'
|
27
|
+
- write:
|
28
|
+
input: 'exit'
|
@@ -0,0 +1,42 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'exec'
|
4
|
+
modes:
|
5
|
+
- name: 'linux'
|
6
|
+
prompt_pattern: '^\S+@\S+:\S+:\S+[\$|#]\s*$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'exec'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'vtysh'
|
12
|
+
- name: 'exec'
|
13
|
+
prompt_pattern: '^[\w\.\-]+#\s*$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'linux'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'exit'
|
19
|
+
- name: 'configuration'
|
20
|
+
instructions:
|
21
|
+
- send_input:
|
22
|
+
input: 'conifgure terminal'
|
23
|
+
- name: 'configuration'
|
24
|
+
prompt_pattern: '^[\w\.\-]+\(config\)#\s*$'
|
25
|
+
accessible_modes:
|
26
|
+
- name: 'exec'
|
27
|
+
instructions:
|
28
|
+
- send_input:
|
29
|
+
input: 'exit'
|
30
|
+
failure_indicators:
|
31
|
+
- 'Permission denied'
|
32
|
+
- 'ERROR:'
|
33
|
+
- '% Unknown command.'
|
34
|
+
- '% Command incomplete.'
|
35
|
+
on_open_instructions:
|
36
|
+
- enter_mode:
|
37
|
+
requested_mode: 'exec'
|
38
|
+
on_close_instructions:
|
39
|
+
- enter_mode:
|
40
|
+
requested_mode: 'exec'
|
41
|
+
- write:
|
42
|
+
input: 'exit'
|
@@ -0,0 +1,30 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '^[\w\.\-]+#\s*$$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'configuration'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'configure terminal'
|
12
|
+
- name: 'configuration'
|
13
|
+
prompt_pattern: '^[\w\.\-]+\(config\)#\s*$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'exec'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'exit'
|
19
|
+
failure_indicators:
|
20
|
+
- 'Error:'
|
21
|
+
on_open_instructions:
|
22
|
+
- enter_mode:
|
23
|
+
requested_mode: 'exec'
|
24
|
+
- send_input:
|
25
|
+
input: 'paginate false'
|
26
|
+
on_close_instructions:
|
27
|
+
- enter_mode:
|
28
|
+
requested_mode: 'exec'
|
29
|
+
- write:
|
30
|
+
input: 'exit'
|
@@ -0,0 +1,32 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '^[\w\.\-]+#\s*$$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'configuration'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'configure'
|
12
|
+
- name: 'configuration'
|
13
|
+
prompt_pattern: '^[\w\.\-]+\(config\)#\s*$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'exec'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'exit'
|
19
|
+
failure_indicators:
|
20
|
+
- 'Error:'
|
21
|
+
on_open_instructions:
|
22
|
+
- enter_mode:
|
23
|
+
requested_mode: 'configuration'
|
24
|
+
- send_input:
|
25
|
+
input: 'no terminal paging'
|
26
|
+
- enter_mode:
|
27
|
+
requested_mode: 'exec'
|
28
|
+
on_close_instructions:
|
29
|
+
- enter_mode:
|
30
|
+
requested_mode: 'exec'
|
31
|
+
- write:
|
32
|
+
input: 'exit'
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '^[\w.\-@/:]{1,63}>$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'privileged_exec'
|
9
|
+
instructions:
|
10
|
+
- send_prompted_input:
|
11
|
+
input: 'enable'
|
12
|
+
prompt_pattern: '^(?:enable\s){0,1}password:\s?$'
|
13
|
+
response: '__lookup::enable'
|
14
|
+
- name: 'privileged_exec'
|
15
|
+
prompt_pattern: '^[\w.\-@/:]{1,63}#$'
|
16
|
+
accessible_modes:
|
17
|
+
- name: 'exec'
|
18
|
+
instructions:
|
19
|
+
- send_input:
|
20
|
+
input: 'disable'
|
21
|
+
- name: 'configuration'
|
22
|
+
instructions:
|
23
|
+
- send_input:
|
24
|
+
input: 'configure terminal'
|
25
|
+
- name: 'configuration'
|
26
|
+
prompt_pattern: '^[\w.\-@/:]{1,63}\([\w.\-@/:+]{0,32}\)#$'
|
27
|
+
accessible_modes:
|
28
|
+
- name: 'privileged_exec'
|
29
|
+
instructions:
|
30
|
+
- send_input:
|
31
|
+
input: 'end'
|
32
|
+
failure_indicators:
|
33
|
+
- 'Command not found'
|
34
|
+
- 'Incomplete command'
|
35
|
+
- '% Invalid input detected at ''^'' marker.'
|
36
|
+
- 'An invalid interface has been used for this command.'
|
37
|
+
on_open_instructions:
|
38
|
+
- enter_mode:
|
39
|
+
requested_mode: 'privileged_exec'
|
40
|
+
- send_input:
|
41
|
+
input: 'term length 0'
|
42
|
+
on_close_instructions:
|
43
|
+
- enter_mode:
|
44
|
+
requested_mode: 'privileged_exec'
|
45
|
+
- write:
|
46
|
+
input: 'exit'
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'exec'
|
4
|
+
modes:
|
5
|
+
- name: 'linux'
|
6
|
+
prompt_pattern: '^[\w.-]+@[\w.-]+:[\w\/~]+[#$]\s*$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'exec'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'sonic-cli'
|
12
|
+
- name: 'exec'
|
13
|
+
prompt_pattern: '^[\w.-]+#\s*$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'configuration'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'conifgure terminal'
|
19
|
+
- name: 'configuration'
|
20
|
+
prompt_pattern: '^[\w.-]+\(config(\S*)?\)#\s*$'
|
21
|
+
accessible_modes:
|
22
|
+
- name: 'exec'
|
23
|
+
instructions:
|
24
|
+
- send_input:
|
25
|
+
input: 'exit'
|
26
|
+
failure_indicators:
|
27
|
+
- 'command not found'
|
28
|
+
- 'Permission denied'
|
29
|
+
- '% Error:'
|
30
|
+
- 'Warning: Idle timeout'
|
31
|
+
on_open_instructions:
|
32
|
+
- enter_mode:
|
33
|
+
requested_mode: 'exec'
|
34
|
+
- send_input:
|
35
|
+
input: 'term length 0'
|
36
|
+
on_close_instructions:
|
37
|
+
- enter_mode:
|
38
|
+
requested_mode: 'exec'
|
39
|
+
- write:
|
40
|
+
input: 'exit'
|
@@ -0,0 +1,46 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '^[a-z0-9.\-_@()/:]{1,63}:(user|oper|puser|3|4|6)#$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'privileged_exec'
|
9
|
+
instructions:
|
10
|
+
- send_prompted_input:
|
11
|
+
input: 'enable admin'
|
12
|
+
prompt_pattern: '^[pP]ass[wW]ord:$'
|
13
|
+
response: '__lookup::enable'
|
14
|
+
- name: 'privileged_exec'
|
15
|
+
prompt_pattern: '^[a-z0-9.\-_@/:]{1,63}:(admin|5)#$'
|
16
|
+
accessible_modes:
|
17
|
+
- name: 'exec'
|
18
|
+
instructions:
|
19
|
+
- send_input:
|
20
|
+
input: 'disable'
|
21
|
+
- name: 'configuration'
|
22
|
+
instructions:
|
23
|
+
- send_input:
|
24
|
+
input: 'configure terminal'
|
25
|
+
- name: 'configuration'
|
26
|
+
prompt_pattern: '^[a-z0-9.\-_@/:]{1,63}:(admin|5)#$'
|
27
|
+
accessible_modes:
|
28
|
+
- name: 'privileged_exec'
|
29
|
+
instructions:
|
30
|
+
- send_input:
|
31
|
+
input: 'end'
|
32
|
+
failure_indicators:
|
33
|
+
- 'Next possible completions:'
|
34
|
+
- 'Available commands:'
|
35
|
+
on_open_instructions:
|
36
|
+
- enter_mode:
|
37
|
+
requested_mode: 'privileged_exec'
|
38
|
+
- send_input:
|
39
|
+
input: 'enable clipaging'
|
40
|
+
on_close_instructions:
|
41
|
+
- enter_mode:
|
42
|
+
requested_mode: 'privileged_exec'
|
43
|
+
- write:
|
44
|
+
input: 'disable clipaging'
|
45
|
+
- write:
|
46
|
+
input: 'exit'
|
@@ -0,0 +1,35 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'privileged_exec'
|
6
|
+
prompt_pattern: '^[a-z0-9.\-_@()/:]{1,48}#\s*$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'configuration'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'conf'
|
12
|
+
- name: 'configuration'
|
13
|
+
prompt_pattern: '^[a-z0-9.\-_@/:]{1,63}\(conf[a-z0-9.\-@/:\+]{0,32}\)#$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'privileged_exec'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'end'
|
19
|
+
failure_indicators:
|
20
|
+
- '% Ambiguous command'
|
21
|
+
- '% Incomplete command'
|
22
|
+
- '% Invalid input detected'
|
23
|
+
- '% Unknown command'
|
24
|
+
on_open_instructions:
|
25
|
+
- enter_mode:
|
26
|
+
requested_mode: 'privileged_exec'
|
27
|
+
- send_input:
|
28
|
+
input: 'term width 300'
|
29
|
+
- send_input:
|
30
|
+
input: 'term len 0'
|
31
|
+
on_close_instructions:
|
32
|
+
- enter_mode:
|
33
|
+
requested_mode: 'privileged_exec'
|
34
|
+
- write:
|
35
|
+
input: 'exit'
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '^(\\n)?[a-z0-9.\-_@/:]{1,63}>\s*$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'privileged_exec'
|
9
|
+
instructions:
|
10
|
+
- send_prompted_input:
|
11
|
+
input: 'enable'
|
12
|
+
prompt_pattern: '^\s*[pP]assword:\s*$'
|
13
|
+
response: '__lookup::enable'
|
14
|
+
- name: 'privileged_exec'
|
15
|
+
prompt_pattern: '^(\\n)?[a-z0-9.\-_@/:]{1,63}#\s*$'
|
16
|
+
accessible_modes:
|
17
|
+
- name: 'exec'
|
18
|
+
instructions:
|
19
|
+
- send_input:
|
20
|
+
input: 'end'
|
21
|
+
- name: 'configuration'
|
22
|
+
instructions:
|
23
|
+
- send_input:
|
24
|
+
input: 'configure terminal'
|
25
|
+
- name: 'configuration'
|
26
|
+
prompt_pattern: '^(\\n)?[a-z0-9.\-_@/:]{1,63}\(conf[a-z0-9.\-@/:\+]{0,32}\)#\s*$'
|
27
|
+
accessible_modes:
|
28
|
+
- name: 'privileged_exec'
|
29
|
+
instructions:
|
30
|
+
- send_input:
|
31
|
+
input: 'end'
|
32
|
+
failure_indicators:
|
33
|
+
- 'Syntax error:'
|
34
|
+
on_open_instructions:
|
35
|
+
- enter_mode:
|
36
|
+
requested_mode: 'privileged_exec'
|
37
|
+
- send_input:
|
38
|
+
input: 'terminal datadump'
|
39
|
+
on_close_instructions:
|
40
|
+
- enter_mode:
|
41
|
+
requested_mode: 'privileged_exec'
|
42
|
+
- write:
|
43
|
+
input: 'exit'
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '[\w_-]+ (\([\w-]+\) )?[$#]'
|
7
|
+
on_open_instructions:
|
8
|
+
- enter_mode:
|
9
|
+
requested_mode: 'privileged_exec'
|
10
|
+
- send_input:
|
11
|
+
input: 'config system console'
|
12
|
+
- send_input:
|
13
|
+
input: 'set output standard'
|
14
|
+
- send_input:
|
15
|
+
input: 'end'
|
16
|
+
on_close_instructions:
|
17
|
+
- enter_mode:
|
18
|
+
requested_mode: 'privileged_exec'
|
19
|
+
- write:
|
20
|
+
input: 'exit'
|
@@ -0,0 +1,33 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'privileged_exec'
|
6
|
+
prompt_pattern: '^[a-z0-9-]{1,48}\(\d{1,2}\)#\s*$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'configuration'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'configure terminal'
|
12
|
+
- name: 'configuration'
|
13
|
+
prompt_pattern: '^[a-z0-9-]{1,48}\(\d{1,2}\)\(conf[a-z0-9.\-@/:\+]{0,32}\)#\s*$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'privileged_exec'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'end'
|
19
|
+
failure_indicators:
|
20
|
+
- 'is not unique'
|
21
|
+
- 'Unrecognized command'
|
22
|
+
- 'Insufficient parameters for command'
|
23
|
+
- 'Error:'
|
24
|
+
on_open_instructions:
|
25
|
+
- enter_mode:
|
26
|
+
requested_mode: 'privileged_exec'
|
27
|
+
- send_input:
|
28
|
+
input: 'screen-length disable'
|
29
|
+
on_close_instructions:
|
30
|
+
- enter_mode:
|
31
|
+
requested_mode: 'privileged_exec'
|
32
|
+
- write:
|
33
|
+
input: 'quit'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'privileged_exec'
|
6
|
+
prompt_pattern: '^<[a-z0-9.\-_@()/:]{1,48}>\s*$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'configuration'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'system-view'
|
12
|
+
- name: 'configuration'
|
13
|
+
prompt_pattern: '^(?=\[[a-z0-9.\-_@/:]{1,64}\]$).*$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'privileged_exec'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'quit'
|
19
|
+
failure_indicators:
|
20
|
+
- '% Unrecognized command found at ''^'' position.'
|
21
|
+
on_open_instructions:
|
22
|
+
- enter_mode:
|
23
|
+
requested_mode: 'privileged_exec'
|
24
|
+
- send_input:
|
25
|
+
input: 'screen-length disable'
|
26
|
+
on_close_instructions:
|
27
|
+
- enter_mode:
|
28
|
+
requested_mode: 'privileged_exec'
|
29
|
+
- write:
|
30
|
+
input: 'quit'
|
31
|
+
ntc_templates_platform: 'hp_comware'
|
@@ -0,0 +1,61 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$%]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'exec'
|
6
|
+
prompt_pattern: '^\S{1,48}>\s?$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'privileged_exec'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'enable'
|
12
|
+
- name: 'privileged_exec'
|
13
|
+
prompt_pattern: '^\S{1,48}#$'
|
14
|
+
accessible_modes:
|
15
|
+
- name: 'exec'
|
16
|
+
instructions:
|
17
|
+
- send_input:
|
18
|
+
input: 'disable'
|
19
|
+
- name: 'configuration'
|
20
|
+
instructions:
|
21
|
+
- send_input:
|
22
|
+
input: 'config'
|
23
|
+
- name: 'diagnose'
|
24
|
+
instructions:
|
25
|
+
- send_input:
|
26
|
+
input: 'diagnose'
|
27
|
+
- name: 'configuration'
|
28
|
+
prompt_pattern: '^(.*)\(.*(config)\S*\)#$'
|
29
|
+
accessible_modes:
|
30
|
+
- name: 'privileged_exec'
|
31
|
+
instructions:
|
32
|
+
- send_input:
|
33
|
+
input: 'quit'
|
34
|
+
- name: 'diagnose'
|
35
|
+
prompt_pattern: '.*\(diagnose\)\%\%$'
|
36
|
+
accessible_modes:
|
37
|
+
- name: 'privileged_exec'
|
38
|
+
instructions:
|
39
|
+
- send_input:
|
40
|
+
input: 'quit'
|
41
|
+
failure_indicators:
|
42
|
+
- '% Ambiguous command'
|
43
|
+
- '% Incomplete command'
|
44
|
+
- '% Invalid input detected'
|
45
|
+
- '% Unknown command'
|
46
|
+
- 'Error:'
|
47
|
+
on_open_instructions:
|
48
|
+
- enter_mode:
|
49
|
+
requested_mode: 'privileged_exec'
|
50
|
+
- write:
|
51
|
+
input: 'undo smart'
|
52
|
+
- write:
|
53
|
+
input: 'scroll'
|
54
|
+
on_close_instructions:
|
55
|
+
- enter_mode:
|
56
|
+
requested_mode: 'privileged_exec'
|
57
|
+
- write:
|
58
|
+
input: 'quit'
|
59
|
+
- write:
|
60
|
+
input: 'y'
|
61
|
+
ntc_templates_platform: 'huawei_smartax'
|
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
prompt_pattern: '^.*[>#$\]]\s?+$'
|
3
|
+
default_mode: 'privileged_exec'
|
4
|
+
modes:
|
5
|
+
- name: 'privileged_exec'
|
6
|
+
prompt_pattern: '^(?:hrp_[a|m|s])?<[a-z0-9.\-_@()/:]{1,48}>\s*$'
|
7
|
+
accessible_modes:
|
8
|
+
- name: 'configuration'
|
9
|
+
instructions:
|
10
|
+
- send_input:
|
11
|
+
input: 'system-view'
|
12
|
+
- name: 'configuration'
|
13
|
+
# On some versions of VRP running on the AR160 & AR650 router series (and possibly
|
14
|
+
# others), the router outputs the current OS version in the following format when
|
15
|
+
# calling the command 'display current-configuration':
|
16
|
+
#
|
17
|
+
# <HOSTNAME>display current-configuration
|
18
|
+
# [V200R009C00SPC500]
|
19
|
+
# #
|
20
|
+
# sysname HOSTNAME
|
21
|
+
# ...
|
22
|
+
#
|
23
|
+
# Since the version string is basically in the same format as the prompt in
|
24
|
+
# configuration mode, scrapli only reads until it sees this very string, and then
|
25
|
+
# stops reading since it assumes that a valid prompt has been found.
|
26
|
+
#
|
27
|
+
# The following pattern tries to prevent this from happening by using a regex negative
|
28
|
+
# lookahead to exclude '[V***R***C**]' from the prompt pattern, but still match
|
29
|
+
# a regular hostname.
|
30
|
+
prompt_pattern: '^(?!\[V\d{3}R\d{3}C\d{2,3}.*\])(?=(?:hrp_[a|m|s])?\[\~{0,1}\*{0,1}[a-z0-9.\-_@/:]{1,64}\]$).*$'
|
31
|
+
accessible_modes:
|
32
|
+
- name: 'privileged_exec'
|
33
|
+
instructions:
|
34
|
+
- send_input:
|
35
|
+
input: 'quit'
|
36
|
+
failure_indicators:
|
37
|
+
- 'Error:'
|
38
|
+
on_open_instructions:
|
39
|
+
- enter_mode:
|
40
|
+
requested_mode: 'privileged_exec'
|
41
|
+
- write:
|
42
|
+
# Attempt to set screen width as a fallback in case the device does not accept the
|
43
|
+
# ptyprocess/cols property when using system transport (observed on some firmware versions).
|
44
|
+
#
|
45
|
+
# On some devices, the command below might not exist (some switches running < V200R019);
|
46
|
+
# on others it asks for confirmation (Y/N), and other devices accept the command as-is.
|
47
|
+
#
|
48
|
+
# Use write() instead of send_command() or send_interactive() to fail silently should the
|
49
|
+
# command not exist.
|
50
|
+
input: 'screen-width 255\ny\n\n'
|
51
|
+
on_close_instructions:
|
52
|
+
- enter_mode:
|
53
|
+
requested_mode: 'privileged_exec'
|
54
|
+
- write:
|
55
|
+
input: 'exit'
|
56
|
+
ntc_templates_platform: 'huawei_vrp'
|
@@ -69,6 +69,8 @@ failure_indicators:
|
|
69
69
|
- 'No valid completions'
|
70
70
|
- 'unknown command'
|
71
71
|
- 'syntax error'
|
72
|
+
- 'missing mandatory argument'
|
73
|
+
- 'invalid numeric value'
|
72
74
|
on_open_instructions:
|
73
75
|
- enter_mode:
|
74
76
|
requested_mode: 'exec'
|
@@ -83,3 +85,4 @@ on_close_instructions:
|
|
83
85
|
requested_mode: 'exec'
|
84
86
|
- write:
|
85
87
|
input: 'exit'
|
88
|
+
ntc_templates_platform: 'juniper_junos'
|
@@ -1,12 +1,23 @@
|
|
1
1
|
---
|
2
|
-
# https://regex101.com/r/
|
3
|
-
prompt_pattern: '
|
2
|
+
# https://regex101.com/r/4YNNII/2
|
3
|
+
prompt_pattern: '(^.*[>#$]\s?+$)|(--.*--\s*\n[abcd]:\S+#\s*$)'
|
4
4
|
default_mode: 'exec'
|
5
5
|
modes:
|
6
|
+
- name: 'bash'
|
7
|
+
prompt_pattern: '^.*[>#$]\s?+$'
|
8
|
+
accessible_modes:
|
9
|
+
- name: 'exec'
|
10
|
+
instructions:
|
11
|
+
- send_input:
|
12
|
+
input: 'exit'
|
6
13
|
- name: 'exec'
|
7
14
|
# https://regex101.com/r/PGLSJJ/1
|
8
15
|
prompt_pattern: '^--{(\s\[[\w\s]+\]){0,5}[\+\*\s]{1,}running\s}--\[.+?\]--\s*\n[abcd]:\S+#\s*$'
|
9
16
|
accessible_modes:
|
17
|
+
- name: 'bash'
|
18
|
+
instructions:
|
19
|
+
- send_input:
|
20
|
+
input: 'bash'
|
10
21
|
- name: 'configuration'
|
11
22
|
instructions:
|
12
23
|
- send_input:
|