scrapli 2.0.0a3__py3-none-musllinux_1_1_aarch64.whl → 2.0.0a5__py3-none-musllinux_1_1_aarch64.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.
Files changed (59) hide show
  1. scrapli/__init__.py +5 -5
  2. scrapli/auth.py +14 -7
  3. scrapli/cli.py +334 -66
  4. scrapli/cli_parse.py +1 -1
  5. scrapli/cli_result.py +42 -0
  6. scrapli/definitions/aethra_atosnt.yaml +9 -0
  7. scrapli/definitions/alcatel_aos.yaml +9 -0
  8. scrapli/definitions/arista_eos.yaml +1 -0
  9. scrapli/definitions/aruba_aoscx.yaml +33 -0
  10. scrapli/definitions/cisco_aireos.yaml +31 -0
  11. scrapli/definitions/cisco_asa.yaml +48 -0
  12. scrapli/definitions/cisco_cbs.yaml +50 -0
  13. scrapli/definitions/cisco_ftd.yaml +42 -0
  14. scrapli/definitions/cisco_nxos.yaml +2 -0
  15. scrapli/definitions/cumulus_linux.yaml +28 -0
  16. scrapli/definitions/cumulus_vtysh.yaml +42 -0
  17. scrapli/definitions/datacom_dmos.yaml +30 -0
  18. scrapli/definitions/datacom_dmswitch.yaml +32 -0
  19. scrapli/definitions/default.yaml +9 -0
  20. scrapli/definitions/dell_emc.yaml +46 -0
  21. scrapli/definitions/dell_enterprisesonic.yaml +40 -0
  22. scrapli/definitions/dlink_os.yaml +46 -0
  23. scrapli/definitions/edgecore_ecs.yaml +35 -0
  24. scrapli/definitions/eltex_esr.yaml +43 -0
  25. scrapli/definitions/fortinet_fortios.yaml +20 -0
  26. scrapli/definitions/fortinet_wlc.yaml +33 -0
  27. scrapli/definitions/hp_comware.yaml +31 -0
  28. scrapli/definitions/huawei_smartax.yaml +61 -0
  29. scrapli/definitions/huawei_vrp.yaml +56 -0
  30. scrapli/definitions/juniper_junos.yaml +3 -0
  31. scrapli/definitions/nokia_srlinux.yaml +13 -2
  32. scrapli/definitions/nokia_sros.yaml +31 -0
  33. scrapli/definitions/nokia_sros_classic.yaml +33 -0
  34. scrapli/definitions/nokia_sros_classic_aram.yaml +25 -0
  35. scrapli/definitions/paloalto_panos.yaml +36 -0
  36. scrapli/definitions/raisecom_ros.yaml +45 -0
  37. scrapli/definitions/ruckus_fastiron.yaml +45 -0
  38. scrapli/definitions/ruckus_unleashed.yaml +64 -0
  39. scrapli/definitions/siemens_roxii.yaml +28 -0
  40. scrapli/definitions/versa_flexvnf.yaml +45 -0
  41. scrapli/definitions/vyos_vyos.yaml +35 -0
  42. scrapli/definitions/zyxel_dslam.yaml +18 -0
  43. scrapli/ffi.py +1 -1
  44. scrapli/ffi_mapping.py +92 -37
  45. scrapli/ffi_mapping_cli.py +146 -22
  46. scrapli/ffi_mapping_netconf.py +28 -60
  47. scrapli/ffi_mapping_options.py +38 -6
  48. scrapli/ffi_types.py +43 -3
  49. scrapli/helper.py +56 -0
  50. scrapli/lib/{libscrapli.0.0.1-alpha.10.dylib → libscrapli.0.0.1-alpha.17.dylib} +0 -0
  51. scrapli/lib/{libscrapli.so.0.0.1-alpha.10 → libscrapli.so.0.0.1-alpha.17} +0 -0
  52. scrapli/netconf.py +36 -147
  53. scrapli/transport.py +71 -130
  54. {scrapli-2.0.0a3.dist-info → scrapli-2.0.0a5.dist-info}/METADATA +1 -1
  55. scrapli-2.0.0a5.dist-info/RECORD +68 -0
  56. scrapli-2.0.0a3.dist-info/RECORD +0 -35
  57. {scrapli-2.0.0a3.dist-info → scrapli-2.0.0a5.dist-info}/WHEEL +0 -0
  58. {scrapli-2.0.0a3.dist-info → scrapli-2.0.0a5.dist-info}/licenses/LICENSE +0 -0
  59. {scrapli-2.0.0a3.dist-info → scrapli-2.0.0a5.dist-info}/top_level.txt +0 -0
