libraries/google_compute_firewall.rb
# NOTE: that port_list only accepts individual ports to match, not ranges
that port_list only accepts individual ports to match, not ranges
that port_list only accepts individual ports to match not ranges
def port_protocol_allowed(single_port, protocol = 'tcp')
    raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall is missing expected property 'allowed' or 'denied'" if !defined?(allowed) || !defined?(denied)
    raise Inspec::Exceptions::ResourceFailed, "google_compute_firewall 'allowed' and 'denied' cannot both be nil" if allowed.nil? && denied.nil?
    allowed_flag = denied.nil?
    return match_rule_protocol(allowed, single_port, protocol, allowed_flag) if allowed_flag
    match_rule_protocol(denied, single_port, protocol, allowed_flag)
  end
def port_protocol_allowed ( single_port , protocol = 'tcp' ) raise Inspec :: Exceptions :: ResourceFailed , "google_compute_firewall is missing expected property 'allowed' or 'denied'" if ! defined? ( allowed ) || ! defined? ( denied ) raise Inspec :: Exceptions :: ResourceFailed , "google_compute_firewall 'allowed' and 'denied' cannot both be nil" if allowed . nil? && denied . nil? allowed_flag = denied . nil? return match_rule_protocol ( allowed , single_port , protocol , allowed_flag ) if allowed_flag match_rule_protocol ( denied , single_port , protocol , allowed_flag ) end
NOTE: that port_list only accepts individual ports to match, not ranges
NOTE : that port_list only accepts individual ports to match not ranges
single_port
protocol