Class: OceanCommander::SshKeys

Inherits:
General
  • Object
show all
Defined in:
lib/ocean_commander/ssh_keys.rb

Instance Method Summary collapse

Instance Method Details

#add(name, ssh_pub_key = nil) ⇒ Object



14
15
16
# File 'lib/ocean_commander/ssh_keys.rb', line 14

def add(name,ssh_pub_key=nil)
  tp api.ssh_keys.add(name: name, ssh_pub_key: ssh_pub_key).ssh_key
end

#destroy(id) ⇒ Object



24
25
26
# File 'lib/ocean_commander/ssh_keys.rb', line 24

def destroy(id)
  tp api.ssh_keys.delete(id).ssh_key
end

#edit(id, ssh_pub_key = nil) ⇒ Object



19
20
21
# File 'lib/ocean_commander/ssh_keys.rb', line 19

def edit(id, ssh_pub_key=nil)
  tp api.ssh_keys.edit(id, ssh_pub_key: ssh_pub_key).ssh_key
end

#listObject



4
5
6
# File 'lib/ocean_commander/ssh_keys.rb', line 4

def list
  tp api.ssh_keys.list.ssh_keys
end

#show(id = nil) ⇒ Object



9
10
11
# File 'lib/ocean_commander/ssh_keys.rb', line 9

def show(id=nil)
  tp api.ssh_keys.show(id).ssh_key
end