There is no need for a separate class now. All of the files in cli-commands now use UbiCli, instead of a mix of UbiCli and UbiRodish.
13 lines
439 B
Ruby
13 lines
439 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiCli.on("pg").run_on("reset-superuser-password") do
|
|
options("ubi pg location/(pg-name|_pg-ubid) reset-superuser-password new-password")
|
|
|
|
args 1, invalid_args_message: "password is required"
|
|
|
|
run do |password|
|
|
post(pg_path("/reset-superuser-password"), "password" => password) do |data|
|
|
["Superuser password reset scheduled for PostgreSQL database with id: #{data["id"]}"]
|
|
end
|
|
end
|
|
end
|