enable sdnr csit 07/134107/7
authorhighstreetherbert <herbert.eiselt@highstreet-technologies.com>
Thu, 13 Apr 2023 10:02:00 +0000 (12:02 +0200)
committerdemskeq8 <alexander.dehn@highstreet-technologies.com>
Wed, 19 Apr 2023 15:28:32 +0000 (17:28 +0200)
enable sdnr testplan

Issue-ID: SDNC-1794
Signed-off-by: highstreetherbert <herbert.eiselt@highstreet-technologies.com>
Change-Id: I8ce091fa6305c8b856d26ba86abc6a3db67dccc3
Signed-off-by: demskeq8 <alexander.dehn@highstreet-technologies.com>
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Former-commit-id: 544da6ee98136c6949fc1a600e687f047d5a8ffa

14 files changed:
csit/plans/sdnr/setup.sh
csit/plans/sdnr/testdata/localhost.py
csit/run-csit.sh
csit/scripts/sdnr/docker-compose/.env
csit/scripts/sdnr/docker-compose/docker-compose-onap-addons.yaml
csit/scripts/sdnr/docker-compose/docker-compose-single-sdnr.yaml
csit/scripts/sdnr/docker-compose/sdnr/mountpoint-registrar.properties
csit/scripts/sdnr/docker-compose/vesc/collector.properties
csit/scripts/sdnr/docker-compose/vesc/ves-dmaap-config.json [new file with mode: 0644]
csit/tests/sdnr/functional/devicemanager/_templates/10_lifecycleNetconfSsh/devicemanagerlifecycle_netconf.robot
csit/tests/sdnr/functional/devicemanager/_templates/20_pnfRegistration/pnfRegistration.robot
csit/tests/sdnr/functional/devicemanager/_templates/21_alarmNotificationVES/alarmNotificationVes.robot
csit/tests/sdnr/functional/devicemanager/_templates/22_alarmNotificationNETCONF/alarmNotificationNetconf.robot
docs/tox.ini

index 0ff3403..8fef610 100755 (executable)
@@ -43,9 +43,9 @@ sdnr_launch
 # SDNC_READY_TIMEOUT=450
 
 # if jenkins should be ok without running robots TCS's
-SDNC_RELEASE_WITHOUT_ROBOT=true
+SDNC_RELEASE_WITHOUT_ROBOT=true
 
 #Pass any variables required by Robot test suites in ROBOT_VARIABLES
 ROBOT_VARIABLES="--variablefile=${WORKSPACE}/plans/sdnr/testdata/localhost.py"
-ROBOT_IMAGE="hightec/sdnc-test-lib:v0.10.2"
+ROBOT_IMAGE="hightec/sdnc-test-lib:v0.11.0"
 
index ed49824..c74d3f1 100644 (file)
@@ -10,7 +10,9 @@ SDNR_PROTOCOL = "http://"
 SDNR_HOST = "127.0.0.1"
 SDNR_PORT = "8181"
 SDNR_USER = "admin"
-SDNR_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+#SDNR_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
+SDNR_PASSWORD = "admin"
+WEBSOCKET_PORT = "8182"
 
 # for odlux gui testing
 WEBDRIVER_PATH = "/usr/local/bin/chromedriver"
index 04d744b..31b8e29 100755 (executable)
@@ -210,7 +210,7 @@ if [[ -z $SDNC_RELEASE_WITHOUT_ROBOT ]] ; then
             python -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
         else
             echo "*** TRACE **** python is running in a container"
-            docker run --net="host" \
+            docker run --rm --net="host" \
             -v ${WORKSPACE}:${WORKSPACE} -v ${WORKDIR}:${WORKDIR} $ROBOT_IMAGE  \
             python3 -B -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
         fi
@@ -222,7 +222,7 @@ if [[ -z $SDNC_RELEASE_WITHOUT_ROBOT ]] ; then
 else
     echo "[WARNING] SDNC_RELEASE_WITHOUT_ROBOT is TRUE "
     echo "[WARNING] Dummy Robot test suite is executed, job remains ok. "
-    docker run --net="host" \
+    docker run --rm --net="host" \
     -v ${WORKSPACE}:${WORKSPACE} -v ${WORKDIR}:${WORKDIR} $ROBOT_IMAGE  \
     python3 -B -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${WORKSPACE}/tests/sdnr/debug/10_dummy.robot
    true
