Class: Specinfra::Helper::DetectOs::Eos
- Inherits:
-
Specinfra::Helper::DetectOs
- Object
- Specinfra::Helper::DetectOs
- Specinfra::Helper::DetectOs::Eos
- Defined in:
- lib/specinfra/helper/detect_os/eos.rb
Instance Method Summary collapse
Methods inherited from Specinfra::Helper::DetectOs
detect, #initialize, #run_command
Constructor Details
This class inherits a constructor from Specinfra::Helper::DetectOs
Instance Method Details
#detect ⇒ Object
2 3 4 5 6 7 8 9 10 11 |
# 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 |