Skip to content

Commit 87355fd

Browse files
committed
Update fortigate prompt for HA cluster status
... so that it will works if Fortinet introduces new status names.
1 parent ae61cb4 commit 87355fd

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

lib/oxidized/model/fortigate.rb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ class FortiGate < Oxidized::Model
55

66
prompt(/
77
^
8-
(?:\(\w\)\ )? # optional status indicator, e.g. "(M) "
9-
[-\w.~]+ # hostname
10-
(?:\((?:Primary|Secondary)\))? # optional HA cluster status
11-
(?:\s[(\w\-.)]+)? # optional VDOM
12-
~?\s?[#>$]\s?$ # End of prompt
8+
(?:\(\w\)\ )? # optional status indicator, e.g. "(M) "
9+
[-\w.~]+ # hostname
10+
(?:\((?:\w+)\))? # optional HA cluster status (Primary|Secondary)
11+
(?:\ [(\w\-.)]+)? # optional VDOM
12+
~?\ ?[#>$]\ ?$ # End of prompt
1313
/x)
14-
1514
# When a post-login-banner is enabled, you have to press "a" to log in
1615
expect /^\(Press\s'a'\sto\saccept\):/ do |data, re|
1716
send 'a'

0 commit comments

Comments
 (0)