From 23d77b181efb4ab82591abfdecdbbf36c5961417 Mon Sep 17 00:00:00 2001 From: "Robert (KHobbits)" Date: Fri, 11 May 2018 20:33:02 +0100 Subject: Enable 'enable' support for HP Procurves --- CHANGELOG.md | 1 + lib/oxidized/model/procurve.rb | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90456d0..2d1b7e0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Master +* FEATURE: add enable to procurve model (@khobbits) * FEATURE: stoneos model (@macaty) * FEATURE: openwrt model (@z00nx) diff --git a/lib/oxidized/model/procurve.rb b/lib/oxidized/model/procurve.rb index 930dc53..f9175b1 100644 --- a/lib/oxidized/model/procurve.rb +++ b/lib/oxidized/model/procurve.rb @@ -79,6 +79,13 @@ class Procurve < Oxidized::Model end cfg :telnet, :ssh do + # preferred way to handle additional passwords + if vars :enable + post_login do + send "enable\n" + cmd vars(:enable) + end + end post_login 'no page' pre_logout "logout\ny\nn" end -- cgit v1.2.1