Sha256: 3a22d88f6b0df1298a3008cf2077cc641262a7b008310a8509da1159107c2741
Contents?: true
Size: 723 Bytes
Versions: 59
Compression:
Stored size: 723 Bytes
Contents
require_relative 'common' module Kontena::Cli::Grids class UpdateCommand < Kontena::Command include Kontena::Cli::Common include Common parameter "NAME", "Grid name" include Common::Parameters option "--no-default-affinity", :flag, "Unset grid default affinity" option "--no-statsd-server", :flag, "Unset statsd server setting" requires_current_master_token def execute validate_grid_parameters payload = {} build_grid_parameters(payload) if no_statsd_server? payload[:stats] = { statsd: nil } end if no_default_affinity? payload[:default_affinity] = [] end client.put("grids/#{name}", payload) end end end
Version data entries
59 entries across 59 versions & 2 rubygems