Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: _Support app service_ #47

Merged
merged 4 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
## [Unreleased]
- NA

## [1.3.5] - 2023-07-12

### Added
- Support for tool app/service type in autosetup

## [1.3.4] - 2023-07-11

### Changed
Expand Down
4 changes: 2 additions & 2 deletions charts/orchestrator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ sources:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.3.4
version: 1.3.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.3.4"
appVersion: "1.3.5"

dependencies:
- condition: postgresql.enabled
Expand Down
2 changes: 1 addition & 1 deletion charts/orchestrator/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# autosetup

![Version: 1.3.4](https://img.shields.io/badge/Version-1.3.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.3.4](https://img.shields.io/badge/AppVersion-1.3.4-informational?style=flat-square)
![Version: 1.3.5](https://img.shields.io/badge/Version-1.3.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.3.5](https://img.shields.io/badge/AppVersion-1.3.5-informational?style=flat-square)

This service will help service provider to set up DFT/SDE with EDC and EDC as service in service provider environment.

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</parent>
<groupId>org.eclipse.tractusx</groupId>
<artifactId>auto-setup</artifactId>
<version>1.3.4</version>
<version>1.3.5</version>
<name>auto-setup</name>
<description>auto-setup</description>
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,9 @@

import java.util.UUID;

import jakarta.validation.Valid;

import org.eclipse.tractusx.autosetup.manager.AutoSetupTriggerManager;
import org.eclipse.tractusx.autosetup.model.AutoSetupRequest;
import org.eclipse.tractusx.autosetup.model.AutoSetupResponse;
import org.eclipse.tractusx.autosetup.model.DFTUpdateRequest;
import org.eclipse.tractusx.autosetup.service.AutoSetupOrchitestratorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
Expand All @@ -44,6 +41,7 @@
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;

@RestController
@Tag(name = "AutoSetup", description = "Auto setup controller to perform all operation")
Expand All @@ -61,18 +59,6 @@ public String getAllInstallPackages() {
return appHandlerService.getAllInstallPackages();
}

/// internal access
// update dft packages input: keycloack details for frontend and backend,
// digital twin details
@Operation(summary = "Update DFT only packages", description = "This will update only DFT packages")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Created", content = @Content(schema = @Schema(implementation = UUID.class))) })
@PutMapping("/internal/update-package/{executionId}")
public String updateDftPackage(@PathVariable("executionId") UUID executionId,
@RequestBody DFTUpdateRequest dftUpdateRequest) {
return appHandlerService.updateDftPackage(executionId.toString(), dftUpdateRequest);
}

// portal access
@Operation(summary = "Start autosetup process", description = "This API will use to start the Auto setup process")
@ApiResponses(value = {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,13 @@ public Map<String, String> postServiceInstanceResultAndGetTenantSpecs(Customer c

ServiceInstanceResultRequest serviceInstanceResultRequest = ServiceInstanceResultRequest.builder()
.requestId(subscriptionId).offerUrl(applicationURL).build();

serviceInstanceResultResponse = portalIntegrationProxy.postServiceInstanceResultAndGetTenantSpecs(portalUrl,
header, serviceInstanceResultRequest);

if ("app".equalsIgnoreCase(tool.getType()))
serviceInstanceResultResponse = portalIntegrationProxy.postAppInstanceResultAndGetTenantSpecs(portalUrl,
header, serviceInstanceResultRequest);
else
serviceInstanceResultResponse = portalIntegrationProxy
.postServiceInstanceResultAndGetTenantSpecs(portalUrl, header, serviceInstanceResultRequest);

if (serviceInstanceResultResponse != null) {

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
public class SelectedTools {

private ToolType tool;

private String type;

private String label;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,17 @@ public interface PortalIntegrationProxy {
KeycloakTokenResponse readAuthToken(URI url, @RequestBody MultiValueMap<String, Object> body);

@PostMapping("/api/Apps/autoSetup")
public ServiceInstanceResultResponse postAppInstanceResultAndGetTenantSpecs(URI url,
@RequestHeader Map<String, String> header,
@RequestBody ServiceInstanceResultRequest serviceInstanceResultRequest);


@PostMapping("/api/Services/autoSetup")
public ServiceInstanceResultResponse postServiceInstanceResultAndGetTenantSpecs(URI url,
@RequestHeader Map<String, String> header,
@RequestBody ServiceInstanceResultRequest serviceInstanceResultRequest);


@PostMapping("/api/administration/connectors/managed-daps")
public String manageConnector(URI url, @RequestHeader Map<String, String> header,
@RequestBody MultiValueMap<String, Object> body);
Expand Down
Loading