class PowerConnect < Oxidized::Model prompt /^([\w\s.@-]+(\(\S*\))?[#>]\s?)$/ # allow spaces in hostname..dell does not limit it.. # comment '! ' expect /^\s*--More--\s+.*$/ do |data, re| send ' ' data.sub re, '' end cmd :all do |cfg| cfg.each_line.to_a[1..-3].join end cmd :secret do |cfg| cfg.gsub! /^(username \S+ password (?:encrypted )?)\S+(.*)/, '\1\2' cfg.gsub! /^(tacacs-server key) \S+/, '\\1