summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized')
-rw-r--r--lib/oxidized/model/viptela.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/oxidized/model/viptela.rb b/lib/oxidized/model/viptela.rb
new file mode 100644
index 0000000..f08e1b4
--- /dev/null
+++ b/lib/oxidized/model/viptela.rb
@@ -0,0 +1,29 @@
+class Viptela < Oxidized::Model
+ # Cisco Vipetla
+
+ prompt /[-\w]+#\s$/
+ comment '! '
+
+ cmd :all do |cfg|
+ cfg.each_line.to_a[1..-2].join
+ end
+
+ cmd :secret do |cfg|
+ cfg.gsub! /(^\s+secret-key|password|auth-password|priv-password)\s+.*$/, '\\1 <secret hidden>'
+ cfg.gsub! /(^\s+community)\s.*$/, '\\1 <secret hidden>'
+ cfg
+ end
+
+ cmd 'show running-config' do |cfg|
+ cfg
+ end
+
+ cmd 'show version' do |cfg|
+ comment cfg
+ end
+
+ cfg :ssh do
+ post_login 'paginate false'
+ pre_logout 'exit'
+ end
+end