forked from opensearch-project/opensearch-migrations
-
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.
[Console] Update format of services.yaml (opensearch-project#718)
* Update schema for clusters Signed-off-by: Mikayla Thompson <thomika@amazon.com> * Update README Signed-off-by: Mikayla Thompson <thomika@amazon.com> * Update metrics sources Signed-off-by: Mikayla Thompson <thomika@amazon.com> * more readme updates Signed-off-by: Mikayla Thompson <thomika@amazon.com> * add a test for calling the api Signed-off-by: Mikayla Thompson <thomika@amazon.com> * add a metrics source test for coverage Signed-off-by: Mikayla Thompson <thomika@amazon.com> --------- Signed-off-by: Mikayla Thompson <thomika@amazon.com>
- Loading branch information
1 parent
5a5b7e6
commit 924de8e
Showing
9 changed files
with
228 additions
and
141 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
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
14 changes: 14 additions & 0 deletions
14
...ion/src/main/docker/migrationConsole/lib/console_link/console_link/models/schema_tools.py
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,14 @@ | ||
from typing import Set | ||
|
||
|
||
def contains_one_of(values_to_restrict: Set): | ||
""" | ||
Generates a validator that checks if a value contains exactly one of the specified keys. | ||
""" | ||
def one_of(field, value, error): | ||
found_objects = values_to_restrict.intersection(value.keys()) | ||
if len(found_objects) > 1: | ||
error(field, f"More than one value is present: {sorted(found_objects)}") | ||
elif len(found_objects) < 1: | ||
error(field, f"No values are present from set: {sorted(values_to_restrict)}") | ||
return one_of |
14 changes: 5 additions & 9 deletions
14
...ficCapture/dockerSolution/src/main/docker/migrationConsole/lib/console_link/services.yaml
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 |
---|---|---|
@@ -1,21 +1,17 @@ | ||
source_cluster: | ||
endpoint: "https://capture-proxy-es:9200" | ||
allow_insecure: true | ||
authorization: | ||
type: "basic_auth" | ||
details: | ||
basic_auth: | ||
username: "admin" | ||
password: "admin" | ||
target_cluster: | ||
endpoint: "https://opensearchtarget:9200" | ||
allow_insecure: true | ||
authorization: | ||
type: "basic_auth" | ||
details: | ||
basic_auth: | ||
username: "admin" | ||
password: "myStrongPassword123!" | ||
metrics_source: | ||
type: "prometheus" | ||
endpoint: "http://prometheus:9090" | ||
prometheus: | ||
endpoint: "http://prometheus:9090" | ||
replayer: | ||
deployment_type: "docker" | ||
docker: |
Oops, something went wrong.