class Fog::Compute::RackspaceV2::KeyPair
Public Instance Methods
destroy()
click to toggle source
Destroys a keypair @return [Boolean] true if the keypair is successfully deleted @raise [Fog::Compute::RackspaceV2::NotFound] @raise [Fog::Compute::RackspaceV2::BadRequest] @raise [Fog::Compute::RackspaceV2::InternalServerError] @raise [Fog::Compute::RackspaceV2::ServiceError]
# File lib/fog/rackspace/models/compute_v2/key_pair.rb, line 47 def destroy requires :identity service.delete_keypair(identity) true end
save()
click to toggle source
Creates a keypair @return [Boolean] true if the keypair is successfully created @raise [Fog::Compute::RackspaceV2::NotFound] @raise [Fog::Compute::RackspaceV2::BadRequest] @raise [Fog::Compute::RackspaceV2::InternalServerError] @raise [Fog::Compute::RackspaceV2::ServiceError]
# File lib/fog/rackspace/models/compute_v2/key_pair.rb, line 34 def save requires :name data = service.create_keypair(name, public_key) merge_attributes(data.body['keypair']) data.body['keypair']['name'] == name end