Method: HP::Cloud::ServerHelper#set_keypair
- Defined in:
- lib/hpcloud/server_helper.rb
#set_keypair(value) ⇒ Object
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/hpcloud/server_helper.rb', line 112 def set_keypair(value) if value.nil? return true end @keypair = Keypairs.new.get(value, false) unless @keypair.is_valid? set_error(@keypair.cstatus) return false end @keyname = @keypair.name if @windows begin @private_key = @keypair.private_read rescue end end return true end |