Sha256: 32fd4d2e795d472cc9dbfb5226a2275921594249172d61def4afdedc8ede2bad
Contents?: true
Size: 504 Bytes
Versions: 25
Compression:
Stored size: 504 Bytes
Contents
module Kontena::Cli::Nodes::Labels class RemoveCommand < Kontena::Command include Kontena::Cli::Common parameter "NODE", "Node name" parameter "LABEL ...", "Labels" requires_current_master requires_current_master_token requires_current_grid def execute node = client.get("nodes/#{current_grid}/#{self.node}") data = { labels: Array(node['labels']).reject {|label| label_list.include?(label) } } client.put("nodes/#{node['id']}", data) end end end
Version data entries
25 entries across 25 versions & 1 rubygems