Skip to content

Commit 241719a

Browse files
authored
Added request_current_index_from_node method and docs (#1079)
* Added request_current_index_from_node method and docs for the cluster methods * Added description to docs for method get_cluster_all_nodes
1 parent 0742b8e commit 241719a

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

atlassian/jira.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,15 @@ def get_cluster_alive_nodes(self):
311311
"""
312312
return [_ for _ in self.get_cluster_all_nodes() if _["alive"]]
313313

314+
def request_current_index_from_node(self, node_id):
315+
"""
316+
Request current index from node (the request is processed asynchronously)
317+
:return:
318+
"""
319+
base_url = self.resource_url("cluster/index-snapshot")
320+
url = f"{base_url}/{node_id}"
321+
return self.put(url)
322+
314323
"""
315324
Troubleshooting. (Available for DC) It gives the posibility to download support zips.
316325
Reference: https://confluence.atlassian.com/support/create-a-support-zip-using-the-rest-api-in-data-center-applications-952054641.html

docs/jira.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,16 @@ Issue security schemes
364364
# Use only_levels=True for get the only levels entries
365365
jira.get_issue_security_scheme(scheme_id, only_levels=False)
366366
367+
Cluster methods (only for DC edition)
368+
----------------------
369+
.. code-block:: python
370+
371+
# Get all cluster nodes.
372+
jira.get_cluster_all_nodes()
373+
374+
# Request current index from node (the request is processed asynchronously).
375+
jira.request_current_index_from_node(node_id)
376+
367377
TEMPO
368378
----------------------
369379
.. code-block:: python

0 commit comments

Comments
 (0)