class CiscoSMB < Oxidized::Model # Cisco Small Business 300, 500, and ESW2 series switches # http://www.cisco.com/c/en/us/support/switches/small-business-300-series-managed-switches/products-release-notes-list.html prompt /^\r?([\w.@()-]+[#>]\s?)$/ comment '! ' cmd :all do |cfg| lines = cfg.each_line.to_a[1..-2] # Remove \r from beginning of response lines[0].gsub!(/^\r.*?/, '') if lines.length > 0 lines.join end cmd :secret do |cfg| cfg.gsub! /^(snmp-server community).*/, '\\1 ' cfg.gsub! /username (\S+) privilege (\d+) (\S+).*/, '