This provides descriptions for all commands. Command help now uses the following format: ``` DESCRIPTION Usage: BANNERS Commands: COMMAND DESCRIPTION Post Commands: COMMAND DESCRIPTION Options: OPTION DESCRIPTION Post Options: OPTION DESCRIPTION ``` This required substantial changes to rodish, so this updates to the current head of rodish. Other minor changes: * Use "virtual machine" instead of "VM" in command help * Use "command" or "post-command" instead of "subcommand" in usage * Use "ps-id" instead of "subnet-id" in {at,de}tach-subnet command usage * Use "rule-id" instead of "id" in delete pg firewall rule usage * Use "md-id" instead of "id" in delete pg metric destination usage * Avoid literal "Usage: " in help -u output
17 lines
413 B
Ruby
17 lines
413 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiCli.on("ps").run_on("create") do
|
|
desc "Create a private subnet"
|
|
|
|
options("ubi ps location/ps-name create [options]", key: :ps_create) do
|
|
on("-f", "--firewall-id=id", "add to given firewall")
|
|
end
|
|
|
|
run do |opts|
|
|
params = underscore_keys(opts[:ps_create])
|
|
post(ps_path, params) do |data|
|
|
["Private subnet created with id: #{data["id"]}"]
|
|
end
|
|
end
|
|
end
|