Class: Copian::Collector::CiscoPortsCollector
- Inherits:
-
PortsCollector
- Object
- AbstractCollector
- PortsCollector
- Copian::Collector::CiscoPortsCollector
- Defined in:
- lib/copian/collector/cisco/ports.rb
Overview
:nodoc:
Instance Method Summary collapse
- #collect ⇒ Object
-
#initialize(manager, vlans_collector) ⇒ CiscoPortsCollector
constructor
A new instance of CiscoPortsCollector.
Constructor Details
#initialize(manager, vlans_collector) ⇒ CiscoPortsCollector
Returns a new instance of CiscoPortsCollector.
4 5 6 7 |
# File 'lib/copian/collector/cisco/ports.rb', line 4 def initialize(manager, vlans_collector) super(manager) @vlans_collector = vlans_collector end |
Instance Method Details
#collect ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/copian/collector/cisco/ports.rb', line 8 def collect each_vlan do |manager| mac_bridge_ports = gather_mac_bridge_ports(manager) bridge_port_iface = gather_bridge_port_ifaces(manager) # Now we stitch the two lists together mac_bridge_ports.each do |bridge_port, addresses| yield bridge_port_iface[bridge_port], addresses end end end |