Sha256: 361c0efe2d1cdb4841fe438dd541773e0e603647a82c52c7fd640a14da28ee49
Contents?: true
Size: 1.06 KB
Versions: 3
Compression:
Stored size: 1.06 KB
Contents
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<EXPERT PASSWORD REMOVED>' cfg.gsub! /^(set user \S+ password-hash ).*/, '\1<USER PASSWORD REMOVED>' cfg.gsub! /^(set ospf .* secret ).*/, '\1<OSPF KEY REMOVED>' cfg.gsub! /^(set snmp community )(.*)( read-only.*)/, '\1<SNMP COMMUNITY REMOVED>\3' cfg.gsub! /^(add snmp .* community )(.*)(\S?.*)/, '\1<SNMP COMMUNITY REMOVED>\3' cfg.gsub! /(auth|privacy)(-pass-phrase-hashed )(\S*)/, '\1-pass-phrase-hashed <SNMP PASS-PHRASE REMOVED>' cfg end cmd 'show asset all' do |cfg| comment cfg end cmd 'show version all' do |cfg| comment cfg end cmd 'show configuration' do |cfg| cfg.gsub! /^# Exported by \S+ on .*/, '# ' cfg end cfg :ssh do # User shell must be /etc/cli.sh post_login 'set clienv rows 0' pre_logout 'exit' end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.24.0 | lib/oxidized/model/gaiaos.rb |
oxidized-0.23.0 | lib/oxidized/model/gaiaos.rb |
oxidized-0.22.0 | lib/oxidized/model/gaiaos.rb |