Skip to content

Commit 697bd22

Browse files
committed
Orchestrator Plugin Templates: Update plugin templates and reorganize structure for API, main, and store operations
1 parent 38604e5 commit 697bd22

23 files changed

+457
-71
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"id": "csm-data postgres-send-runner-metadata",
3+
"command": "csm-data",
4+
"arguments": [
5+
"api",
6+
"postgres-send-runner-metadata"
7+
],
8+
"description": "Use csm-data to send runner metadata to a PostgreSQL database",
9+
"useSystemEnvironment": true,
10+
"environment": {
11+
"CSM_ORGANIZATION_ID": {
12+
"description": "An organization id for the Cosmo Tech API"
13+
},
14+
"CSM_WORKSPACE_ID": {
15+
"description": "A workspace id for the Cosmo Tech API"
16+
},
17+
"CSM_RUNNER_ID": {
18+
"description": "A runner id for the Cosmo Tech API"
19+
},
20+
"POSTGRES_HOST_URI": {
21+
"description": "PostgreSQL host URI"
22+
},
23+
"POSTGRES_HOST_PORT": {
24+
"description": "PostgreSQL host port",
25+
"defaultValue": "5432"
26+
},
27+
"POSTGRES_DB_NAME": {
28+
"description": "PostgreSQL database name"
29+
},
30+
"POSTGRES_DB_SCHEMA": {
31+
"description": "PostgreSQL database schema"
32+
},
33+
"POSTGRES_USER_NAME": {
34+
"description": "PostgreSQL user name"
35+
},
36+
"POSTGRES_USER_PASSWORD": {
37+
"description": "PostgreSQL user password"
38+
}
39+
}
40+
}

cosmotech/orchestrator_plugins/csm-data/templates/rds_load_csv.json renamed to cosmotech/orchestrator_plugins/csm-data/templates/api/rds_load_csv.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@
33
"command": "csm-data",
44
"arguments": [
55
"api",
6-
"rds-load-csv",
7-
"--target-folder",
8-
"$CSM_DATASET_ABSOLUTE_PATH",
9-
"--organization-id",
10-
"$CSM_ORGANIZATION_ID",
11-
"--workspace-id",
12-
"$CSM_WORKSPACE_ID",
13-
"--runner-id",
14-
"$CSM_RUNNER_ID",
15-
"--run-id",
16-
"$CSM_RUN_ID"
6+
"rds-load-csv"
177
],
188
"description": "Use csm-data to query the results api and store it in a csv file, you need to add your arguments for filename and query while using this template",
199
"useSystemEnvironment": true,
@@ -34,4 +24,4 @@
3424
"description": "A run id for the Cosmo Tech API"
3525
}
3626
}
37-
}
27+
}

cosmotech/orchestrator_plugins/csm-data/templates/rds_send_csv.json renamed to cosmotech/orchestrator_plugins/csm-data/templates/api/rds_send_csv.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@
33
"command": "csm-data",
44
"arguments": [
55
"api",
6-
"rds-send-csv",
7-
"--source-folder",
8-
"$CSM_DATASET_ABSOLUTE_PATH",
9-
"--organization-id",
10-
"$CSM_ORGANIZATION_ID",
11-
"--workspace-id",
12-
"$CSM_WORKSPACE_ID",
13-
"--runner-id",
14-
"$CSM_RUNNER_ID",
15-
"--run-id",
16-
"$CSM_RUN_ID"
6+
"rds-send-csv"
177
],
188
"description": "Use csm-data to send the content of all csv of a folder to the Cosmo Tech API as custom results data",
199
"useSystemEnvironment": true,
@@ -34,4 +24,4 @@
3424
"description": "A run id for the Cosmo Tech API"
3525
}
3626
}
37-
}
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"id": "csm-data rds-send-store",
3+
"command": "csm-data",
4+
"arguments": [
5+
"api",
6+
"rds-send-store"
7+
],
8+
"description": "Use csm-data to send the content of a store to the Cosmo Tech API as custom results data",
9+
"useSystemEnvironment": true,
10+
"environment": {
11+
"CSM_PARAMETERS_ABSOLUTE_PATH": {
12+
"description": "Folder containing the store to send to the Cosmo Tech API"
13+
},
14+
"CSM_ORGANIZATION_ID": {
15+
"description": "An organization id for the Cosmo Tech API"
16+
},
17+
"CSM_WORKSPACE_ID": {
18+
"description": "A workspace id for the Cosmo Tech API"
19+
},
20+
"CSM_RUNNER_ID": {
21+
"description": "A runner id for the Cosmo Tech API"
22+
},
23+
"CSM_RUN_ID": {
24+
"description": "A run id for the Cosmo Tech API"
25+
}
26+
}
27+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"id": "csm-data run-load-data",
3+
"command": "csm-data",
4+
"arguments": [
5+
"api",
6+
"run-load-data"
7+
],
8+
"description": "Use csm-data to download runner data from the Cosmo Tech API",
9+
"useSystemEnvironment": true,
10+
"environment": {
11+
"CSM_ORGANIZATION_ID": {
12+
"description": "An organization id for the Cosmo Tech API"
13+
},
14+
"CSM_WORKSPACE_ID": {
15+
"description": "A workspace id for the Cosmo Tech API"
16+
},
17+
"CSM_RUNNER_ID": {
18+
"description": "A runner id for the Cosmo Tech API"
19+
},
20+
"CSM_DATASET_ABSOLUTE_PATH": {
21+
"description": "Target folder in which to write the dataset from the Cosmo Tech API"
22+
},
23+
"CSM_PARAMETERS_ABSOLUTE_PATH": {
24+
"description": "Target folder in which to write the parameters from the Cosmo Tech API"
25+
},
26+
"CSM_API_URL": {
27+
"description": "The URL to a Cosmo Tech API instance"
28+
}
29+
}
30+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"id": "csm-data runtemplate-load-handler",
3+
"command": "csm-data",
4+
"arguments": [
5+
"api",
6+
"runtemplate-load-handler"
7+
],
8+
"description": "Use csm-data to load run template handlers from the Cosmo Tech API",
9+
"useSystemEnvironment": true,
10+
"environment": {
11+
"CSM_ORGANIZATION_ID": {
12+
"description": "An organization id for the Cosmo Tech API"
13+
},
14+
"CSM_WORKSPACE_ID": {
15+
"description": "A workspace id for the Cosmo Tech API"
16+
},
17+
"CSM_RUN_TEMPLATE_ID": {
18+
"description": "A run template id for the Cosmo Tech API"
19+
},
20+
"CSM_CONTAINER_MODE": {
21+
"description": "Comma-separated list of handlers to load"
22+
},
23+
"CSM_API_URL": {
24+
"description": "The URL to a Cosmo Tech API instance"
25+
}
26+
}
27+
}

