Sha256: 3ffdde95ad8fc60edc3450c22755d5185f12dc887f6569d0c0d0f12f485b4545
Contents?: true
Size: 865 Bytes
Versions: 1
Compression:
Stored size: 865 Bytes
Contents
module Fog module Compute class OracleCloud class Real def create_ssh_key (name, enabled, key) # Just in case it's already set name.sub! "/Compute-#{@identity_domain}/#{@username}/", '' body_data = { 'name' => "/Compute-#{@identity_domain}/#{@username}/#{name}", 'enabled' => enabled, 'key' => key } body_data = body_data.reject {|key, value| value.nil?} request( :method => 'POST', :expects => 201, :path => "/sshkey/", :body => Fog::JSON.encode(body_data), :headers => { 'Content-Type' => 'application/oracle-compute-v3+json' } ) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-oraclecloud-0.1.1 | lib/fog/oraclecloud/requests/compute/create_ssh_key.rb |