diff options
Diffstat (limited to 'tests/usecases')
21 files changed, 0 insertions, 834 deletions
diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases/5G-bulkpm/BulkpmE2E.robot deleted file mode 100644 index e89d4d67..00000000 --- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot +++ /dev/null @@ -1,123 +0,0 @@ -*** Settings *** -Documentation Testing E2E VES,Dmaap,DFC,DR with File Ready event feed from xNF -Library RequestsLibrary -Library OperatingSystem -Library Collections -Library Process -Resource resources/bulkpm_keywords.robot - - -*** Variables *** -${VESC_URL} http://%{VESC_IP}:%{VESC_PORT} -${GLOBAL_APPLICATION_ID} robot-ves -${VES_ANY_EVENT_PATH} /eventListener/v7 -${HEADER_STRING} content-type=application/json -${EVENT_DATA_FILE} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotificationUpdated.json - -${TARGETURL_TOPICS} http://${DMAAP_MR_IP}:3904/topics -${TARGETURL_SUBSCR} http://${DMAAP_MR_IP}:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT/OpenDcae-c12/C12?timeout=1000 -${CLI_EXEC_CLI} curl -k https://${DR_PROV_IP}:8443/internal/prov -${CLI_EXEC_CLI_FILECONSUMER} docker exec fileconsumer-node /bin/sh -c "ls /opt/app/subscriber/delivery | grep .xml" -${CLI_EXEC_CLI_DFC_LOG} docker exec dfc /bin/sh -c "cat /var/log/ONAP/application.log" > /tmp/dfc_docker.log.robot -${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Datafile file published" /tmp/dfc_docker.log.robot -${CLI_EXEC_CLI_FILECONSUMER_CP} docker cp fileconsumer-node:/opt/app/subscriber/delivery/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE} -${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/metadata.json -${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec pmmapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > /tmp/pmmapper_docker.log.robot -${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful Event" /tmp/pmmapper_docker.log.robot -${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} grep "Successfully published VES events to messagerouter" /tmp/pmmapper_docker.log.robot -${metadataSchemaPath} %{WORKSPACE}/tests/usecases/5G-bulkpm/assets/metadata.schema.json -${metadataJsonPath} %{WORKSPACE}/metadata.json - -*** Test Cases *** - -Send VES File Ready Event to VES Collector - [Tags] Bulk_PM_E2E_01 - [Documentation] Send VES File Ready Event - ${evtdata}= Get Event Data From File ${EVENT_DATA_FILE} - ${headers}= Create Header From String ${HEADER_STRING} - ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 15s - ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 5s - ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 5s - ${resp}= Publish Event To VES Collector ${VESC_URL} ${VES_ANY_EVENT_PATH} ${headers} ${evtdata} - Sleep 5s - Log Receive HTTP Status code ${resp.status_code} - Should Be Equal As Strings ${resp.status_code} 202 - -Check VES Notification Topic is existing in Message Router - [Tags] Bulk_PM_E2E_02 - [Documentation] Get the VES Notification topic on message router - [Timeout] 1 minute - Sleep 10s - ${resp}= GetCall ${TARGETURL_TOPICS} - log ${TARGETURL_TOPICS} - log 'JSON Response Code :'${resp} - ${topics}= Evaluate $resp.json().get('topics') - log ${topics} - ${ListLength}= Get Length ${topics} - log ${ListLength} - List Should Contain Value ${topics} unauthenticated.VES_NOTIFICATION_OUTPUT - -Verify Data File Collector successfully publishes the PM XML file to the Data Router - [Tags] Bulk_PM_E2E_03 - [Documentation] Check that DFC publishes the PM XML to the Data Router - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_DFC_LOG_GREP} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} Datafile file published - - -Verify Default Feed And File Consumer Subscription On Datarouter - [Tags] Bulk_PM_E2E_04 - [Documentation] Verify Default Feed And File Consumer Subscription On Datarouter - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} https://dmaap-dr-prov/publish/1 - Should Contain ${cli_cmd_output.stdout} http://${DR_SUBSCIBER_IP}:7070 - - -Verify Fileconsumer Receive PM file from Data Router - [Tags] Bulk_PM_E2E_05 - [Documentation] Check PM XML file exists on the File Consumer Simulator - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml - -Verify File Consumer Receive valid metadata from Data Router - [Tags] Bulk_PM_E2E_06 - [Documentation] Check PM XML file is delivered to the FileConsumer Simulator with valid metadata - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} A20181002.0000-1000-0015-1000_5G.xml.M - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_FILECONSUMER_CP} shell=yes - ${cli_cmd_output}= Run Process ${CLI_EXEC_RENAME_METADATA} shell=yes - ${validation_result}= Validate ${metadataSchemaPath} ${metadataJsonPath} - Should Be Equal As Strings ${validation_result} 0 - -Verify PM-Mapper successfully receives uncompressed the PM XML file - [Tags] Bulk_PM_E2E_07 - [Documentation] Check that PM-Mapper receives the uncompressed PM XML file - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - Should Contain ${cli_cmd_output.stdout} XML validation successful Event - -Verify PM-Mapper successfully publishes VES event the Message Router - [Tags] Bulk_PM_E2E_08 - [Documentation] Check that PM-Mapper publishes VES onto the Message Router - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG} shell=yes - Log ${cli_cmd_output.stdout} - Should Be Equal As Strings ${cli_cmd_output.rc} 0 - ${cli_cmd_output}= Run Process ${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} shell=yes - Should Contain ${cli_cmd_output.stdout} Successfully published VES events to messagerouter
\ No newline at end of file diff --git a/tests/usecases/5G-bulkpm/__init__.robot b/tests/usecases/5G-bulkpm/__init__.robot deleted file mode 100644 index 7114fd44..00000000 --- a/tests/usecases/5G-bulkpm/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -*** Settings *** -Documentation 5G Bulk PM E2E Testcases diff --git a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json b/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json deleted file mode 100644 index 375dbd80..00000000 --- a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "event": { - "commonEventHeader": { - "version": "4.0.1", - "vesEventListenerVersion": "7.0.1", - "domain": "notification", - "eventName": "Noti_RnNode-Ericsson_FileReady", - "eventId": "FileReady_1797490e-10ae-4d48-9ea7-3d7d790b25e1", - "lastEpochMicrosec": 8745745764578, - "priority": "Normal", - "reportingEntityName": "otenb5309", - "sequence": 0, - "sourceName": "oteNB5309", - "startEpochMicrosec": 8745745764578, - "timeZoneOffset": "UTC+05.30" - }, - "notificationFields": { - "changeIdentifier": "PM_MEAS_FILES", - "changeType": "FileReady", - "notificationFieldsVersion": "2.0", - "arrayOfNamedHashMap": [ - { "name": "A20181002.0000-1000-0015-1000_5G.xml.gz", - "hashMap":{ - "location": "sftp://admin:admin@sftpserver:sftpport/A20181002.0000-1000-0015-1000_5G.xml.gz", - "compression": "gzip", - "fileFormatType": "org.3GPP.32.435#measCollec", - "fileFormatVersion": "V10" - } - } - ] - } -} -}
\ No newline at end of file diff --git a/tests/usecases/5G-bulkpm/assets/metadata.schema.json b/tests/usecases/5G-bulkpm/assets/metadata.schema.json deleted file mode 100644 index a41b3544..00000000 --- a/tests/usecases/5G-bulkpm/assets/metadata.schema.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "metadata.schema.json", - "title": "DataRouter PM File Metadata", - "description": "Metadata for 3GPP PM files that are placed on the DMaaP Data Router by the Data File Collector (VES 7.1)", - "type": "object", - - "properties": { - "productName": { - "description": "from the FileReady event eventName", - "type": "string" - }, - - "vendorName": { - "description": "from the FileReady event eventName", - "type": "string" - }, - - "lastEpochMicrosec": { - "description": "the latest unix epoch time associated with the FileReady event", - "type": "string" - }, - - "sourceName": { - "description": "the name of the entity experiencing the event", - "type": "string" - }, - - "startEpochMicrosec": { - "description": "the earliest unix epoch time associated with the FileReady event", - "type": "string" - }, - - "timeZoneOffset": { - "description": "the timezone offset from UTC", - "type": "string", - "pattern": "^(?:(?:[a-zA-Z]{3})[+-](?:[01][0-9]|2[0-3]).[0-5][0-9])$" - }, - - "location": { - "description": "follows the format <protocol>://<ip address>:<port>/<path>/<filename>, the IP address is the node ip address, the port of the protocol server", - "type": "string" - }, - - "compression": { - "description": "specifies if the file is compressed", - "type": "string", - "enum": [ "gzip" ] - }, - - "fileFormatType": { - "description": "the file format", - "type": "string" - }, - - "fileFormatVersion": { - "description": "the version of the file format", - "type": "string" - } - }, - - "required": [ - "productName", - "vendorName", - "lastEpochMicrosec", - "sourceName", - "startEpochMicrosec", - "timeZoneOffset", - "location", - "compression", - "fileFormatType", - "fileFormatVersion" - ] -} diff --git a/tests/usecases/5G-bulkpm/resources/JsonValidatorLibrary.py b/tests/usecases/5G-bulkpm/resources/JsonValidatorLibrary.py deleted file mode 100644 index 12d5d856..00000000 --- a/tests/usecases/5G-bulkpm/resources/JsonValidatorLibrary.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- - -import sys -import logging -from simplejson import load -from jsonschema import validate, ValidationError, SchemaError - - -class JsonValidatorLibrary(object): - - def __init__(self): - pass - - def validate(self, schemaPath, jsonPath): - logging.info("Schema path: " + schemaPath) - logging.info("JSON path: " + jsonPath) - schema = None - data = None - try: - schema = load(open(schemaPath, 'r')) - data = load(open(jsonPath, 'r')) - except (IOError, ValueError, OSError) as e: - logging.error(e.message) - return 1 - - try: - validate(data, schema) - except (ValidationError, SchemaError) as e: - logging.error(e.message) - return 1 - - # logger.log("JSON validation successful") - print("JSON validation successful") - return 0 - -if __name__ == '__main__': - lib = JsonValidatorLibrary() - # sys.exit(JsonValidatorLibrary().validate(sys.argv[1], sys.argv[2])) diff --git a/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot b/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot deleted file mode 100644 index 9ef56c83..00000000 --- a/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot +++ /dev/null @@ -1,39 +0,0 @@ - *** Settings *** -Documentation The main interface for interacting with VES. It handles low level stuff like managing the http request library and VES required fields -Library RequestsLibrary -Library ../resources/xNFLibrary.py -Library ../resources/JsonValidatorLibrary.py -Library OperatingSystem -Library Collections -Library requests -Library Collections -Library String - -*** Variables *** - -*** Keywords *** - -Get Event Data From File - [Arguments] ${jsonfile} - ${data}= OperatingSystem.Get File ${jsonfile} - #Should Not Be_Equal ${data} None - [return] ${data} - -Publish Event To VES Collector - [Documentation] Send an event to VES Collector - [Arguments] ${url} ${evtpath} ${httpheaders} ${evtdata} - Log Creating session ${url} - ${session}= Create Session dcaegen2-d1 ${url} - ${resp}= Post Request dcaegen2-d1 ${evtpath} data=${evtdata} headers=${httpheaders} - #Log Received response from dcae ${resp.json()} - [return] ${resp} -PostCall - [Arguments] ${url} ${data} - ${headers}= Create Dictionary Accept=application/json Content-Type=application/json - ${resp}= Evaluate requests.post('${url}',data='${data}', headers=${headers},verify=False) requests - [Return] ${resp} - -GetCall - [Arguments] ${url} - ${resp}= Evaluate requests.get('${url}') requests - [Return] ${resp} diff --git a/tests/usecases/5G-bulkpm/resources/xNFLibrary.py b/tests/usecases/5G-bulkpm/resources/xNFLibrary.py deleted file mode 100644 index 01574f77..00000000 --- a/tests/usecases/5G-bulkpm/resources/xNFLibrary.py +++ /dev/null @@ -1,25 +0,0 @@ -''' -Created on Aug 18, 2017 - -@author: sw6830 -''' -from robot.api import logger -from Queue import Queue -import uuid, time, json, threading,os, platform, subprocess,paramiko - -class xNFLibrary(object): - - def __init__(self): - pass - - def create_header_from_string(self, dictStr): - logger.info("Enter create_header_from_string: dictStr") - return dict(u.split("=") for u in dictStr.split(",")) - - def Generate_UUID(self): - """generate a uuid""" - return uuid.uuid4() - -if __name__ == '__main__': - lib = xNFLibrary() - time.sleep(100000)
\ No newline at end of file diff --git a/tests/usecases/config-over-netconf/__init__.robot b/tests/usecases/config-over-netconf/__init__.robot deleted file mode 100644 index 614d5c17..00000000 --- a/tests/usecases/config-over-netconf/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -1 *** Settings *** -2 Documentation PNF - config-over-netconf diff --git a/tests/usecases/config-over-netconf/config_over_netconf.robot b/tests/usecases/config-over-netconf/config_over_netconf.robot deleted file mode 100644 index 2ba64007..00000000 --- a/tests/usecases/config-over-netconf/config_over_netconf.robot +++ /dev/null @@ -1,69 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library String - -*** Variables *** -${SDNC_KEYSTORE_CONFIG_PATH} /config/netconf-keystore:keystore -${SDNC_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/pnf-simulator -${PNFSIM_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/pnf-simulator/yang-ext:mount/mynetconf:netconflist -${BP_UPLOAD_URL} /api/v1/execution-service/upload -${BP_PROCESS_URL} /api/v1/execution-service/process -${BP_ARCHIVE_PATH} ${CURDIR}/data/blueprint_archive.zip - - - *** Test Cases *** - Test SDNC Keystore - [Documentation] Checking keystore after SDNC installation - Create Session sdnc http://localhost:8282/restconf - &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json - ${resp}= Get Request sdnc ${SDNC_KEYSTORE_CONFIG_PATH} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - ${keystoreContent}= Convert To String ${resp.content} - Log to console ************************* - Log to console ${resp.content} - Log to console ************************* - - Test BP-PROC upload blueprint archive - [Documentation] Upload Blueprint archive to BP processor - Create Session blueprint http://localhost:8000 - ${bp_archive}= Get Binary File ${BP_ARCHIVE_PATH} - &{bp_file}= create Dictionary file ${bp_archive} - &{headers}= Create Dictionary Authorization=Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== - ${resp}= Post Request blueprint ${BP_UPLOAD_URL} files=${bp_file} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - - Test BP-PROC CONFIG-ASSIGN - [Documentation] Send config-assign request to BP-Proc - Create Session blueprint http://localhost:8000 - ${config-assign}= Get File ${CURDIR}${/}data${/}config-assign.json - Log to console ${config-assign} - &{headers}= Create Dictionary Authorization=Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== Content-Type=application/json Accept=application/json - ${resp}= Post Request blueprint ${BP_PROCESS_URL} data=${config-assign} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - - Test BP-PROC CONFIG-DEPLOY - [Documentation] Send config-deploy request to BP-Proc - Create Session blueprint http://localhost:8000 - ${config-deploy}= Get File ${CURDIR}${/}data${/}config-deploy.json - Log to console ${config-deploy} - &{headers}= Create Dictionary Authorization=Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== Content-Type=application/json Accept=application/json - ${resp}= Post Request blueprint ${BP_PROCESS_URL} data=${config-deploy} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - - Test PNF Configuration update - [Documentation] Checking PNF configuration params - Create Session sdnc http://localhost:8282/restconf - ${mount}= Get File ${CURDIR}${/}data${/}mount.xml - Log to console ${mount} - &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/xml Accept=application/xml - ${resp}= Put Request sdnc ${SDNC_MOUNT_PATH} data=${mount} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 201 - Sleep 10 - &{headers1}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json - ${resp1}= Get Request sdnc ${PNFSIM_MOUNT_PATH} headers=${headers1} - Should Be Equal As Strings ${resp1.status_code} 200 - Log to console ${resp1.content} - Should Contain ${resp1.text} {"netconf-id":30,"netconf-param":3000} diff --git a/tests/usecases/config-over-netconf/data/blueprint_archive.zip b/tests/usecases/config-over-netconf/data/blueprint_archive.zip Binary files differdeleted file mode 100644 index ac346554..00000000 --- a/tests/usecases/config-over-netconf/data/blueprint_archive.zip +++ /dev/null diff --git a/tests/usecases/config-over-netconf/data/config-assign.json b/tests/usecases/config-over-netconf/data/config-assign.json deleted file mode 100644 index 12c3865f..00000000 --- a/tests/usecases/config-over-netconf/data/config-assign.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "actionIdentifiers": { - "actionName": "config-assign", - "blueprintName": "configuration_over_restconf", - "blueprintVersion": "1.0.0", - "mode": "sync" - }, - "commonHeader": { - "originatorId": "sdnc", - "requestId": "123456-1000", - "subRequestId": "sub-123456-1000" - }, - "payload": { - "config-assign-request": { - "resolution-key": "RES-KEY reskey", - "config-assign-properties": { - "service-instance-id": "siid_1234", - "pnf-id": "pnf-simulator", - "pnf-ipv4-address": "pnfaddr", - "service-model-uuid": "service-model-uuid", - "pnf-customization-uuid": "pnf-customization-uuid" - } - } - } -} diff --git a/tests/usecases/config-over-netconf/data/config-deploy.json b/tests/usecases/config-over-netconf/data/config-deploy.json deleted file mode 100644 index 546fdc78..00000000 --- a/tests/usecases/config-over-netconf/data/config-deploy.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "actionIdentifiers": { - "actionName": "config-deploy", - "blueprintName": "configuration_over_restconf", - "blueprintVersion": "1.0.0", - "mode": "sync" - }, - "commonHeader": { - "originatorId": "sdnc", - "requestId": "123456-1000", - "subRequestId": "sub-123456-1000" - }, - "payload": { - "config-deploy-request": { - "resolution-key": "RES-KEY reskey", - "config-deploy-properties": { - "service-instance-id": "siid_1234", - "pnf-id": "pnf-simulator", - "pnf-ipv4-address": "pnfaddr", - "service-model-uuid": "service-model-uuid", - "pnf-customization-uuid": "pnf-customization-uuid" - } - } - } -} diff --git a/tests/usecases/config-over-netconf/data/mount.xml b/tests/usecases/config-over-netconf/data/mount.xml deleted file mode 100644 index 22053e8a..00000000 --- a/tests/usecases/config-over-netconf/data/mount.xml +++ /dev/null @@ -1,14 +0,0 @@ -<node xmlns="urn:TBD:params:xml:ns:yang:network-topology"> - <node-id>pnf-simulator</node-id> - <key-based xmlns="urn:opendaylight:netconf-node-topology"> - <key-id xmlns="urn:opendaylight:netconf-node-topology">ODL_private_key_0</key-id> - <username xmlns="urn:opendaylight:netconf-node-topology">netconf</username> - </key-based> - <host xmlns="urn:opendaylight:netconf-node-topology">pnfaddr</host> - <port xmlns="urn:opendaylight:netconf-node-topology">6513</port> - <tcp-only xmlns="urn:opendaylight:netconf-node-topology">false</tcp-only> - <protocol xmlns="urn:opendaylight:netconf-node-topology"> - <name xmlns="urn:opendaylight:netconf-node-topology">TLS</name> - </protocol> - <max-connection-attempts xmlns="urn:opendaylight:netconf-node-topology">2</max-connection-attempts> -</node> diff --git a/tests/usecases/pnf-sw-upgrade/.gitignore b/tests/usecases/pnf-sw-upgrade/.gitignore deleted file mode 100755 index 44793d73..00000000 --- a/tests/usecases/pnf-sw-upgrade/.gitignore +++ /dev/null @@ -1,22 +0,0 @@ -target -**/.settings -**/.classpath -**/.project -**/.buildpath -**/.factorypath -**/.springBeans -.idea -.checkstyle -.DS_Store -.*~ -*.iml -*.class -*.swp -*.log -*.tmp -**/bin/ -/.metadata/ -temp/ -**/temp/** -test_lab/ -**/test_lab/** diff --git a/tests/usecases/pnf-sw-upgrade/__init__.robot b/tests/usecases/pnf-sw-upgrade/__init__.robot deleted file mode 100644 index a721a88f..00000000 --- a/tests/usecases/pnf-sw-upgrade/__init__.robot +++ /dev/null @@ -1,2 +0,0 @@ -1 *** Settings *** -2 Documentation PNF - pnf-sw-upgrade diff --git a/tests/usecases/pnf-sw-upgrade/data/blueprint_archive.zip b/tests/usecases/pnf-sw-upgrade/data/blueprint_archive.zip Binary files differdeleted file mode 100644 index 4edc9ded..00000000 --- a/tests/usecases/pnf-sw-upgrade/data/blueprint_archive.zip +++ /dev/null diff --git a/tests/usecases/pnf-sw-upgrade/data/distributeServiceTemplate.json b/tests/usecases/pnf-sw-upgrade/data/distributeServiceTemplate.json deleted file mode 100644 index c13eb8d5..00000000 --- a/tests/usecases/pnf-sw-upgrade/data/distributeServiceTemplate.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "distributionID": "05fd08d8-c452-429a-a1ad-806c8d05e7c8", - "serviceName": "Demo_svc", - "serviceVersion": "1.0", - "serviceUUID": "cd4decf6-4f27-4775-9561-0e683ed43635", - "serviceDescription": "aaaa", - "serviceInvariantUUID": "fe41489e-1563-46a3-b90a-1db629e4375b", - "resources": [ - { - "resourceInstanceName": "Demo_pnf 0", - "resourceCustomizationUUID": "36b46817-2eaf-41b3-bfa3-11a7e0fd9bb2", - "resourceName": "Demo_pnf", - "resourceVersion": "1.0", - "resoucreType": "PNF", - "resourceUUID": "a42f6566-6a29-43e1-bac9-b91a59d702ac", - "resourceInvariantUUID": "fdf44827-35db-4ee5-bd70-7500e633576e", - "category": "Network L4+", - "subcategory": "Common Network Resources", - "artifacts": [] - } - ], - "serviceArtifacts": [ - { - "artifactName": "service-DemoSvc-csar.csar", - "artifactType": "TOSCA_CSAR", - "artifactURL": "//unzipped_sdc_csar/v1/catalog/services/DemoSvc/1.0/artifacts/service-DemoSvc-csar.csar", - "artifactChecksum": "Njk4NDM4YTdjYmM4NWFkN2M1YWZiM2IzYzdmNWZjZTU\u003d", - "artifactDescription": "TOSCA definition package of the asset", - "artifactTimeout": 0, - "artifactVersion": "1", - "artifactUUID": "e2640671-a5ed-40a6-b231-8f33084b1c1a" - } - ], - "workloadContext": "Production" - }
\ No newline at end of file diff --git a/tests/usecases/pnf-sw-upgrade/data/mount.json b/tests/usecases/pnf-sw-upgrade/data/mount.json deleted file mode 100755 index 58925b1a..00000000 --- a/tests/usecases/pnf-sw-upgrade/data/mount.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "node": [ - { - "node-id": "PNFDemo", - "netconf-node-topology:protocol": { - "name": "TLS" - }, - "netconf-node-topology:host": "pnfaddr", - "netconf-node-topology:key-based": { - "username": "netconf", - "key-id": "ODL_private_key_0" - }, - "netconf-node-topology:port": 6513, - "netconf-node-topology:tcp-only": false, - "netconf-node-topology:max-connection-attempts": 5 - } - ] -}
\ No newline at end of file diff --git a/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json b/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json deleted file mode 100644 index a25ebfda..00000000 --- a/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "requestDetails":{ - "requestInfo":{ - "source":"VID", - "suppressRollback":false, - "requestorId":"demo" - }, - "modelInfo":{ - "modelType":"service", - "modelInvariantUuid":"fe41489e-1563-46a3-b90a-1db629e4375b", - "modelInvariantId" : "fe41489e-1563-46a3-b90a-1db629e4375b", - "modelUuid":"cd4decf6-4f27-4775-9561-0e683ed43635", - "modelVersionId" : "cd4decf6-4f27-4775-9561-0e683ed43635", - "modelName":"Demo_svc", - "modelVersion":"1.0" - }, - "requestParameters":{ - "userParams":[ - { - "name":"targetSoftwareVersion", - "value":"pnf_sw_version-3.0.0" - }, - { - "name":"pnfName", - "value":"PNFDemo" - } - ], - "subscriptionServiceType":"vCPE", - "aLaCarte":false - - }, - "subscriberInfo": { - "globalSubscriberId": "DemoCustomer" - }, - "project": { - "projectName": "pnfSWUProject" - }, - "owningEntity": { - "owningEntityId": "f2e1071e-3d47-4a65-94d4-e473ec03326a", - "owningEntityName": "OE-Demonstration" - } - } - }
\ No newline at end of file diff --git a/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json b/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json deleted file mode 100644 index 0042ac26..00000000 --- a/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "requestDetails":{ - "requestInfo":{ - "source":"VID", - "suppressRollback":false, - "requestorId":"demo" - }, - "modelInfo":{ - "modelType":"service", - "modelInvariantUuid":"fe41489e-1563-46a3-b90a-1db629e4375b", - "modelInvariantId" : "fe41489e-1563-46a3-b90a-1db629e4375b", - "modelUuid":"cd4decf6-4f27-4775-9561-0e683ed43635", - "modelVersionId" : "cd4decf6-4f27-4775-9561-0e683ed43635", - "modelName":"Demo_svc", - "modelVersion":"1.0" - }, - "requestParameters":{ - "userParams":[ - { - "name":"targetSoftwareVersion", - "value":"pnf_sw_version-2.0.0" - }, - { - "name":"pnfName", - "value":"PNFDemo" - } - ], - "subscriptionServiceType":"vCPE", - "aLaCarte":false - - }, - "subscriberInfo": { - "globalSubscriberId": "DemoCustomer" - }, - "project": { - "projectName": "pnfSWUProject" - }, - "owningEntity": { - "owningEntityId": "f2e1071e-3d47-4a65-94d4-e473ec03326a", - "owningEntityName": "OE-Demonstration" - } - } - }
\ No newline at end of file diff --git a/tests/usecases/pnf-sw-upgrade/pnf-sw-upgrade.robot b/tests/usecases/pnf-sw-upgrade/pnf-sw-upgrade.robot deleted file mode 100644 index 70408366..00000000 --- a/tests/usecases/pnf-sw-upgrade/pnf-sw-upgrade.robot +++ /dev/null @@ -1,202 +0,0 @@ -*** Settings *** -Library Collections -Library RequestsLibrary -Library OperatingSystem -Library json -Library String - -*** Variables *** -${SDNC_KEYSTORE_CONFIG_PATH} /restconf/config/netconf-keystore:keystore -${SDNC_MOUNT_PATH} /restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo -${PNFSIM_MOUNT_PATH} /restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/pnf-sw-upgrade:software-upgrade -${PNFSIM_DELETE_PATH} /restconf/config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo -${BP_UPLOAD_URL} /api/v1/blueprint-model/publish -${BP_PROCESS_URL} /api/v1/execution-service/process -${BP_ARCHIVE_PATH} ${CURDIR}/data/blueprint_archive.zip -${SLEEP_INTERVAL_SEC}= 5 -${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT}= 20 - - -*** Test Cases *** -Test SDNC Keystore - [Documentation] Checking keystore after SDNC installation - Create Session sdnc http://${REPO_IP}:8282 - &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json Accept=application/json - ${resp}= Get Request sdnc ${SDNC_KEYSTORE_CONFIG_PATH} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - ${keystoreContent}= Convert To String ${resp.content} - Log to console ************************* - Log to console ${resp.content} - Log to console ************************* - -Test BP-PROC upload blueprint archive - [Documentation] Upload Blueprint archive to BP processor - Create Session blueprint http://${REPO_IP}:8000 - ${bp_archive}= Get Binary File ${BP_ARCHIVE_PATH} - &{bp_file}= create Dictionary file ${bp_archive} - &{headers}= Create Dictionary Authorization=Basic Y2NzZGthcHBzOmNjc2RrYXBwcw== - ${resp}= Post Request blueprint ${BP_UPLOAD_URL} files=${bp_file} headers=${headers} - Should Be Equal As Strings ${resp.status_code} 200 - -Distribute Service Template - Create Session sdc_controller_session http://${REPO_IP}:8085 - ${data}= Get Binary File ${CURDIR}${/}data${/}distributeServiceTemplate.json - &{headers}= Create Dictionary Authorization=Basic bXNvX2FkbWluOnBhc3N3b3JkMSQ= resource-location=/app/distribution-test-zip/unzipped/ Content-Type=application/json Accept=application/json - ${resp}= Post Request sdc_controller_session /test/treatNotification/v1 data=${data} headers=${headers} - Run Keyword If '${resp.status_code}' == '200' log to console \nexecuted with expected result - Should Be Equal As Strings '${resp.status_code}' '200' - ${serviceInstanceId}= Set Variable cd4decf6-4f27-4775-9561-0e683ed43635 - SET GLOBAL VARIABLE ${serviceInstanceId} - ${pnfName}= Set Variable PNFDemo - SET GLOBAL VARIABLE ${pnfName} - -Get pnf workflow - Create Session api_handler_session http://${REPO_IP}:8080 - &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json - ${get_pnfworkflows_request}= Get Request api_handler_session /onap/so/infra/workflowSpecifications/v1/pnfWorkflows headers=${headers} - Run Keyword If '${get_pnfworkflows_request.status_code}' == '200' log to console \nexecuted with expected result - log to console ${get_pnfworkflows_request.content} - ${pnfworkflows_json_response}= Evaluate json.loads(r"""${get_pnfworkflows_request.content}""", strict=False) json - ${all_wf_members}= Set Variable ${pnfworkflows_json_response['workflowSpecificationList']} - ${activate_workflow_uuid}= Set Variable "" - ${activate_workflow_name}= Set Variable "" - ${download_workflow_uuid}= Set Variable "" - ${download_workflow_name}= Set Variable "" - - :FOR ${member} IN @{all_wf_members} - \ ${workflow_uuid}= Set Variable ${member}[workflowSpecification][artifactInfo][artifactUuid] - \ ${workflow_name}= Set Variable ${member}[workflowSpecification][artifactInfo][artifactName] - \ Log to console The workflow ${workflow_name} has uuid : ${workflow_uuid} - \ ${activate_workflow_uuid}= Set Variable If '${workflow_name}' == 'PNFSoftwareUpgrade' ${workflow_uuid} ${activate_workflow_uuid} - \ ${activate_workflow_name}= Set Variable If '${workflow_name}' == 'PNFSoftwareUpgrade' ${workflow_name} ${activate_workflow_name} - \ ${download_workflow_uuid}= Set Variable If '${workflow_name}' == 'PNFSWUPDownload' ${workflow_uuid} ${download_workflow_uuid} - \ ${download_workflow_name}= Set Variable If '${workflow_name}' == 'PNFSWUPDownload' ${workflow_name} ${download_workflow_name} - - SET GLOBAL VARIABLE ${activate_workflow_uuid} - SET GLOBAL VARIABLE ${download_workflow_uuid} - - Run Keyword If '${activate_workflow_name}' == 'PNFSoftwareUpgrade' log to console \nexecuted with expected result - Run Keyword If '${download_workflow_name}' == 'PNFSWUPDownload' log to console \nexecuted with expected result - Should Be Equal As Strings '${activate_workflow_name}' 'PNFSoftwareUpgrade' - Should Be Equal As Strings '${download_workflow_name}' 'PNFSWUPDownload' - -Invoke Service Instantiation for pnf software download - Create Session api_handler_session http://${REPO_IP}:8080 - ${data}= Get Binary File ${CURDIR}${/}data${/}serviceInstantiationDownloadRequest.json - &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json X-ONAP-RequestID=0ddc448d-5513-44bc-8b02-5759d84600d5 X-ONAP-PartnerName=ONAP X-RequestorID=VID - ${service_instantiation_request}= Post Request api_handler_session /onap/so/infra/instanceManagement/v1/serviceInstances/${serviceInstanceId}/pnfs/${pnfName}/workflows/${download_workflow_uuid} data=${data} headers=${headers} - Run Keyword If '${service_instantiation_request.status_code}' == '200' log to console \nexecuted with expected result - log to console ${service_instantiation_request.content} - ${service_instantiation_json_response}= Evaluate json.loads(r"""${service_instantiation_request.content}""", strict=False) json - ${request_ID}= Set Variable ${service_instantiation_json_response}[requestReferences][requestId] - ${actual_request_state}= Set Variable "" - - : FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT} - \ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID} - \ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result - \ log to console ${orchestration_status_request.content} - \ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""", strict=False) json - \ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState] - \ Log To Console Received actual repsonse status:${actual_request_state} - \ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETED' or '${actual_request_state}' == 'FAILED' Exit For Loop - \ log to console Will try again after ${SLEEP_INTERVAL_SEC} seconds - \ SLEEP ${SLEEP_INTERVAL_SEC}s - - Log To Console final repsonse status received: ${actual_request_state} - Run Keyword If '${actual_request_state}' == 'COMPLETED' log to console \nexecuted with expected result - Should Be Equal As Strings '${actual_request_state}' 'COMPLETED' - -Test verify PNF Configuration for software download - [Documentation] Checking PNF configuration params - - Create Session sdnc http://${REPO_IP}:8282 - &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json - ${mount}= Get File ${CURDIR}${/}data${/}mount.json - Log to console ${mount} - ${pnf_mount_resp}= Put Request sdnc ${SDNC_MOUNT_PATH} data=${mount} headers=${headers} - Should Be Equal As Strings ${pnf_mount_resp.status_code} 201 - SLEEP 10 - ${pnfsim_software_resp}= Get Request sdnc ${PNFSIM_MOUNT_PATH} headers=${headers} - Should Be Equal As Strings ${pnfsim_software_resp.status_code} 200 - Log to console ${pnfsim_software_resp.content} - ${pnfsim_software_resp_json}= Evaluate json.loads(r"""${pnfsim_software_resp.content}""", strict=False) json - ${all_upgp_members}= Set Variable ${pnfsim_software_resp_json['software-upgrade']['upgrade-package']} - - :FOR ${member} IN @{all_upgp_members} - \ ${soft_ver}= Get From Dictionary ${member} software-version - \ ${soft_status}= Get From Dictionary ${member} current-status - \ Log to console The node ${pnfName} has software version ${soft_ver} : ${soft_status} - \ Run Keyword If '${soft_ver}' == 'pnf_sw_version-2.0.0' Exit For Loop - - Run Keyword If '${soft_ver}' == 'pnf_sw_version-2.0.0' log to console \nexecuted with expected result - Should Be Equal As Strings '${soft_ver}' 'pnf_sw_version-2.0.0' - Should Be Equal As Strings '${soft_status}' 'DOWNLOAD_COMPLETED' - -Invoke Service Instantiation for pnf software activation - Create Session api_handler_session http://${REPO_IP}:8080 - ${data}= Get Binary File ${CURDIR}${/}data${/}serviceInstantiationActivationRequest.json - &{headers}= Create Dictionary Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA== Content-Type=application/json Accept=application/json X-ONAP-RequestID=4e104e12-5539-4557-b31e-00369398c214 X-ONAP-PartnerName=ONAP X-RequestorID=VID - ${service_instantiation_request}= Post Request api_handler_session /onap/so/infra/instanceManagement/v1/serviceInstances/${serviceInstanceId}/pnfs/${pnfName}/workflows/${activate_workflow_uuid} data=${data} headers=${headers} - Run Keyword If '${service_instantiation_request.status_code}' == '200' log to console \nexecuted with expected result - log to console ${service_instantiation_request.content} - ${service_instantiation_json_response}= Evaluate json.loads(r"""${service_instantiation_request.content}""", strict=False) json - ${request_ID}= Set Variable ${service_instantiation_json_response}[requestReferences][requestId] - ${actual_request_state}= Set Variable "" - : FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT} - \ ${orchestration_status_request}= Get Request api_handler_session /onap/so/infra/orchestrationRequests/v7/${request_ID} - \ Run Keyword If '${orchestration_status_request.status_code}' == '200' log to console \nexecuted with expected result - \ log to console ${orchestration_status_request.content} - \ ${orchestration_json_response}= Evaluate json.loads(r"""${orchestration_status_request.content}""", strict=False) json - \ ${actual_request_state}= SET VARIABLE ${orchestration_json_response}[request][requestStatus][requestState] - \ Log To Console Received actual repsonse status:${actual_request_state} - \ RUN KEYWORD IF '${actual_request_state}' == 'COMPLETED' or '${actual_request_state}' == 'FAILED' Exit For Loop - \ log to console Will try again after ${SLEEP_INTERVAL_SEC} seconds - \ SLEEP ${SLEEP_INTERVAL_SEC}s - - Log To Console final repsonse status received: ${actual_request_state} - Run Keyword If '${actual_request_state}' == 'COMPLETED' log to console \nexecuted with expected result - Should Be Equal As Strings '${actual_request_state}' 'COMPLETED' - -Test verify PNF Configuration for software activate - [Documentation] Checking PNF configuration params - - Create Session sdnc http://${REPO_IP}:8282 - &{headers}= Create Dictionary Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ== Content-Type=application/json - ${mount}= Get File ${CURDIR}${/}data${/}mount.json - Log to console ${mount} - ${pnf_mount_resp}= Put Request sdnc ${SDNC_MOUNT_PATH} data=${mount} headers=${headers} - Should Be Equal As Strings ${pnf_mount_resp.status_code} 201 - SLEEP 10 - ${pnfsim_software_resp}= Get Request sdnc ${PNFSIM_MOUNT_PATH} headers=${headers} - Should Be Equal As Strings ${pnfsim_software_resp.status_code} 200 - Log to console ${pnfsim_software_resp.content} - ${pnfsim_software_resp_json}= Evaluate json.loads(r"""${pnfsim_software_resp.content}""", strict=False) json - ${all_upgp_members}= Set Variable ${pnfsim_software_resp_json['software-upgrade']['upgrade-package']} - - :FOR ${member} IN @{all_upgp_members} - \ ${soft_ver}= Get From Dictionary ${member} software-version - \ ${soft_status}= Get From Dictionary ${member} current-status - \ Log to console The node ${pnfName} has software version ${soft_ver} : ${soft_status} - \ Run Keyword If '${soft_ver}' == 'pnf_sw_version-3.0.0' Exit For Loop - - Run Keyword If '${soft_ver}' == 'pnf_sw_version-3.0.0' log to console \nexecuted with expected result - Should Be Equal As Strings '${soft_ver}' 'pnf_sw_version-3.0.0' - Should Be Equal As Strings '${soft_status}' 'ACTIVATION_COMPLETED' - -Test AAI-update for target software version verify - Create Session aai_simulator_session https://${REPO_IP}:9993 - &{headers}= Create Dictionary Authorization=Basic YWFpOmFhaS5vbmFwLm9yZzpkZW1vMTIzNDU2IQ== Content-Type=application/json Accept=application/json verify=False - : FOR ${INDEX} IN RANGE ${MAXIMUM_ATTEMPTS_BEFORE_TIMEOUT} - \ ${get_pnf_request}= Get Request aai_simulator_session aai/v11/network/pnfs/pnf/${pnfName} headers=${headers} - \ Run Keyword If '${get_pnf_request.status_code}' == '200' log to console \nexecuted with expected result - \ ${get_pnf_json_response}= Evaluate json.loads(r"""${get_pnf_request.content}""", strict=False) json - \ Log to console ${get_pnf_json_response} - \ ${sw_version}= Set Variable ${get_pnf_json_response}[sw-version] - \ Log to console ${sw_version} - \ Run Keyword If '${sw_version}' == 'pnf_sw_version-3.0.0' Exit For Loop - \ log to console Will try again after ${SLEEP_INTERVAL_SEC} seconds - \ SLEEP ${SLEEP_INTERVAL_SEC}s - - Log To Console final target software version received: ${sw_version} - Run Keyword If '${sw_version}' == 'pnf_sw_version-3.0.0' log to console \nexecuted with expected result - Should Be Equal As Strings '${sw_version}' 'pnf_sw_version-3.0.0' |