cosmotech/orchestrator_plugins/csm-data/templates/tdl_load_files.json renamed to cosmotech/orchestrator_plugins/csm-data/templates/api/tdl_load_files.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@
33
"command": "csm-data",
44
"arguments": [
55
"api",
6-
"tdl-load-files",
7-
"--dir",
8-
"$CSM_DATASET_ABSOLUTE_PATH",
9-
"--organization-id",
10-
"$CSM_ORGANIZATION_ID",
11-
"--workspace-id",
12-
"$CSM_WORKSPACE_ID"
6+
"tdl-load-files"
137
],
148
"description": "Use csm-data to query a twingraph and loads all the data from it",
159
"useSystemEnvironment": true,
@@ -35,4 +29,4 @@
3529
"optional": true
3630
}
3731
}
38-
}
32+
}

cosmotech/orchestrator_plugins/csm-data/templates/tdl_send_files.json renamed to cosmotech/orchestrator_plugins/csm-data/templates/api/tdl_send_files.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@
33
"command": "csm-data",
44
"arguments": [
55
"api",
6-
"tdl-send-files",
7-
"--dir",
8-
"$CSM_DATASET_ABSOLUTE_PATH",
9-
"--organization-id",
10-
"$CSM_ORGANIZATION_ID",
11-
"--workspace-id",
12-
"$CSM_WORKSPACE_ID",
13-
"--runner-id",
14-
"$CSM_RUNNER_ID"
6+
"tdl-send-files"
157
],
168
"description": "Use csm-data to send a folder content to the Cosmo Tech API as a Twin Graph",
179
"useSystemEnvironment": true,
@@ -32,4 +24,4 @@
3224
"description": "A runner id for the Cosmo Tech API"
3325
}
3426
}
35-
}
27+
}

cosmotech/orchestrator_plugins/csm-data/templates/try_api_connection.json renamed to cosmotech/orchestrator_plugins/csm-data/templates/api/try_api_connection.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
],
77
"description": "Use csm-data check if a valid Cosmo Tech API connection exists.",
88
"useSystemEnvironment": true
9-
}
9+
}

cosmotech/orchestrator_plugins/csm-data/templates/wsf_load_file.json renamed to cosmotech/orchestrator_plugins/csm-data/templates/api/wsf_load_file.json

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@
33
"command": "csm-data",
44
"arguments": [
55
"api",
6-
"wsf-load-file",
7-
"--target-folder",
8-
"$CSM_DATASET_ABSOLUTE_PATH",
9-
"--organization-id",
10-
"$CSM_ORGANIZATION_ID",
11-
"--workspace-id",
12-
"$CSM_WORKSPACE_ID",
13-
"--workspace-path",
14-
"$CSM_WORKSPACE_PATH"
6+
"wsf-load-file"
157
],
168
"description": "Use csm-data to load files from a workspace inside the API",
179
"useSystemEnvironment": true,
@@ -41,4 +33,4 @@
4133
"description": "Path inside the workspace to load (end with '/' for a folder)"
4234
}
4335
}
44-
}
36+
}

0 commit comments

Comments
 (0)