index fbe7421..e75351a 100644 (file)
@@ -20,6 +20,7 @@ SDN_CONTROLLER_PROTOCOL="http"
 SDNR_IP=172.40.0.21
 SDNRPORT=8181
 SDNR_DM=true
+SDNR_WEBSOCKET_PORT=8182
 
 # sdnrdb
 ES_VERSION=7.9.3
@@ -35,7 +36,7 @@ SDNC_WEB_PORT=8282
 
 
 # onap dependent components
-VESC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.8.0
+VESC_IMAGE=nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.10.3
 DMAAP_IMAGE=nexus3.onap.org:10001/onap/dmaap/dmaap-mr:1.1.18
 KAFKA_IMAGE=nexus3.onap.org:10001/onap/dmaap/kafka111:1.0.4
 ZOOKEEPER_IMAGE=nexus3.onap.org:10001/onap/dmaap/zookeeper:6.0.3
index f931450..e4e80a6 100644 (file)
@@ -84,6 +84,9 @@ services:
       - "8443:8443"
     volumes:
       - ./vesc/collector.properties:/opt/app/VESCollector/etc/collector.properties
+      - ./vesc/ves-dmaap-config.json:/opt/app/VESCollector/etc/ves-dmaap-config.json
+      - ./vesc/externalRepo:/opt/app/VESCollector/etc/externalRepo
+
     networks:
       integration:
         ipv4_address: ${VESCOLLECTOR_IP}
index b7c7e7b..6b8d464 100644 (file)
@@ -6,6 +6,7 @@ services:
     ports:
       - "8181:8181"
       - "8101:8101"
+      - "${SDNR_WEBSOCKET_PORT}:${SDNR_WEBSOCKET_PORT}"
 #entrypoint: ["/bin/bash", "/opt/onap/sdnc/bin/startODL.oom.sh"]
     environment:
       - SDNC_CONFIG_DIR=/opt/onap/ccsdk/data/properties
@@ -19,6 +20,7 @@ services:
       - SDNRINIT=true
       - SDNRONLY=true
       - JAVA_OPTS=-Xms256m -Xmx2g
+      - SDNR_WEBSOCKET_PORT=${SDNR_WEBSOCKET_PORT}
     volumes:
       - ./sdnr/mountpoint-registrar.properties:/opt/opendaylight/etc/mountpoint-registrar.properties
       - ./sdnr/certs/certs.properties:${ODL_CERT_DIR}/certs.properties
index df0b562..87802fb 100644 (file)
@@ -1,43 +1,44 @@
 [general]
-dmaapEnabled=true
 baseUrl=http://localhost:8181
 sdnrUser=admin
 sdnrPasswd=${ODL_ADMIN_PASSWORD}
 
+[strimzi-kafka]
+strimziEnabled=true
+bootstrapServers=kafka:9092
+securityProtocol=PLAINTEXT
+saslMechanism=PLAIN
+saslJaasConfig=PLAIN
+
+
 [fault]
-TransportType=HTTPNOAUTH
-Protocol=http
-username=${DMAAP_FAULT_TOPIC_USERNAME}
-password=${DMAAP_FAULT_TOPIC_PASSWORD}
-host=onap-dmaap:3904
 topic=unauthenticated.SEC_FAULT_OUTPUT
-contenttype=application/json
-group=myG
-id=C1
+consumerGroup=myG
+consumerID=C1
+timeout=20000
+limit=10000
+fetchPause=5000
+
+[provisioning]
+topic=unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT
+consumerGroup=myG
+consumerID=C1
 timeout=20000
 limit=10000
 fetchPause=5000
-jersey.config.client.readTimeout=25000
-jersey.config.client.connectTimeout=25000
-jersey.config.client.proxy.username=${HTTP_PROXY_USERNAME}
-jersey.config.client.proxy.password=${HTTP_PROXY_PASSWORD}
-jersey.config.client.proxy.uri=${HTTP_PROXY_URI}
 
 [pnfRegistration]
-TransportType=HTTPNOAUTH
-Protocol=http
-username=${DMAAP_PNFREG_TOPIC_USERNAME}
-password=${DMAAP_PNFREG_TOPIC_PASSWORD}
-host=onap-dmaap:3904
 topic=unauthenticated.VES_PNFREG_OUTPUT
-contenttype=application/json
-group=myG
-id=C1
+consumerGroup=myG
+consumerID=C1
+timeout=20000
+limit=10000
+fetchPause=5000
+
+[stndDefinedFault]
+topic=unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT
+consumerGroup=myG
+consumerID=C1
 timeout=20000
 limit=10000
 fetchPause=5000
