These were not used consistently, only for some vm and pg commands. They made sense to have before we started including help output with errors. However, now that we show help output with errors, it's easy to see the usage to determine what args are expected.
20 lines
476 B
Ruby
20 lines
476 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiCli.on("pg").run_on("delete-firewall-rule") do
|
|
desc "Delete a PostgreSQL firewall rule"
|
|
|
|
banner "ubi pg (location/pg-name | pg-id) delete-firewall-rule rule-id"
|
|
|
|
args 1
|
|
|
|
run do |ubid|
|
|
if ubid.include?("/")
|
|
raise Rodish::CommandFailure, "invalid firewall rule id format"
|
|
end
|
|
|
|
delete(pg_path("/firewall-rule/#{ubid}")) do |data|
|
|
["Firewall rule, if it exists, has been scheduled for deletion"]
|
|
end
|
|
end
|
|
end
|