From 7d9a8742d4bf5f0d98003b6836b09f6ff17b0331 Mon Sep 17 00:00:00 2001 From: MD IRSHAD SHEIKH Date: Sat, 22 May 2021 22:45:54 +0530 Subject: Added CSIT for Macroflow with HELM Issue-ID: SO-3585 Signed-off-by: MD IRSHAD SHEIKH Change-Id: I3eb3ec1005f19fc109e28b1e709bdc0d32f1180a --- .../controller/MultiCloudController.java | 32 ++++++------ .../src/main/resources/application.yaml | 2 +- .../macro_helm_zipped_sdc_csar.tar.gz | Bin 0 -> 88510 bytes plans/so/macroflow/config/env | 1 + .../cnf-adapter/onapheat/override.yaml | 56 +++++++++++++++++++++ .../openstack-adapter/onapheat/override.yaml | 4 +- plans/so/macroflow/docker-compose.local.yml | 3 ++ plans/so/macroflow/docker-compose.yml | 42 +++++++++++++--- plans/so/macroflow/testplan.txt | 1 + 9 files changed, 116 insertions(+), 25 deletions(-) create mode 100755 plans/so/macroflow/config/distribution-test-zip/macro_helm_zipped_sdc_csar.tar.gz create mode 100644 plans/so/macroflow/config/override-files/cnf-adapter/onapheat/override.yaml (limited to 'plans') diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java index c99e246e..8361f240 100644 --- a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java +++ b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/java/org/onap/so/multicloudsimulator/controller/MultiCloudController.java @@ -30,14 +30,13 @@ import org.onap.so.multicloudsimulator.beans.MulticloudRequest; import org.springframework.http.ResponseEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.GetMapping; import java.io.IOException; import java.io.InputStream; @@ -45,22 +44,22 @@ import java.io.InputStream; import static org.onap.so.multicloudsimulator.utils.Constants.BASE_URL; @RestController -@RequestMapping(path = BASE_URL) public class MultiCloudController { public static final String X_HTTP_METHOD_OVERRIDE = "X-HTTP-Method-Override"; private static final Logger LOGGER = LoggerFactory.getLogger(MultiCloudController.class); - @PostMapping(value = "/v1/instance") + @PostMapping("/v1/instance") public ResponseEntity createInstance(@RequestBody MulticloudInstanceRequest req) { - System.out.println("MultiCloud createInstance "); + LOGGER.info("MultiCloud createInstance "); final InstanceResponse InstanceResponse = new InstanceResponse(); - LOGGER.info("Calling createInstance"); - return ResponseEntity.ok(InstanceResponse); + LOGGER.info("Calling v1 instance method"); + return ResponseEntity.ok(req); } - @GetMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload", produces = { MediaType.APPLICATION_JSON }) + @GetMapping(value = BASE_URL + "/{cloud-owner}/{cloud-region-id}/infra_workload", + produces = { MediaType.APPLICATION_JSON }) public ResponseEntity getInstance(@PathVariable("cloud-owner") String cloudOwner, @PathVariable("cloud-region-id") String cloudRegionId, @RequestParam(value = "depth", required = false, defaultValue = "0") Integer depth, @@ -76,8 +75,9 @@ public class MultiCloudController { return ResponseEntity.ok(output); } - @PostMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload", consumes = { MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML }, produces = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) + @PostMapping(value = BASE_URL + "/{cloud-owner}/{cloud-region-id}/infra_workload", + consumes = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }, + produces = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ResponseEntity postCreateInstance(@RequestBody final MulticloudCreateResponse inputRequest, @PathVariable("cloud-owner") final String cloudOwner, @PathVariable("cloud-region-id") final String cloudRegionId, @@ -94,8 +94,8 @@ public class MultiCloudController { return ResponseEntity.status(201).body(inputRequest); } - @GetMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", produces = { - MediaType.APPLICATION_JSON }) + @GetMapping(value = BASE_URL + "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", + produces = {MediaType.APPLICATION_JSON }) public ResponseEntity getInstanceName(@PathVariable("cloud-owner") final String cloudOwner, @PathVariable("cloud-region-id") final String cloudRegionId, @PathVariable("workload-id") final String workloadId, @RequestParam(value = "depth", required = false, defaultValue = "0") final Integer depth, @@ -112,9 +112,9 @@ public class MultiCloudController { return ResponseEntity.ok(output); } - @PostMapping(value = "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", consumes = { - MediaType.APPLICATION_JSON, - MediaType.APPLICATION_XML }, produces = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) + @PostMapping(value = BASE_URL + "/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}", + consumes = {MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }, + produces = { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML }) public ResponseEntity postCreateInstanceName(@RequestBody final MulticloudRequest inputRequest, @PathVariable("cloud-owner") final String cloudOwner, @PathVariable("workload-id") String workloadId, @PathVariable("cloud-region-id") final String cloudRegionId, diff --git a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml index 393d1b7b..c24b9dc1 100644 --- a/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml +++ b/plans/so/integration-etsi-testing/so-simulators/multicloud-simulator/src/main/resources/application.yaml @@ -1,5 +1,5 @@ server: - port: 9996 + port: 9015 tomcat: max-threads: 4 ssl-enable: false diff --git a/plans/so/macroflow/config/distribution-test-zip/macro_helm_zipped_sdc_csar.tar.gz b/plans/so/macroflow/config/distribution-test-zip/macro_helm_zipped_sdc_csar.tar.gz new file mode 100755 index 00000000..c06f4907 Binary files /dev/null and b/plans/so/macroflow/config/distribution-test-zip/macro_helm_zipped_sdc_csar.tar.gz differ diff --git a/plans/so/macroflow/config/env b/plans/so/macroflow/config/env index f5453e95..86a88274 100644 --- a/plans/so/macroflow/config/env +++ b/plans/so/macroflow/config/env @@ -4,4 +4,5 @@ TAG=1.8.0-STAGING-latest TIME_OUT_DEFAULT_VALUE_SEC=1200 PROJECT_NAME=macroflowintegrationtesting DEFAULT_NETWORK_NAME=macroflowintegrationtesting_default +CNF_ADAPTER_IMAGE_VERSION=1.8.2 MARIADB_VERSION=10.5.8 diff --git a/plans/so/macroflow/config/override-files/cnf-adapter/onapheat/override.yaml b/plans/so/macroflow/config/override-files/cnf-adapter/onapheat/override.yaml new file mode 100644 index 00000000..27425833 --- /dev/null +++ b/plans/so/macroflow/config/override-files/cnf-adapter/onapheat/override.yaml @@ -0,0 +1,56 @@ +# Copyright 2020 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://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. + +logging: + path: logs + +server: + port: 8090 + tomcat: + max-threads: 50 + +mso: + auth: BEA8637716A7EB617DF472BA6552D22F68C1CB17B0D094D77DDA562F4ADAAC4457CAB848E1A4 + msoKey: 07a7159d3bf51a0e53be7a8f89699be7 + logPath: ./logs/cnf + msb-ip: multicloud-k8s + msb-port: 9015 + msb-scheme: http +spring: + security: + usercredentials: + - + username: apihBpmn + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: BPMN-Client + - + username: sdncaBpmn + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: BPMN-Client + - + username: poBpmn + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: BPMN-Client + - + username: wmaBpmn + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: BPMN-Client + - + username: sniro + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: SNIRO-Client + - + username: mso_admin + password: '$2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke' + role: ACTUATOR diff --git a/plans/so/macroflow/config/override-files/openstack-adapter/onapheat/override.yaml b/plans/so/macroflow/config/override-files/openstack-adapter/onapheat/override.yaml index 7e2afa85..1b5e9966 100644 --- a/plans/so/macroflow/config/override-files/openstack-adapter/onapheat/override.yaml +++ b/plans/so/macroflow/config/override-files/openstack-adapter/onapheat/override.yaml @@ -93,8 +93,8 @@ mso: auth: BEA8637716A7EB617DF472BA6552D22F68C1CB17B0D094D77DDA562F4ADAAC4457CAB848E1A4 msoKey: 07a7159d3bf51a0e53be7a8f89699be7 logPath: ./logs/openstack - msb-ip: multicloud-simulator - msb-port: 9996 + msb-ip: multicloud-k8s + msb-port: 9015 msb-scheme: http workflow: endpoint: http://bpmn-infra:8081/sobpmnengine diff --git a/plans/so/macroflow/docker-compose.local.yml b/plans/so/macroflow/docker-compose.local.yml index a796b379..34a5419b 100644 --- a/plans/so/macroflow/docker-compose.local.yml +++ b/plans/so/macroflow/docker-compose.local.yml @@ -15,6 +15,9 @@ services: ################################################################################ openstack-adapter: image: onap/so/openstack-adapter:${TAG} +################################################################################ + so-cnf-adapter: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/so-cnf-adapter:${TAG} ################################################################################ sdc-controller: image: onap/so/sdc-controller:${TAG} diff --git a/plans/so/macroflow/docker-compose.yml b/plans/so/macroflow/docker-compose.yml index 5b6bfb23..1bd3fb11 100644 --- a/plans/so/macroflow/docker-compose.yml +++ b/plans/so/macroflow/docker-compose.yml @@ -135,6 +135,36 @@ services: user: root entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' ################################################################################ + so-cnf-adapter: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/so-cnf-adapter:${CNF_ADAPTER_IMAGE_VERSION} + ports: + - "8090:8090" + volumes: + - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates + - ${CONFIG_DIR_PATH_MACRO}/override-files/cnf-adapter/onapheat:/app/config + environment: + - APP=so-cnf-adapter + - JVM_ARGS=-Xms64m -Xmx512m + - DB_HOST=mariadb + - DB_PORT=3306 + - DB_USERNAME=so_user + - DB_PASSWORD=so_User123 + - DB_ADMIN_USERNAME=so_admin + - DB_ADMIN_PASSWORD=so_Admin123 + hostname: + so-cnf-adapter.so.testlab.onap.org + depends_on: + - mariadb + - catalog-db-adapter + - request-db-adapter + logging: + driver: "json-file" + options: + max-size: "30m" + max-file: "5" + user: root + entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' +#################################################################################### sdc-controller: image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/sdc-controller:${TAG} ports: @@ -164,7 +194,7 @@ services: max-size: "30m" max-file: "5" user: root - entrypoint: /bin/sh -c 'mkdir -p /distribution-test-zip/unzipped && tar -xvzf /distribution-test-zip/macro_zipped_sdc_csar.tar.gz -C /distribution-test-zip/unzipped && chmod 777 -R /distribution-test-zip/ && /app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' + entrypoint: /bin/sh -c 'mkdir -p /distribution-test-zip/unzipped && tar -xvzf /distribution-test-zip/macro_zipped_sdc_csar.tar.gz -C /distribution-test-zip/unzipped && tar -xvzf /distribution-test-zip/macro_helm_zipped_sdc_csar.tar.gz -C /distribution-test-zip/unzipped && chmod 777 -R /distribution-test-zip/ && /app/wait-for.sh -q -t "300" request-db-adapter:8083 -- "/app/start-app.sh"' ################################################################################ bpmn-infra: image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/bpmn-infra:${TAG} @@ -294,17 +324,17 @@ services: max-size: "30m" max-file: "5" ################################################################################# - multicloud-simulator: + multicloud-k8s: image: simulators/multicloud-simulator:latest ports: - - "9996:9996" + - "9015:9015" environment: - - APP=MULTICLOUD-SIMULATOR + - APP=multicloud-k8s - JVM_ARGS=-Xms64m -Xmx512m hostname: - multicloud-simulator + multicloud-k8s depends_on: - - mariadb + - mariadb logging: driver: "json-file" options: diff --git a/plans/so/macroflow/testplan.txt b/plans/so/macroflow/testplan.txt index 00a8d8b7..3e4ff102 100644 --- a/plans/so/macroflow/testplan.txt +++ b/plans/so/macroflow/testplan.txt @@ -1,3 +1,4 @@ # Test suites are relative paths under [integration/csit.git]/tests/. # Place the suites in run order. so/sanity-check/macroflow.robot +so/sanity-check/macroflow_helm.robot -- cgit 1.2.3-korg