Class: OsCtl::Cli::TrashBin

Inherits:
Command
  • Object
show all
Defined in:
lib/osctl/cli/trash_bin.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

#dataset_addObject



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

def dataset_add
  require_args!('dataset')
  osctld_fmt(:trash_bin_dataset_add, cmd_opts: { dataset: args[0] })
end

#pruneObject



10
11
12
13
14
15
16
17
# File 'lib/osctl/cli/trash_bin.rb', line 10

def prune
  require_args!(optional: %w[pool], strict: false)

  cmd_opts = {}
  cmd_opts[:pools] = args if args.any?

  osctld_fmt(:trash_bin_prune, cmd_opts:)
end