1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[Brightbox] Standardises update_firewall_rule

Code was not generated and missed the checks for blank identifiers or
options.
This commit is contained in:
Paul Thornthwaite 2012-11-02 15:43:38 +00:00
parent fb13fd981d
commit 0ceb4c54d9

View file

@ -3,8 +3,10 @@ module Fog
class Brightbox
class Real
def update_firewall_rule(id, options)
request("put", "/1.0/firewall_rules/#{id}", [202], options)
def update_firewall_rule(identifier, options)
return nil if identifier.nil? || identifier == ""
return nil if options.empty? || options.nil?
request("put", "/1.0/firewall_rules/#{identifier}", [202], options)
end
end