diff options
10 files changed, 149 insertions, 1 deletions
diff --git a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/customer.json b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/customer.json index 6c53c056..931e31eb 100644 --- a/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/customer.json +++ b/plans/so/integration-etsi-testing/config/aai-simulator-populate-data/customer.json @@ -67,6 +67,38 @@ } ] } + }, + { + "service-type": "NetworkService", + "relationship-list": { + "relationship": [ + { + "related-to": "tenant", + "relationship-label": "org.onap.relationships.inventory.Uses", + "related-link": "/aai/v14/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/xyzcloud/tenants/tenant/693c7729b2364a26a3ca602e6f66187d", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "CloudOwner" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "xyzcloud" + }, + { + "relationship-key": "tenant.tenant-id", + "relationship-value": "693c7729b2364a26a3ca602e6f66187d" + } + ], + "related-to-property": [ + { + "property-key": "tenant.tenant-name", + "property-value": "admin" + } + ] + } + ] + } } ] } diff --git a/plans/so/integration-etsi-testing/config/override-files/so-etsi-nfvo-ns-lcm/onapheat/override.yaml b/plans/so/integration-etsi-testing/config/override-files/so-etsi-nfvo-ns-lcm/onapheat/override.yaml new file mode 100644 index 00000000..bb35d1f9 --- /dev/null +++ b/plans/so/integration-etsi-testing/config/override-files/so-etsi-nfvo-ns-lcm/onapheat/override.yaml @@ -0,0 +1,47 @@ +aai: + auth: 221187EFA3AD4E33600DE0488F287099934CE65C3D0697BCECC00BB58E784E07CD74A24581DC31DBC086FF63DF116378776E9BE3D1325885 + version: v15 + endpoint: https://aai-simulator:9993 +spring: + datasource: + hikari: + camunda: + jdbcUrl: jdbc:mariadb://mariadb:3306/camundabpmn + username: so_user + password: so_User123 + driver-class-name: org.mariadb.jdbc.Driver + pool-name: bpmn-pool + registerMbeans: true + nfvo: + jdbcUrl: jdbc:mariadb://mariadb:3306/nfvo + username: so_admin + password: so_Admin123 + driver-class-name: org.mariadb.jdbc.Driver + pool-name: nfvo-pool + registerMbeans: true + security: + usercredentials: + - username: so-etsi-nfvo-ns-lcm + password: $2a$10$Fh9ffgPw2vnmsghsRD3ZauBL1aKXebigbq3BB1RPWtE62UDILsjke + role: ETSI-NFVO-Client +server: + port: 9095 + tomcat: + max-threads: 50 +mso: + key: 07a7159d3bf51a0e53be7a8f89699be7 +so: + adapters: + sol003-adapter: + url: http://so-vnfm-adapter:9092/so/vnfm-adapter/v1 + auth: Basic dm5mbTpwYXNzd29yZDEk +etsi-catalog-manager: + base: + endpoint: http://modeling-etsicatalog:8806/api +camunda: + bpm: + history-level: full + job-execution: + max-pool-size: 30 + core-pool-size: 3 + deployment-aware: true diff --git a/plans/so/integration-etsi-testing/docker-compose.yml b/plans/so/integration-etsi-testing/docker-compose.yml index 772fb6f0..6aea906b 100644 --- a/plans/so/integration-etsi-testing/docker-compose.yml +++ b/plans/so/integration-etsi-testing/docker-compose.yml @@ -376,3 +376,31 @@ services: max-size: "30m" max-file: "5" entrypoint: /bin/sh -c '/service/wait-for.sh -t 300 -h mariadb -p 3306 && /service/modeling/etsicatalog/docker/docker-entrypoint.sh' +############################################################################### + so-etsi-nfvo-ns-lcm: + image: ${NEXUS_DOCKER_REPO_MSO}/onap/so/so-etsi-nfvo-ns-lcm:${TAG} + ports: + - "9095:9095" + volumes: + - ${CONFIG_DIR_PATH}/override-files/so-etsi-nfvo-ns-lcm/onapheat:/app/config + - ${CONFIG_DIR_PATH}/certificates/truststore/root-ca.crt:/app/ca-certificates/root-ca.crt + - ${TEST_LAB_DIR}/volumes/so/ca-certificates/onapheat:/app/ca-certificates + environment: + - APP=so-etsi-nfvo-ns-lcm + - 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: + etsi.nfvo.ns.lcm + depends_on: + - mariadb + - aai-simulator + - sdc-simulator + - modeling-etsicatalog + - so-vnfm-adapter + user: root + entrypoint: /bin/sh -c '/app/wait-for.sh -q -t "300" mariadb:3306 -- "/app/start-app.sh"' diff --git a/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/resources/csar/SERVICES/9bb8c882-44a1-4b67-a12c-5a998e18d6ba.csar b/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/resources/csar/SERVICES/9bb8c882-44a1-4b67-a12c-5a998e18d6ba.csar Binary files differindex 6504cb1a..1610b7fc 100644 --- a/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/resources/csar/SERVICES/9bb8c882-44a1-4b67-a12c-5a998e18d6ba.csar +++ b/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/resources/csar/SERVICES/9bb8c882-44a1-4b67-a12c-5a998e18d6ba.csar diff --git a/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/test/java/org/onap/so/sdcsimulator/controller/CatalogControllerTest.java b/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/test/java/org/onap/so/sdcsimulator/controller/CatalogControllerTest.java index e3d040da..e5a6e7f7 100644 --- a/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/test/java/org/onap/so/sdcsimulator/controller/CatalogControllerTest.java +++ b/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/test/java/org/onap/so/sdcsimulator/controller/CatalogControllerTest.java @@ -102,7 +102,7 @@ public class CatalogControllerTest { assertEquals(HttpStatus.OK, response.getStatusCode()); assertTrue(response.hasBody()); - assertEquals(147743, response.getBody().length); + assertEquals(147255, response.getBody().length); } diff --git a/plans/so/integration-etsi-testing/testplan.txt b/plans/so/integration-etsi-testing/testplan.txt index 249010a9..963abb93 100644 --- a/plans/so/integration-etsi-testing/testplan.txt +++ b/plans/so/integration-etsi-testing/testplan.txt @@ -5,3 +5,4 @@ so/etsi/etsi_package_onboarding_tests.robot so/etsi/etsi_vnf_lcm_tests.robot so/etsi/etsi_vnf_package_management_tests.robot so/etsi/etsi_vnf_notification_tests.robot +so/etsi/etsi_nfvo_ns_lcm_tests.robot diff --git a/tests/so/etsi/data/createNetworkServiceRequest.json b/tests/so/etsi/data/createNetworkServiceRequest.json new file mode 100644 index 00000000..6980068e --- /dev/null +++ b/tests/so/etsi/data/createNetworkServiceRequest.json @@ -0,0 +1 @@ +{"nsdId": "9bb8c882-44a1-4b67-a12c-5a998e18d6ba", "nsName": "demo", "nsDescription": "demo"} diff --git a/tests/so/etsi/data/networkServicePackageOnboardRequest.json b/tests/so/etsi/data/networkServicePackageOnboardRequest.json new file mode 100644 index 00000000..f6ffeb2e --- /dev/null +++ b/tests/so/etsi/data/networkServicePackageOnboardRequest.json @@ -0,0 +1 @@ +{"csarId": "9bb8c882-44a1-4b67-a12c-5a998e18d6ba"} diff --git a/tests/so/etsi/etsi_nfvo_ns_lcm_tests.robot b/tests/so/etsi/etsi_nfvo_ns_lcm_tests.robot new file mode 100644 index 00000000..e931b3ca --- /dev/null +++ b/tests/so/etsi/etsi_nfvo_ns_lcm_tests.robot @@ -0,0 +1,27 @@ +*** Settings *** +Library Collections +Library RequestsLibrary +Library OperatingSystem +Library json +Library ArchiveLibrary + +*** Variables *** +${NFVO_NS_LCM_BASE_URL}= /so/so-etsi-nfvo-ns-lcm/v1/api/nslcm/v1 +${BASIC_AUTH}= Basic c28tZXRzaS1uZnZvLW5zLWxjbTpwYXNzd29yZDEk + +*** Test Cases *** + +Invoke Create Network Service + Create Session etsi_nfvo_ns_lcm_session http://${REPO_IP}:9095 + ${data}= Get Binary File ${CURDIR}${/}data${/}createNetworkServiceRequest.json + &{headers}= Create Dictionary Authorization=${BASIC_AUTH} Content-Type=application/json Accept=application/json HTTP_GLOBALCUSTOMERID=DemoCustomer + ${create_network_service_request}= POST On Session etsi_nfvo_ns_lcm_session ${NFVO_NS_LCM_BASE_URL}/ns_instances data=${data} headers=${headers} + log to console ${create_network_service_request.content} + ${create_network_service_json_response}= Evaluate json.loads(r"""${create_network_service_request.content}""", strict=False) json + ${request_Id}= Set Variable ${create_network_service_json_response}[id] + SET GLOBAL VARIABLE ${request_Id} + + Run Keyword If '${create_network_service_request.status_code}' == '201' log to console \nexecuted with expected result + log to console \nCreate Network Service Response Status Code: ${create_network_service_request.status_code} + Should Be Equal As Strings '${create_network_service_request.status_code}' '201' + diff --git a/tests/so/etsi/etsi_package_onboarding_tests.robot b/tests/so/etsi/etsi_package_onboarding_tests.robot index e4694e01..c48101c8 100644 --- a/tests/so/etsi/etsi_package_onboarding_tests.robot +++ b/tests/so/etsi/etsi_package_onboarding_tests.robot @@ -51,6 +51,17 @@ OnBoard VNF Package In Etsi Catalog Run Keyword If '${actual_job_status}' == 'finished' log to console \nexecuted with expected result Should Be Equal As Strings '${actual_job_status}' 'finished' +Onboard Network Service Package In Etsi Catalog + Create Session etsi_catalog_session http://${REPO_IP}:8806 + ${data}= Get Binary File ${CURDIR}${/}data${/}networkServicePackageOnboardRequest.json + &{headers}= Create Dictionary Content-Type=application/json Accept=application/json + ${resp}= POST On Session etsi_catalog_session /api/catalog/v1/nspackages data=${data} headers=${headers} + log to console ${resp.content} + + Run Keyword If '${resp.status_code}' == '202' log to console \nexecuted with expected result + Should Be Equal As Strings '${resp.status_code}' '202' + + Distribute Service Template Create Session sdc_controller_session http://${REPO_IP}:8085 ${data}= Get Binary File ${CURDIR}${/}data${/}distributeServiceTemplate.json |