Sha256: 243c245b73e75e7dd2a772e26ef886a9745c2af06683b1f0f99259baa3dc148f
Contents?: true
Size: 667 Bytes
Versions: 24
Compression:
Stored size: 667 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 node = client(token).get("grids/#{current_grid}/nodes/#{node_id}") data = {} data[:labels] = label_list if label_list spinner "Updating #{node_id.colorize(:cyan)} node " do client.put("nodes/#{node['id']}", data, {}, {'Kontena-Grid-Token' => node['grid']['token']}) end end end end
Version data entries
24 entries across 24 versions & 1 rubygems