Class: PEClient::Resource::NodeClassifierV1::Commands

Inherits:
Base
  • Object
show all
Defined in:
lib/pe_client/resources/node_classifier.v1/commands.rb

Overview

Use the commands endpoint to unpin specified nodes from all node groups they’re pinned to.

Constant Summary collapse

BASE_PATH =

The base path for Node Classifier API v1 commands endpoints.

"#{NodeClassifierV1::BASE_PATH}/commands".freeze

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PEClient::Resource::Base

Instance Method Details

#unpin_from_all(nodes) ⇒ Hash

Unpin one or more specific nodes from all node groups they’re pinned to. Unpinning has no effect on nodes that are assigned to node groups via dynamic rules.

Parameters:

  • nodes (Array<String>)

    Node certnames.

Returns:

  • (Hash)


35
36
37
# File 'lib/pe_client/resources/node_classifier.v1/commands.rb', line 35

def unpin_from_all(nodes)
  @client.post "#{BASE_PATH}/unpin-from-all", body: {nodes:}
end