-jersey.config.client.readTimeout=25000
-jersey.config.client.connectTimeout=25000
-jersey.config.client.proxy.username=${HTTP_PROXY_USERNAME}
-jersey.config.client.proxy.password=${HTTP_PROXY_PASSWORD}
-jersey.config.client.proxy.uri=${HTTP_PROXY_URI}
\ No newline at end of file
index fd9bce5..fff480c 100644 (file)
@@ -6,8 +6,6 @@
 ##
 ###############################################################################
 ##
-###############################################################################
-##
 ## HTTP(S) service
 ##
 ##      Normally:
@@ -19,6 +17,7 @@
 ##
 ##
 #collector.service.port=8080
+
 ## Authentication is only supported via secure port
 ## When enabled - require valid keystore defined
 collector.service.secure.port=8443
@@ -51,14 +50,27 @@ collector.truststore.passwordfile=etc/trustpasswordfile
 collector.schema.checkflag=1
 collector.schema.file={\"v1\":\"./etc/CommonEventFormat_27.2.json\",\"v2\":\"./etc/CommonEventFormat_27.2.json\",\"v3\":\"./etc/CommonEventFormat_27.2.json\",\"v4\":\"./etc/CommonEventFormat_27.2.json\",\"v5\":\"./etc/CommonEventFormat_28.4.1.json\",\"v7\":\"./etc/CommonEventFormat_30.2.1_ONAP.json\"}
 
+## Schema StndDefinedFields Validation checkflag
+## default no validation checkflag (-1)
+## If enabled (1) - schema files locations must be specified, mapping file path must be specified, schema reference path
+## in event json must be specified, path to stndDefined data field in event json must be specified
+collector.externalSchema.checkflag=1
+collector.externalSchema.schemasLocation=etc/externalRepo/
+collector.externalSchema.mappingFileLocation=etc/externalRepo/schema-map.json
+event.externalSchema.schemaRefPath=$.event.stndDefinedFields.schemaReference
+event.externalSchema.stndDefinedDataPath=$.event.stndDefinedFields.data
+
 ## List all streamid per domain to be supported. The streamid should match to channel name on dmaapfile
-collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration
-collector.dmaapfile=./etc/DmaapConfig.json
+collector.dmaap.streamid=fault=ves-fault|syslog=ves-syslog|heartbeat=ves-heartbeat|measurementsForVfScaling=ves-measurement|mobileFlow=ves-mobileflow|other=ves-other|stateChange=ves-statechange|thresholdCrossingAlert=ves-thresholdCrossingAlert|voiceQuality=ves-voicequality|sipSignaling=ves-sipsignaling|notification=ves-notification|pnfRegistration=ves-pnfRegistration|3GPP-FaultSupervision=ves-3gpp-fault-supervision|3GPP-Heartbeat=ves-3gpp-heartbeat|3GPP-Provisioning=ves-3gpp-provisioning|3GPP-PerformanceAssurance=ves-3gpp-performance-assurance|o-ran-sc-du-hello-world-pm-streaming-oas3=ves-o-ran-sc-du-hello-world-pm-streaming-oas3|o1-notify-pnf-registration=ves-o1-notify-pnf-registration
+collector.dmaapfile=etc/ves-dmaap-config.json
+
+## Path to the file containing description of api versions
+collector.description.api.version.location=etc/api_version_description.json
 
 ## Event transformation Flag - when set expects configurable transformation
 ## defined under ./etc/eventTransform.json
 ## Enabled by default; to disable set to 0
-event.transform.flag=1
+event.transform.flag=0
 
 # Describes at what frequency (measured in minutes) should application try to fetch config from CBS
 collector.dynamic.config.update.frequency=5
diff --git a/csit/scripts/sdnr/docker-compose/vesc/ves-dmaap-config.json b/csit/scripts/sdnr/docker-compose/vesc/ves-dmaap-config.json
new file mode 100644 (file)
index 0000000..c928ee5
--- /dev/null
@@ -0,0 +1,42 @@
+{
+    "ves-pnfRegistration": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.VES_PNFREG_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-3gpp-fault-supervision": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.SEC_3GPP_FAULTSUPERVISION_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-notification": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.VES_NOTIFICATION_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-3gpp-heartbeat": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.SEC_3GPP_HEARTBEAT_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-3gpp-performance-assurance": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.SEC_3GPP_PERFORMANCEASSURANCE_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-3gpp-provisioning": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.SEC_3GPP_PROVISIONING_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-fault": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.SEC_FAULT_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-heartbeat": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.SEC_HEARTBEAT_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-other": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.SEC_OTHER_OUTPUT"},
+        "type": "message_router"
+    },
+    "ves-measurement": {
+        "dmaap_info": {"topic_url": "http://onap-dmaap:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT"},
+        "type": "message_router"
+    }
+}
index be94102..885e195 100644 (file)
@@ -63,7 +63,6 @@ Add network element connection
                                                                      ...  status=Connected
                                                                      ...  host=${HOST}
                                                                      ...  port=${PORT}
