Skip to content

Commit d09e282

Browse files
apply corrections from pull request feedbacks
1 parent ebe6471 commit d09e282

File tree

7 files changed

+6
-153
lines changed

7 files changed

+6
-153
lines changed

doc/Models/Workspace.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@
1414
| **ownerId** | **String** | the user id which own this workspace. set by the API from Authentification service receved id | [default to null] |
1515
| **solution** | [**WorkspaceSolution**](WorkspaceSolution.md) | | [default to null] |
1616
| **webApp** | [**WorkspaceWebApp**](WorkspaceWebApp.md) | | [optional] [default to null] |
17-
| **sendInputToDataWarehouse** | **Boolean** | default setting for all Scenarios and Run Templates to set whether or not the Dataset values and the input parameters values are send to the DataWarehouse prior to the ScenarioRun | [optional] [default to null] |
18-
| **useDedicatedEventHubNamespace** | **Boolean** | Set this property to true to use a dedicated Azure Event Hub Namespace for this Workspace. The Event Hub Namespace must be named \\'<organization_id\\>-<workspace_id\\>\\' (in lower case). This Namespace must also contain two Event Hubs named \\'probesmeasures\\' and \\'scenariorun\\'. | [optional] [default to false] |
19-
| **dedicatedEventHubSasKeyName** | **String** | the Dedicated Event Hub SAS key name, default to RootManageSharedAccessKey. Ask you DevOps Team to add the associated value to your Workspace Secret | [optional] [default to null] |
20-
| **dedicatedEventHubAuthenticationStrategy** | **String** | the Event Hub authentication strategy, SHARED_ACCESS_POLICY or TENANT_CLIENT_CREDENTIALS. Default to the one defined for the tenant. | [optional] [default to null] |
21-
| **sendScenarioRunToEventHub** | **Boolean** | default setting for all Scenarios and Run Templates to set whether or not the ScenarioRun is send to the Event Hub | [optional] [default to true] |
22-
| **sendScenarioMetadataToEventHub** | **Boolean** | Set this property to false to not send scenario metada to Azure Event Hub Namespace for this Workspace. The Event Hub Namespace must be named \\'<organization_id\\>-<workspace_id\\>\\' (in lower case). This Namespace must also contain two Event Hubs named \\'scenariometadata\\' and \\'scenariorunmetadata\\'. | [optional] [default to false] |
2317
| **datasetCopy** | **Boolean** | Activate the copy of dataset on scenario creation, meaning that each scenario created in this workspace will make this copy. when false, scenario use directly the dataset specified. | [optional] [default to true] |
2418
| **security** | [**WorkspaceSecurity**](WorkspaceSecurity.md) | | [default to null] |
2519

doc/Models/WorkspaceCreateRequest.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
| **tags** | **List** | the list of tags | [optional] [default to null] |
1111
| **solution** | [**WorkspaceSolution**](WorkspaceSolution.md) | | [default to null] |
1212
| **webApp** | [**WorkspaceWebApp**](WorkspaceWebApp.md) | | [optional] [default to null] |
13-
| **sendInputToDataWarehouse** | **Boolean** | default setting for all Scenarios and Run Templates to set whether or not the Dataset values and the input parameters values are send to the DataWarehouse prior to the ScenarioRun | [optional] [default to null] |
14-
| **useDedicatedEventHubNamespace** | **Boolean** | Set this property to true to use a dedicated Azure Event Hub Namespace for this Workspace. | [optional] [default to false] |
15-
| **dedicatedEventHubSasKeyName** | **String** | the Dedicated Event Hub SAS key name, default to RootManageSharedAccessKey | [optional] [default to null] |
16-
| **dedicatedEventHubAuthenticationStrategy** | **String** | the Event Hub authentication strategy | [optional] [default to null] |
17-
| **sendScenarioRunToEventHub** | **Boolean** | default setting for all Scenarios and Run Templates | [optional] [default to true] |
18-
| **sendScenarioMetadataToEventHub** | **Boolean** | Set this property to false to not send scenario metada | [optional] [default to false] |
1913
| **datasetCopy** | **Boolean** | Activate the copy of dataset on scenario creation | [optional] [default to true] |
2014
| **security** | [**WorkspaceSecurity**](WorkspaceSecurity.md) | | [optional] [default to null] |
2115

doc/Models/WorkspaceUpdateRequest.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,12 @@
33

