Sha256: f2fb605cbb9a45fe5f046ee6e930df61368ad1fba7959a776e999fcbbafec136
Contents?: true
Size: 955 Bytes
Versions: 47
Compression:
Stored size: 955 Bytes
Contents
# # Author:: Matt Eldridge (<matt.eldridge@us.ibm.com>) # © Copyright IBM Corporation 2014. # # LICENSE: MIT (http://opensource.org/licenses/MIT) # module Fog module Compute class Softlayer class Mock def create_key_pair(opts) response = Excon::Response.new response.status = 200 response.body = [] response.body = { "createDate" => Time.now.iso8601, "fingerprint" => "1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:1a:1a", "id" => Fog::Mock.random_numbers(5).to_i, "key" => opts[:key], "label" => opts[:label], "modifyDate" => nil } @key_pairs.push(response.body) response end end class Real def create_key_pair(opts) request(:security_ssh_key, :create_object, :body => opts, :http_method => :post) end end end end end
Version data entries
47 entries across 45 versions & 3 rubygems