-                                                                     ...  core-model-capability=${CORE_MODEL}
                                                                      ...  device-type=${DEVICE_TYPE_GUI}
   # Check connection status log entries
   Sleep  1s  reason=insert time gap to avoid time constrains
@@ -72,8 +71,9 @@ Add network element connection
   Log  ${connection_status_list}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  1  msg=wrong connection log entries for Connected state
-  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  1    msg=wrong connection log entries for Mounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  ${1}
+  ...  msg=wrong connection log entries for Connected state
+  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  ${1}    msg=wrong connection log entries for Mounted state
 
 Retrieve yang capabilities from network element
   [Documentation]  get yang capabilities from network element  and compare with reference file
@@ -111,7 +111,7 @@ Remove network element connection
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  1    msg=wrong connection log entries for Unmounted state
+  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  ${1}    msg=wrong connection log entries for Unmounted state
 
 Add network element connection wrong port
   [Tags]  prio2
@@ -141,7 +141,7 @@ Add network element connection wrong port
   ${connection_status_list_debug_backend} =  FaultManagementAppBackend.get_connection_log_list  node-id=${DEVICE_NAME_TEST}
                                                                      ...  timestamp=>=${start_time}
   Log  ${connection_status_list_debug_backend}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  1  msg=wrong connection log entries for Mounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  ${1}  msg=wrong connection log entries for Mounted state
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connected
   Dictionary Should Not Contain Key  ${conn_status_list_stats}  Unmounted
 
@@ -167,7 +167,7 @@ Remove network element connection wrong port
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  1  msg=wrong connection log entries for Unmounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  ${1}  msg=wrong connection log entries for Unmounted state
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connected
   Dictionary Should Not Contain Key  ${conn_status_list_stats}  Mounted
 
@@ -199,7 +199,7 @@ Add network element connection wrong ip
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  1  msg=wrong connection log entries for Mounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  ${1}  msg=wrong connection log entries for Mounted state
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connected
   Dictionary Should Not Contain Key  ${conn_status_list_stats}  Unmounted
 
@@ -225,7 +225,7 @@ Remove network element connection wrong ip
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  1  msg=wrong connection log entries for Unmounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  ${1}  msg=wrong connection log entries for Unmounted state
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connected
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Mounted
 
@@ -259,8 +259,8 @@ Add network element connection and change is required to false
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  1  msg=wrong connection log entries for Connected state
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  1    msg=wrong connection log entries for Mounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  ${1}  msg=wrong connection log entries for Connected state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  ${1}    msg=wrong connection log entries for Mounted state
 
 Edit network element connection: is required to true
   [Tags]  prio2
@@ -311,7 +311,7 @@ Unmount network element
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  1    msg=wrong connection log entries for Unmounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  ${1}    msg=wrong connection log entries for Unmounted state
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connected
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Mounted
   #Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connecting
@@ -339,8 +339,8 @@ Mount network element
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  1  msg=wrong connection log entries for Connected state
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  1    msg=wrong connection log entries for Mounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  ${1}  msg=wrong connection log entries for Connected state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  ${1}    msg=wrong connection log entries for Mounted state
 
 Mount Nts Network Function with VALID TLS Key ID
   IF    'DOCKER_TLS_PORT' in ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']}
@@ -377,7 +377,7 @@ Remove network element connection
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  1    msg=wrong connection log entries for Unmounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  ${1}    msg=wrong connection log entries for Unmounted state
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connected
   Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Mounted
   #Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connecting
