Sha256: 338f4e8f9e226a6ce28f388622e3c155dc8d639d64d3aee522c28d1a3556b03e
Contents?: true
Size: 1.15 KB
Versions: 2
Compression:
Stored size: 1.15 KB
Contents
module Fog module Compute class OneAndOne class Real ## # Returns information about a shared storage # URL: [https://cloudpanel-api.1and1.com/documentation/1and1/v1/en/documentation.html#shared_storages__shared_storage_id__get] ## def get_shared_storage(shared_storage_id) params = { 'method' => :get, 'endpoint' => "/shared_storages/#{shared_storage_id}" } request(params) end end # Real class Mock def get_shared_storage(shared_storage_id) # Search for shared storage to return if shared_storage = self.data[:shared_storages].find { |hash| hash['id'] == shared_storage_id } else raise Fog::Errors::NotFound.new('The requested resource could not be found.') end # Return Response Object to User response = Excon::Response.new response.status = 202 response.body = shared_storage response end end # Mock end # OneAndOne end # Compute end # Fog
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
fog-oneandone-1.2 | lib/oneandone/requests/compute/get_shared_storage.rb |
fog-oneandone-1.0 | lib/oneandone/requests/compute/get_shared_storage.rb |