class Specinfra::Helper::DetectOs::Eos

Public Instance Methods

detect() click to toggle source
# File lib/specinfra/helper/detect_os/eos.rb, line 2
def detect
  # Arista Networks EOS
  if run_command('ls /etc/Eos-release').success?
    line = run_command('cat /etc/Eos-release').stdout
    if line =~ /EOS (\d[\d.]*[A-Z]*)/
      release = $1
    end
    { :family => 'eos', :release => release }
  end
end