@@ -412,8 +412,84 @@ Remove unmounted network element connection
   Log  ${connection_status_list_debug_backend}
   ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
   Log Dictionary  ${conn_status_list_stats}
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  1    msg=wrong connection log entries for Mounted state
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  1    msg=wrong connection log entries for Connected state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  ${1}    msg=wrong connection log entries for Mounted state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  ${1}    msg=wrong connection log entries for Connected state
   Run Keyword And Continue On Failure  Dictionary Should Contain Key  ${conn_status_list_stats}  Unmounted  msg=no connection log entries for Unmounted state
   ConnectApp.Remove Network Element Connection    ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
 
+Add network element connection and remount
+  [Tags]  smoke
+  Sleep  1s  reason=insert time gap in log files
+  ${start_time} =  Get Current Date  time_zone=UTC  result_format=%Y-%m-%dT%H:%M:%S.%f
+  Sleep  1s  reason=insert time delay to account for time differences of container and host
+  Set Test Variable  ${DEVICE_NAME_TEST}  ${DEVICE_NAME}-remount
+  Log To Console  ${start_time}
+  ConnectApp.Add network element connection    device_name=${DEVICE_NAME_TEST}    is_required=${True}
+  ...  host=${HOST}    port=${PORT}    username=${USERNAME}    password=${PASSWORD}
+  Run Keyword And Continue On Failure  ConnectApp.Should Be Equal connection status until time  ${DEVICE_NAME_TEST}  Connected
+  SDNCRestconfLibrary.should_be_equal_connection_status_until_time  ${DEVICE_NAME_TEST}  connected  time_in_sec=${10}
+  Run Keyword And Continue On Failure  ConnectApp.should_be_equal_network_element_connection_details  ${DEVICE_NAME_TEST}
+                                                                     ...  node-id=${DEVICE_NAME_TEST}
+                                                                     ...  is-required=${True}
+                                                                     ...  status=Connected
+                                                                     ...  host=${HOST}
+                                                                     ...  port=${PORT}
+                                                                     ...  device-type=${DEVICE_TYPE_GUI}
+  # Check connection status log entries
+  Sleep  1s  reason=insert time gap to avoid time constrains
+  ${connection_status_list} =  FaultManagementApp.get_connection_log_list  node-id=${DEVICE_NAME_TEST}
+                                                                     ...   timestamp=>=${start_time}
+  Log  ${connection_status_list}
+  ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
+  Log Dictionary  ${conn_status_list_stats}
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  ${1}  msg=wrong connection log entries for Connected state
+  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  ${1}    msg=wrong connection log entries for Mounted state
+
+  Sleep  1s  reason=insert time gap in log files
+  ${start_time} =  Get Current Date  time_zone=UTC  result_format=%Y-%m-%dT%H:%M:%S.%f
+  Sleep  1s  reason=insert time delay to account for time differences of container and host
+  # perform a mount on a alredy connected device
+  ConnectApp.mount_network_element  ${DEVICE_NAME_TEST}
+  Run Keyword And Continue On Failure  ConnectApp.Should Be Equal connection status until time  ${DEVICE_NAME_TEST}  Connected
+  Run Keyword And Continue On Failure  SDNCRestconfLibrary.should_be_equal_connection_status_until_time  ${DEVICE_NAME_TEST}  connected  time_in_sec=${10}
+
+  # Check connection status log entries
+  Sleep  1s  reason=insert time gap to avoid time constrains
+  ${connection_status_list} =  FaultManagementApp.get_connection_log_list  node-id=${DEVICE_NAME_TEST}
+                                                                     ...   timestamp=>=${start_time}
+  Log  ${connection_status_list}
+  ${connection_status_list_debug} =  FaultManagementApp.get_connection_log_list  node-id=${DEVICE_NAME_TEST}
+  Log  ${connection_status_list_debug}
+  ${connection_status_list_debug_backend} =  FaultManagementAppBackend.get_connection_log_list  node-id=${DEVICE_NAME_TEST}
+                                                                     ...  timestamp=>=${start_time}
+  Log  ${connection_status_list_debug_backend}
+  ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
+  Log Dictionary  ${conn_status_list_stats}
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Connected  ${1}  msg=wrong connection log entries for Connected state
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Mounted  ${1}    msg=wrong connection log entries for Mounted state
+
+Remove remounted network element connection
+  [Tags]  smoke
+  Sleep  3s  reason=insert time gap in log files
+  ${start_time} =  Get Current Date  time_zone=UTC  result_format=%Y-%m-%dT%H:%M:%S.%f
+  Sleep  3s  reason=insert time delay to account for time differences of container and host
+  Set Test Variable  ${DEVICE_NAME_TEST}  ${DEVICE_NAME}-remount
+  ConnectApp.Remove network element connection  ${DEVICE_NAME_TEST}
+  Run Keyword And Continue On Failure  ConnectApp.Should be equal connection status until time  ${DEVICE_NAME_TEST}  not existing
+  Run Keyword And Continue On Failure  SDNCRestconfLibrary.should_be_equal_connection_status_until_time  ${DEVICE_NAME_TEST}  not existing  time_in_sec=${10}
+
+  # Check connection status log entries
+  Sleep  1s  reason=insert time gap to avoid time constrains
+  ${connection_status_list} =  FaultManagementApp.get_connection_log_list  node-id=${DEVICE_NAME_TEST}
+                                                                     ...   timestamp=>=${start_time}
+  Log  ${connection_status_list}
+  ${connection_status_list_debug} =  FaultManagementApp.get_connection_log_list  node-id=${DEVICE_NAME_TEST}
+  Log  ${connection_status_list_debug}
+  ${connection_status_list_debug_backend} =  FaultManagementAppBackend.get_connection_log_list  node-id=${DEVICE_NAME_TEST}
+                                                                     ...  timestamp=>=${start_time}
+  Log  ${connection_status_list_debug_backend}
+  ${conn_status_list_stats} =  get_counts_from_list  ${connection_status_list}  status
+  Log Dictionary  ${conn_status_list_stats}
+  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${conn_status_list_stats}  Unmounted  ${1}  msg=wrong connection log entries for Unmounted state
+  Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Connected
+  Run Keyword And Continue On Failure  Dictionary Should Not Contain Key  ${conn_status_list_stats}  Mounted
\ No newline at end of file
index 669ceb0..6adf5f1 100644 (file)
@@ -40,7 +40,7 @@ Start pnf ves registration from NTS function
   [Documentation]  scales number of simulated devices per device type to '0'
   ...              set details for VES endpoint
   ...              scales number of simulated devices per device type
