class Fog::Compute::Gridscale::Sshkey

Public Instance Methods

delete() click to toggle source
# File lib/fog/compute/gridscale/models/sshkey.rb, line 34
def delete
  requires :object_uuid
  response = service.sshkey_delete object_uuid
  response.body
end
destroy() click to toggle source
# File lib/fog/compute/gridscale/models/sshkey.rb, line 40
def destroy
  requires :object_uuid
  response = service.sshkey_delete(object_uuid)
  response
end
save() click to toggle source
# File lib/fog/compute/gridscale/models/sshkey.rb, line 18
def save
  raise Fog::Errors::Error.new('Re-saving an existing object may create a duplicate') if persisted?
  requires :name, :sshkey

  options = {}

  if attributes[:labels]
    options[:labels] = labels
  end

  data = service.sshkey_create(name, sshkey, options)

  merge_attributes(data.body)
  true
end