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
406 B
Ruby
17 lines
406 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiCli.on("fw").run_on("create") do
|
|
desc "Create a firewall"
|
|
|
|
options("ubi fw location/fw-name create [options]", key: :fw_create) do
|
|
on("-d", "--description=desc", "description for firewall")
|
|
end
|
|
|
|
run do |opts|
|
|
params = underscore_keys(opts[:fw_create])
|
|
post(fw_path, params) do |data|
|
|
["Firewall created with id: #{data["id"]}"]
|
|
end
|
|
end
|
|
end
|