-  Stop Network Function Feature    ${NETWORK_FUNCTIONS['O_RAN_FH']['NAME']}    ves-pnf-registration
+  Stop Network Function Feature    ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}    ves-pnf-registration  # stopping feature not necessary
   NTSimManagerNG.set_ves_endpoint_details_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
   ...  ves-endpoint-protocol=${VESCOLLECTOR}[SCHEME]
   ...  ves-endpoint-ip=${VESCOLLECTOR}[IP]
@@ -48,7 +48,7 @@ Start pnf ves registration from NTS function
   ...  ves-endpoint-auth-method=${VESCOLLECTOR}[AUTHMETHOD]
   ...  ves-endpoint-username=${VESCOLLECTOR}[USERNAME]
   ...  ves-endpoint-password=${VESCOLLECTOR}[PASSWORD]
-  Start Network Function Feature    ${NETWORK_FUNCTIONS['O_RAN_FH']['NAME']}    ves-pnf-registration
+  Start Network Function Feature    ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}    ves-pnf-registration
   NTSimManagerNG.set_ves_config_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
   ...  pnf-registration=${True}
   sleep  10s  reason=Wait before start network function
@@ -76,7 +76,6 @@ Verify connection status SSH
                                                                      ...  is-required=${False}
                                                                      ...  status=Connected
                                                                      ...  port=${port}
-                                                                     ...  core-model-capability=${CORE_MODEL}
                                                                      ...  device-type=${DEVICE_TYPE_GUI}
   END
 
@@ -99,18 +98,17 @@ Verify connection status TLS
                                                                      ...  is-required=${False}
                                                                      ...  status=Connected
                                                                      ...  port=${port}
-                                                                     ...  core-model-capability=${CORE_MODEL}
                                                                      ...  device-type=${DEVICE_TYPE_GUI}
   END
 
 Remove all networkelement connections
   [Documentation]  Delete all network element connections, should not fail if the connection is not there
   [Tags]  restconf  dm-lifecycle
-  Stop Network Function Feature    ${NETWORK_FUNCTIONS['O_RAN_FH']['NAME']}    ves-pnf-registration
+  Stop Network Function Feature    ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}    ves-pnf-registration
   @{pnf_list}=  NTSimManagerNG.get_simulated_pnfs_nf  ${DEVICE_TYPE}
   FOR    ${device}    IN    @{pnf_list}
     ${node_id}=  set variable  ${device["node-id"]}
