aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot (renamed from tests/usecases/5G-bulkpm/BulkpmE2E.robot)22
-rw-r--r--tests/usecases-5G-bulkpm/5G-bulkpm/__init__.robot (renamed from tests/usecases/5G-bulkpm/__init__.robot)0
-rw-r--r--tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json (renamed from tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json)2
-rw-r--r--tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json (renamed from tests/usecases/5G-bulkpm/assets/metadata.schema.json)0
-rw-r--r--tests/usecases-5G-bulkpm/5G-bulkpm/resources/JsonValidatorLibrary.py (renamed from tests/usecases/5G-bulkpm/resources/JsonValidatorLibrary.py)18
-rw-r--r--tests/usecases-5G-bulkpm/5G-bulkpm/resources/bulkpm_keywords.robot (renamed from tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot)0
-rw-r--r--tests/usecases-5G-bulkpm/5G-bulkpm/resources/xNFLibrary.py (renamed from tests/usecases/5G-bulkpm/resources/xNFLibrary.py)15
-rw-r--r--tests/usecases-config-over-netconf/config-over-netconf/__init__.robot (renamed from tests/usecases/config-over-netconf/__init__.robot)0
-rw-r--r--tests/usecases-config-over-netconf/config-over-netconf/config_over_netconf.robot69
-rw-r--r--tests/usecases-config-over-netconf/config-over-netconf/data/blueprint_archive.zip (renamed from tests/usecases/config-over-netconf/data/blueprint_archive.zip)bin10768 -> 10768 bytes
-rw-r--r--tests/usecases-config-over-netconf/config-over-netconf/data/config-assign.json (renamed from tests/usecases/config-over-netconf/data/config-assign.json)0
-rw-r--r--tests/usecases-config-over-netconf/config-over-netconf/data/config-deploy.json (renamed from tests/usecases/config-over-netconf/data/config-deploy.json)0
-rw-r--r--tests/usecases-config-over-netconf/config-over-netconf/data/mount.xml (renamed from tests/usecases/config-over-netconf/data/mount.xml)0
-rwxr-xr-xtests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/.gitignore (renamed from tests/usecases/pnf-sw-upgrade/.gitignore)0
-rw-r--r--tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/__init__.robot (renamed from tests/usecases/pnf-sw-upgrade/__init__.robot)0
-rw-r--r--tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/blueprint_archive.zip (renamed from tests/usecases/pnf-sw-upgrade/data/blueprint_archive.zip)bin18151 -> 18151 bytes
-rw-r--r--tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/distributeServiceTemplate.json (renamed from tests/usecases/pnf-sw-upgrade/data/distributeServiceTemplate.json)0
-rwxr-xr-xtests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/mount.json (renamed from tests/usecases/pnf-sw-upgrade/data/mount.json)0
-rw-r--r--tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json (renamed from tests/usecases/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json)0
-rw-r--r--tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json (renamed from tests/usecases/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json)0
-rw-r--r--tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/pnf-sw-upgrade.robot (renamed from tests/usecases/pnf-sw-upgrade/pnf-sw-upgrade.robot)146
-rw-r--r--tests/usecases/config-over-netconf/config_over_netconf.robot69
22 files changed, 172 insertions, 169 deletions
diff --git a/tests/usecases/5G-bulkpm/BulkpmE2E.robot b/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot
index e89d4d67..fe3b1cec 100644
--- a/tests/usecases/5G-bulkpm/BulkpmE2E.robot
+++ b/tests/usecases-5G-bulkpm/5G-bulkpm/BulkpmE2E.robot
@@ -5,6 +5,8 @@ Library OperatingSystem
Library Collections
Library Process
Resource resources/bulkpm_keywords.robot
+Library resources/JsonValidatorLibrary.py
+Library resources/xNFLibrary.py
*** Variables ***
@@ -12,21 +14,21 @@ ${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
+${EVENT_DATA_FILE} %{WORKSPACE}/tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.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_DFC_LOG} docker exec dcaegen2-datafile-collector /bin/sh -c "cat /var/log/ONAP/application.log" > %{WORKSPACE}/archives/dfc_docker.log
+${CLI_EXEC_CLI_DFC_LOG_GREP} grep "Datafile file published" %{WORKSPACE}/archives/dfc_docker.log
${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
+${CLI_EXEC_RENAME_METADATA} mv %{WORKSPACE}/A20181002.0000-1000-0015-1000_5G.xml.M %{WORKSPACE}/archives/metadata.json
+${CLI_EXEC_CLI_PMMAPPER_LOG} docker exec dcaegen2-pm-mapper /bin/sh -c "cat /var/log/ONAP/dcaegen2/services/pm-mapper/pm-mapper_output.log" > %{WORKSPACE}/archives/pmmapper_docker.log
+${CLI_EXEC_CLI_PMMAPPER_LOG_GREP} grep "XML validation successful Event" %{WORKSPACE}/archives/pmmapper_docker.log
+${CLI_EXEC_CLI_PMMAPPER_LOG_GREP_VES} grep "Successfully published VES events to messagerouter" %{WORKSPACE}/archives/pmmapper_docker.log
+${metadataSchemaPath} %{WORKSPACE}/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json
+${metadataJsonPath} %{WORKSPACE}/archives/metadata.json
*** Test Cases ***
@@ -79,7 +81,7 @@ Verify Default Feed And File Consumer Subscription On Datarouter
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
+ Should Contain ${cli_cmd_output.stdout} http://datarouter-subscriber:7070
Verify Fileconsumer Receive PM file from Data Router
diff --git a/tests/usecases/5G-bulkpm/__init__.robot b/tests/usecases-5G-bulkpm/5G-bulkpm/__init__.robot
index 7114fd44..7114fd44 100644
--- a/tests/usecases/5G-bulkpm/__init__.robot
+++ b/tests/usecases-5G-bulkpm/5G-bulkpm/__init__.robot
diff --git a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json b/tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json
index 375dbd80..02f092df 100644
--- a/tests/usecases/5G-bulkpm/assets/json_events/FileExistNotification.json
+++ b/tests/usecases-5G-bulkpm/5G-bulkpm/assets/json_events/FileExistNotification.json
@@ -21,7 +21,7 @@
"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",
+ "location": "sftp://admin:admin@sftp:22/A20181002.0000-1000-0015-1000_5G.xml.gz",
"compression": "gzip",
"fileFormatType": "org.3GPP.32.435#measCollec",
"fileFormatVersion": "V10"
diff --git a/tests/usecases/5G-bulkpm/assets/metadata.schema.json b/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json
index a41b3544..a41b3544 100644
--- a/tests/usecases/5G-bulkpm/assets/metadata.schema.json
+++ b/tests/usecases-5G-bulkpm/5G-bulkpm/assets/metadata.schema.json
diff --git a/tests/usecases/5G-bulkpm/resources/JsonValidatorLibrary.py b/tests/usecases-5G-bulkpm/5G-bulkpm/resources/JsonValidatorLibrary.py
index 12d5d856..ed376ff2 100644
--- a/tests/usecases/5G-bulkpm/resources/JsonValidatorLibrary.py
+++ b/tests/usecases-5G-bulkpm/5G-bulkpm/resources/JsonValidatorLibrary.py
@@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
-import sys
import logging
-from simplejson import load
+
from jsonschema import validate, ValidationError, SchemaError
+from simplejson import load
class JsonValidatorLibrary(object):
@@ -11,14 +11,15 @@ class JsonValidatorLibrary(object):
def __init__(self):
pass
- def validate(self, schemaPath, jsonPath):
- logging.info("Schema path: " + schemaPath)
- logging.info("JSON path: " + jsonPath)
+ @staticmethod
+ def validate(schema_path, json_path):
+ logging.info("Schema path: " + schema_path)
+ logging.info("JSON path: " + json_path)
schema = None
data = None
try:
- schema = load(open(schemaPath, 'r'))
- data = load(open(jsonPath, 'r'))
+ schema = load(open(schema_path, 'r'))
+ data = load(open(json_path, 'r'))
except (IOError, ValueError, OSError) as e:
logging.error(e.message)
return 1
@@ -33,6 +34,7 @@ class JsonValidatorLibrary(object):
print("JSON validation successful")
return 0
+
if __name__ == '__main__':
lib = JsonValidatorLibrary()
- # sys.exit(JsonValidatorLibrary().validate(sys.argv[1], sys.argv[2]))
+# 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/5G-bulkpm/resources/bulkpm_keywords.robot
index 9ef56c83..9ef56c83 100644
--- a/tests/usecases/5G-bulkpm/resources/bulkpm_keywords.robot
+++ b/tests/usecases-5G-bulkpm/5G-bulkpm/resources/bulkpm_keywords.robot
diff --git a/tests/usecases/5G-bulkpm/resources/xNFLibrary.py b/tests/usecases-5G-bulkpm/5G-bulkpm/resources/xNFLibrary.py
index 01574f77..b70d8095 100644
--- a/tests/usecases/5G-bulkpm/resources/xNFLibrary.py
+++ b/tests/usecases-5G-bulkpm/5G-bulkpm/resources/xNFLibrary.py
@@ -3,23 +3,28 @@ Created on Aug 18, 2017
@author: sw6830
'''
+import time
+import uuid
+
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):
+ @staticmethod
+ def create_header_from_string(dict_str):
logger.info("Enter create_header_from_string: dictStr")
- return dict(u.split("=") for u in dictStr.split(","))
+ return dict(u.split("=") for u in dict_str.split(","))
+ @staticmethod
def Generate_UUID(self):
"""generate a uuid"""
return uuid.uuid4()
+
if __name__ == '__main__':
lib = xNFLibrary()
- time.sleep(100000) \ No newline at end of file
+ time.sleep(100000)
diff --git a/tests/usecases/config-over-netconf/__init__.robot b/tests/usecases-config-over-netconf/config-over-netconf/__init__.robot
index 614d5c17..614d5c17 100644
--- a/tests/usecases/config-over-netconf/__init__.robot
+++ b/tests/usecases-config-over-netconf/config-over-netconf/__init__.robot
diff --git a/tests/usecases-config-over-netconf/config-over-netconf/config_over_netconf.robot b/tests/usecases-config-over-netconf/config-over-netconf/config_over_netconf.robot
new file mode 100644
index 00000000..21c03c6f
--- /dev/null
+++ b/tests/usecases-config-over-netconf/config-over-netconf/config_over_netconf.robot
@@ -0,0 +1,69 @@
+*** 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/config-over-netconf/data/blueprint_archive.zip
index ac346554..ac346554 100644
--- a/tests/usecases/config-over-netconf/data/blueprint_archive.zip
+++ b/tests/usecases-config-over-netconf/config-over-netconf/data/blueprint_archive.zip
Binary files differ
diff --git a/tests/usecases/config-over-netconf/data/config-assign.json b/tests/usecases-config-over-netconf/config-over-netconf/data/config-assign.json
index 12c3865f..12c3865f 100644
--- a/tests/usecases/config-over-netconf/data/config-assign.json
+++ b/tests/usecases-config-over-netconf/config-over-netconf/data/config-assign.json
diff --git a/tests/usecases/config-over-netconf/data/config-deploy.json b/tests/usecases-config-over-netconf/config-over-netconf/data/config-deploy.json
index 546fdc78..546fdc78 100644
--- a/tests/usecases/config-over-netconf/data/config-deploy.json
+++ b/tests/usecases-config-over-netconf/config-over-netconf/data/config-deploy.json
diff --git a/tests/usecases/config-over-netconf/data/mount.xml b/tests/usecases-config-over-netconf/config-over-netconf/data/mount.xml
index 22053e8a..22053e8a 100644
--- a/tests/usecases/config-over-netconf/data/mount.xml
+++ b/tests/usecases-config-over-netconf/config-over-netconf/data/mount.xml
diff --git a/tests/usecases/pnf-sw-upgrade/.gitignore b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/.gitignore
index 44793d73..44793d73 100755
--- a/tests/usecases/pnf-sw-upgrade/.gitignore
+++ b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/.gitignore
diff --git a/tests/usecases/pnf-sw-upgrade/__init__.robot b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/__init__.robot
index a721a88f..a721a88f 100644
--- a/tests/usecases/pnf-sw-upgrade/__init__.robot
+++ b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/__init__.robot
diff --git a/tests/usecases/pnf-sw-upgrade/data/blueprint_archive.zip b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/blueprint_archive.zip
index 4edc9ded..4edc9ded 100644
--- a/tests/usecases/pnf-sw-upgrade/data/blueprint_archive.zip
+++ b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/blueprint_archive.zip
Binary files differ
diff --git a/tests/usecases/pnf-sw-upgrade/data/distributeServiceTemplate.json b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/distributeServiceTemplate.json
index c13eb8d5..c13eb8d5 100644
--- a/tests/usecases/pnf-sw-upgrade/data/distributeServiceTemplate.json
+++ b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/distributeServiceTemplate.json
diff --git a/tests/usecases/pnf-sw-upgrade/data/mount.json b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/mount.json
index 58925b1a..58925b1a 100755
--- a/tests/usecases/pnf-sw-upgrade/data/mount.json
+++ b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/mount.json
diff --git a/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json
index a25ebfda..a25ebfda 100644
--- a/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json
+++ b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/serviceInstantiationActivationRequest.json
diff --git a/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json
index 0042ac26..0042ac26 100644
--- a/tests/usecases/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json
+++ b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/data/serviceInstantiationDownloadRequest.json
diff --git a/tests/usecases/pnf-sw-upgrade/pnf-sw-upgrade.robot b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/pnf-sw-upgrade.robot
index 70408366..738a4311 100644
--- a/tests/usecases/pnf-sw-upgrade/pnf-sw-upgrade.robot
+++ b/tests/usecases-pnf-sw-upgrade/pnf-sw-upgrade/pnf-sw-upgrade.robot
@@ -19,21 +19,21 @@ ${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 *************************
+ [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}
+ &{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
@@ -62,19 +62,18 @@ Get pnf workflow
${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}
+ END
- :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'
@@ -90,25 +89,23 @@ Invoke Service Instantiation for pnf software download
${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
-
+ 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}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
+ log to console Will try again after ${SLEEP_INTERVAL_SEC} seconds
+ SLEEP ${SLEEP_INTERVAL_SEC}s
+ END
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'
+ Run Keyword If '${actual_request_state}' == 'COMPLETE' log to console \nexecuted with expected result
+ Should Be Equal As Strings '${actual_request_state}' 'COMPLETE'
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
@@ -121,13 +118,12 @@ Test verify PNF Configuration for software download
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
-
+ 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
+ END
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'
@@ -142,24 +138,23 @@ Invoke Service Instantiation for pnf software activation
${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
-
+ 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}' == 'COMPLETE' or '${actual_request_state}' == 'FAILED' Exit For Loop
+ log to console Will try again after ${SLEEP_INTERVAL_SEC} seconds
+ SLEEP ${SLEEP_INTERVAL_SEC}s
+ END
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
+ Run Keyword If '${actual_request_state}' == 'COMPLETE' log to console \nexecuted with expected result
+ Should Be Equal As Strings '${actual_request_state}' 'COMPLETE'
+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
@@ -172,13 +167,12 @@ Test verify PNF Configuration for software activate
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
-
+ 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
+ END
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'
@@ -186,17 +180,17 @@ Test verify PNF Configuration for software activate
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
-
+ 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
+ END
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'
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}