Skip to content

Commit 193b16e

Browse files
committed
[7.8] Add 'accept_enterprise' parameter to xpack.info
1 parent 0132c9a commit 193b16e

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

elasticsearch/_async/client/xpack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ def __getattr__(self, attr_name):
1010
return getattr(self.client, attr_name)
1111

1212
# AUTO-GENERATED-API-DEFINITIONS #
13-
@query_params("categories")
13+
@query_params("accept_enterprise", "categories")
1414
async def info(self, params=None, headers=None):
1515
"""
1616
Retrieves information about the installed X-Pack features.
1717
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/info-api.html>`_
1818
19+
:arg accept_enterprise: If an enterprise license is installed,
20+
return the type and mode as 'enterprise' (default: false)
1921
:arg categories: Comma-separated list of info categories. Can be
2022
any of: build, license, features
2123
"""

elasticsearch/client/xpack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@ def __getattr__(self, attr_name):
1010
return getattr(self.client, attr_name)
1111

1212
# AUTO-GENERATED-API-DEFINITIONS #
13-
@query_params("categories")
13+
@query_params("accept_enterprise", "categories")
1414
def info(self, params=None, headers=None):
1515
"""
1616
Retrieves information about the installed X-Pack features.
1717
`<https://www.elastic.co/guide/en/elasticsearch/reference/7.8/info-api.html>`_
1818
19+
:arg accept_enterprise: If an enterprise license is installed,
20+
return the type and mode as 'enterprise' (default: false)
1921
:arg categories: Comma-separated list of info categories. Can be
2022
any of: build, license, features
2123
"""

utils/generate_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def __init__(self, namespace, name, definition):
140140
self.doc_url = definition["documentation"]
141141
else:
142142
# set as attribute so it may be overriden by Module.add
143-
self.description = definition["documentation"].get("description", "")
143+
self.description = definition["documentation"].get("description", "").strip()
144144
self.doc_url = definition["documentation"].get("url", "")
145145

146146
# Filter out bad URL refs like 'TODO'

utils/templates/base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
{% for p, info in api.params %}
1414
{% filter wordwrap(72, wrapstring="\n ") %}
15-
:arg {{ p }}: {{ info.description }} {% if info.options %} Valid choices: {{ info.options|join(", ") }}{% endif %} {% if info.default %} Default: {{ info.default }}{% endif %}
15+
:arg {{ p }}: {{ info.description }}{% if info.options %} Valid choices: {{ info.options|join(", ") }}{% endif %}{% if info.default %} Default: {{ info.default }}{% endif %}
1616
{% endfilter %}
1717

1818
{% endfor %}

0 commit comments

Comments
 (0)