Skip to content

Commit

Permalink
xos.rb: Fix prompt
Browse files Browse the repository at this point in the history
First attempt to fix #3259
  • Loading branch information
robertcheramy committed Jan 30, 2025
1 parent 2ba0ed6 commit 030e58f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/oxidized/model/xos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@ class XOS < Oxidized::Model

# Extreme Networks XOS

prompt /^\s?\*?\s?[-\w]+\s?[-\w.~]+(:\d+)? [#>] $/
# (\* )? (opt) unsaved configuration
# (Slot-\d+ )? (opt) slot for stacks
# (VPEX )? (opt) VPEX = Virtual port extender
# \(? (opt) parenthesis around hostname
# [\w\-.~]+ hostname
# \)? (opt) parenthesis around hostname
# ([.:]\d+)? (opt) prompt counting
# [#>] trailing text
prompt /^(\* )?(Slot-\d+ )?(VPEX )?\(?[\w\-.~]+\)?([.:]\d+)? [#>] $/
comment '# '

cmd :all do |cfg|
Expand Down
18 changes: 18 additions & 0 deletions spec/model/data/xos:generic:prompt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pass:
# Prompts from PR #2075
# unsaved config
- "* mydevice-eu-sw02 > "
# saved config
- "my-device02.1 # "
- "my-device02.2 # "
# old xos
- "ancient-device02:1 # "
# Prompts from issue #2107
- "Slot-1 stack_office_x3.1 # "
# Prompts from issue #2113
- "* sw0.l9.kv.1 # "
- "* sw0.l9.kv.2 # "
# Prompts from issue #3259
- "Slot-1 VPEX SW-00035-002.1 # "
- "(super-ancient-machine001) > "
- "(super-ancient-machine001) # "

0 comments on commit 030e58f

Please sign in to comment.