Sha256: 495608f26b78a8fc17bff3c520451c8d155ff8a96b07f820e35218aa227552e2

Contents?: true

Size: 627 Bytes

Versions: 32

Compression:

Stored size: 627 Bytes

Contents

require_relative 'common'

module Kontena::Cli::Grids
  class UpdateCommand < Clamp::Command
    include Kontena::Cli::Common
    include Common

    parameter "NAME", "Grid name"
    option "--statsd-server", "STATSD_SERVER", "Statsd server address (host:port)"

    def execute
      require_api_url
      token = require_token
      payload = {}
      if statsd_server
        server, port = statsd_server.split(':')
        payload[:stats] = {
          statsd: {
            server: server,
            port: port || 8125
          }
        }
      end
      client(token).put("grids/#{name}", payload)
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
kontena-cli-0.14.1 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.14.0 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.13.4 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.13.3 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.13.2 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.13.1 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.13.0.1 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.13.0 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.12.3 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.12.2 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.12.1 lib/kontena/cli/grids/update_command.rb
kontena-cli-0.12.0 lib/kontena/cli/grids/update_command.rb