From 21e3d6490496573f25ef77fe8172766ac7d1a736 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Sat, 21 Apr 2018 13:27:05 +0200 Subject: the great makeover - standardize layout, alignment, indentation --- lib/oxidized/model/gaiaos.rb | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'lib/oxidized/model/gaiaos.rb') diff --git a/lib/oxidized/model/gaiaos.rb b/lib/oxidized/model/gaiaos.rb index 434e774..8f13bcb 100644 --- a/lib/oxidized/model/gaiaos.rb +++ b/lib/oxidized/model/gaiaos.rb @@ -1,25 +1,23 @@ class GaiaOS < Oxidized::Model - # CheckPoint - Gaia OS Model - + # Gaia Prompt prompt /^([\[\]\w.@:-]+[#>]\s?)$/ # Comment tag comment '# ' - cmd :all do |cfg| cfg = cfg.each_line.to_a[1..-2].join end cmd :secret do |cfg| cfg.gsub! /^(set expert-password-hash ).*/, '\1' - cfg.gsub! /^(set user \S+ password-hash ).*/,'\1' - cfg.gsub! /^(set ospf .* secret ).*/,'\1' - cfg.gsub! /^(set snmp community )(.*)( read-only.*)/,'\1\3' - cfg.gsub! /^(add snmp .* community )(.*)(\S?.*)/,'\1\3' - cfg.gsub! /(auth|privacy)(-pass-phrase-hashed )(\S*)/,'\1-pass-phrase-hashed ' + cfg.gsub! /^(set user \S+ password-hash ).*/, '\1' + cfg.gsub! /^(set ospf .* secret ).*/, '\1' + cfg.gsub! /^(set snmp community )(.*)( read-only.*)/, '\1\3' + cfg.gsub! /^(add snmp .* community )(.*)(\S?.*)/, '\1\3' + cfg.gsub! /(auth|privacy)(-pass-phrase-hashed )(\S*)/, '\1-pass-phrase-hashed ' cfg end @@ -36,11 +34,9 @@ class GaiaOS < Oxidized::Model cfg end - cfg :ssh do # User shell must be /etc/cli.sh post_login 'set clienv rows 0' pre_logout 'exit' end - end -- cgit v1.2.1