Sha256: ad0d95004d52e473be60d23b360104b83bf53f83f720c6b8732ee139997b8d4f

Contents?: true

Size: 551 Bytes

Versions: 18

Compression:

Stored size: 551 Bytes

Contents

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

    parameter "NODE_ID", "Node id"

    # the command outputs id info only anyway, this is here strictly for ignoring purposes
    option ['-q', '--quiet'], :flag, "Output the identifying column only", hidden: true

    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

18 entries across 18 versions & 1 rubygems

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