Class: Specinfra::Command::Redhat::Base::Port

Inherits:
Base::Port show all
Defined in:
lib/specinfra/command/redhat/base/port.rb

Direct Known Subclasses

V7::Port

Class Method Summary collapse

Methods inherited from Base::Port

check_is_listening

Methods inherited from Base

escape

Class Method Details

.create(os_info = nil) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/specinfra/command/redhat/base/port.rb', line 3

def create(os_info=nil)
  release = (os_info || os)[:release].to_i
  # Dirty hack for Amazon Linux
  if release < 7 || release > 2000
    self
  else
    Specinfra::Command::Redhat::V7::Port
  end
end