Sha256: 862efb818ec911356df3e7ab0cf5a7d36a45567aeffc207dc5024c37f7c9c8f5
Contents?: true
Size: 901 Bytes
Versions: 5
Compression:
Stored size: 901 Bytes
Contents
module Fog module Compute class OracleCloud class Real def delete_ssh_key (name) if !name.start_with?("/Compute-") then # They haven't provided a well formed name, add their name in name = "/Compute-#{@identity_domain}/#{@username}/#{name}" end request( :method => 'DELETE', :expects => 204, :path => "/sshkey#{name}", :headers => { 'Content-Type' => 'application/oracle-compute-v3+json' } ) end end class Mock def delete_ssh_key (name) response = Excon::Response.new clean_name = name.sub "/Compute-#{@identity_domain}/#{@username}/", '' self.data[:sshkeys].delete(clean_name) response.status = 204 response end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems