Sha256: de20f56196eced5d77fe8b8a674fdf11ca217bc7785713c6d7963dc618a13349

Contents?: true

Size: 554 Bytes

Versions: 70

Compression:

Stored size: 554 Bytes

Contents

module Kontena::Cli::Nodes
  class UpdateCommand < Kontena::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

      data = {}
      data[:labels] = label_list if label_list
      spinner "Updating #{node_id.colorize(:cyan)} node " do
        client.put("nodes/#{current_grid}/#{node_id}", data)
      end
    end
  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
kontena-cli-1.3.5 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.5.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.4 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.4.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.3 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.3.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.2.rc2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.2.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.1.rc2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.1.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.0 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.0.rc4 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.0.rc3 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.0.rc2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.0.rc1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.0.pre2 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.3.0.pre1 lib/kontena/cli/nodes/update_command.rb
kontena-cli-1.2.2 lib/kontena/cli/nodes/update_command.rb