Class: Serverspec::Type::WindowsFirewall
- Inherits:
-
Base
- Object
- Base
- Serverspec::Type::WindowsFirewall
show all
- Defined in:
- lib/serverspec/type/windows_firewall.rb
Instance Attribute Summary
Attributes inherited from Base
#name
Instance Method Summary
collapse
Methods inherited from Base
#initialize, #inspect, #to_ary, #to_s
Instance Method Details
#allowed? ⇒ Boolean
23
24
25
|
# File 'lib/serverspec/type/windows_firewall.rb', line 23
def allowed?
@runner.check_firewall_has_action(@name, 'Allow')
end
|
#enabled? ⇒ Boolean
19
20
21
|
# File 'lib/serverspec/type/windows_firewall.rb', line 19
def enabled?
@runner.check_firewall_is_enabled(@name)
end
|
#exists? ⇒ Boolean
3
4
5
|
# File 'lib/serverspec/type/windows_firewall.rb', line 3
def exists?
@runner.check_firewall_exists(@name)
end
|
#has_localport?(port) ⇒ Boolean
11
12
13
|
# File 'lib/serverspec/type/windows_firewall.rb', line 11
def has_localport?(port)
@runner.check_firewall_has_localport(@name, port)
end
|
#inbound? ⇒ Boolean
15
16
17
|
# File 'lib/serverspec/type/windows_firewall.rb', line 15
def inbound?
@runner.check_firewall_has_direction(@name, 'Inbound')
end
|
#tcp? ⇒ Boolean
7
8
9
|
# File 'lib/serverspec/type/windows_firewall.rb', line 7
def tcp?
@runner.check_firewall_has_protocol(@name, 'TCP')
end
|