From ba5bfd826ce8d13500497ff477ec219df921f527 Mon Sep 17 00:00:00 2001 From: Mike Bryant Date: Tue, 2 Feb 2016 11:03:11 +0000 Subject: Add OpenGear model --- lib/oxidized/model/opengear.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 lib/oxidized/model/opengear.rb (limited to 'lib') diff --git a/lib/oxidized/model/opengear.rb b/lib/oxidized/model/opengear.rb new file mode 100644 index 0000000..7f801f8 --- /dev/null +++ b/lib/oxidized/model/opengear.rb @@ -0,0 +1,19 @@ +class OpenGear < Oxidized::Model + + comment '# ' + + cmd :secret do |cfg| + cfg.gsub!(/password (\S+)/, 'password ') + cfg.gsub!(/community (\S+)/, 'community ') + cfg + end + + cmd('cat /etc/version') { |cfg| comment cfg } + + cmd 'config -g config' + + cfg :ssh do + exec true # don't run shell, run each command in exec channel + end + +end -- cgit v1.2.1