Sha256: d609dc5e1cbaecb8b7e358e55a87b31b4f16b52b2218628206e4c124b67e879c
Contents?: true
Size: 1.05 KB
Versions: 22
Compression:
Stored size: 1.05 KB
Contents
module Fog module OpenStack class SharedFileSystem class Real def update_share(id, options = {}) request( :body => Fog::JSON.encode('share' => options), :expects => 200, :method => 'PUT', :path => "shares/#{id}" ) end end class Mock def update_share(id, options = {}) # stringify keys options = Hash[options.map { |k, v| [k.to_s, v] }] update_data(id, options) response = Excon::Response.new response.status = 200 response.body = {'share' => data[:share_updated]} response end private def update_data(id, options) data[:share_updated] = data[:shares_detailed].first.merge(options) data[:share_updated]['id'] = id data[:share_updated]['status'] = "PENDING" data[:share_updated]['links']['self'] = "https://127.0.0.1:8786/v2/shares/#{id}" end end end end end
Version data entries
22 entries across 22 versions & 3 rubygems