Class: Specinfra::Command::Solaris::Base::Ipnat

Inherits:
Base::Ipnat show all
Defined in:
lib/specinfra/command/solaris/base/ipnat.rb

Class Method Summary collapse

Methods inherited from Base

create, escape

Class Method Details

.check_has_rule(rule) ⇒ Object


3
4
5
6
# File 'lib/specinfra/command/solaris/base/ipnat.rb', line 3

def check_has_rule(rule)
  regexp = "^#{rule}$"
  "ipnat -l 2> /dev/null | grep -- #{escape(regexp)}"
end