From c4b3144bfc79467f244b50ebd58b21c7663fe745 Mon Sep 17 00:00:00 2001 From: Ilya Sapunov Date: Tue, 15 Nov 2022 21:24:48 +0400 Subject: [PATCH 1/2] Added request_current_index_from_node method and docs for the cluster methods --- atlassian/jira.py | 9 +++++++++ docs/jira.rst | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/atlassian/jira.py b/atlassian/jira.py index 535068b1a..e3fdce123 100644 --- a/atlassian/jira.py +++ b/atlassian/jira.py @@ -311,6 +311,15 @@ def get_cluster_alive_nodes(self): """ return [_ for _ in self.get_cluster_all_nodes() if _["alive"]] + def request_current_index_from_node(self, node_id): + """ + Request current index from node (the request is processed asynchronously) + :return: + """ + base_url = self.resource_url("cluster/index-snapshot") + url = f"{base_url}/{node_id}" + return self.put(url) + """ Troubleshooting. (Available for DC) It gives the posibility to download support zips. Reference: https://confluence.atlassian.com/support/create-a-support-zip-using-the-rest-api-in-data-center-applications-952054641.html diff --git a/docs/jira.rst b/docs/jira.rst index 2c0a893bf..12180cc56 100644 --- a/docs/jira.rst +++ b/docs/jira.rst @@ -364,6 +364,13 @@ Issue security schemes # Use only_levels=True for get the only levels entries jira.get_issue_security_scheme(scheme_id, only_levels=False) +Cluster methods +---------------------- +.. code-block:: python + + # Request current index from node (the request is processed asynchronously). + jira.request_current_index_from_node(node_id) + TEMPO ---------------------- .. code-block:: python From 70efeeba1d0f227e7b4e99a76268adcfe857513f Mon Sep 17 00:00:00 2001 From: Ilya Sapunov Date: Tue, 15 Nov 2022 21:30:10 +0400 Subject: [PATCH 2/2] Added description to docs for method get_cluster_all_nodes --- docs/jira.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/jira.rst b/docs/jira.rst index 12180cc56..03e48099d 100644 --- a/docs/jira.rst +++ b/docs/jira.rst @@ -364,10 +364,13 @@ Issue security schemes # Use only_levels=True for get the only levels entries jira.get_issue_security_scheme(scheme_id, only_levels=False) -Cluster methods +Cluster methods (only for DC edition) ---------------------- .. code-block:: python + # Get all cluster nodes. + jira.get_cluster_all_nodes() + # Request current index from node (the request is processed asynchronously). jira.request_current_index_from_node(node_id)