aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/so/etsi/data/distributeServiceTemplate.json142
-rw-r--r--tests/so/etsi/data/serviceDeleteRequest.json8
-rw-r--r--tests/so/etsi/data/serviceInstantiationRequest.json60
-rw-r--r--tests/so/etsi/data/vnfDeleteRequest.json12
-rw-r--r--tests/so/etsi/data/vnfInstantiationRequest.json94
-rw-r--r--tests/so/etsi/data/vnfPackageOnboardRequest.json1
-rw-r--r--tests/so/etsi/etsi_tests.robot37
7 files changed, 170 insertions, 184 deletions
diff --git a/tests/so/etsi/data/distributeServiceTemplate.json b/tests/so/etsi/data/distributeServiceTemplate.json
index 47a9f21b..6c64d5c2 100644
--- a/tests/so/etsi/data/distributeServiceTemplate.json
+++ b/tests/so/etsi/data/distributeServiceTemplate.json
@@ -1,102 +1,52 @@
{
- "distributionID": "cfe30d6c-eb67-4ffb-ba98-4b654162223a",
- "serviceName": "manualDistributionTestService",
- "serviceVersion": "1.0",
- "serviceUUID": "28d4acf3-4791-4998-8d06-1cdf6d1767a9",
- "serviceDescription": "Test",
- "serviceInvariantUUID": "0ddc448d-5513-44bc-8b02-5759d84600d5",
- "resources": [
- {
- "resourceInstanceName": "manualDistributionTestVNF 0",
- "resourceCustomizationUUID": "82ad3aa0-edc6-410c-a217-655fb064323f",
- "resourceName": "manualDistributionTestVNF",
- "resourceVersion": "1.0",
- "resoucreType": "VF",
- "resourceUUID": "e8e39dc4-4761-4da7-aedf-7d1fd3637772",
- "resourceInvariantUUID": "0a0b9979-863d-4b7e-b7f4-d27725a182b3",
- "category": "Application L4+",
- "subcategory": "Media Servers",
- "artifacts": [
+ "distributionID": "f0d0e9e2-10aa-4f66-a0cc-cf5ecb386b42",
+ "serviceName": "EtsiServiceCSIT3",
+ "serviceVersion": "1.0",
+ "serviceUUID": "fdea6501-dabd-4428-b52c-623336a3b403",
+ "serviceDescription": "test",
+ "serviceInvariantUUID": "10b3d278-e262-44ca-a0c0-4e663c2d7562",
+ "resources": [
{
- "artifactName": "manualdistributiontestvnf0_modules.json",
- "artifactType": "VF_MODULES_METADATA",
- "artifactURL": "/unzipped_sdc_csar/v1/catalog/services/Manualdistributiontestservice/1.0/resourceInstances/manualdistributiontestvnf0/artifacts/manualdistributiontestvnf0_modules.json",
- "artifactChecksum": "NTc0NDlkNzdmYzVmMDM3ZjMxMTE2NDBmYWJiMDM1NzY\u003d",
- "artifactDescription": "Auto-generated VF Modules information artifact",
- "artifactTimeout": 120,
- "artifactVersion": "1",
- "artifactUUID": "a10f397a-6546-4a27-843f-25821955ef3e",
- "relatedArtifactsInfo": []
- },
- {
- "artifactName": "base_ves_med1.yaml",
- "artifactType": "HEAT",
- "artifactURL": "/unzipped_sdc_csar/v1/catalog/services/Manualdistributiontestservice/1.0/resourceInstances/manualdistributiontestvnf0/artifacts/base_ves_med1.yaml",
- "artifactChecksum": "YTAwNTQ3NjczY2Y5MmUwZjUzZTY1ZjNhNTA0NGQyMDY\u003d",
- "artifactDescription": "created from csar",
- "artifactTimeout": 120,
- "artifactVersion": "2",
- "artifactUUID": "e216d9da-18c4-460f-8b2b-d7f8dd9e9295",
- "generatedArtifact": {
- "artifactName": "base_ves_med1.env",
- "artifactType": "HEAT_ENV",
- "artifactURL": "/unzipped_sdc_csar/v1/catalog/services/Manualdistributiontestservice/1.0/resourceInstances/manualdistributiontestvnf0/artifacts/base_ves_med1.env",
- "artifactChecksum": "Mjg5YTVhNTlmYTdjYTFlYjYxMDlhODYzNmJhZGJiZGE\u003d",
- "artifactDescription": "Auto-generated HEAT Environment deployment artifact",
- "artifactTimeout": 120,
- "artifactVersion": "2",
- "artifactUUID": "6243747f-e794-4519-82b2-6399846f1951",
- "generatedFromUUID": "e216d9da-18c4-460f-8b2b-d7f8dd9e9295"
- },
- "relatedArtifactsInfo": []
- },
- {
- "artifactName": "base_ves_med1.env",
- "artifactType": "HEAT_ENV",
- "artifactURL": "/unzipped_sdc_csar/v1/catalog/services/Manualdistributiontestservice/1.0/resourceInstances/manualdistributiontestvnf0/artifacts/base_ves_med1.env",
- "artifactChecksum": "Mjg5YTVhNTlmYTdjYTFlYjYxMDlhODYzNmJhZGJiZGE\u003d",
- "artifactDescription": "Auto-generated HEAT Environment deployment artifact",
- "artifactTimeout": 120,
- "artifactVersion": "2",
- "artifactUUID": "6243747f-e794-4519-82b2-6399846f1951",
- "relatedArtifactsInfo": []
- },
+ "resourceInstanceName": "EtsiVnfCSIT3 0",
+ "resourceCustomizationUUID": "3341825c-837c-4e84-8a82-cc69033ca92f",
+ "resourceName": "EtsiVnfCSIT3",
+ "resourceVersion": "1.0",
+ "resourceUUID": "bb7ff27f-d609-4d02-9926-2f4c5eb89316",
+ "resourceInvariantUUID": "037f7b1b-5c62-44c1-b806-f92fe8970171",
+ "category": "Generic",
+ "subcategory": "Network Service",
+ "artifacts": [],
+ "artifactsImpl": [],
+ "resourceType": "VF"
+ }
+ ],
+ "serviceArtifacts": [
{
- "artifactName": "TOSCA.meta",
- "artifactType": "OTHER",
- "artifactURL": "/unzipped_sdc_csar/v1/catalog/services/Manualdistributiontestservice/1.0/resourceInstances/manualdistributiontestvnf0/artifacts/TOSCA.meta",
- "artifactChecksum": "NWE2ODcyOWY0NGI2MzEyOGViYjUxNTEwMjU5OWRhZmI\u003d",
- "artifactDescription": "created from csar",
- "artifactTimeout": 120,
- "artifactVersion": "1",
- "artifactUUID": "6c64d38b-186f-4339-9a76-a266c40f40ec",
- "relatedArtifactsInfo": []
- },
+ "artifactName": "service-Etsiservicecsit3-csar.csar",
+ "artifactType": "TOSCA_CSAR",
+ "artifactURL": "/unzipped_sdc_csar/v1/catalog/services/Etsiservicecsit3/1.0/artifacts/service-Etsiservicecsit3-csar.csar",
+ "artifactChecksum": "NDcwMjRmZjg3MWYwY2FmMTAxN2RlZWEzMWE2OTU2ZjA=",
+ "artifactDescription": "TOSCA definition package ofthe asset",
+ "artifactTimeout": 0,
+ "artifactVersion": "1",
+ "artifactUUID": "587a89d9-ca2d-41b7-929e-de191fd4bf29",
+ "relatedArtifacts": []
+ }
+ ],
+ "workloadContext": "Production",
+ "resourcesImpl": [
{
- "artifactName": "descriptor.yaml",
- "artifactType": "OTHER",
- "artifactURL": "/unzipped_sdc_csar/v1/catalog/services/Manualdistributiontestservice/1.0/resourceInstances/manualdistributiontestvnf0/artifacts/descriptor.yaml",
- "artifactChecksum": "YWZkNTg2ZGMzZjRhZjgxNzNkODJiNjgwZmRlZjlmNDE\u003d",
- "artifactDescription": "created from csar",
- "artifactTimeout": 120,
- "artifactVersion": "1",
- "artifactUUID": "4bd0cdf6-0b12-4d19-b3d8-6dbc34fe397e",
- "relatedArtifactsInfo": []
+ "resourceInstanceName": "EtsiVnfCSIT3 0",
+ "resourceCustomizationUUID": "3341825c-837c-4e84-8a82-cc69033ca92f",
+ "resourceName": "EtsiVnfCSIT3",
+ "resourceVersion": "1.0",
+ "resourceUUID": "bb7ff27f-d609-4d02-9926-2f4c5eb89316",
+ "resourceInvariantUUID": "037f7b1b-5c62-44c1-b806-f92fe8970171",
+ "category": "Generic",
+ "subcategory": "Network Service",
+ "artifacts": [],
+ "artifactsImpl": [],
+ "resourceType": "VF"
}
- ]
- }
- ],
- "serviceArtifacts": [
- {
- "artifactName": "service-Manualdistributiontestservice-csar.csar",
- "artifactType": "TOSCA_CSAR",
- "artifactURL": "/unzipped_sdc_csar/v1/catalog/services/Manualdistributiontestservice/1.0/artifacts/service-Manualdistributiontestservice-csar.csar",
- "artifactChecksum": "YWYxNmUxNTlhMmE3MjA1NGVhNTBhYTdkMmU0OTZjNzM\u003d",
- "artifactDescription": "TOSCA definition package of the asset",
- "artifactTimeout": 0,
- "artifactVersion": "1",
- "artifactUUID": "e6e8c36a-b939-4845-995a-41c50be890a0"
- }
- ],
- "workloadContext": "Production"
+ ]
}
diff --git a/tests/so/etsi/data/serviceDeleteRequest.json b/tests/so/etsi/data/serviceDeleteRequest.json
index 257b0673..4fd43e44 100644
--- a/tests/so/etsi/data/serviceDeleteRequest.json
+++ b/tests/so/etsi/data/serviceDeleteRequest.json
@@ -2,9 +2,9 @@
"requestDetails": {
"modelInfo": {
"modelType": "service",
- "modelInvariantId": "0ddc448d-5513-44bc-8b02-5759d84600d5",
- "modelVersionId": "28d4acf3-4791-4998-8d06-1cdf6d1767a9",
- "modelName": "manualDistributionTestService",
+ "modelInvariantId": "10b3d278-e262-44ca-a0c0-4e663c2d7562",
+ "modelVersionId": "fdea6501-dabd-4428-b52c-623336a3b403",
+ "modelName": "EtsiServiceCSIT3",
"modelVersion": "1.0"
},
"requestInfo": {
@@ -16,4 +16,4 @@
"aLaCarte": true
}
}
-} \ No newline at end of file
+}
diff --git a/tests/so/etsi/data/serviceInstantiationRequest.json b/tests/so/etsi/data/serviceInstantiationRequest.json
index 054a2ffe..8520c0d8 100644
--- a/tests/so/etsi/data/serviceInstantiationRequest.json
+++ b/tests/so/etsi/data/serviceInstantiationRequest.json
@@ -1,33 +1,33 @@
{
- "requestDetails": {
- "requestInfo": {
- "instanceName": "CsitEtsiInstance",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "demo"
- },
- "modelInfo": {
- "modelType": "service",
- "modelInvariantId": "0ddc448d-5513-44bc-8b02-5759d84600d5",
- "modelVersionId": "28d4acf3-4791-4998-8d06-1cdf6d1767a9",
- "modelName": "manualDistributionTestService",
- "modelVersion": "1.0"
- },
- "requestParameters": {
- "userParams": [],
- "testApi": "GR_API",
- "subscriptionServiceType": "vCPE",
- "aLaCarte": true
- },
- "subscriberInfo": {
- "globalSubscriberId": "DemoCustomer"
- },
- "project": {
- "projectName": "etsiCsitProject"
- },
- "owningEntity": {
- "owningEntityId": "f2e1071e-3d47-4a65-94d4-e473ec03326a",
- "owningEntityName": "OE-Demonstration"
- }
+ "requestDetails": {
+ "requestInfo": {
+ "instanceName": "CsitEtsiInstance",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "demo"
+ },
+ "modelInfo": {
+ "modelType": "service",
+ "modelInvariantId": "10b3d278-e262-44ca-a0c0-4e663c2d7562",
+ "modelVersionId": "fdea6501-dabd-4428-b52c-623336a3b403",
+ "modelName": "EtsiServiceCSIT3",
+ "modelVersion": "1.0"
+ },
+ "requestParameters": {
+ "userParams": [],
+ "testApi": "GR_API",
+ "subscriptionServiceType": "vCPE",
+ "aLaCarte": true
+ },
+ "subscriberInfo": {
+ "globalSubscriberId": "DemoCustomer"
+ },
+ "project": {
+ "projectName": "etsiCsitProject"
+ },
+ "owningEntity": {
+ "owningEntityId": "f2e1071e-3d47-4a65-94d4-e473ec03326a",
+ "owningEntityName": "OE-Demonstration"
}
+ }
}
diff --git a/tests/so/etsi/data/vnfDeleteRequest.json b/tests/so/etsi/data/vnfDeleteRequest.json
index 08862ea8..32728669 100644
--- a/tests/so/etsi/data/vnfDeleteRequest.json
+++ b/tests/so/etsi/data/vnfDeleteRequest.json
@@ -2,11 +2,11 @@
"requestDetails": {
"modelInfo": {
"modelType": "vnf",
- "modelInvariantId": "b0f14066-2b65-40d2-b5a4-c8f2116fb5fc",
- "modelVersionId": "84b9649a-4eb9-4967-9abe-e8702f55518b",
- "modelName": "Sol004Zip3VSP",
- "modelCustomizationName": "Sol004Zip3VSP 0",
- "modelCustomizationId": "ff0860ac-fa9a-4fff-956b-80eeb7a330bc",
+ "modelInvariantId": "037f7b1b-5c62-44c1-b806-f92fe8970171",
+ "modelVersionId": "73522444-e8e9-49c1-be29-d355800aa349",
+ "modelName": "EtsiVnfCSIT3",
+ "modelCustomizationName": "EtsiVnfCSIT3 0",
+ "modelCustomizationId": "3341825c-837c-4e84-8a82-cc69033ca92f",
"modelVersion": "1.0"
},
"requestInfo": {
@@ -22,4 +22,4 @@
"tenantId": "693c7729b2364a26a3ca602e6f66187d"
}
}
-} \ No newline at end of file
+}
diff --git a/tests/so/etsi/data/vnfInstantiationRequest.json b/tests/so/etsi/data/vnfInstantiationRequest.json
index a4cc5c90..03a143b0 100644
--- a/tests/so/etsi/data/vnfInstantiationRequest.json
+++ b/tests/so/etsi/data/vnfInstantiationRequest.json
@@ -1,49 +1,47 @@
{
- "requestDetails": {
- "requestInfo": {
- "instanceName": "CsitEtsiVnfInstance",
- "source": "VID",
- "suppressRollback": false,
- "requestorId": "demo",
- "productFamilyId": "f13844f4-dbf8-4d0e-a979-45204f3ddb4e"
- },
- "modelInfo": {
- "modelType": "vnf",
- "modelInvariantId": "0a0b9979-863d-4b7e-b7f4-d27725a182b3",
- "modelVersionId": "8f43a8c9-c677-462a-ae36-8ddb5990a60d",
- "modelName": "manualDistributionTestVNF",
- "modelVersion": "1.0",
- "modelCustomizationId": "82ad3aa0-edc6-410c-a217-655fb064323f",
- "modelCustomizationName": "manualDistributionTestVNF 0"
- },
- "requestParameters": {
- "userParams": [],
- "testApi": "GR_API"
- },
- "cloudConfiguration": {
- "lcpCloudRegionId": "EtsiCloudRegion",
- "cloudOwner": "CloudOwner",
- "tenantId": "693c7729b2364a26a3ca602e6f66187d"
- },
- "lineOfBusiness": {
- "lineOfBusinessName": "EtsiCsitLineOfBusiness"
- },
- "platform": {
- "platformName": "EtsiCsitPlatform"
- },
- "relatedInstanceList": [
- {
- "relatedInstance": {
- "instanceId": "",
- "modelInfo": {
- "modelType": "service",
- "modelName": "Sol004Zip4Service",
- "modelInvariantId": "0ddc448d-5513-44bc-8b02-5759d84600d5",
- "modelVersion": "1.0",
- "modelVersionId": "99d59273-4450-4034-9141-027f0c1a807a"
- }
- }
- }
- ]
- }
-} \ No newline at end of file
+ "requestDetails": {
+ "requestInfo": {
+ "instanceName": "CsitEtsiVnfInstance",
+ "source": "VID",
+ "suppressRollback": false,
+ "requestorId": "demo",
+ "productFamilyId": "f13844f4-dbf8-4d0e-a979-45204f3ddb4e"
+ },
+ "modelInfo": {
+ "modelType": "vnf",
+ "modelInvariantId": "037f7b1b-5c62-44c1-b806-f92fe8970171",
+ "modelVersionId": "73522444-e8e9-49c1-be29-d355800aa349",
+ "modelName": "EtsiVnfCSIT3",
+ "modelVersion": "1.0",
+ "modelCustomizationId": "3341825c-837c-4e84-8a82-cc69033ca92f",
+ "modelCustomizationName": "EtsiVnfCSIT3 0"
+ },
+ "requestParameters": {
+ "userParams": [],
+ "testApi": "GR_API"
+ },
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "EtsiCloudRegion",
+ "cloudOwner": "CloudOwner",
+ "tenantId": "693c7729b2364a26a3ca602e6f66187d"
+ },
+ "lineOfBusiness": {
+ "lineOfBusinessName": "EtsiCsitLineOfBusiness"
+ },
+ "platform": {
+ "platformName": "EtsiCsitPlatform"
+ },
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": "",
+ "modelInfo": {
+ "modelType": "service",
+ "modelName": "EtsiServiceCSIT3",
+ "modelInvariantId": "10b3d278-e262-44ca-a0c0-4e663c2d7562",
+ "modelVersion": "1.0",
+ "modelVersionId": "fdea6501-dabd-4428-b52c-623336a3b403"
+ }
+ }
+ }]
+ }
+}
diff --git a/tests/so/etsi/data/vnfPackageOnboardRequest.json b/tests/so/etsi/data/vnfPackageOnboardRequest.json
new file mode 100644
index 00000000..08b7e05c
--- /dev/null
+++ b/tests/so/etsi/data/vnfPackageOnboardRequest.json
@@ -0,0 +1 @@
+{"csarId": "73522444-e8e9-49c1-be29-d355800aa349"}
diff --git a/tests/so/etsi/etsi_tests.robot b/tests/so/etsi/etsi_tests.robot
index 6aebd137..57238cb0 100644
--- a/tests/so/etsi/etsi_tests.robot
+++ b/tests/so/etsi/etsi_tests.robot
@@ -9,6 +9,43 @@ ${SLEEP_INTERVAL_SEC}= 5
${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}= 48 # Represents the maximum number of attempts that will be made before a timeout. It sleeps for SLEEP_INTERVAL_SEC seconds before retry.
*** Test Cases ***
+OnBoard VNF Package In Etsi Catalog
+ Create Session etsi_catalog_session http://${REPO_IP}:8806
+ ${data}= Get Binary File ${CURDIR}${/}data${/}vnfPackageOnboardRequest.json
+ &{headers}= Create Dictionary Content-Type=application/json Accept=application/json
+ ${resp}= Post Request etsi_catalog_session /api/catalog/v1/vnfpackages data=${data} headers=${headers}
+ Run Keyword If '${resp.status_code}' == '202' log to console \nexecuted with expected result
+ Should Be Equal As Strings '${resp.status_code}' '202'
+ log to console ${resp.content}
+ ${onboarding_job_json_response}= Evaluate json.loads(r"""${resp.content}""", strict=False) json
+ ${job_ID}= Set Variable ${onboarding_job_json_response}[jobId]
+ Should Not Be Empty ${job_ID}
+ ${actual_job_status}= Set Variable ""
+
+ FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}
+ ${onboarding_job_status_request}= Get Request etsi_catalog_session /api/catalog/v1/jobs/${job_ID}
+ Run Keyword If '${onboarding_job_status_request.status_code}' == '200' log to console \nexecuted with expected result
+ log to console ${onboarding_job_status_request.content}
+
+ ${onboarding_job_status_json_response}= Evaluate json.loads(r"""${onboarding_job_status_request.content}""", strict=False) json
+
+ ${actual_job_status}= Set Variable ""
+
+ ${response_descriptor_exists}= Run Keyword And Return Status Get From Dictionary ${onboarding_job_status_json_response} responseDescriptor
+ ${status_exists}= Run Keyword And Return Status Get From Dictionary ${onboarding_job_status_json_response}[responseDescriptor] status
+
+ ${actual_job_status}= Set Variable If ${response_descriptor_exists} == True and ${status_exists} == True
+ ... ${onboarding_job_status_json_response}[responseDescriptor][status]
+
+ Log To Console Received actual repsonse status:${actual_job_status}
+ Run Keyword If '${actual_job_status}' == 'finished' or '${actual_job_status}' == 'error' or '${actual_job_status}' == 'timeout' Exit For Loop
+ log to console Will try again after ${SLEEP_INTERVAL_SEC} seconds
+ SLEEP ${SLEEP_INTERVAL_SEC}
+ END
+ Log To Console final repsonse status received: ${actual_job_status}
+ Run Keyword If '${actual_job_status}' == 'finished' log to console \nexecuted with expected result
+ Should Be Equal As Strings '${actual_job_status}' 'finished'
+
Distribute Service Template
Create Session sdc_controller_session http://${REPO_IP}:8085
${data}= Get Binary File ${CURDIR}${/}data${/}distributeServiceTemplate.json