Sha256: f0dfd89bed8b8e476e424f1f030cff764bfb2643084cfc1d5bd6026aae4a202e

Contents?: true

Size: 371 Bytes

Versions: 52

Compression:

Stored size: 371 Bytes

Contents

module Kontena::Cli::Nodes::Labels
  class ListCommand < Kontena::Command
    include Kontena::Cli::Common

    parameter "NODE_ID", "Node id"

    requires_current_master
    requires_current_master_token
    requires_current_grid

    def execute
      node = client.get("nodes/#{current_grid}/#{node_id}")
      puts Array(node['labels']).join("\n")
    end
  end
end

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
kontena-cli-1.3.0.pre1 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.2 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.2.rc2 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.2.rc1 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.1 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.1.rc1 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.0 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.0.rc3 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.0.rc2 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.0.rc1 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.0.pre3 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.0.pre2 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.1.6 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.0.pre1 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.1.5 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.1.5.rc3 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.1.5.rc2 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.1.5.rc1 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.1.4 lib/kontena/cli/nodes/labels/list_command.rb
kontena-cli-1.2.0.dev1 lib/kontena/cli/nodes/labels/list_command.rb