class Fog::Compute::OneAndOne::SshKey

Public Instance Methods

destroy() click to toggle source
# File lib/oneandone/models/compute/ssh_key.rb, line 47
def destroy

  requires :id

  service.delete_ssh_key(id)
  
  true

end
ready?() click to toggle source
# File lib/oneandone/models/compute/ssh_key.rb, line 58
def ready?

  state == 'ACTIVE'

end
save() click to toggle source
# File lib/oneandone/models/compute/ssh_key.rb, line 18
def save

  # Perform Request
  response = service.create_ssh_key(name: name, description: description,
    public_key: public_key)

  # Merge Attributes
  merge_attributes(response.body)

  true

end
update(options = {}) click to toggle source
# File lib/oneandone/models/compute/ssh_key.rb, line 32
def update(options = {})

  requires :id

  response = service.update_ssh_key(ssh_key_id: id,
    name: options[:name], description: options[:description])

  # Merge Attributes
  merge_attributes(response.body)

  true

end