Method: IBMSmartCloud#generate_keypair

Defined in:
lib/smartcloud.rb

#generate_keypair(name, publicKey = nil) ⇒ Object



265
266
267
268
269
270
271
272
273
274
# File 'lib/smartcloud.rb', line 265

def generate_keypair(name, publicKey=nil)
  options = {:name => name}
  options[:publicKey] = publicKey if publicKey
  response = post("/keys", options)
  if publicKey
    true
  else
    response.PrivateKey.KeyMaterial
  end
end