From 3ae5ef4c2f7a928bbd681eaa1183f0d746d48fd5 Mon Sep 17 00:00:00 2001 From: tragait Date: Fri, 6 Sep 2019 11:31:59 +0100 Subject: Update config-over-netconf with el-alto images Change-Id: I06b7aaefe7dd40e20ac094074f5c0840867f1717 Signed-off-by: tragait Issue-ID: INT-1262 --- .../5g_config_over_netconf.robot | 69 --------------------- tests/usecases/5G-config-over-netconf/_init_.robot | 2 - .../5G-config-over-netconf/data/config-assign.json | 25 -------- .../5G-config-over-netconf/data/config-deploy.json | 25 -------- .../usecases/5G-config-over-netconf/data/mount.xml | 14 ----- tests/usecases/config-over-netconf/__init__.robot | 2 + .../config-over-netconf/config_over_netconf.robot | 69 +++++++++++++++++++++ .../config-over-netconf/data/blueprint_archive.zip | Bin 0 -> 10768 bytes .../config-over-netconf/data/config-assign.json | 25 ++++++++ .../config-over-netconf/data/config-deploy.json | 25 ++++++++ tests/usecases/config-over-netconf/data/mount.xml | 14 +++++ 11 files changed, 135 insertions(+), 135 deletions(-) delete mode 100644 tests/usecases/5G-config-over-netconf/5g_config_over_netconf.robot delete mode 100644 tests/usecases/5G-config-over-netconf/_init_.robot delete mode 100644 tests/usecases/5G-config-over-netconf/data/config-assign.json delete mode 100644 tests/usecases/5G-config-over-netconf/data/config-deploy.json delete mode 100644 tests/usecases/5G-config-over-netconf/data/mount.xml create mode 100644 tests/usecases/config-over-netconf/__init__.robot create mode 100644 tests/usecases/config-over-netconf/config_over_netconf.robot create mode 100644 tests/usecases/config-over-netconf/data/blueprint_archive.zip create mode 100644 tests/usecases/config-over-netconf/data/config-assign.json create mode 100644 tests/usecases/config-over-netconf/data/config-deploy.json create mode 100644 tests/usecases/config-over-netconf/data/mount.xml (limited to 'tests') diff --git a/tests/usecases/5G-config-over-netconf/5g_config_over_netconf.robot b/tests/usecases/5G-config-over-netconf/5g_config_over_netconf.robot deleted file mode 100644 index c6e06596..00000000 --- a/tests/usecases/5G-config-over-netconf/5g_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/netopeer2 -${PNFSIM_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/netopeer2/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/5G-config-over-netconf/_init_.robot b/tests/usecases/5G-config-over-netconf/_init_.robot deleted file mode 100644 index d7353060..00000000 --- a/tests/usecases/5G-config-over-netconf/_init_.robot +++ /dev/null @@ -1,2 +0,0 @@ -1 *** Settings *** -2 Documentation SDNC - keystorecheck diff --git a/tests/usecases/5G-config-over-netconf/data/config-assign.json b/tests/usecases/5G-config-over-netconf/data/config-assign.json deleted file mode 100644 index 12c3865f..00000000 --- a/tests/usecases/5G-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/5G-config-over-netconf/data/config-deploy.json b/tests/usecases/5G-config-over-netconf/data/config-deploy.json deleted file mode 100644 index 546fdc78..00000000 --- a/tests/usecases/5G-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/5G-config-over-netconf/data/mount.xml b/tests/usecases/5G-config-over-netconf/data/mount.xml deleted file mode 100644 index 108369bc..00000000 --- a/tests/usecases/5G-config-over-netconf/data/mount.xml +++ /dev/null @@ -1,14 +0,0 @@ - - netopeer2 - - ODL_private_key_0 - netconf - - pnfaddr - 6513 - false - - TLS - - 2 - diff --git a/tests/usecases/config-over-netconf/__init__.robot b/tests/usecases/config-over-netconf/__init__.robot new file mode 100644 index 00000000..614d5c17 --- /dev/null +++ b/tests/usecases/config-over-netconf/__init__.robot @@ -0,0 +1,2 @@ +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 new file mode 100644 index 00000000..c6e06596 --- /dev/null +++ b/tests/usecases/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/netopeer2 +${PNFSIM_MOUNT_PATH} /config/network-topology:network-topology/topology/topology-netconf/node/netopeer2/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 new file mode 100644 index 00000000..ac346554 Binary files /dev/null and b/tests/usecases/config-over-netconf/data/blueprint_archive.zip differ diff --git a/tests/usecases/config-over-netconf/data/config-assign.json b/tests/usecases/config-over-netconf/data/config-assign.json new file mode 100644 index 00000000..12c3865f --- /dev/null +++ b/tests/usecases/config-over-netconf/data/config-assign.json @@ -0,0 +1,25 @@ +{ + "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 new file mode 100644 index 00000000..546fdc78 --- /dev/null +++ b/tests/usecases/config-over-netconf/data/config-deploy.json @@ -0,0 +1,25 @@ +{ + "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 new file mode 100644 index 00000000..108369bc --- /dev/null +++ b/tests/usecases/config-over-netconf/data/mount.xml @@ -0,0 +1,14 @@ + + netopeer2 + + ODL_private_key_0 + netconf + + pnfaddr + 6513 + false + + TLS + + 2 + -- cgit 1.2.3-korg