Class: Inspec::Resources::Interfaces::LinuxInterfaceLister
- Inherits:
-
InterfaceLister
- Object
- InterfaceLister
- Inspec::Resources::Interfaces::LinuxInterfaceLister
- Defined in:
- lib/inspec/resources/interfaces.rb
Instance Attribute Summary
Attributes inherited from InterfaceLister
Instance Method Summary collapse
Methods inherited from InterfaceLister
Constructor Details
This class inherits a constructor from Inspec::Resources::Interfaces::InterfaceLister
Instance Method Details
#scan_interfaces ⇒ Object
90 91 92 93 94 95 96 97 |
# File 'lib/inspec/resources/interfaces.rb', line 90 def scan_interfaces iface_data = [] cmd = inspec.command("ls /sys/class/net") cmd.stdout.split("\n").each do |iface| iface_data << { "name" => iface } end iface_data end |