Class: Fog::Compute::Glesys::SshKey

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/glesys/models/compute/ssh_key.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject



19
20
21
22
23
24
# File 'lib/fog/glesys/models/compute/ssh_key.rb', line 19

def destroy
  requires :id

  service.ssh_key_remove(:sshkeyids => id)
  true
end

#saveObject



10
11
12
13
14
15
16
17
# File 'lib/fog/glesys/models/compute/ssh_key.rb', line 10

def save
  requires :description, :data

  merge_attributes(service.ssh_key_add(:description => description,
                                      :sshkey => data
                                     ).body["response"]["sshkey"])
  true
end