Class: OsCtl::Cli::Receive

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

Instance Attribute Summary

Attributes inherited from Command

#args, #gopts, #opts

Instance Method Summary collapse

Methods inherited from Command

#cli_opt, #format_output, #initialize, #osctld_call, #osctld_fmt, #osctld_open, #osctld_resp, #require_args!, run

Methods included from Utils::Humanize

#break_interval, #format_long_duration, #format_percent, #format_short_duration, #humanize_data, #humanize_time_ns, #parse_data

Constructor Details

This class inherits a constructor from OsCtl::Cli::Command

Instance Method Details

#authorized_keys_addObject



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

def authorized_keys_add
  require_args!('name')
  osctld_fmt(
    :receive_authkey_add,
    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



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

def authorized_keys_delete
  require_args!('name')
  osctld_fmt(
    :receive_authkey_delete,
    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, pool: gopts[:pool])
end