Sha256: 4b534ab62a09072b1174b6376811ef7142f59f0445103e889dd6b740d96bbdc3
Contents?: true
Size: 1009 Bytes
Versions: 12
Compression:
Stored size: 1009 Bytes
Contents
module Fog module Compute class OracleCloud class Real def create_volume(name, size, high_latency = false, options={}) name.sub! "/Compute-#{@identity_domain}/#{@username}/", '' # Just in case it's already set body_data = { 'name' => "/Compute-#{@identity_domain}/#{@username}/#{name}", 'size' => size, 'properties' => [] } body_data['properties'].push(high_latency ? "/oracle/public/storage/latency" : '/oracle/public/storage/default') body_data = body_data.reject {|key, value| value.nil?} request( :method => 'POST', :expects => 201, :path => "/storage/volume/", :body => Fog::JSON.encode(body_data), :headers => { 'Content-Type' => 'application/oracle-compute-v3+json' } ) end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems