Class: OsCtl::Cli::Receive

Inherits:
Command
  • Object
show all
Defined in:
lib/osctl/cli/receive.rb

Instance Method Summary collapse

Methods inherited from Command

#cli_opt, #format_output, #osctld_call, #osctld_fmt, #osctld_open, #osctld_resp, run

Instance Method Details

#authorized_keys_addObject



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/osctl/cli/receive.rb', line 9

def authorized_keys_add
  require_args!('name')
  osctld_fmt(:receive_authkey_add, cmd_opts: {
    pool: gopts[:pool],
    name: args[0],
    public_key: $stdin.readline.strip,
    from: opts['from'],
    ctid: opts['ctid'],
    passphrase: opts['passphrase'],
    single_use: opts['single-use']
  })
end

#authorized_keys_deleteObject



22
23
24
25
26
27
28
# File 'lib/osctl/cli/receive.rb', line 22

def authorized_keys_delete
  require_args!('name')
  osctld_fmt(:receive_authkey_delete, cmd_opts: {
    pool: gopts[:pool],
    name: args[0]
  })
end

#authorized_keys_listObject



5
6
7
# File 'lib/osctl/cli/receive.rb', line 5

def authorized_keys_list
  osctld_fmt(:receive_authkey_list, cmd_opts: { pool: gopts[:pool] })
end