class AWPlus < Oxidized::Model #Allied Telesis Alliedware Plus Model# #https://www.alliedtelesis.com/products/software/AlliedWare-Plus prompt /^(\r?[\w.@:\/-]+[#>]\s?)$/ comment '! ' #Avoids needing "term length 0" to display full config file. expect /--More--/ do |data, re| send ' ' data.sub re, '' end #Removes gibberish pager output e.g. VT100 escape codes cmd :all do |cfg| cfg.gsub! /\e\[K/, '' # example how to handle pager - cleareol EL0 cfg.gsub! /\e\[7m\e\[m/, '' # example how to handle pager - Reverse SGR7 cfg.gsub! /\r/, '' # Filters rogue ^M - see issue #415 cfg.each_line.to_a[1..-2].join end #Remove passwords from config file. #Add vars "remove_secret: true" to global oxidized config file to enable. cmd :secret do |cfg| cfg.gsub! /^(snmp-server community).*/, '\\1 ' cfg.gsub! /^(username \S+ privilege \d+) (\S+).*/, '\\1