class HPMSM < Oxidized::Model prompt /^CLI[>#] +$/ comment '! ' # replace next line control sequence with a new line expect /(\e\[1M\e\[\??\d+(;\d+)*[A-Za-z]\e\[1L)|(\eE)/ do |data, re| data.gsub re, "\n" end # replace all used vt100 control sequences expect /\e\[\??\d+(;\d+)*[A-Za-z]/ do |data, re| data.gsub re, '' end cmd :all do |cfg| cfg = cfg.cut_both cfg = cfg.gsub /^\r/, '' cfg end cmd :secret do |cfg| cfg.gsub! /^(snmp-server community) \S+(.*)/, '\\1