-    Run Keyword And Ignore Error  ConnectApp.remove network element connection filtered  validate=${True}  node-id=${node_id}
+    Run Keyword And Ignore Error  ConnectApp.remove network element connection filtered  node-id=${node_id}
   END
   NTSimManagerNG.set_ves_config_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
   ...  pnf-registration=${False}
index 842a3d8..7b4574d 100644 (file)
@@ -24,7 +24,7 @@ Suite Teardown  global suite teardown
 
 *** Variables ***
 ${DEVICE_TYPE}  _FILL_HERE_
-${FAULT_DELAY}  5
+${FAULT_DELAY}  10
 ${TIME_PERIOD_SEND_NOTIFY}  22s
 ${PROCESS_TIME_NOTIF}  30s
 &{ALARM_SEVERITY_DEFAULT}  Critical=${0}  Major=${0}  Minor=${0}  Warning=${0}  NonAlarmed=${0}
@@ -52,7 +52,7 @@ Set alarm notification
   ${alarm_status_start} =  FaultManagementApp.get_alarm_status
   Set Global Variable  ${alarm_status_start}
   NTSimManagerNG.set_fault_delay_list_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  delay-period=${fault_delay}
-  Log  Send notification every ${FAULT_DELAY} sec for ${TIME_PERIOD_SEND_NOTIFY}  level=INFO  html=False  console=True  repr=False
+  Log  Send notification every ${FAULT_DELAY} sec for ${TIME_PERIOD_SEND_NOTIFY}  level=INFO  console=True
   Sleep  ${TIME_PERIOD_SEND_NOTIFY}
 
 UnSet alarm notification
@@ -62,7 +62,7 @@ UnSet alarm notification
   NTSimManagerNG.set_fault_delay_list_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  delay-period=${0}
   #NTSimManagerNG.set_ves_config_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
   #...                            faults-enabled=${False}
-  Log  Wait ${PROCESS_TIME_NOTIF} to process notifications  level=INFO  html=False  console=True  repr=False
+  Log  Wait ${PROCESS_TIME_NOTIF} to process notifications  level=INFO  console=True
   Sleep  ${PROCESS_TIME_NOTIF}
   # get generated alarms
   ${vesAlarmGenerated} =  NTSimManagerNG.Get Alarm Count  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
@@ -92,11 +92,11 @@ Verify alarm log
                                                           ...   timestamp=>=${start_time}
                                                           ...   node-id=${device}
     ${alarm_log_list_stats} =  get_counts_from_list  ${alarm_log_list}  severity  ${ALARM_SEVERITY_DEFAULT}
-    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Critical    ${vesAlarmGenerated}[critical]
-    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Major       ${vesAlarmGenerated}[major]
-    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Minor       ${vesAlarmGenerated}[minor]
-    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Warning     ${vesAlarmGenerated}[warning]
-    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  NonAlarmed  ${vesAlarmGenerated}[normal]
+    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Critical    ${vesAlarmGenerated}[critical]  msg=Value of dictionary key 'Critical' does not match not match expected value '${vesAlarmGenerated}[critical]'. Current: ${alarm_log_list_stats["Critical"]}
+    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Major       ${vesAlarmGenerated}[major]  msg=Value of dictionary key 'Critical' does not match not match expected value '${vesAlarmGenerated}[major]'. Current: ${alarm_log_list_stats["Major"]}
+    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Minor       ${vesAlarmGenerated}[minor]  msg=Value of dictionary key 'Critical' does not match not match expected value '${vesAlarmGenerated}[minor]'. Current: ${alarm_log_list_stats["Minor"]}
+    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Warning     ${vesAlarmGenerated}[warning]  msg=Value of dictionary key 'Critical' does not match not match expected value '${vesAlarmGenerated}[warning]'. Current: ${alarm_log_list_stats["Warning"]}
+    Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  NonAlarmed  ${vesAlarmGenerated}[normal]  msg=Value of dictionary key 'Critical' does not match not match expected value '${vesAlarmGenerated}[normal]'. Current: ${alarm_log_list_stats["NonAlarmed"]}
   END
 
 Verify current problem list
index b0b8f0e..460a7d7 100644 (file)
@@ -34,7 +34,7 @@ ${USERNAME_NOK}  wrong-username
 ${PASSWORD_NOK}  wrong-password
 ${CORE_MODEL}  Unsupported
 ${UNDEFINED}  undefined
