Sha256: f4bbff87ef45fc6e43f4c4ae1c07c0fede964340f9b13a67f5d96d9b1e9aab90

Contents?: true

Size: 593 Bytes

Versions: 32

Compression:

Stored size: 593 Bytes

Contents

module Kontena::Cli::Nodes
  class UpdateCommand < Clamp::Command
    include Kontena::Cli::Common
    include Kontena::Cli::GridOptions

    parameter "NODE_ID", "Node id"
    option ["-l", "--label"], "LABEL", "Node label", multivalued: true

    def execute
      require_api_url
      require_current_grid
      token = require_token


      node = client(token).get("grids/#{current_grid}/nodes/#{node_id}")
      data = {}
      data[:labels] = label_list if label_list
      client.put("nodes/#{node['id']}", data, {}, {'Kontena-Grid-Token' => node['grid']['token']})
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
kontena-cli-0.15.5 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.5.rc2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.5.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.4 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.4.rc2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.4.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.4.pre1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.3 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.0 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.0.rc3 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.0.rc2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.15.0.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.14.7 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.14.6 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.14.5 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.14.4 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.14.3 lib/kontena/cli/nodes/update_command.rb
kontena-cli-0.14.2 lib/kontena/cli/nodes/update_command.rb