2011-12-26 07:27:19 -05:00
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class Brightbox
|
|
|
|
class Real
|
2012-11-15 09:30:09 -05:00
|
|
|
# Update some settings of the firewall rule.
|
|
|
|
#
|
|
|
|
# @param [String] identifier Unique reference to identify the resource
|
|
|
|
# @param [Hash] options
|
|
|
|
# @option options [String] :protocol
|
|
|
|
# @option options [String] :source Required unless destination is set.
|
|
|
|
# @option options [String] :source_port
|
|
|
|
# @option options [String] :destination Required unless source is set
|
|
|
|
# @option options [String] :destination_port
|
|
|
|
# @option options [String] :icmp_type_name
|
|
|
|
# @option options [String] :description
|
|
|
|
#
|
2013-05-14 07:02:24 -04:00
|
|
|
# @return [Hash] if successful Hash version of JSON object
|
|
|
|
# @return [NilClass] if no options were passed
|
2012-11-15 09:30:09 -05:00
|
|
|
#
|
|
|
|
# @see https://api.gb1.brightbox.com/1.0/#firewall_rule_update_firewall_rule
|
|
|
|
#
|
2012-11-02 11:43:38 -04:00
|
|
|
def update_firewall_rule(identifier, options)
|
|
|
|
return nil if identifier.nil? || identifier == ""
|
|
|
|
return nil if options.empty? || options.nil?
|
2012-12-18 10:00:26 -05:00
|
|
|
wrapped_request("put", "/1.0/firewall_rules/#{identifier}", [202], options)
|
2011-12-26 07:27:19 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|