diff options
author | Lasse Kaihlavirta <l.kaihlavirt@partner.samsung.com> | 2021-02-16 17:15:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2021-02-16 17:15:50 +0000 |
commit | a680781ff2266be181cad97275514ab5bb6716e4 (patch) | |
tree | 7b815dc6569e311ad2433f9345766ea3c4b2ad0e /tests | |
parent | f28a4e8c9ac2278890b3b6d0dcaa481880154f28 (diff) | |
parent | afd22dac87adc52066e35a9ac5b475fc17f2ca69 (diff) |
Merge "Add initial configurations + basic test for ETSI NFVO NS LCM CSIT Tests"
Diffstat (limited to 'tests')
4 files changed, 40 insertions, 0 deletions
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 |