44
| Name | Type | Description | Notes |
55
|------------ | ------------- | ------------- | -------------|
6-
| **key** | **String** | technical key for resource name convention and version grouping. Must be unique | [default to null] |
7-
| **name** | **String** | Workspace name | [default to null] |
6+
| **key** | **String** | technical key for resource name convention and version grouping. Must be unique | [optional] [default to null] |
7+
| **name** | **String** | Workspace name | [optional] [default to null] |
88
| **description** | **String** | the Workspace description | [optional] [default to null] |
99
| **tags** | **List** | the list of tags | [optional] [default to null] |
1010
| **solution** | [**WorkspaceSolution**](WorkspaceSolution.md) | | [optional] [default to null] |
1111
| **webApp** | [**WorkspaceWebApp**](WorkspaceWebApp.md) | | [optional] [default to null] |
12-
| **sendInputToDataWarehouse** | **Boolean** | default setting for all Scenarios and Run Templates | [optional] [default to null] |
13-
| **useDedicatedEventHubNamespace** | **Boolean** | Set this property to true to use a dedicated Azure Event Hub Namespace | [optional] [default to null] |
14-
| **dedicatedEventHubSasKeyName** | **String** | the Dedicated Event Hub SAS key name | [optional] [default to null] |
15-
| **dedicatedEventHubAuthenticationStrategy** | **String** | the Event Hub authentication strategy | [optional] [default to null] |
16-
| **sendScenarioRunToEventHub** | **Boolean** | default setting for all Scenarios and Run Templates | [optional] [default to null] |
17-
| **sendScenarioMetadataToEventHub** | **Boolean** | Set this property to false to not send scenario metadata | [optional] [default to null] |
1812
| **datasetCopy** | **Boolean** | Activate the copy of dataset on scenario creation | [optional] [default to null] |
1913

