From c75d6904b3de8434720a15c4e2fbd8119e2bc0bc Mon Sep 17 00:00:00 2001 From: Zachary Tong Date: Mon, 7 Jan 2019 16:15:49 -0500 Subject: [PATCH] Remove obsolete Shutdown API This has been long gone! --- .../Endpoints/Cluster/Nodes/Shutdown.php | 49 ------------------- .../Namespaces/NodesNamespace.php | 23 --------- 2 files changed, 72 deletions(-) delete mode 100644 src/Elasticsearch/Endpoints/Cluster/Nodes/Shutdown.php diff --git a/src/Elasticsearch/Endpoints/Cluster/Nodes/Shutdown.php b/src/Elasticsearch/Endpoints/Cluster/Nodes/Shutdown.php deleted file mode 100644 index 6b7a6f2c8..000000000 --- a/src/Elasticsearch/Endpoints/Cluster/Nodes/Shutdown.php +++ /dev/null @@ -1,49 +0,0 @@ - - * @license http://www.apache.org/licenses/LICENSE-2.0 Apache2 - * @link http://elastic.co - */ -class Shutdown extends AbstractNodesEndpoint -{ - /** - * @return string - */ - public function getURI() - { - $node_id = $this->nodeID; - $uri = "/_shutdown"; - - if (isset($node_id) === true) { - $uri = "/_cluster/nodes/$node_id/_shutdown"; - } - - return $uri; - } - - /** - * @return string[] - */ - public function getParamWhitelist() - { - return array( - 'delay', - 'exit', - ); - } - - /** - * @return string - */ - public function getMethod() - { - return 'POST'; - } -} diff --git a/src/Elasticsearch/Namespaces/NodesNamespace.php b/src/Elasticsearch/Namespaces/NodesNamespace.php index e8bbaf928..46b432046 100644 --- a/src/Elasticsearch/Namespaces/NodesNamespace.php +++ b/src/Elasticsearch/Namespaces/NodesNamespace.php @@ -108,27 +108,4 @@ public function hotThreads($params = array()) return $this->performRequest($endpoint); } - /** - * $params['node_id'] = (list) A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes - * ['delay'] = (time) Set the delay for the operation (default: 1s) - * ['exit'] = (boolean) Exit the JVM as well (default: true) - * - * @param $params array Associative array of parameters - * - * @return array - */ - public function shutdown($params = array()) - { - $nodeID = $this->extractArgument($params, 'node_id'); - - /** @var callback $endpointBuilder */ - $endpointBuilder = $this->endpoints; - - /** @var \Elasticsearch\Endpoints\Cluster\Nodes\Shutdown $endpoint */ - $endpoint = $endpointBuilder('Cluster\Nodes\Shutdown'); - $endpoint->setNodeID($nodeID); - $endpoint->setParams($params); - - return $this->performRequest($endpoint); - } }