Sha256: d87d7c63213f60f636b7ddbddf12ae3c1ca30c7778a0263ab3fc42c4a248c218
Contents?: true
Size: 516 Bytes
Versions: 2
Compression:
Stored size: 516 Bytes
Contents
require 'netutils/parser' module Cisco class IfSummary < Parser def cmd 'show interfaces summary' end def initialize(sw) super() add('Init', :init) add('Interface', :interface) @sw = sw end def init(l, m) changeto('Interface') if l =~ /^-+$/ end def interface(l, m) return unless l =~ /^(.) ([^ ]+) +.*$/ up = $1 name = $2 return if name =~ /Port-channel/ return if name =~ /Vlan/ return if ! @sw.ports.exists?(name) @sw.ports[name].up = up == '*' ? true : false end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
netutils-0.1.2 | lib/netutils/cli/cisco/ifsummary.rb |
netutils-0.1.1 | lib/netutils/cli/cisco/ifsummary.rb |