generated from MITLibraries/python-cli-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Why these changes are being introduced: We want the indexes command to display information about all of the indexes in an OpenSearch instance. How this addresses that need: * Adds a list_indexes function to the opensearch module that retrieves information about all of the indexes in an instance and formats the results as a string for display. * Calls the list_indexes function from the cli indexes command. * Adds tests for new functionality. * Moves all logic for the ping function to the opensearch module for consistency and reformats the output slightly. * Updates ping tests as needed to reflect changes. Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/TIMX-74
- Loading branch information
Showing
8 changed files
with
152 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
content-type: | ||
- application/json | ||
user-agent: | ||
- opensearch-py/2.0.0 (Python 3.10.6) | ||
method: GET | ||
uri: http://localhost:9200/_cat/indices?format=json | ||
response: | ||
body: | ||
string: '[{"health":"yellow","status":"open","index":"test-index","uuid":"CutX-ZdNRa-Novw8vdTXIg","pri":"1","rep":"1","docs.count":"0","docs.deleted":"0","store.size":"208b","pri.store.size":"208b"}]' | ||
headers: | ||
content-length: | ||
- '190' | ||
content-type: | ||
- application/json; charset=UTF-8 | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
content-type: | ||
- application/json | ||
user-agent: | ||
- opensearch-py/2.0.0 (Python 3.10.6) | ||
method: GET | ||
uri: http://localhost:9200/_cat/indices?format=json | ||
response: | ||
body: | ||
string: '[]' | ||
headers: | ||
content-length: | ||
- '2' | ||
content-type: | ||
- application/json; charset=UTF-8 | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
content-type: | ||
- application/json | ||
user-agent: | ||
- opensearch-py/2.0.0 (Python 3.10.6) | ||
method: GET | ||
uri: http://localhost:9200/_cat/indices?format=json | ||
response: | ||
body: | ||
string: '[{"health":"yellow","status":"open","index":"test-index","uuid":"xERdq2rbQUy1IgtP5-ydVg","pri":"1","rep":"1","docs.count":"0","docs.deleted":"0","store.size":"208b","pri.store.size":"208b"}]' | ||
headers: | ||
content-length: | ||
- '190' | ||
content-type: | ||
- application/json; charset=UTF-8 | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters