Sha256: 21105d3932d9b70a345564c06720285b3dbb41f1efbef6544e3ce862d7950eff
Contents?: true
Size: 1.42 KB
Versions: 14
Compression:
Stored size: 1.42 KB
Contents
module Fog module Google class SQL ## # Lists all instance operations that have been performed on the given Cloud SQL instance # in the reverse chronological order of the start time # # @see https://developers.google.com/cloud-sql/docs/admin-api/v1beta3/operations/list class Real def list_operations(instance_id) api_method = @sql.operations.list parameters = { "project" => @project, "instance" => instance_id } request(api_method, parameters) end end class Mock def list_operations(instance_id) if data[:operations].key?(instance_id) body = { "kind" => 'sql#operationsList', "items" => data[:operations][instance_id].values } status = 200 else body = { "error" => { "errors" => [ { "domain" => "global", "reason" => "notAuthorized", "message" => "The client is not authorized to make this request." } ], "code" => 403, "message" => "The client is not authorized to make this request." } } status = 403 end build_excon_response(body, status) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems