forked from eclipse-tractusx/managed-service-orchestrator
-
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.
Merge pull request #55 from catenax-ng/main
sync code with main branch
- Loading branch information
Showing
20 changed files
with
179 additions
and
179 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
### The following people have contributed to this repository | ||
# Authors | ||
|
||
Aditya Kumar, doubleSlash Net-Business GmbH, https://github.com/adkumar1 <br /> | ||
Aditya Gajbhiye, doubleSlash Net-Business GmbH, https://github.com/adityagajbhiye <br /> | ||
Sachin Argade, doubleSlash Net-Business GmbH, https://github.com/sachinargade123 <br /> | ||
Dmitrii Vasiunin, doubleSlash Net-Business GmbH, https://github.com/dvasunin <br /> | ||
Amol Dashwant, doubleSlash Net-Business GmbH, https://github.com/amoldashwant <br /> | ||
Fedor Nazarov, doubleSlash Net-Business GmbH, https://github.com/Wulghash <br /> | ||
The following people have contributed to this repository: | ||
|
||
* Sachin Argade, T-Systems International GmbH, https://github.com/sachinargade123 | ||
* Chetan Parate, T-Systems International GmbH, https://github.com/ChetanT-System | ||
* Aditya Gajbhiye, T-Systems International GmbH, https://github.com/adityagajbhiye | ||
* Aditya Kumar, T-Systems International GmbH, https://github.com/adkumar1 | ||
* Dmitrii Vasiunin, T-Systems International GmbH, https://github.com/dvasunin | ||
* Amol Dashwant, T-Systems International GmbH, https://github.com/amoldashwant | ||
* Fedor Nazarov,, T-Systems International GmbH, https://github.com/Wulghash |
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
This file was deleted.
Oops, something went wrong.
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
41 changes: 41 additions & 0 deletions
41
src/main/java/org/eclipse/tractusx/autosetup/constant/DAPsConfigurationProperty.java
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,41 @@ | ||
/******************************************************************************** | ||
#* Copyright (c) 2022, 2023 T-Systems International GmbH | ||
#* Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation | ||
#* | ||
#* See the NOTICE file(s) distributed with this work for additional | ||
#* information regarding copyright ownership. | ||
#* | ||
#* This program and the accompanying materials are made available under the | ||
#* terms of the Apache License, Version 2.0 which is available at | ||
#* https://www.apache.org/licenses/LICENSE-2.0. | ||
#* | ||
#* Unless required by applicable law or agreed to in writing, software | ||
#* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
#* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
#* License for the specific language governing permissions and limitations | ||
#* under the License. | ||
#* | ||
#* SPDX-License-Identifier: Apache-2.0 | ||
#********************************************************************************/ | ||
|
||
package org.eclipse.tractusx.autosetup.constant; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
|
||
import lombok.Getter; | ||
|
||
@Getter | ||
@Component | ||
public class DAPsConfigurationProperty { | ||
|
||
@Value("${daps.url}") | ||
private String url; | ||
|
||
@Value("${daps.jskurl}") | ||
private String jskUrl; | ||
|
||
@Value("${daps.token.url}") | ||
private String tokenUrl; | ||
|
||
} |
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
74 changes: 74 additions & 0 deletions
74
src/main/java/org/eclipse/tractusx/autosetup/manager/ConnectorCommonUtilityManager.java
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,74 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2023 T-Systems International GmbH | ||
* Copyright (c) 2023 Contributors to the Eclipse Foundation | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Apache License, Version 2.0 which is available at | ||
* https://www.apache.org/licenses/LICENSE-2.0. | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations | ||
* under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
********************************************************************************/ | ||
|
||
package org.eclipse.tractusx.autosetup.manager; | ||
|
||
import java.util.Map; | ||
|
||
import org.eclipse.tractusx.autosetup.constant.DAPsConfigurationProperty; | ||
import org.eclipse.tractusx.autosetup.utility.PasswordGenerator; | ||
import org.springframework.stereotype.Component; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
|
||
@Component | ||
@RequiredArgsConstructor | ||
public class ConnectorCommonUtilityManager { | ||
|
||
|
||
private final DAPsConfigurationProperty dAPsConfigurationProperty; | ||
|
||
public Map<String, String> prepareConnectorInput(String packageName, Map<String, String> inputData) { | ||
|
||
String generateRandomPassword = PasswordGenerator.generateRandomPassword(50); | ||
String dnsName = inputData.get("dnsName"); | ||
String dnsNameURLProtocol = inputData.get("dnsNameURLProtocol"); | ||
|
||
String controlplaneurl = dnsNameURLProtocol + "://" + dnsName; | ||
|
||
inputData.put("dapsurl", dAPsConfigurationProperty.getUrl()); | ||
inputData.put("dapsjsksurl", dAPsConfigurationProperty.getJskUrl()); | ||
inputData.put("dapstokenurl", dAPsConfigurationProperty.getTokenUrl()); | ||
|
||
inputData.put("dataPlanePublicUrl", | ||
dnsNameURLProtocol + "://" + packageName + "-edcdataplane-edc-dataplane:8185/api/public"); | ||
|
||
String localControlplane = dnsNameURLProtocol + "://" + packageName | ||
+ "-edccontrolplane-edc-controlplane:8182/validation/token"; | ||
|
||
inputData.put("controlPlaneValidationEndpoint", localControlplane); | ||
|
||
inputData.put("controlPlaneEndpoint", controlplaneurl); | ||
inputData.put("controlPlaneDataEndpoint", controlplaneurl + "/data"); | ||
inputData.put("edcApiKey", "X-Api-Key"); | ||
inputData.put("edcApiKeyValue", generateRandomPassword); | ||
inputData.put("controlPlaneIdsEndpoint", controlplaneurl + "/api/v1/ids/data"); | ||
inputData.put("dataplaneendpoint", controlplaneurl); | ||
inputData.put("dataPlanePublicEndpoint", controlplaneurl + "/public"); | ||
|
||
String dftAddress = dnsNameURLProtocol + "://" + dnsName + "/dftbackend/api"; | ||
inputData.put("dftAddress", dftAddress); | ||
|
||
String edcDb = "jdbc:postgresql://" + packageName + "-postgresdb-postgresql:5432/postgres"; | ||
inputData.put("edcdatabaseurl", edcDb); | ||
|
||
return inputData; | ||
} | ||
} |
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
Oops, something went wrong.