@@ -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/U5mgK9/1
3
- prompt_pattern: '^--.*--\s*\n[abcd]:\S+#\s*$'
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:
@@ -0,0 +1,31 @@
1
+ ---
2
+ prompt_pattern: '.*\[.*?\]\n.*#'
3
+ default_mode: 'exec'
4
+ modes:
5
+ - name: 'exec'
6
+ prompt_pattern: '^\[.*?\]\n.*#'
7
+ accessible_modes:
8
+ - name: 'configuration'
9
+ instructions:
10
+ - send_input:
11
+ input: 'edit-config exclusive'
12
+ - name: 'configuration'
13
+ prompt_pattern: '.?\(.*?\)\[.*?\]\n.*#'
14
+ accessible_modes:
15
+ - name: 'exec'
16
+ instructions:
17
+ - send_input:
18
+ input: 'quit-config'
19
+ failure_indicators:
20
+ - 'MINOR:'
21
+ - 'MAJOR:'
22
+ on_open_instructions:
23
+ - enter_mode:
24
+ requested_mode: 'exec'
25
+ - send_input:
26
+ input: 'environment no more'
27
+ on_close_instructions:
28
+ - enter_mode:
29
+ requested_mode: 'exec'
30
+ - write:
31
+ input: 'logout'
@@ -0,0 +1,33 @@
1
+ ---
2
+ prompt_pattern: '^.*[>#$]\s?+$'
3
+ default_mode: 'exec'
4
+ modes:
5
+ - name: 'exec'
6
+ prompt_pattern: '^\*?[abcd]:[\w\s_.-]+#\s?$'
7
+ accessible_modes:
8
+ - name: 'configuration'
9
+ instructions:
10
+ - send_input:
11
+ input: 'configure'
12
+ - name: 'configuration'
13
+ prompt_pattern: '^\*?[abcd]:[\w\s_.-]+>config[\w>]*(#|\$)\s?$'
14
+ accessible_modes:
15
+ - name: 'exec'
16
+ instructions:
17
+ - send_input:
18
+ input: 'exit all'
19
+ failure_indicators:
20
+ - 'MINOR:'
21
+ - 'MAJOR:'
22
+ - 'Error:'
23
+ - 'Bad Command:'
24
+ on_open_instructions:
25
+ - enter_mode:
26
+ requested_mode: 'exec'
27
+ - send_input:
28
+ input: 'environment no more'
29
+ on_close_instructions:
30
+ - enter_mode:
31
+ requested_mode: 'exec'
32
+ - write:
33
+ input: 'logout'
@@ -0,0 +1,25 @@
1
+ ---
2
+ prompt_pattern: '^.*[>#$]\s?+$'
3
+ default_mode: 'exec'
4
+ modes:
5
+ - name: 'exec'
6
+ prompt_pattern: '^(.*)[a-zA-Z0-9_\:\-\>]*[\#\$] ?$'
7
+ failure_indicators:
8
+ - 'command is not complete'
9
+ - 'invalid token'
10
+ on_open_instructions:
11
+ - enter_mode:
12
+ requested_mode: 'exec'
13
+ - send_input:
14
+ input: 'environment mode batch'
15
+ - send_input:
16
+ input: 'environment inhibit-alarms'
17
+ - send_input:
18
+ input: 'environment print no-more'
19
+ - send_input:
20
+ input: 'exit all'
21
+ on_close_instructions:
22
+ - enter_mode:
23
+ requested_mode: 'exec'
24
+ - write:
25
+ input: 'logout'
@@ -0,0 +1,36 @@
1
+ ---
2
+ prompt_pattern: '^.*[>#$]\s?+$'
3
+ default_mode: 'exec'
4
+ modes:
5
+ - name: 'exec'
6
+ prompt_pattern: '^[\w\._-]+@[\w\.\(\)_-]+>\s?$'
7
+ accessible_modes:
8
+ - name: 'configuration'
9
+ instructions:
10
+ - send_input:
11
+ input: 'configure'
12
+ - name: 'configuration'
13
+ prompt_pattern: '^[\w\._-]+@[\w\.\(\)_-]+#\s?$'
14
+ accessible_modes:
15
+ - name: 'exec'
16
+ instructions:
17
+ - send_input:
18
+ input: 'exit'
19
+ failure_indicators:
20
+ - 'Unknown command:'
21
+ - 'Invalid syntax.'
22
+ - 'Server error'
23
+ - 'Validation Error:'
24
+ on_open_instructions:
25
+ - enter_mode:
26
+ requested_mode: 'exec'
27
+ - send_input:
28
+ input: 'set cli scripting-mode on'
29
+ - send_input:
30
+ input: 'set cli pager off'
31
+ on_close_instructions:
32
+ - enter_mode:
33
+ requested_mode: 'exec'
34
+ - write:
35
+ input: 'exit'
36
+ ntc_templates_platform: 'paloalto_panos'
@@ -0,0 +1,45 @@
1
+ ---
2
+ prompt_pattern: '^.*[>#$]\s?+$'
3
+ default_mode: 'privileged_exec'
4
+ modes:
5
+ - name: 'exec'
6
+ prompt_pattern: '^[a-z0-9.\-_@()/:]{1,63}>$'
7
+ accessible_modes:
8
+ - name: 'privileged_exec'
9
+ instructions:
10
+ - send_prompted_input:
11
+ input: 'enable'
12
+ prompt_exact: '[pP]assword:\s?$'
13
+ response: '__lookup::enable'
14
+ - name: 'privileged_exec'
15
+ prompt_pattern: '^[a-z0-9.\-_@/:]{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: 'config'
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
+ - 'Error input in the position marked by ''^''.'
34
+ - 'Ambiguous input in the position marked by ''^'''
35
+ - '% Incomplete command.'
36
+ on_open_instructions:
37
+ - enter_mode:
38
+ requested_mode: 'privileged_exec'
39
+ - send_input:
40
+ input: 'terminal page-break disable'
41
+ on_close_instructions:
42
+ - enter_mode:
43
+ requested_mode: 'privileged_exec'
44
+ - write:
45
+ input: 'exit'
@@ -0,0 +1,45 @@
1
+ ---
2
+ prompt_pattern: '^.*[>#$]\s?+$'
3
+ default_mode: 'privileged_exec'
4
+ modes:
5
+ - name: 'exec'
6
+ prompt_pattern: '^[a-z0-9 .\-_@()/:]{1,63}>$'
7
+ accessible_modes:
8
+ - name: 'privileged_exec'
9
+ instructions:
10
+ - send_prompted_input:
11
+ input: 'enable'
12
+ prompt_exact: '^[pP]assword:\s?$'
13
+ response: '__lookup::enable'
14
+ - name: 'privileged_exec'
15
+ prompt_pattern: '^[a-z0-9 .\-_@/:]{1,63}#$'
16
+ accessible_modes:
17
+ - name: 'exec'
18
+ instructions:
19
+ - send_input:
20
+ input: 'quit'
21
+ - name: 'configuration'
22
+ instructions:
23
+ - send_input:
24
+ input: 'configure terminal'
25
+ - name: 'configuration'
26
+ prompt_pattern: '^[a-z0-9 .\-_@/:]{1,63}\(conf[a-z0-9.\-@/:\+]{0,32}\)#$'
27
+ accessible_modes:
28
+ - name: 'privileged_exec'
29
+ instructions:
30
+ - send_input:
31
+ input: 'end'
32
+ failure_indicators:
33
+ - 'Error -'
34
+ - 'Invalid input -'
35
+ on_open_instructions:
36
+ - enter_mode:
37
+ requested_mode: 'privileged_exec'
38
+ - send_input:
39
+ input: 'skip-page-display'
40
+ on_close_instructions:
41
+ - enter_mode:
42
+ requested_mode: 'privileged_exec'
43
+ - write:
44
+ input: 'exit'
45
+ ntc_templates_platform: 'ruckus_fastiron'
@@ -0,0 +1,64 @@
1
+ ---
2
+ prompt_pattern: '^.*[>#$]\s?+$'
3
+ default_mode: 'privileged_exec'
4
+ modes:
5
+ - name: 'exec'
6
+ prompt_pattern: '^[a-z0-9]{1,24}>\s*$'
7
+ accessible_modes:
8
+ - name: 'privileged_exec'
9
+ instructions:
10
+ - send_input:
11
+ input: 'enable force'
12
+ - name: 'privileged_exec'
13
+ prompt_pattern: '^[a-z0-9]{1,24}#\s*$'
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: 'debug'
24
+ instructions:
25
+ - send_input:
26
+ input: 'debug'
27
+ - name: 'ap_mode'
28
+ instructions:
29
+ - send_input:
30
+ input: 'ap-mode'
31
+ - name: 'configuration'
32
+ prompt_pattern: '^[a-z0-9]{1,24}\(conf[a-z0-9\-]{0,24}\)#\s*$'
33
+ accessible_modes:
34
+ - name: 'privileged_exec'
35
+ instructions:
36
+ - send_input:
37
+ input: 'end'
38
+ - name: 'debug'
39
+ prompt_pattern: '^[a-z0-9]{1,24}\(debug\)#\s*$'
40
+ accessible_modes:
41
+ - name: 'privileged_exec'
42
+ instructions:
43
+ - send_input:
44
+ input: 'quit'
45
+ - name: 'ap_mode'
46
+ prompt_pattern: '^[a-z0-9]{1,24}\(ap-mode\)#\s*$'
47
+ accessible_modes:
48
+ - name: 'privileged_exec'
49
+ instructions:
50
+ - send_input:
51
+ input: 'quit'
52
+ failure_indicators:
53
+ - 'The command is'
54
+ - 'is invalid'
55
+ - 'must consist'
56
+ on_open_instructions:
57
+ - enter_mode:
58
+ requested_mode: 'privileged_exec'
59
+ on_close_instructions:
60
+ - enter_mode:
61
+ requested_mode: 'privileged_exec'
62
+ - write:
63
+ input: 'exit'
64
+ force_in_session_auth: true
@@ -0,0 +1,28 @@
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: 'config'
12
+ - name: 'configuration'
13
+ prompt_pattern: '^[a-z0-9\-_]{1,63}\(conf[a-z0-9.\-@/:\+]{0,32}\)#\s*$'
14
+ accessible_modes:
15
+ - name: 'privileged_exec'
16
+ instructions:
17
+ - send_input:
18
+ input: 'top; exit'
19
+ failure_indicators:
20
+ - 'syntax error:'
21
+ on_open_instructions:
22
+ - enter_mode:
23
+ requested_mode: 'privileged_exec'
24
+ on_close_instructions:
25
+ - enter_mode:
26
+ requested_mode: 'privileged_exec'
27
+ - write:
28
+ input: 'q'
@@ -0,0 +1,45 @@
1
+ ---
2
+ prompt_pattern: '^.*[>#$%]\s?+$'
3
+ default_mode: 'privileged_exec'
4
+ modes:
5
+ - name: 'shell'
6
+ prompt_pattern: '^\[\w+\@\S+ \S+\] \$ ?$'
7
+ accessible_modes:
8
+ - name: 'cli'
9
+ instructions:
10
+ - send_input:
11
+ input: 'cli'
12
+ - name: 'cli'
13
+ prompt_pattern: '^\w+@\S+-cli> ?$'
14
+ accessible_modes:
15
+ - name: 'shell'
16
+ instructions:
17
+ - send_input:
18
+ input: 'exit'
19
+ - name: 'configuration'
20
+ instructions:
21
+ - send_input:
22
+ input: 'configure'
23
+ - name: 'configuration'
24
+ prompt_pattern: '^\w+@\S+-cli\(\S+\)% ?$'
25
+ accessible_modes:
26
+ - name: 'cli'
27
+ instructions:
28
+ - send_input:
29
+ input: 'exit'
30
+ failure_indicators:
31
+ - '[error]'
32
+ on_open_instructions:
33
+ - enter_mode:
34
+ requested_mode: 'cli'
35
+ - send_input:
36
+ input: 'set complete-on-space false'
37
+ - send_input:
38
+ input: 'set paginate false'
39
+ - send_input:
40
+ input: 'set screen width 512'
41
+ on_close_instructions:
42
+ - enter_mode:
43
+ requested_mode: 'cli'
44
+ - write:
45
+ input: 'logout'
@@ -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,1000}@[a-z0-9\.\--_()/:~]{1,1000}\$'
7
+ accessible_modes:
8
+ - name: 'configuration'
9
+ instructions:
10
+ - send_input:
11
+ input: 'configure'
12
+ - name: 'configuration'
13
+ prompt_pattern: '^[a-z0-9\.\--_()/:~]{1,1000}@[a-z0-9\.\--_()/:~]{1,1000}#'
14
+ accessible_modes:
15
+ - name: 'privileged_exec'
16
+ instructions:
17
+ - send_input:
18
+ input: 'exit'
19
+ failure_indicators:
20
+ - 'Ambiguous command'
21
+ - 'Incomplete command'
22
+ - 'Invalid command'
23
+ - 'Invalid value'
24
+ - 'Need to specify the config node to set'
25
+ - 'Set failed'
26
+ on_open_instructions:
27
+ - enter_mode:
28
+ requested_mode: 'privileged_exec'
29
+ - send_input:
30
+ input: 'stty cols 100000'
31
+ on_close_instructions:
32
+ - enter_mode:
33
+ requested_mode: 'privileged_exec'
34
+ - write:
35
+ input: 'exit'
@@ -0,0 +1,18 @@
1
+ ---
2
+ prompt_pattern: '^.*[>#$]\s?+$'
3
+ default_mode: 'exec'
4
+ modes:
5
+ - name: 'exec'
6
+ prompt_pattern: '^(.*)[a-zA-Z0-9_\-]*[\>#]\s*$'
7
+ failure_indicators:
8
+ - 'invalid command'
9
+ - 'command authorization fail'
10
+ on_open_instructions:
11
+ - enter_mode:
12
+ requested_mode: 'exec'
13
+ on_close_instructions:
14
+ - enter_mode:
15
+ requested_mode: 'exec'
16
+ - write:
17
+ input: 'exit'
18
+ ntc_templates_platform: 'zyxel_dslam'
scrapli/ffi.py CHANGED
@@ -10,7 +10,7 @@ from scrapli.exceptions import LibScrapliException
10
10
 
11
11
  logger = getLogger(__name__)
12
12
 
13
- LIBSCRAPLI_VERSION = "0.0.1-alpha.10"
13
+ LIBSCRAPLI_VERSION = "0.0.1-alpha.17"
14
14
  LIBSCRAPLI_PATH_OVERRIDE_ENV = "LIBSCRAPLI_PATH"
15
15
  LIBSCRAPLI_CACHE_PATH_OVERRIDE_ENV = "LIBSCRAPLI_CACHE_PATH"
16
16
  XDG_CACHE_HOME_ENV = "XDG_CACHE_HOME"