Extend the robot tests by a simple SOL002-Adapter test 76/109576/5
authorPiotr Borelowski <p.borelowski@partner.samsung.com>
Thu, 25 Jun 2020 15:05:53 +0000 (17:05 +0200)
committerPiotr Borelowski <p.borelowski@partner.samsung.com>
Fri, 26 Jun 2020 06:46:03 +0000 (08:46 +0200)
Issue-ID: INT-1614
Signed-off-by: Piotr Borelowski <p.borelowski@partner.samsung.com>
Change-Id: I04a75d92aba9c4c06dc0b384aff141592b79845e

tests/so/etsi/data/notification.json [new file with mode: 0644]
tests/so/etsi/etsi_tests.robot

diff --git a/tests/so/etsi/data/notification.json b/tests/so/etsi/data/notification.json
new file mode 100644 (file)
index 0000000..54bbc09
--- /dev/null
@@ -0,0 +1,26 @@
+{
+    "id": "3aa49739-aabd-4d40-8c32-b5b97940201b",
+    "notificationType": "VnfLcmOperationOccurrenceNotification",
+    "subscriptionId": null,
+    "timeStamp": null,
+    "notificationStatus": "START",
+    "operationState": "PROCESSING",
+    "vnfInstanceId": "a23c5388-e035-4ca6-a126-662ad8dd8687",
+    "operation": "INSTANTIATE",
+    "isAutomaticInvocation": null,
+    "vnfLcmOpOccId": null,
+    "affectedVnfcs": null,
+    "affectedVirtualLinks": null,
+    "affectedVirtualStorages": null,
+    "changedInfo": null,
+    "changedExtConnectivity": null,
+    "error": null,
+    "_links": {
+        "vnfInstance": {
+            "href": "https://so-vnfm-simulator:9093/vnflcm/v1/vnf_instances/a23c5388-e035-4ca6-a126-662ad8dd8687"
+        },
+        "subscription": null,
+        "vnfLcmOpOcc": null
+    }
+}
+
index 684034b..49670d9 100644 (file)
@@ -78,6 +78,15 @@ Invoke VNF Instantiation
     Run Keyword If  '${actual_request_state}' == 'COMPLETE'  log to console   \nexecuted with expected result
     Should Be Equal As Strings    '${actual_request_state}'    'COMPLETE'
 
+Invoke VNF Notification for SOL002
+    Create Session    ve-vnfm-adapter-session    http://${REPO_IP}:9098
+    ${data}=    Get Binary File    ${CURDIR}${/}data${/}notification.json
+    &{headers}=    Create Dictionary    Content-Type=application/json    Accept=application/json    Authorization=Basic YWRtaW46YTRiM2MyZDE=
+    ${notification_request}=    Post Request    ve-vnfm-adapter-session    /lcm/v1/vnf/instances/notifications    data=${data}    headers=${headers}
+    Log To Console    ${notification_request}
+    Run Keyword If    '${notification_request.status_code}' == '200'    Log To Console    \nexecuted with expected result
+    Should Be Equal As Strings    '${notification_request.status_code}'    '200'
+
 Delete VNF Instance
     Run Keyword If      "${vnf_instance_Id}" != "${EMPTY}"      Log to Console    VNF Instance ID :${vnf_instance_Id} received
     ...                ELSE      Fail           Log to Console  Invalid VNF Instance ID :${vnf_instance_Id} recieved