source ${WORKSPACE}/scripts/sdnr/sdnr-launch.sh
onap_dependent_components_launch
nts_networkfunctions_launch ${WORKSPACE}/plans/sdnr/testdata/nts-networkfunctions.csv
-sdnr_launch
+sdnr_web_launch
## environment for SDNC/R specific robot test runs
## Ready state will be checked every SDNC_READY_RETRY_PERIOD seconds
#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.11.0"
+ROBOT_DEBUG_LEVEL=DEBUG # INFO or DEBUG
+
+ROBOT_VARIABLES="--variablefile=${WORKSPACE}/plans/sdnr/testdata/localhost.py -L ${ROBOT_DEBUG_LEVEL}"
+ROBOT_IMAGE="hightec/sdnc-test-lib:v0.12.0"
## Access SDNR cluster
SDNR_PROTOCOL = "http://"
SDNR_HOST = "127.0.0.1"
-SDNR_PORT = "8181"
+SDNR_PORT = "8282"
SDNR_USER = "admin"
#SDNR_PASSWORD = "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
SDNR_PASSWORD = "admin"
WEBSOCKET_PORT = "8182"
+RELEASE_VERSION="argon" # expected opendaylight version
+
# for odlux gui testing
WEBDRIVER_PATH = "/usr/local/bin/chromedriver"
-# Access to elastic search SDNRDB
-SDNRDB = {'PROTOCOL': 'http', 'IP': '127.0.0.1', 'PORT': '8181', 'USE_API_GATEWAY': True, 'USE_SSL': False,
- 'VERIFY_CERTS': False}
-# elastic DB to store statistic datas
-ELASTIC_LOG_DB = SDNRDB
+# sdnrdb is based on mariaDB
+
+USE_MARIA_DB=True
+MARIADB = {'IP': SDNR_HOST, 'PORT': 3306}
+
RESTCONF_TIMEOUT = '90 s'
# Restconf response time longer than VALID_RESPONSE_TIME in s will be notified as warning in the robot logs
VALID_RESPONSE_TIME = 5
## To skip sdnr robot test suite
## set in .setup.sh SDNC_RELEASE_WITHOUT_ROBOT=true
-# sdnr/healthcheck
+sdnr/healthcheck
sdnr/functional
+sdnr/odlux
docker run --rm --net="host" \
--env-file ${WORKSPACE}/sdnc-csit-robot.env \
-v ${WORKSPACE}:${WORKSPACE} -v ${WORKDIR}:${WORKDIR} $ROBOT_IMAGE \
- python3 -B -m robot.run -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
+ python3 -B -m robot -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${SUITES}
fi
else
echo "[INFO] Skip Robot test suite, because SDNC is not in ready state"
echo "[WARNING] Dummy Robot test suite is executed, job remains ok. "
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
+ python3 -B -m robot -N ${TESTPLAN} -v WORKSPACE:/tmp --outputdir ${WORKDIR} ${ROBOT_VARIABLES} ${TESTOPTIONS} ${WORKSPACE}/tests/sdnr/debug/10_dummy.robot
true
fi
RESULT=$?
sdnr:
environment:
- SDNRDM="true"
- topology-api:
- image: ${TOPOLOGY_DOCKER_REPO}/${TOPOLOGY_DOCKER_IMAGE_NAME}:${TOPOLOGY_DOCKER_IMAGE_TAG}
- container_name: topology-api
- ports:
- - "3001:3001"
- environment:
- - AUTH_ENABLED=${AUTH_ENABLED}
- - AUTH_HOST_URL=${IDENTITY_PROVIDER_URL}
- # - AUTH_CONFIG_FILE
- - PROVIDERS=${TOPOLOGY_PROVIDERS}
- - LOAD_PACKAGES=${LOAD_PACKAGES}
- depends_on:
- - sdnr
- networks:
- integration:
- ipv4_address: ${TOPOLOGY_IP}
sdnr-web:
image: ${NEXUS_DOCKER_WEB_IMAGE_NAME}:${NEXUS_DOCKER_IMAGE_TAG}
container_name: sdnr-web
- SDNRPROTOCOL=HTTP
- SDNRHOST=sdnr
- SDNRPORT=${SDNRPORT}
- - TOPOURL=${TOPOURL}
- - TILEURL=${TILEURL}
depends_on:
- - topology-api
- sdnr
command: ["/wait-for-sdnc.sh", "sdnr:${SDNRPORT}/ready", "/opt/bitnami/nginx/sbin/run.sh"]
volumes:
--- /dev/null
+#!/bin/sh
+# wait-for-sdnc.sh
+# *******************************************************************************
+# * ============LICENSE_START========================================================================
+# * Copyright (C) 2023 highstreet technologies GmbH Intellectual Property. All rights reserved.
+# * =================================================================================================
+# * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
+# * in compliance with the License. You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software distributed under the License
+# * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+# * or implied. See the License for the specific language governing permissions and limitations under
+# * the License.
+# * ============LICENSE_END==========================================================================
+set -e
+
+url="$1"
+shift
+cmd="$@"
+
+while [ "$(curl -s -o /dev/null -w ''%{http_code}'' $url)" != "200" ]; do
+ >&2 echo "sdnc is not ready - sleeping"
+ sleep 1
+done
+
+>&2 echo "sdnc is up - executing command"
+exec $cmd
+
Library ConnectLibrary
Library SDNCBaseLibrary
Library Collections
-Library ElasticSearchLibrary
+Library SDNRDBLib
Library ConnectApp
Library RequestsLibrary
*** Variables ***
&{headers} Content-Type=application/json Authorization=Basic
-
*** Test Cases ***
Test Is SDNR Node Available
${server_status}= Server Is Ready
Test Is SDNRDB Initialized
${res}= Check Aliases
- Log ${res} level=INFO html=False console=False repr=False
+ Log ${res} level=INFO
Test Is VES Collector available
# curl -k -u sample1:sample1 https://172.40.0.1:8443
Should Be Equal As Strings ${resp.status_code} 200
RequestsLibrary.Delete All Sessions
+Test Version Info Contains Correct release
+ ${VERSION_INFO_DICT}= get_version_info_as_dict
+ ${release}= Get From Dictionary ${VERSION_INFO_DICT["""version-info"""]} Opendaylight-release
+ Should Contain ${release} ${RELEASE_VERSION}
+
--- /dev/null
+*** Settings ***
+Documentation Test to verify the existence and functionality of the ODLUX Side-Bar Elements.
+ ... Opens ODLUX and clicks on each Side-Bar Element (Data-driven), given in the SIDE_BAR_ELEMENT
+ ... column. Once clicking on the Side-Bar Element has been successful, a clickable web-element
+ ... given by the locator in the CHECK_CLICKABLE_BUTTON_VALUE column, will be checked for existence.
+ ... The web-element's By strategy to find the element, given by the CHECK_CLICKABLE_BUTTON_BY column,
+ ... (either Xpath or CSS_SELECTOR) has to be provided and is depended on the variable locator.
+ ... The test will Pass if both the Side-Bar Element and the clickable web-element exist, else Fail.
+Library UILib
+Library Collections
+
+Test Template Check Side Bar Elements
+
+*** Variables ***
+${MAKE_SCREENSHOTS} ${True}
+${ELEMENT_COUNT} ${0}
+
+*** Test Cases *** SIDE_BAR_ELEMENT CHECK_WEBELEMENT_BY CHECK_WEBELEMENT_VALUE CLICK_ON_WEB_ELEMET
+Check if Side Bar Element Home exists Home CSS_SELECTOR ODLUX_WELCOME_TO_ODLUX_LABEL False
+Check if Side Bar Element Connect exists Connect CSS_SELECTOR ODLUX_NETWORK_ELEMENTS_LIST_TAB_LABEL False
+Check if Side Bar Element Fault exists Fault CSS_SELECTOR ODLUX_CURRENT_ALARMS_TABLE_LABEL False
+Check if Side Bar Element Maintenance exists Maintenance CSS_SELECTOR ODLUX_MAINTENANCE_TABLE_FILTER_LIST_BUTTON_LABEL False
+Check if Side Bar Element Configuration exists Configuration CSS_SELECTOR ODLUX_TABLE_FILTER_LIST_BUTTON_LABEL False
+Check if Side Bar Element Performance exists Performance CSS_SELECTOR ODLUX_PERFORMANCE_TABLE_FILTER_LIST_BUTTON_LABEL False
+Check if Side Bar Element Inventory exists Inventory CSS_SELECTOR ODLUX_INVENTORY_TABLE_LABEL False
+Check if Side Bar Element Event_Log exists Event_Log CSS_SELECTOR ODLUX_EVENT_LOG_TABLE_FILTER_LIST_BUTTON_LABEL False
+Check if Side Bar Element Help exists Help CSS_SELECTOR ODLUX_HELP_AND_FAQ_LABEL False
+Check if Side Bar Element About exists About CSS_SELECTOR ODLUX_ABOUT_COPY_TO_CLIPBOARD_LABEL False
+
+Sidebar Elements Count
+ [Template] Check Side Bar Elements Count
+ ${ELEMENT_COUNT}
+
+*** Keywords ***
+Check Side Bar Elements
+ [Arguments] ${side_bar_element} ${check_webelement_by} ${check_webelement_value} ${click_on_web_element}
+ ${ELEMENT_COUNT}= Set Variable ${${ELEMENT_COUNT}+${1}}
+ Set Suite Variable ${ELEMENT_COUNT}
+ Refresh Current Browser Tab
+ Log ${side_bar_element}
+ UILib.Click On Site Bar Element side_bar_element=${side_bar_element}
+ ${is_exist}= Check If Web Element Exists by=${check_webelement_by} value=${check_webelement_value}
+ ... click_on_web_element=${click_on_web_element}
+ Should Be True ${is_exist}
+
+Check Sidebar Elements Count
+ [Arguments] ${elements_count}
+ ${sidebar_elements}= Get All Sidebar Elements
+ Log ${sidebar_elements}
+ ${current_sidebar_elements_count}= Get Length ${sidebar_elements}
+ Should Be Equal As Integers ${elements_count} ${current_sidebar_elements_count}
+
+
--- /dev/null
+../../functional/devicemanager/_templates/10_lifecycleNetconfSsh
\ No newline at end of file
--- /dev/null
+../../functional/devicemanager/_templates/22_alarmNotificationNETCONF
\ No newline at end of file
--- /dev/null
+../../functional/devicemanager/_templates/90_resetSimulatedDevices/
\ No newline at end of file
--- /dev/null
+*** Settings ***
+Documentation Test suite for onf core 1.4 devices via odlux
+Suite Setup My Setup
+Force Tags onf-core-14
+Library OperatingSystem
+
+*** Variables ***
+
+
+*** Keywords ***
+My Setup
+ Set Suite Variable ${USE_SELENIUM} ${True}
+ Set Suite Variable ${DEVICE_TYPE} ONF_CORE_1_4 children=true
+ Set Suite Variable ${CORE_MODEL} 2019-11-27 children=true
+ Set Suite Variable ${DEVICE_TYPE_GUI} Wireless children=true
+ ${yang_file} = Get File ${CURDIR}/yangCapabilities.txt
+ Set Suite Variable ${YANG_CAPABILITIES_FILE} ${yang_file} children=true
+ Set Suite Variable ${IS_SUPERVISION_ALARM} ${True}
+
+
--- /dev/null
+[["ethernet-container-2-0", "2020-01-21"],
+ ["ietf-crypto-types", "2019-07-02"],
+ ["ietf-netconf-notifications", "2012-02-06"],
+ ["ietf-yang-types", "2013-07-15"],
+ ["vlan-fd-1-0", "2021-01-05"],
+ ["ietf-tcp-server", "2019-07-02"],
+ ["yang", "2017-02-20"],
+ ["notifications", "2008-07-14"],
+ ["iana-crypt-hash", "2014-08-06"],
+ ["ietf-origin", "2018-02-14"],
+ ["wred-profile-1-0", "2020-01-24"],
+ ["ietf-netconf-monitoring", "2010-10-04"],
+ ["ietf-tls-common", "2019-07-02"],
+ ["ietf-netconf-server", "2019-07-02"],
+ ["mac-fd-1-0", "2020-08-26"],
+ ["wire-interface-2-0", "2020-01-23"],
+ ["ietf-ssh-common", "2019-07-02"],
+ ["qos-profile-1-0", "2020-01-24"],
+ ["mac-interface-1-0", "2020-01-23"],
+ ["ietf-ssh-server", "2019-07-02"],
+ ["ietf-netconf-with-defaults", "2011-06-01"],
+ ["ietf-tls-server", "2019-07-02"],
+ ["ietf-tcp-client", "2019-07-02"],
+ ["onap-system", "2020-10-26"],
+ ["l-3vpn-profile-1-0", "2020-01-27"],
+ ["ietf-netconf", "2013-09-29"],
+ ["nts-common", "2021-06-08"],
+ ["mac-fc-1-0", "2020-08-26"],
+ ["ltp-augment-1-0", "2020-07-30"],
+ ["ietf-keystore", "2019-07-02"],
+ ["co-channel-profile-1-0", "2020-01-27"],
+ ["vlan-interface-1-0", "2021-01-04"],
+ ["ietf-yang-library", "2019-01-04"],
+ ["ietf-netconf-acm", "2018-02-14"],
+ ["ietf-x509-cert-to-name", "2014-12-10"],
+ ["ietf-tcp-common", "2019-07-02"],
+ ["tdm-container-2-0", "2020-01-23"],
+ ["vlan-fc-1-0", "2021-01-05"],
+ ["ietf-truststore", "2019-07-02"],
+ ["pure-ethernet-structure-2-0", "2020-01-22"],
+ ["ietf-system", "2014-08-06"],
+ ["core-model-1-4", "2019-11-27"],
+ ["hybrid-mw-structure-2-0", "2020-01-22"],
+ ["air-interface-2-0", "2020-01-21"],
+ ["ietf-yang-metadata", "2016-08-05"],
+ ["ietf-datastores", "2018-02-14"],
+ ["nc-notifications", "2008-07-14"],
+ ["ietf-netconf-nmda", "2019-01-07"],
+ ["ip-interface-1-0", "2020-01-24"],
+ ["ietf-inet-types", "2013-07-15"],
+ ["nts-network-function", "2021-06-18"]]
\ No newline at end of file