-${FAULT_DELAY}  5
+${FAULT_DELAY}  10
 ${TIME_PERIOD_SEND_NOTIF}  22s
 &{ALARM_SEVERITY_DEFAULT}  Critical=${0}  Major=${0}  Minor=${0}  Warning=${0}  NonAlarmed=${0}
 
@@ -64,16 +64,16 @@ Set alarm notification
   Set Global Variable  ${alarm_status_start}
   NTSimManagerNG.set_fault_delay_list_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  delay-period=${fault_delay}
 
-  Log  Send notification every ${FAULT_DELAY} sec for ${TIME_PERIOD_SEND_NOTIF}  level=INFO  html=False  console=True  repr=False
+  Log  Send notification every ${FAULT_DELAY} sec for ${TIME_PERIOD_SEND_NOTIF}  level=INFO  console=True
   Sleep  ${TIME_PERIOD_SEND_NOTIF}
 
 UnSet alarm notification
   [Documentation]  stops alarm generation and create dictionary ${netconfAlarmGenerated}
   ...              for further checks
   [Tags]  smoke
-  ${netconfAlarmGenerated} =   NTSimManagerNG.Get Alarm Count    ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
   NTSimManagerNG.set_fault_delay_list_nf  ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  delay-period=${0}
   NTSimManagerNG.Set Netconf Config Nf    ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}  faults-enabled=${False}
+  ${netconfAlarmGenerated} =   NTSimManagerNG.Get Alarm Count    ${NETWORK_FUNCTIONS['${DEVICE_TYPE}']['NAME']}
   # get generated alarms
   ${alarmsGenerated} =         Get Dictionary Values   ${netconfAlarmGenerated}
   Log  ${alarmsGenerated}
@@ -97,11 +97,24 @@ Verify alarm log
                                                         ...   timestamp=>=${start_time}
   Log  ${alarm_log_list_debug_backend}
 
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Critical    ${netconfAlarmGenerated}[critical]
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Major       ${netconfAlarmGenerated}[major]
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Minor       ${netconfAlarmGenerated}[minor]
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  Warning     ${netconfAlarmGenerated}[warning]
-  Run Keyword And Continue On Failure  Dictionary Should Contain Item  ${alarm_log_list_stats}  NonAlarmed  ${netconfAlarmGenerated}[normal]
+  ${critical_count}    Set Variable    ${alarm_log_list_stats}[Critical]
+  ${major_count}       Set Variable    ${alarm_log_list_stats}[Major]
+  ${minor_count}       Set Variable    ${alarm_log_list_stats}[Minor]
+  ${warning_count}     Set Variable    ${alarm_log_list_stats}[Warning]
+  ${nonalarmed_count}  Set Variable    ${alarm_log_list_stats}[NonAlarmed]
+
+  ${netconf_critical_count}    Set Variable    ${netconfAlarmGenerated}[critical]
+  ${netconf_major_count}       Set Variable    ${netconfAlarmGenerated}[major]
+  ${netconf_minor_count}       Set Variable    ${netconfAlarmGenerated}[minor]
+  ${netconf_warning_count}     Set Variable    ${netconfAlarmGenerated}[warning]
+  ${netconf_nonalarmed_count}  Set Variable    ${netconfAlarmGenerated}[normal]
+
+  Should Be True    ${critical_count} >= ${netconf_critical_count}
+  Should Be True    ${major_count} >= ${netconf_major_count}
+  Should Be True    ${minor_count} >= ${netconf_minor_count}
+  Should Be True    ${warning_count} >= ${netconf_warning_count}
+  Should Be True    ${nonalarmed_count} >= ${netconf_nonalarmed_count}
+
 
 Verify current problem list
   [Tags]  smoke
index 1110b0b..0465b38 100644 (file)
@@ -12,7 +12,7 @@ deps =
 commands =
     sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./ {toxinidir}/_build/html
     echo "Generated docs available in {toxinidir}/_build/html"
-whitelist_externals =
+allowlist_externals =
     echo
     git
     sh
@@ -22,7 +22,7 @@ basepython = python3.8
 #deps = -r{toxinidir}/requirements-docs.txt
 commands = echo "Link Checking not enforced"
 #commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./ {toxinidir}/_build/linkcheck
-whitelist_externals = echo
+allowlist_externals = echo
 
 [testenv:docs-spellcheck]
 basepython = python3.8