Sha256: 0f110680c525f39ece49778561ded518b47cc352d7a6196f2cd94bee828d426f
Contents?: true
Size: 1.44 KB
Versions: 22
Compression:
Stored size: 1.44 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 self.data[:operations].has_key?(instance_id) body = { 'kind' => 'sql#operationsList', 'items' => self.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
22 entries across 20 versions & 5 rubygems