From d58d43b15e5103b78b45afcedf5d9b00da19a051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Honza=20Kr=C3=A1l?= Date: Wed, 8 Oct 2014 09:23:13 +0200 Subject: [PATCH] Verify repository API for snapshots --- elasticsearch/client/snapshot.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/elasticsearch/client/snapshot.py b/elasticsearch/client/snapshot.py index 47370ef6..456c10e2 100644 --- a/elasticsearch/client/snapshot.py +++ b/elasticsearch/client/snapshot.py @@ -117,6 +117,9 @@ class SnapshotClient(NamespacedClient): @query_params('master_timeout') def status(self, repository=None, snapshot=None, params=None): """ + Return information about all currently running snapshots. By specifying + a repository name, it’s possible to limit the results to a particular + repository. ``_ :arg repository: A repository name @@ -127,3 +130,20 @@ class SnapshotClient(NamespacedClient): _, data = self.transport.perform_request('GET', _make_path('_snapshot', repository, snapshot, '_status'), params=params) return data + + @query_params('master_timeout', 'timeout') + def verify_repository(self, repository, params=None): + """ + Returns a list of nodes where repository was successfully verified or + an error message if verification process failed. + ``_ + + :arg repository: A repository name + :arg master_timeout: Explicit operation timeout for connection to master + node + :arg timeout: Explicit operation timeout + """ + _, data = self.transport.perform_request('POST', _make_path('_snapshot', + repository, '_verify'), params=params) + return data +