Update tests to use new netconf sim 29/118829/1
authorDan Timoney <dtimoney@att.com>
Thu, 4 Mar 2021 18:04:54 +0000 (13:04 -0500)
committerDan Timoney <dtimoney@att.com>
Thu, 4 Mar 2021 18:04:54 +0000 (13:04 -0500)
Updated netconf TLS tests to use new netconf simulator.

Change-Id: I9c6706222bf0b7223c3cfe6416dee085fae9df6b
Issue-ID: SDNC-1500
Signed-off-by: Dan Timoney <dtimoney@att.com>
plans/sdnc/sdnc_netconf_tls_post_deploy/setup.sh
tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-keywords.robot
tests/sdnc/sdnc_netconf_tls_post_deploy/resources/sdnc-properties.robot
tests/sdnc/sdnc_netconf_tls_post_deploy/sdnc_post_deploy_cert_check.robot

index e712ee1..6f4e547 100644 (file)
@@ -151,6 +151,29 @@ if [ "$TIME" -ge "$TIME_OUT" ]; then
    exit 1;
 fi
 
+# Check if certificate installation is done
+TIME_OUT=300
+INTERVAL=10
+TIME=0
+while [ "$TIME" -lt "$TIME_OUT" ]; do
+
+  docker-compose -f "${SCRIPTS}"/sdnc/sdnc/docker-compose.yml logs sdnc | grep 'Everything OK in Certificate Installation'
+
+  if [ $? == 0 ] ; then
+    echo SDNC karaf started in $TIME seconds
+    break;
+  fi
+
+  echo Sleep: $INTERVAL seconds before testing if SDNC is up. Total wait time up now is: $TIME seconds. Timeout is: $TIME_OUT seconds
+  sleep $INTERVAL
+  TIME=$(($TIME+$INTERVAL))
+done
+
+if [ "$TIME" -ge "$TIME_OUT" ]; then
+   echo TIME OUT: karaf session not started in $TIME_OUT seconds, setup failed
+   exit 1;
+fi
+
 # Update default Networking bridge IP in mount.json file
 sed -i "s/pnfaddr/${LOCAL_IP}/g" "${REQUEST_DATA_PATH}"/mount.xml
 
index 52cc5d2..3ea6164 100644 (file)
@@ -55,8 +55,6 @@ Send Get Request And Validate TLS Connection Response
     &{headers1}=  Create Dictionary    Authorization=Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==    Content-Type=application/json    Accept=application/json
     ${resp1}=    Get Request    sdnc_restconf    ${PNFSIM_MOUNT_PATH}    headers=${headers1}
     Should Be Equal As Strings    ${resp1.status_code}    ${resp_code}
-    Should Contain  ${resp1.content}     netconf-id
-    Should Contain  ${resp1.content}     netconf-param
 
 Send Delete Request And Validate PNF Mount Deleted
     [Documentation]   Send request to passed url and validate received response
index e6e9790..2f2d6f5 100644 (file)
@@ -28,7 +28,7 @@ ${SDNC_NETWORK_TOPOLOGY}                 /config/network-topology:network-topolo
 ${MOUNT_PATH}                            %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/cert-data
 ${SDNC_CSR_FILE}                         %{WORKSPACE}/tests/sdnc/sdnc_netconf_tls_post_deploy/csr/sdnc_csr.env
 ${SDNC_MOUNT_PATH}                       /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo
-${PNFSIM_MOUNT_PATH}                     /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/pnf-simulator
+${PNFSIM_MOUNT_PATH}                     /config/network-topology:network-topology/topology/topology-netconf/node/PNFDemo/yang-ext:mount/turing-machine:turing-machine
 
 # Netconf-Pnp-Simulator
 ${NETCONF_PNP_SIM_CONTAINER_NAME}        %{NETCONF_PNP_SIM_CONTAINER_NAME}
index 7d322c1..4d93597 100644 (file)
@@ -14,15 +14,14 @@ Check SDNC Keystore For Netopeer2 Certificates
     [Documentation]    Checking Keystore after SDNC istallation
     Send Get Request And Validate Response Sdnc  ${SDNC_KEYSTORE_CONFIG_PATH}  200
 
-# TLS connection to netconf simulator is not currently working. Commenting
-# out for now, and will uncomment when we have working solution.
-#Check SDNC And PNF TLS Connection Over Netopeer2 Certificates
-#    [Tags]      SDNC-PNF-TLS-CONNECTION-CHECK
-#   [Documentation]    Checking PNF Mount after SDNC Installation
-#    Send Get Request And Validate TLS Connection Response  ${SDNC_MOUNT_PATH}  200
-
-#Check PNF Delete And Remove Netopeer2 Certificates From Keystore
-#    [Tags]      SDNC-PNF-MOUNT-DELETE-CLEAR-KEYSTORE
-#    [Documentation]    Checking PNF Mount Delete from SDNC
-#   Send Delete Request And Validate PNF Mount Deleted  ${SDNC_MOUNT_PATH}  200
+
+Check SDNC And PNF TLS Connection Over Netopeer2 Certificates
+    [Tags]      SDNC-PNF-TLS-CONNECTION-CHECK
+   [Documentation]    Checking PNF Mount after SDNC Installation
+    Send Get Request And Validate TLS Connection Response  ${SDNC_MOUNT_PATH}  200
+
+Check PNF Delete And Remove Netopeer2 Certificates From Keystore
+    [Tags]      SDNC-PNF-MOUNT-DELETE-CLEAR-KEYSTORE
+    [Documentation]    Checking PNF Mount Delete from SDNC
+   Send Delete Request And Validate PNF Mount Deleted  ${SDNC_MOUNT_PATH}  200