From 8bef76580a3e848836f3f12fe9e6c50380dbe01e Mon Sep 17 00:00:00 2001 From: pv2b Date: Sat, 18 Nov 2017 10:59:28 +0100 Subject: 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. --- lib/oxidized/model/procurve.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/oxidized/model/procurve.rb') 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/, '' -- cgit v1.2.1 From a9e5eed60b687b4a488eb1d11b5147e9f932c6fa Mon Sep 17 00:00:00 2001 From: Dave Date: Sat, 10 Feb 2018 17:10:23 -0500 Subject: mode: Procurve model add show commands (#1176) Sanitized output: ``` Power Supply Status: PS# Model State AC/DC + V Wattage ---- --------- ------------- ----------------- --------- 1 Unknwn Powered AC 220V 1500 2 Unknwn Powered AC 220V 1500 2 / 2 supply bays delivering power. Total power: 3000 W ``` Of course you see `unknwn` but that is addressed in latest firmware release. Thanks! --- lib/oxidized/model/procurve.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/oxidized/model/procurve.rb') diff --git a/lib/oxidized/model/procurve.rb b/lib/oxidized/model/procurve.rb index 11d7ea9..444fb5b 100644 --- a/lib/oxidized/model/procurve.rb +++ b/lib/oxidized/model/procurve.rb @@ -47,6 +47,10 @@ class Procurve < Oxidized::Model comment cfg end + cmd 'show system power-supply' do |cfg| + comment cfg + end + cmd 'show interfaces transceiver' do |cfg| comment cfg end -- cgit v1.2.1