Sha256: df2631ce94745c5597cf0b54051a550f9f2b37a164dafa0aa2c1f543659637ee
Contents?: true
Size: 992 Bytes
Versions: 53
Compression:
Stored size: 992 Bytes
Contents
class Ey::Core::Client class Real def destroy_firewall_rule(params={}) id = params["id"] url = params.delete("url") request( :path => "/firewall-rules/#{id}", :url => url, :method => :delete, ) end end class Mock def destroy_firewall_rule(params={}) extract_url_params!(params) request_id = self.uuid firewall_rule_id = params["id"] || params["firewall_rule"] firewall_rule = self.find(:firewall_rules, firewall_rule_id) request = { "type" => "deprovision_firewall_rule", "started_at" => Time.now, "finished_at" => nil, "successful" => "true", "id" => request_id, } self.data[:requests][request_id] = request.merge( "resource" => [:firewall_rules, firewall_rule_id, firewall_rule.merge("deleted_at" => Time.now)], ) response( :body => {"request" => request}, ) end end end
Version data entries
53 entries across 53 versions & 3 rubygems