Project

General

Profile

Actions

Bug #11990

closed

app/services/fact_parser.rb does not return all the virtual interfaces

Added by Julien Pivotto over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Facts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

This looks like a bug:

While taking a look into the foreman code, I saw that snippet in app/services/fact_parser.rb

  def find_physical_interface(interfaces)
    interfaces.detect { |int, _| int.to_s !~ FactParser::VIRTUAL_NAMES }
  end

  def find_virtual_interface(interfaces)
    interfaces.detect { |int, _| int.to_s =~ /#{FactParser::BONDS}/ }
  end

I think this should be

  def find_physical_interface(interfaces)
    interfaces.detect { |int, _| int.to_s !~ FactParser::VIRTUAL_NAMES }
  end

  def find_virtual_interface(interfaces)
    interfaces.detect { |int, _| int.to_s =~ FactParser::VIRTUAL_NAMES }
  end
Actions

Also available in: Atom PDF