summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
authorpv2b <pvz@pvz.pp.se>2017-11-18 10:59:28 +0100
committerNeil Lathwood <neil@lathwood.co.uk>2017-11-18 09:59:28 +0000
commit8bef76580a3e848836f3f12fe9e6c50380dbe01e (patch)
tree153532dfda20bffa884de0486372b6c86bef132b /lib/oxidized/model
parent77e5c874896e8f17aa32fa40b96196a8d2932ff5 (diff)
model: Procurve Handle switch selection for stack commanders (#1104)
When trying to connect to a HP Procurve Switch with stacking enabled, you are asked to choose which switch to connect to to manage. This patch makes it so that if this question is encountered, just press "Enter" to choose the stack commander. This won't make backing up stack members work (they still need to be configured seperately and given IP addresses, making stacking useless) but at least it makes it possible to back up a commander in a stack seperately. Fixed #1070 Credit to @stiltzkin10 for this fix.
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r--lib/oxidized/model/procurve.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/oxidized/model/procurve.rb b/lib/oxidized/model/procurve.rb
index 180b703..11d7ea9 100644
--- a/lib/oxidized/model/procurve.rb
+++ b/lib/oxidized/model/procurve.rb
@@ -21,6 +21,11 @@ class Procurve < Oxidized::Model
""
end
+ expect /Enter switch number/ do
+ send "\n"
+ ""
+ end
+
cmd :all do |cfg|
cfg = cfg.each_line.to_a[1..-2].join
cfg = cfg.gsub /^\r/, ''