2014
[[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 & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -496,12 +496,6 @@ entity Workspace {
496496
* ownerId: String
497497
* solution: WorkspaceSolution
498498
webApp: WorkspaceWebApp
499-
sendInputToDataWarehouse: Boolean
500-
useDedicatedEventHubNamespace: Boolean
501-
dedicatedEventHubSasKeyName: String
502-
dedicatedEventHubAuthenticationStrategy: String
503-
sendScenarioRunToEventHub: Boolean
504-
sendScenarioMetadataToEventHub: Boolean
505499
datasetCopy: Boolean
506500
* security: WorkspaceSecurity
507501
}
@@ -519,12 +513,6 @@ entity WorkspaceCreateRequest {
519513
tags: List<String>
520514
* solution: WorkspaceSolution
521515
webApp: WorkspaceWebApp
522-
sendInputToDataWarehouse: Boolean
523-
useDedicatedEventHubNamespace: Boolean
524-
dedicatedEventHubSasKeyName: String
525-
dedicatedEventHubAuthenticationStrategy: String
526-
sendScenarioRunToEventHub: Boolean
527-
sendScenarioMetadataToEventHub: Boolean
528516
datasetCopy: Boolean
529517
security: WorkspaceSecurity
530518
}
@@ -549,18 +537,12 @@ entity WorkspaceSolution {
549537
}
550538

551539
entity WorkspaceUpdateRequest {
552-
* key: String
553-
* name: String
540+
key: String
541+
name: String
554542
description: String
555543
tags: List<String>
556544
solution: WorkspaceSolution
557545
webApp: WorkspaceWebApp
558-
sendInputToDataWarehouse: Boolean
559-
useDedicatedEventHubNamespace: Boolean
560-
dedicatedEventHubSasKeyName: String
561-
dedicatedEventHubAuthenticationStrategy: String
562-
sendScenarioRunToEventHub: Boolean
563-
sendScenarioMetadataToEventHub: Boolean
564546
datasetCopy: Boolean
565547
}
566548

run/src/test/kotlin/com/cosmotech/run/ContainerFactoryTests.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,6 @@ class ContainerFactoryTests {
249249
}
250250

251251
private fun getWorkspace(
252-
dedicatedEventHubNamespace: Boolean? = null,
253-
sendToScenarioRun: Boolean? = true,
254-
sasAuthentication: String? = null,
255-
sasName: String? = null
256252
): Workspace {
257253
return Workspace(
258254
id = "Workspaceid",
@@ -266,10 +262,6 @@ class ContainerFactoryTests {
266262
WorkspaceSolution(
267263
solutionId = "1",
268264
),
269-
useDedicatedEventHubNamespace = dedicatedEventHubNamespace,
270-
sendScenarioRunToEventHub = sendToScenarioRun,
271-
dedicatedEventHubAuthenticationStrategy = sasAuthentication,
272-
dedicatedEventHubSasKeyName = sasName,
273265
security = WorkspaceSecurity(default = ROLE_ADMIN, accessControlList = mutableListOf())
274266
)
275267
}

workspace/src/main/kotlin/com/cosmotech/workspace/service/WorkspaceServiceImpl.kt

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,21 +149,15 @@ internal class WorkspaceServiceImpl(
149149
val existingWorkspace = this.getVerifiedWorkspace(organizationId, workspaceId, PERMISSION_WRITE)
150150
// Security cannot be changed by updateWorkspace
151151
val updatedWorkspace = Workspace(
152-
key = workspaceUpdateRequest.key,
153-
name = workspaceUpdateRequest.name,
152+
key = workspaceUpdateRequest.key ?: "",
153+
name = workspaceUpdateRequest.name ?: "",
154154
solution = workspaceUpdateRequest.solution ?: existingWorkspace.solution,
155155
id = existingWorkspace.id,
156156
organizationId = organizationId,
157157
description = workspaceUpdateRequest.description ?: "",
158158
tags = workspaceUpdateRequest.tags,
159159
ownerId = existingWorkspace.ownerId,
160160
webApp = workspaceUpdateRequest.webApp,
161-
sendInputToDataWarehouse = workspaceUpdateRequest.sendInputToDataWarehouse,
162-
useDedicatedEventHubNamespace = workspaceUpdateRequest.useDedicatedEventHubNamespace,
163-
dedicatedEventHubSasKeyName = workspaceUpdateRequest.dedicatedEventHubSasKeyName,
164-
dedicatedEventHubAuthenticationStrategy = workspaceUpdateRequest.dedicatedEventHubAuthenticationStrategy,
165-
sendScenarioRunToEventHub = workspaceUpdateRequest.sendScenarioRunToEventHub,
166-
sendScenarioMetadataToEventHub = workspaceUpdateRequest.sendScenarioMetadataToEventHub,
167161
datasetCopy = workspaceUpdateRequest.datasetCopy,
168162
security = existingWorkspace.security
169163
)

workspace/src/main/openapi/workspace.yaml

Lines changed: 0 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -715,31 +715,6 @@ components:
715715
$ref: '#/components/schemas/WorkspaceSolution'
716716
webApp:
717717
$ref: '#/components/schemas/WorkspaceWebApp'
718-
sendInputToDataWarehouse:
719-
type: boolean
720-
description: default setting for all Scenarios and Run Templates to set whether or not the Dataset values and the input parameters values are send to the DataWarehouse prior to the ScenarioRun
721-
useDedicatedEventHubNamespace:
722-
type: boolean
723-
default: false
724-
description: Set this property to true to use a dedicated Azure Event Hub Namespace for this Workspace.
725-
The Event Hub Namespace must be named \'<organization_id\>-<workspace_id\>\' (in lower case).
726-
This Namespace must also contain two Event Hubs named \'probesmeasures\' and \'scenariorun\'.
727-
dedicatedEventHubSasKeyName:
728-
type: string
729-
description: the Dedicated Event Hub SAS key name, default to RootManageSharedAccessKey. Ask you DevOps Team to add the associated value to your Workspace Secret
730-
dedicatedEventHubAuthenticationStrategy:
731-
type: string
732-
description: the Event Hub authentication strategy, SHARED_ACCESS_POLICY or TENANT_CLIENT_CREDENTIALS. Default to the one defined for the tenant.
733-
sendScenarioRunToEventHub:
734-
type: boolean
735-
default : true
736-
description: default setting for all Scenarios and Run Templates to set whether or not the ScenarioRun is send to the Event Hub
737-
sendScenarioMetadataToEventHub:
738-
type: boolean
739-
default: false
740-
description: Set this property to false to not send scenario metada to Azure Event Hub Namespace for this Workspace.
741-
The Event Hub Namespace must be named \'<organization_id\>-<workspace_id\>\' (in lower case).
742-
This Namespace must also contain two Event Hubs named \'scenariometadata\' and \'scenariorunmetadata\'.
743718
datasetCopy:
744719
type: boolean
745720
default: true
@@ -786,27 +761,6 @@ components:
786761
$ref: '#/components/schemas/WorkspaceSolution'
787762
webApp:
788763
$ref: '#/components/schemas/WorkspaceWebApp'
789-
sendInputToDataWarehouse:
790-
type: boolean
791-
description: default setting for all Scenarios and Run Templates to set whether or not the Dataset values and the input parameters values are send to the DataWarehouse prior to the ScenarioRun
792-
useDedicatedEventHubNamespace:
793-
type: boolean
794-
default: false
795-
description: Set this property to true to use a dedicated Azure Event Hub Namespace for this Workspace.
796-
dedicatedEventHubSasKeyName:
797-
type: string
798-
description: the Dedicated Event Hub SAS key name, default to RootManageSharedAccessKey
799-
dedicatedEventHubAuthenticationStrategy:
800-
type: string
801-
description: the Event Hub authentication strategy
802-
sendScenarioRunToEventHub:
803-
type: boolean
804-
default: true
805-
description: default setting for all Scenarios and Run Templates
806-
sendScenarioMetadataToEventHub:
807-
type: boolean
808-
default: false
809-
description: Set this property to false to not send scenario metada
810764
datasetCopy:
811765
type: boolean
812766
default: true
@@ -840,30 +794,9 @@ components:
840794
$ref: '#/components/schemas/WorkspaceSolution'
841795
webApp:
842796
$ref: '#/components/schemas/WorkspaceWebApp'
843-
sendInputToDataWarehouse:
844-
type: boolean
845-
description: default setting for all Scenarios and Run Templates
846-
useDedicatedEventHubNamespace:
847-
type: boolean
848-
description: Set this property to true to use a dedicated Azure Event Hub Namespace
849-
dedicatedEventHubSasKeyName:
850-
type: string
851-
description: the Dedicated Event Hub SAS key name
852-
dedicatedEventHubAuthenticationStrategy:
853-
type: string
854-
description: the Event Hub authentication strategy
855-
sendScenarioRunToEventHub:
856-
type: boolean
857-
description: default setting for all Scenarios and Run Templates
858-
sendScenarioMetadataToEventHub:
859-
type: boolean
860-
description: Set this property to false to not send scenario metadata
861797
datasetCopy:
862798
type: boolean
863799
description: Activate the copy of dataset on scenario creation
864-
required:
865-
- key
866-
- name
867800

868801
# File Operation Schemas
869802
WorkspaceFileUpload:
@@ -1009,12 +942,6 @@ components:
1009942
- "run1"
1010943
defaultRunTemplateDataset:
1011944
run1: "data1"
1012-
sendInputToDataWarehouse: false
1013-
useDedicatedEventHubNamespace: false
1014-
dedicatedEventHubSasKeyName: "RootManageSharedAccessKey"
1015-
dedicatedEventHubAuthenticationStrategy: "SHARED_ACCESS_POLICY"
1016-
sendScenarioRunToEventHub: true
1017-
sendScenarioMetadataToEventHub: false
1018945
datasetCopy: true
1019946
security:
1020947
default: "viewer"
@@ -1039,12 +966,6 @@ components:
1039966
- "run1"
1040967
defaultRunTemplateDataset:
1041968
run1: "data1"
1042-
sendInputToDataWarehouse: false
1043-
useDedicatedEventHubNamespace: false
1044-
dedicatedEventHubSasKeyName: "RootManageSharedAccessKey"
1045-
dedicatedEventHubAuthenticationStrategy: "SHARED_ACCESS_POLICY"
1046-
sendScenarioRunToEventHub: true
1047-
sendScenarioMetadataToEventHub: false
1048969
datasetCopy: true
1049970
security:
1050971
default: "viewer"
@@ -1088,12 +1009,6 @@ components:
10881009
- "run1"
10891010
defaultRunTemplateDataset:
10901011
run1: "data1"
1091-
sendInputToDataWarehouse: false
1092-
useDedicatedEventHubNamespace: false
1093-
dedicatedEventHubSasKeyName: "RootManageSharedAccessKey"
1094-
dedicatedEventHubAuthenticationStrategy: "SHARED_ACCESS_POLICY"
1095-
sendScenarioRunToEventHub: true
1096-
sendScenarioMetadataToEventHub: false
10971012
datasetCopy: true
10981013
security:
10991014
default: "viewer"
@@ -1112,12 +1027,6 @@ components:
11121027
- "runA"
11131028
defaultRunTemplateDataset:
11141029
runA: "data1"
1115-
sendInputToDataWarehouse: false
1116-
useDedicatedEventHubNamespace: false
1117-
dedicatedEventHubSasKeyName: "RootManageSharedAccessKey"
1118-
dedicatedEventHubAuthenticationStrategy: "SHARED_ACCESS_POLICY"
1119-
sendScenarioRunToEventHub: true
1120-
sendScenarioMetadataToEventHub: false
11211030
datasetCopy: true
11221031
security:
11231032
default: "viewer"
@@ -1145,12 +1054,6 @@ components:
11451054
- "run1"
11461055
defaultRunTemplateDataset:
11471056
run1: "data1"
1148-
sendInputToDataWarehouse: false
1149-
useDedicatedEventHubNamespace: false
1150-
dedicatedEventHubSasKeyName: "RootManageSharedAccessKey"
1151-
dedicatedEventHubAuthenticationStrategy: "SHARED_ACCESS_POLICY"
1152-
sendScenarioRunToEventHub: true
1153-
sendScenarioMetadataToEventHub: false
11541057
datasetCopy: true
11551058
security:
11561059
default: "viewer"

0 commit comments

Comments
 (0)