Sha256: f010a984259650ba92d278f20c76c18a4336fba68f8fe5588a9b979ddc355364
Contents?: true
Size: 979 Bytes
Versions: 14
Compression:
Stored size: 979 Bytes
Contents
module Fog module Compute class Google class Mock def get_region(identity) rname = identity.split("/")[-1] region = data[:regions][rname] || { "error" => { "errors" => [ { "domain" => "global", "reason" => "notFound", "message" => "The resource 'projects/#{project}/regions/#{rname}' was not found" } ], "code" => 404, "message" => "The resource 'projects/#{project}/regions/#{rname}' was not found" } } build_excon_response(region) end end class Real def get_region(identity) api_method = @compute.regions.get parameters = { "project" => @project, "region" => identity.split("/")[-1] } request(api_method, parameters) end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems