ubid is an internal concept that users will not be familiar with. When the cli lists/shows objects, it uses the ubid when displaying the id, so users already understand that is the id, they never see the actual uuid. This should make the usage lines a bit more understandable.
15 lines
475 B
Ruby
15 lines
475 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiCli.on("lb").run_on("update") do
|
|
options("ubi lb location/(lb-name|_lb-id) update algorithm src-port dst-port health-check-endpoint [vm-id [...]]")
|
|
|
|
args(4...)
|
|
|
|
run do |argv|
|
|
algorithm, src_port, dst_port, health_check_endpoint, *vms = argv
|
|
patch(lb_path, {algorithm:, src_port:, dst_port:, health_check_endpoint:, vms:}.transform_keys(&:to_s)) do |data|
|
|
["Updated load balancer with id #{data["id"]}"]
|
|
end
|
|
end
|
|
end
|