summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
authorJacob Thomas <jacob@doogie.consulting>2016-02-02 21:54:27 -0500
committerJacob Thomas <jacob@doogie.consulting>2016-02-02 21:54:27 -0500
commite3d1a614e7a1d4ee5cf6983cc2bddcb0c64bb975 (patch)
treeb29dee8d51cf9922b49613d4226a453527fad425 /lib/oxidized/model
parent550a20c9ac0b6f69b91cab9b3d20688a0e7d1bd0 (diff)
parent52eaba0e15c7808949c0821a318376c17b281a12 (diff)
Merge remote-tracking branch 'ytti/master'
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r--lib/oxidized/model/opengear.rb19
1 files changed, 19 insertions, 0 deletions
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 <secret removed>')
+ cfg.gsub!(/community (\S+)/, 'community <secret removed>')
+ 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