Skip to content

Commit 8c83dd4

Browse files
jreynard-codevcarluer
authored andcommitted
Add sourceLocation
1 parent a2e6230 commit 8c83dd4

File tree

7 files changed

+15
-11
lines changed

7 files changed

+15
-11
lines changed

api/src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ csm:
9595
imageVersion: "0.0.5"
9696
- name: "StorageTwingraphImport"
9797
imageRegistry: "ghcr.io"
98-
imageName: "cosmo-tech/azStorage-twincache-connector"
98+
imageName: "cosmo-tech/azstorage-twincache-connector"
9999
imageVersion: "latest"
100100
authorization:
101101
principal-jwt-claim: "sub"

build.gradle.kts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ group = "com.cosmotech"
3939
version = scmVersion.version
4040

4141
val kotlinJvmTarget = 17
42-
val cosmotechApiCommonVersion = "0.1.23-SNAPSHOT"
42+
val cosmotechApiCommonVersion = "0.1.24-SNAPSHOT"
4343
val cosmotechApiAzureVersion = "0.1.6-SNAPSHOT"
4444
val azureSpringBootBomVersion = "3.14.0"
4545

@@ -49,7 +49,6 @@ allprojects {
4949
apply(plugin = "io.gitlab.arturbosch.detekt")
5050

5151
repositories {
52-
mavenLocal()
5352
maven {
5453
name = "GitHubPackages"
5554
url = uri("https://maven.pkg.github.com/Cosmo-Tech/cosmotech-api-common")

doc/Models/SourceInfo.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**name** | **String** | the source name containing the files to import | [default to null]
6+
**name** | **String** | the source name containing the files to import | [optional] [default to null]
77
**location** | **String** | the source location containing the files to import | [default to null]
8+
**path** | **String** | the source location containing the files to import | [optional] [default to null]
89
**type** | **String** | the source type containing the files to import | [default to null]
910

1011
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

openapi/plantuml/schemas.plantuml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,9 @@ entity Solution {
415415
}
416416

417417
entity SourceInfo {
418-
* name: String
418+
name: String
419419
* location: String
420+
path: String
420421
* type: String
421422
}
422423

scenariorun/src/main/kotlin/com/cosmotech/scenariorun/azure/ScenarioRunServiceImpl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,15 +369,15 @@ internal class ScenarioRunServiceImpl(
369369
mutableMapOf(
370370
"TWIN_CACHE_NAME" to jobImportInfo.graphId,
371371
"LOG_LEVEL" to "DEBUG",
372-
"AZURE_DIGITAL_TWINS_NAME" to jobImportInfo.sourceName,
373-
"AZURE_DIGITAL_TWINS_URL" to jobImportInfo.sourcePath)
372+
"AZURE_DIGITAL_TWINS_URL" to jobImportInfo.sourceLocation)
374373
}
375374
"Storage" -> {
376375
mutableMapOf(
377376
"TWIN_CACHE_NAME" to jobImportInfo.graphId,
378377
"LOG_LEVEL" to "DEBUG",
379378
"ACCOUNT_NAME" to jobImportInfo.sourceName,
380-
"CONTAINER_NAME" to jobImportInfo.sourcePath)
379+
"CONTAINER_NAME" to jobImportInfo.sourceLocation,
380+
"STORAGE_PATH" to jobImportInfo.sourcePath)
381381
}
382382
else -> {
383383
throw IllegalArgumentException(

twingraph/src/main/kotlin/com/cosmotech/twingraph/api/TwingraphServiceImpl.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ class TwingraphServiceImpl(
4545
requestJobId,
4646
organizationId,
4747
twinGraphImport.graphId,
48-
twinGraphImport.source.name,
48+
twinGraphImport.source.name ?: "",
4949
twinGraphImport.source.location,
50+
twinGraphImport.source.path ?: "",
5051
twinGraphImport.source.type.value,
5152
twinGraphImport.version)
5253
this.eventPublisher.publishEvent(graphImportEvent)

twingraph/src/main/openapi/twingraph.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,14 +197,16 @@ components:
197197
location:
198198
type: string
199199
description: the source location containing the files to import
200+
path:
201+
type: string
202+
description: the source location containing the files to import
200203
type:
201204
type: string
202205
description: the source type containing the files to import
203206
enum:
204207
- ADT
205208
- Storage
206209
required:
207-
- name
208210
- location
209211
- type
210212
TwinGraphImportInfo:
@@ -223,7 +225,6 @@ components:
223225
description: Run import job with ADT as source
224226
value:
225227
source:
226-
name: "my-adt-name-instance"
227228
location: "https://my-adt-name-instance.api.weu.digitaltwins.azure.net"
228229
type: "ADT"
229230
graphId: "my-graph-id"
@@ -234,5 +235,6 @@ components:
234235
source:
235236
name: "my-storage-account-name"
236237
location: "my-container-name"
238+
path: "my-data-folder"
237239
type: "Storage"
238240
graphId: "my-graph-id"

0 commit comments

Comments
 (0)