Sha256: 52c1d5d673384258dd0ce75e4e6cdb55d4fee738c8fdbe3dd91dde929f2fbd6c
Contents?: true
Size: 926 Bytes
Versions: 79
Compression:
Stored size: 926 Bytes
Contents
module Fog module Compute class HP class Real # Delete a keypair # # ==== Parameters # * key_name<~String> - Name of the keypair to delete # def delete_key_pair(key_name) request( :expects => 202, :method => 'DELETE', :path => "os-keypairs/#{key_name}" ) end end class Mock def delete_key_pair(key_name) response = Excon::Response.new if self.data[:key_pairs][key_name] self.data[:last_modified][:key_pairs].delete(key_name) self.data[:key_pairs].delete(key_name) response.status = 202 response.body = "202 Accepted\n\nThe request is accepted for processing.\n\n " response else raise Fog::Compute::HP::NotFound end end end end end end
Version data entries
79 entries across 79 versions & 12 rubygems