diff options
author | Peter Mikus <pmikus@cisco.com> | 2019-11-11 16:14:32 +0000 |
---|---|---|
committer | Peter Mikus <pmikus@cisco.com> | 2019-11-19 06:43:59 +0000 |
commit | e7ad66f3147662973039caaac33015de7e0c6f8c (patch) | |
tree | 809a056325425bad672a8a9274c3c2d696a35030 | |
parent | 20cc67d5f23a7f4e05b08012bf3d3a63be4bcf63 (diff) |
HONEYCOMB: Remove
Signed-off-by: Peter Mikus <pmikus@cisco.com>
Change-Id: I60d80564050cb786c7b1e0a08f31f8292f82197e
170 files changed, 0 insertions, 26778 deletions
@@ -72,7 +72,6 @@ A brief bottom-up description is provided here: - Test suites with test cases; - Functional tests using VIRL environment: - VPP; - - Honeycomb; - NSH_SFC; - DMM; - TLDK; @@ -80,7 +79,6 @@ A brief bottom-up description is provided here: - VPP; - DPDK-Testpmd; - DPDK-L3Fwd; - - Honeycomb; - VPP Container K8s orchestrated topologies; - Tools: - Documentation generator; @@ -100,9 +98,6 @@ A brief bottom-up description is provided here:   ├── dpdk   │  ├── dpdk_scripts # DPDK helper scripts   │  └── perf # DPDK performance tests -   ├── honeycomb -   │  ├── func # Honeycomb functional VIRL tests -   │  └── perf # Honeycomb functional performance tests   ├── kubernetes   │  └── perf # VPP K8S orchestration performance tests   ├── nsh_sfc @@ -163,7 +158,6 @@ resources │  │  └── wrk │  └── traffic_scripts # Functional tests traffic profiles │  ├── dhcp -│  ├── honeycomb │  └── lisp └── topologies # Linux Foundation topology files ├── available diff --git a/bootstrap-hc2vpp-integration-odl.sh b/bootstrap-hc2vpp-integration-odl.sh deleted file mode 100755 index cc4913a816..0000000000 --- a/bootstrap-hc2vpp-integration-odl.sh +++ /dev/null @@ -1,265 +0,0 @@ -#!/bin/bash -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -set -x - -cat /etc/hostname -cat /etc/hosts - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") -VIRL_SERVER="" - -VIRL_USERNAME=jenkins-in -VIRL_PKEY=priv_key -VIRL_SERVER_STATUS_FILE="status" -VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" - -JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log karaf.log) -LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log karaf.log) -JOB_ARCHIVE_DIR="archive" -LOG_ARCHIVE_DIR="$WORKSPACE/archives" -mkdir -p ${JOB_ARCHIVE_DIR} -mkdir -p ${LOG_ARCHIVE_DIR} - -STREAM=$1 -OS=$2 -ODL=$3 - -if [ -f "/etc/redhat-release" ]; then - DISTRO="CENTOS" - sudo yum install -y python-devel python-virtualenv openssh-clients sshpass - VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_CENTOS) - VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_CENTOS) -else - DISTRO="UBUNTU" - export DEBIAN_FRONTEND=noninteractive - sudo apt-get -y update - sudo apt-get -y install libpython2.7-dev python-virtualenv - VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_UBUNTU) - VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_UBUNTU) -fi - -SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" - -function ssh_do() { - echo - echo "### " ssh $@ - ssh ${SSH_OPTIONS} $@ -} - -rm -f ${VIRL_PKEY} -cat > ${VIRL_PKEY} <<EOF ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA+IHXq87GcqMR1C47rzx6Cbip5Ghq8pKrbqKrP5Nf41HcYrT6 -GOXl9nFWKsMOzIlIn+8y7Il27eZh7csQGApbg8QLiHMtcYEmWNzKZpkqg4nuAPxX -VXwlKgnKX902SrET9Gp9TDayiHtCRWVfrlPPPSA0UEXW6BjLN/uHJ+W/Xzrrab+9 -asBVa05vT2W6n0KJ66zfCaeDM912mQ6SttscAwFoWDmdHlegiVqrlIG2ABxOvxxz -L3dM3iSmlmQlzv9bThjo+nI4KFYh6m5wrZmAo5r/4q9CIJc21HVnTqkGOWJIZz6J -73lePJVSq5gYqaoGw3swFEA/MDkOx7baWKSoLQIDAQABAoIBAQCNBeolNp+JWJ76 -gQ4fwLsknyXSV6sxYyhkDW4PEwwcTU06uqce0AAzXVffxne0fMe48x47+zqBgPbb -4huM+Pu8B9nfojUMr5TaYtl9Zbgpk3F8H7dT7LKOa6XrxvZTZrADSRc30+Z26zPN -e9zTaf42Gvt0/l0Zs1BHwbaOXqO+XuwJ3/F9Sf3PQYWXD3EOWjpHDP/X/1vAs6lV -SLkm6J/9KKE1m6I6LTYjIXuYt4SXybW6N2TSy54hhQtYcDUnIU2hR/PHVWKrGA0J -kELgrtTNTdbML27O5gFWU4PLUEYTZ9fN11D6qUZKxLcPOiPPHXkiILMRCCnG5DYI -ksBAU/YlAoGBAPxZO9VO18TYc8THV1nLKcvT2+1oSs1UcA2wNQMU55t910ZYinRa -MRwUhMOf8Mv5wOeiZaRICQB1PnVWtDVmGECgPpK6jUxqAwn8rgJcnoafLGL5YKMY -RVafTe6N5LXgCaOcJrk21wxs6v7ninEbUxxc575urOvZMBkymDw91dwbAoGBAPwa -YRhKhrzFKZzdK0RadVjnxKvolUllpoqqg3XuvmeAJHAOAnaOgVWq68NAcp5FZJv0 -2D2Up7TX8pjf9MofP1SJbcraKBpK4NzfNkA0dSdEi+FhVofAJ9umB2o5LW1n7sab -UIrjsdzSJK/9Zb9yTTHPyibYzNEgaJV1HsbxfEFXAoGAYO2RmvRm0phll18OQVJV -IpKk9kLKAKZ/R/K32hAsikBC8SVPQTPniyaifFWx81diblalff2hX4ipTf7Yx24I -wMIMZuW7Im/R7QMef4+94G3Bad7p7JuE/qnAEHJ2OBnu+eYfxaK35XDsrq6XMazS -NqHE7hOq3giVfgg+C12hCKMCgYEAtu9dbYcG5owbehxzfRI2/OCRsjz/t1bv1seM -xVMND4XI6xb/apBWAZgZpIFrqrWoIBM3ptfsKipZe91ngBPUnL9s0Dolx452RVAj -yctHB8uRxWYgqDkjsxtzXf1HnZBBkBS8CUzYj+hdfuddoeKLaY3invXLCiV+PpXS -U4KAK9kCgYEAtSv0m5+Fg74BbAiFB6kCh11FYkW94YI6B/E2D/uVTD5dJhyEUFgZ -cWsudXjMki8734WSpMBqBp/J8wG3C9ZS6IpQD+U7UXA+roB7Qr+j4TqtWfM+87Rh -maOpG56uAyR0w5Z9BhwzA3VakibVk9KwDgZ29WtKFzuATLFnOtCS46E= ------END RSA PRIVATE KEY----- -EOF -chmod 600 ${VIRL_PKEY} - -# -# Pick a random host from the array of VIRL servers, and attempt -# to reach it and verify it's status. -# -# The server must be reachable, and have a "status" file with -# the content "PRODUCTION", to be selected. -# -# If the server is not reachable, or does not have the correct -# status, remove it from the array and start again. -# -# Abort if there are no more servers left in the array. -# -while [[ ! "$VIRL_SERVER" ]] -do - num_hosts=${#VIRL_SERVERS[@]} - if [ $num_hosts == 0 ] - then - echo "No more VIRL candidate hosts available, failing." - exit 127 - fi - element=$[ $RANDOM % $num_hosts ] - virl_server_candidate=${VIRL_SERVERS[$element]} - virl_server_status=$(ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${virl_server_candidate} cat $VIRL_SERVER_STATUS_FILE 2>&1) - echo VIRL HOST $virl_server_candidate status is \"$virl_server_status\" - if [ "$virl_server_status" == "$VIRL_SERVER_EXPECTED_STATUS" ] - then - # Candidate is in good status. Select this server. - VIRL_SERVER="$virl_server_candidate" - else - # Candidate is in bad status. Remove from array. - VIRL_SERVERS=("${VIRL_SERVERS[@]:0:$element}" "${VIRL_SERVERS[@]:$[$element+1]}") - fi -done - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Download VPP and HC packages from the current branch -echo Downloading packages... -bash ${SCRIPT_DIR}/resources/tools/scripts/download_hc_pkgs.sh ${STREAM} ${OS} - -if [ "${OS}" == "centos7" ]; then - VPP_PKGS=(*.rpm) -else - VPP_PKGS=(*.deb) -fi -echo ${VPP_PKGS[@]} -VIRL_DIR_LOC="/tmp" -VPP_PKGS_FULL=(${VPP_PKGS[@]}) - -# Prepend directory location at remote host to package file list -for index in "${!VPP_PKGS_FULL[@]}"; do - VPP_PKGS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_FULL[${index}]} -done - -echo "Updated file names: " ${VPP_PKGS_FULL[@]} - -cat ${VIRL_PKEY} - -# Copy the files to VIRL hosts -DONE="" -for index in "${!VIRL_SERVER[@]}"; do - # Do not copy files in case they have already been copied to the VIRL host - [[ "${DONE[@]}" =~ "${VIRL_SERVER[${index}]}" ]] && copy=0 || copy=1 - - if [ "${copy}" -eq "0" ]; then - echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}" - else - if [ "${OS}" == "centos7" ]; then - scp ${SSH_OPTIONS} *.rpm \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - else - scp ${SSH_OPTIONS} *.deb \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - fi - result=$? - if [ "${result}" -ne "0" ]; then - echo "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}" - echo ${result} - exit ${result} - else - echo "files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}" - fi - DONE+=(${VIRL_SERVER[${index}]}) - fi -done - -# Start a simulation on VIRL server -echo "Starting simulation on VIRL server" - -function stop_virl_simulation { - ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER}\ - "stop-testcase ${VIRL_SID}" -} - -VIRL_SID=$(ssh ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER} \ - "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}") -retval=$? -if [ "${retval}" -ne "0" ]; then - echo "VIRL simulation start failed" - exit ${retval} -fi - -if [[ ! "${VIRL_SID}" =~ session-[a-zA-Z0-9_]{6} ]]; then - echo "No VIRL session ID reported." - exit 127 -fi - -# Upon script exit, cleanup the simulation execution -trap stop_virl_simulation EXIT -echo ${VIRL_SID} - -ssh_do ${VIRL_USERNAME}@${VIRL_SERVER} cat /scratch/${VIRL_SID}/topology.yaml - -# Download the topology file from virl session -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/topology.yaml \ - topologies/enabled/topology.yaml - -retval=$? -if [ "${retval}" -ne "0" ]; then - echo "Failed to copy topology file from VIRL simulation" - exit ${retval} -fi - -virtualenv --system-site-packages env -. env/bin/activate - -echo pip install -pip install -r ${SCRIPT_DIR}/requirements.txt - -pykwalify -s ${SCRIPT_DIR}/resources/topology_schemas/3_node_topology.sch.yaml \ - -s ${SCRIPT_DIR}/resources/topology_schemas/topology.sch.yaml \ - -d ${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - -vvv - -if [ "$?" -ne "0" ]; then - echo "Topology schema validation failed." - echo "However, the tests will start." -fi - -# TODO(CSIT-994): reenable NSH -PYTHONPATH=`pwd` pybot -L TRACE -W 136\ - -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - --suite "tests.honeycomb.func" \ - --include HC_FUNC \ - --exclude hc_nshORhc_rest_only \ - --noncritical EXPECTED_FAILING \ - --variable HC_ODL:${ODL} \ - tests/ - -RETURN_STATUS=$? - -# Get Honeycomb log file from virl host -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true - -# Get ODL karaf log file from virl host -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/karaf.log . || true - -# Archive JOB artifacts in jenkins -for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/ -done -# Archive JOB artifacts to logs.fd.io -for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/ -done - -exit ${RETURN_STATUS} diff --git a/bootstrap-hc2vpp-integration.sh b/bootstrap-hc2vpp-integration.sh deleted file mode 100755 index bc1c96572e..0000000000 --- a/bootstrap-hc2vpp-integration.sh +++ /dev/null @@ -1,259 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -set -x - -cat /etc/hostname -cat /etc/hosts - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") -VIRL_SERVER="" - -VIRL_USERNAME=jenkins-in -VIRL_PKEY=priv_key -VIRL_SERVER_STATUS_FILE="status" -VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" - -JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) -LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) -JOB_ARCHIVE_DIR="archive" -LOG_ARCHIVE_DIR="$WORKSPACE/archives" -mkdir -p ${JOB_ARCHIVE_DIR} -mkdir -p ${LOG_ARCHIVE_DIR} - -STREAM=$1 -OS=$2 - -if [ -f "/etc/redhat-release" ]; then - DISTRO="CENTOS" - sudo yum install -y python-devel python-virtualenv openssh-clients sshpass - VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_CENTOS) - VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_CENTOS) -else - DISTRO="UBUNTU" - export DEBIAN_FRONTEND=noninteractive - sudo apt-get -y update - sudo apt-get -y install libpython2.7-dev python-virtualenv - VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_UBUNTU) - VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_UBUNTU) -fi - -SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" - -function ssh_do() { - echo - echo "### " ssh $@ - ssh ${SSH_OPTIONS} $@ -} - -rm -f ${VIRL_PKEY} -cat > ${VIRL_PKEY} <<EOF ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA+IHXq87GcqMR1C47rzx6Cbip5Ghq8pKrbqKrP5Nf41HcYrT6 -GOXl9nFWKsMOzIlIn+8y7Il27eZh7csQGApbg8QLiHMtcYEmWNzKZpkqg4nuAPxX -VXwlKgnKX902SrET9Gp9TDayiHtCRWVfrlPPPSA0UEXW6BjLN/uHJ+W/Xzrrab+9 -asBVa05vT2W6n0KJ66zfCaeDM912mQ6SttscAwFoWDmdHlegiVqrlIG2ABxOvxxz -L3dM3iSmlmQlzv9bThjo+nI4KFYh6m5wrZmAo5r/4q9CIJc21HVnTqkGOWJIZz6J -73lePJVSq5gYqaoGw3swFEA/MDkOx7baWKSoLQIDAQABAoIBAQCNBeolNp+JWJ76 -gQ4fwLsknyXSV6sxYyhkDW4PEwwcTU06uqce0AAzXVffxne0fMe48x47+zqBgPbb -4huM+Pu8B9nfojUMr5TaYtl9Zbgpk3F8H7dT7LKOa6XrxvZTZrADSRc30+Z26zPN -e9zTaf42Gvt0/l0Zs1BHwbaOXqO+XuwJ3/F9Sf3PQYWXD3EOWjpHDP/X/1vAs6lV -SLkm6J/9KKE1m6I6LTYjIXuYt4SXybW6N2TSy54hhQtYcDUnIU2hR/PHVWKrGA0J -kELgrtTNTdbML27O5gFWU4PLUEYTZ9fN11D6qUZKxLcPOiPPHXkiILMRCCnG5DYI -ksBAU/YlAoGBAPxZO9VO18TYc8THV1nLKcvT2+1oSs1UcA2wNQMU55t910ZYinRa -MRwUhMOf8Mv5wOeiZaRICQB1PnVWtDVmGECgPpK6jUxqAwn8rgJcnoafLGL5YKMY -RVafTe6N5LXgCaOcJrk21wxs6v7ninEbUxxc575urOvZMBkymDw91dwbAoGBAPwa -YRhKhrzFKZzdK0RadVjnxKvolUllpoqqg3XuvmeAJHAOAnaOgVWq68NAcp5FZJv0 -2D2Up7TX8pjf9MofP1SJbcraKBpK4NzfNkA0dSdEi+FhVofAJ9umB2o5LW1n7sab -UIrjsdzSJK/9Zb9yTTHPyibYzNEgaJV1HsbxfEFXAoGAYO2RmvRm0phll18OQVJV -IpKk9kLKAKZ/R/K32hAsikBC8SVPQTPniyaifFWx81diblalff2hX4ipTf7Yx24I -wMIMZuW7Im/R7QMef4+94G3Bad7p7JuE/qnAEHJ2OBnu+eYfxaK35XDsrq6XMazS -NqHE7hOq3giVfgg+C12hCKMCgYEAtu9dbYcG5owbehxzfRI2/OCRsjz/t1bv1seM -xVMND4XI6xb/apBWAZgZpIFrqrWoIBM3ptfsKipZe91ngBPUnL9s0Dolx452RVAj -yctHB8uRxWYgqDkjsxtzXf1HnZBBkBS8CUzYj+hdfuddoeKLaY3invXLCiV+PpXS -U4KAK9kCgYEAtSv0m5+Fg74BbAiFB6kCh11FYkW94YI6B/E2D/uVTD5dJhyEUFgZ -cWsudXjMki8734WSpMBqBp/J8wG3C9ZS6IpQD+U7UXA+roB7Qr+j4TqtWfM+87Rh -maOpG56uAyR0w5Z9BhwzA3VakibVk9KwDgZ29WtKFzuATLFnOtCS46E= ------END RSA PRIVATE KEY----- -EOF -chmod 600 ${VIRL_PKEY} - -# -# Pick a random host from the array of VIRL servers, and attempt -# to reach it and verify it's status. -# -# The server must be reachable, and have a "status" file with -# the content "PRODUCTION", to be selected. -# -# If the server is not reachable, or does not have the correct -# status, remove it from the array and start again. -# -# Abort if there are no more servers left in the array. -# -while [[ ! "$VIRL_SERVER" ]] -do - num_hosts=${#VIRL_SERVERS[@]} - if [ $num_hosts == 0 ] - then - echo "No more VIRL candidate hosts available, failing." - exit 127 - fi - element=$[ $RANDOM % $num_hosts ] - virl_server_candidate=${VIRL_SERVERS[$element]} - virl_server_status=$(ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${virl_server_candidate} cat $VIRL_SERVER_STATUS_FILE 2>&1) - echo VIRL HOST $virl_server_candidate status is \"$virl_server_status\" - if [ "$virl_server_status" == "$VIRL_SERVER_EXPECTED_STATUS" ] - then - # Candidate is in good status. Select this server. - VIRL_SERVER="$virl_server_candidate" - else - # Candidate is in bad status. Remove from array. - VIRL_SERVERS=("${VIRL_SERVERS[@]:0:$element}" "${VIRL_SERVERS[@]:$[$element+1]}") - fi -done - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Download VPP and HC packages from the current branch -echo Downloading packages... -bash ${SCRIPT_DIR}/resources/tools/scripts/download_hc_pkgs.sh ${STREAM} ${OS} - -if [ "${OS}" == "centos7" ]; then - VPP_PKGS=(*.rpm) -else - VPP_PKGS=(*.deb) -fi -echo ${VPP_PKGS[@]} -VIRL_DIR_LOC="/tmp" -VPP_PKGS_FULL=(${VPP_PKGS[@]}) - -# Prepend directory location at remote host to package file list -for index in "${!VPP_PKGS_FULL[@]}"; do - VPP_PKGS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_FULL[${index}]} -done - -echo "Updated file names: " ${VPP_PKGS_FULL[@]} - -cat ${VIRL_PKEY} - -# Copy the files to VIRL hosts -DONE="" -for index in "${!VIRL_SERVER[@]}"; do - # Do not copy files in case they have already been copied to the VIRL host - [[ "${DONE[@]}" =~ "${VIRL_SERVER[${index}]}" ]] && copy=0 || copy=1 - - if [ "${copy}" -eq "0" ]; then - echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}" - else - if [ "${OS}" == "centos7" ]; then - scp ${SSH_OPTIONS} *.rpm \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - else - scp ${SSH_OPTIONS} *.deb \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - fi - result=$? - if [ "${result}" -ne "0" ]; then - echo "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}" - echo ${result} - exit ${result} - else - echo "files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}" - fi - DONE+=(${VIRL_SERVER[${index}]}) - fi -done - -# Start a simulation on VIRL server -echo "Starting simulation on VIRL server" - -function stop_virl_simulation { - ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER}\ - "stop-testcase ${VIRL_SID}" -} - -VIRL_SID=$(ssh ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER} \ - "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}") -retval=$? -if [ "${retval}" -ne "0" ]; then - echo "VIRL simulation start failed" - exit ${retval} -fi - -if [[ ! "${VIRL_SID}" =~ session-[a-zA-Z0-9_]{6} ]]; then - echo "No VIRL session ID reported." - exit 127 -fi - -# Upon script exit, cleanup the simulation execution -trap stop_virl_simulation EXIT -echo ${VIRL_SID} - -ssh_do ${VIRL_USERNAME}@${VIRL_SERVER} cat /scratch/${VIRL_SID}/topology.yaml - -# Download the topology file from virl session -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/topology.yaml \ - topologies/enabled/topology.yaml - -retval=$? -if [ "${retval}" -ne "0" ]; then - echo "Failed to copy topology file from VIRL simulation" - exit ${retval} -fi - -virtualenv --system-site-packages env -. env/bin/activate - -echo pip install -pip install -r ${SCRIPT_DIR}/requirements.txt - -pykwalify -s ${SCRIPT_DIR}/resources/topology_schemas/3_node_topology.sch.yaml \ - -s ${SCRIPT_DIR}/resources/topology_schemas/topology.sch.yaml \ - -d ${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - -vvv - -if [ "$?" -ne "0" ]; then - echo "Topology schema validation failed." - echo "However, the tests will start." -fi - -# TODO(CSIT-994): reenable NSH -PYTHONPATH=`pwd` pybot -L TRACE -W 136\ - -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - --suite "tests.honeycomb.func" \ - --include HC_FUNC \ - --exclude HC_NSH \ - --noncritical EXPECTED_FAILING \ - tests/ - -RETURN_STATUS=$? - -# Get Honeycomb log file from virl host -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true - -# Archive JOB artifacts in jenkins -for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/ -done -# Archive JOB artifacts to logs.fd.io -for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/ -done - -exit ${RETURN_STATUS} diff --git a/bootstrap-hc2vpp-perf.sh b/bootstrap-hc2vpp-perf.sh deleted file mode 100755 index a3531ab792..0000000000 --- a/bootstrap-hc2vpp-perf.sh +++ /dev/null @@ -1,129 +0,0 @@ -#!/bin/bash -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -set -x - -STREAM=$1 -OS=$2 -ODL=$3 - -# Space separated list of available testbeds, described by topology files -TOPOLOGIES="topologies/available/lf_3n_hsw_testbed1.yaml \ - topologies/available/lf_3n_hsw_testbed2.yaml \ - topologies/available/lf_3n_hsw_testbed3.yaml" - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# Reservation dir -RESERVATION_DIR="/tmp/reservation_dir" -INSTALLATION_DIR="/tmp/install_dir" - -PYBOT_ARGS="-W 150 -L TRACE" - -JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) -LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) -JOB_ARCHIVE_DIR="archive" -LOG_ARCHIVE_DIR="$WORKSPACE/archives" -mkdir -p ${JOB_ARCHIVE_DIR} -mkdir -p ${LOG_ARCHIVE_DIR} - -WORKING_TOPOLOGY="" -export PYTHONPATH=${SCRIPT_DIR} - -sudo apt-get -y update -sudo apt-get -y install libpython2.7-dev python-virtualenv - -virtualenv --system-site-packages env -. env/bin/activate - -echo pip install -pip install -r requirements.txt - -# We iterate over available topologies and wait until we reserve topology -while :; do - for TOPOLOGY in ${TOPOLOGIES}; - do - python ${SCRIPT_DIR}/resources/tools/scripts/topo_reservation.py -t ${TOPOLOGY} - if [ $? -eq 0 ]; then - WORKING_TOPOLOGY=${TOPOLOGY} - echo "Reserved: ${WORKING_TOPOLOGY}" - break - fi - done - - if [ ! -z "${WORKING_TOPOLOGY}" ]; then - # Exit the infinite while loop if we made a reservation - break - fi - - # Wait ~3minutes before next try - SLEEP_TIME=$[ ( $RANDOM % 20 ) + 180 ]s - echo "Sleeping ${SLEEP_TIME}" - sleep ${SLEEP_TIME} -done - -function cancel_all { - python ${SCRIPT_DIR}/resources/tools/scripts/topo_installation.py -c -d ${INSTALLATION_DIR} -t $1 -hc True - python ${SCRIPT_DIR}/resources/tools/scripts/topo_reservation.py -c -t $1 -} - -# On script exit we cancel the reservation and installation and delete all vpp -# packages -trap "cancel_all ${WORKING_TOPOLOGY}" EXIT - -# Download VPP and HC packages from the current branch -echo Downloading packages... -CSIT_DIR=${SCRIPT_DIR} -source "${SCRIPT_DIR}/resources/libraries/bash/function/artifacts.sh" -source "${SCRIPT_DIR}/resources/libraries/bash/function/artifacts_hc.sh" -download_artifacts -download_artifacts_hc - -if [ "${OS}" == "centos7" ]; then - VPP_PKGS=(*.rpm) -else - VPP_PKGS=(*.deb) -fi -echo ${VPP_PKGS[@]} - -# Install packages -python ${SCRIPT_DIR}/resources/tools/scripts/topo_installation.py -t ${WORKING_TOPOLOGY} \ - -d ${INSTALLATION_DIR} \ - -p ${VPP_PKGS[@]} \ - -hc True -if [ $? -eq 0 ]; then - echo "VPP Installed on hosts from: ${WORKING_TOPOLOGY}" -else - echo "Failed to copy vpp deb files to DUTs" - exit 1 -fi - -# run full performance test suite and exit on fail - pybot ${PYBOT_ARGS} \ - -v TOPOLOGY_PATH:${WORKING_TOPOLOGY} \ - -s "tests.honeycomb.perf" \ - --variable install_dir:${INSTALLATION_DIR} \ - tests/ - RETURN_STATUS=$(echo $?) - -# Archive JOB artifacts in jenkins -for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/ -done -# Archive JOB artifacts to logs.fd.io -for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/ -done - -exit ${RETURN_STATUS} diff --git a/bootstrap-hc2vpp-verify-odl.sh b/bootstrap-hc2vpp-verify-odl.sh deleted file mode 100755 index 25f4741a44..0000000000 --- a/bootstrap-hc2vpp-verify-odl.sh +++ /dev/null @@ -1,264 +0,0 @@ -#!/bin/bash -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -set -x - -cat /etc/hostname -cat /etc/hosts - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") -VIRL_SERVER="" - -VIRL_USERNAME=jenkins-in -VIRL_PKEY=priv_key -VIRL_SERVER_STATUS_FILE="status" -VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" - -JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log karaf.log) -LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log karaf.log) -JOB_ARCHIVE_DIR="archive" -LOG_ARCHIVE_DIR="$WORKSPACE/archives" -mkdir -p ${JOB_ARCHIVE_DIR} -mkdir -p ${LOG_ARCHIVE_DIR} - -OS=$1 -ODL=$2 - -if [ -f "/etc/redhat-release" ]; then - DISTRO="CENTOS" - sudo yum install -y python-devel python-virtualenv openssh-clients sshpass - VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_CENTOS) - VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_CENTOS) -else - DISTRO="UBUNTU" - export DEBIAN_FRONTEND=noninteractive - sudo apt-get -y update - sudo apt-get -y install libpython2.7-dev python-virtualenv - VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_UBUNTU) - VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_UBUNTU) -fi - -SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" - -function ssh_do() { - echo - echo "### " ssh $@ - ssh ${SSH_OPTIONS} $@ -} - -rm -f ${VIRL_PKEY} -cat > ${VIRL_PKEY} <<EOF ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA+IHXq87GcqMR1C47rzx6Cbip5Ghq8pKrbqKrP5Nf41HcYrT6 -GOXl9nFWKsMOzIlIn+8y7Il27eZh7csQGApbg8QLiHMtcYEmWNzKZpkqg4nuAPxX -VXwlKgnKX902SrET9Gp9TDayiHtCRWVfrlPPPSA0UEXW6BjLN/uHJ+W/Xzrrab+9 -asBVa05vT2W6n0KJ66zfCaeDM912mQ6SttscAwFoWDmdHlegiVqrlIG2ABxOvxxz -L3dM3iSmlmQlzv9bThjo+nI4KFYh6m5wrZmAo5r/4q9CIJc21HVnTqkGOWJIZz6J -73lePJVSq5gYqaoGw3swFEA/MDkOx7baWKSoLQIDAQABAoIBAQCNBeolNp+JWJ76 -gQ4fwLsknyXSV6sxYyhkDW4PEwwcTU06uqce0AAzXVffxne0fMe48x47+zqBgPbb -4huM+Pu8B9nfojUMr5TaYtl9Zbgpk3F8H7dT7LKOa6XrxvZTZrADSRc30+Z26zPN -e9zTaf42Gvt0/l0Zs1BHwbaOXqO+XuwJ3/F9Sf3PQYWXD3EOWjpHDP/X/1vAs6lV -SLkm6J/9KKE1m6I6LTYjIXuYt4SXybW6N2TSy54hhQtYcDUnIU2hR/PHVWKrGA0J -kELgrtTNTdbML27O5gFWU4PLUEYTZ9fN11D6qUZKxLcPOiPPHXkiILMRCCnG5DYI -ksBAU/YlAoGBAPxZO9VO18TYc8THV1nLKcvT2+1oSs1UcA2wNQMU55t910ZYinRa -MRwUhMOf8Mv5wOeiZaRICQB1PnVWtDVmGECgPpK6jUxqAwn8rgJcnoafLGL5YKMY -RVafTe6N5LXgCaOcJrk21wxs6v7ninEbUxxc575urOvZMBkymDw91dwbAoGBAPwa -YRhKhrzFKZzdK0RadVjnxKvolUllpoqqg3XuvmeAJHAOAnaOgVWq68NAcp5FZJv0 -2D2Up7TX8pjf9MofP1SJbcraKBpK4NzfNkA0dSdEi+FhVofAJ9umB2o5LW1n7sab -UIrjsdzSJK/9Zb9yTTHPyibYzNEgaJV1HsbxfEFXAoGAYO2RmvRm0phll18OQVJV -IpKk9kLKAKZ/R/K32hAsikBC8SVPQTPniyaifFWx81diblalff2hX4ipTf7Yx24I -wMIMZuW7Im/R7QMef4+94G3Bad7p7JuE/qnAEHJ2OBnu+eYfxaK35XDsrq6XMazS -NqHE7hOq3giVfgg+C12hCKMCgYEAtu9dbYcG5owbehxzfRI2/OCRsjz/t1bv1seM -xVMND4XI6xb/apBWAZgZpIFrqrWoIBM3ptfsKipZe91ngBPUnL9s0Dolx452RVAj -yctHB8uRxWYgqDkjsxtzXf1HnZBBkBS8CUzYj+hdfuddoeKLaY3invXLCiV+PpXS -U4KAK9kCgYEAtSv0m5+Fg74BbAiFB6kCh11FYkW94YI6B/E2D/uVTD5dJhyEUFgZ -cWsudXjMki8734WSpMBqBp/J8wG3C9ZS6IpQD+U7UXA+roB7Qr+j4TqtWfM+87Rh -maOpG56uAyR0w5Z9BhwzA3VakibVk9KwDgZ29WtKFzuATLFnOtCS46E= ------END RSA PRIVATE KEY----- -EOF -chmod 600 ${VIRL_PKEY} - -# -# Pick a random host from the array of VIRL servers, and attempt -# to reach it and verify it's status. -# -# The server must be reachable, and have a "status" file with -# the content "PRODUCTION", to be selected. -# -# If the server is not reachable, or does not have the correct -# status, remove it from the array and start again. -# -# Abort if there are no more servers left in the array. -# -while [[ ! "$VIRL_SERVER" ]] -do - num_hosts=${#VIRL_SERVERS[@]} - if [ $num_hosts == 0 ] - then - echo "No more VIRL candidate hosts available, failing." - exit 127 - fi - element=$[ $RANDOM % $num_hosts ] - virl_server_candidate=${VIRL_SERVERS[$element]} - virl_server_status=$(ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${virl_server_candidate} cat $VIRL_SERVER_STATUS_FILE 2>&1) - echo VIRL HOST $virl_server_candidate status is \"$virl_server_status\" - if [ "$virl_server_status" == "$VIRL_SERVER_EXPECTED_STATUS" ] - then - # Candidate is in good status. Select this server. - VIRL_SERVER="$virl_server_candidate" - else - # Candidate is in bad status. Remove from array. - VIRL_SERVERS=("${VIRL_SERVERS[@]:0:$element}" "${VIRL_SERVERS[@]:$[$element+1]}") - fi -done - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# VPP, VPP plugin and Honeycomb packages should already be in working directory -if [ "${OS}" == "centos7" ]; then - VPP_PKGS=(*.rpm) -else - VPP_PKGS=(*.deb) -fi -echo ${VPP_PKGS[@]} -VIRL_DIR_LOC="/tmp" -VPP_PKGS_FULL=(${VPP_PKGS[@]}) - -# Prepend directory location at remote host to package file list -for index in "${!VPP_PKGS_FULL[@]}"; do - VPP_PKGS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_FULL[${index}]} -done - -echo "Updated file names: " ${VPP_PKGS_FULL[@]} - -cat ${VIRL_PKEY} - -# Copy the files to VIRL hosts -DONE="" -for index in "${!VIRL_SERVER[@]}"; do - # Do not copy files in case they have already been copied to the VIRL host - [[ "${DONE[@]}" =~ "${VIRL_SERVER[${index}]}" ]] && copy=0 || copy=1 - - if [ "${copy}" -eq "0" ]; then - echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}" - else - if [ "${OS}" == "centos7" ]; then - scp ${SSH_OPTIONS} *.rpm \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - else - scp ${SSH_OPTIONS} *.deb \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - fi - result=$? - if [ "${result}" -ne "0" ]; then - echo "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}" - echo ${result} - exit ${result} - else - echo "files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}" - fi - DONE+=(${VIRL_SERVER[${index}]}) - fi -done - -# Start a simulation on VIRL server -echo "Starting simulation on VIRL server" - -function stop_virl_simulation { - ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER}\ - "stop-testcase ${VIRL_SID}" -} - -VIRL_SID=$(ssh ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER} \ - "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}") -retval=$? -if [ "${retval}" -ne "0" ]; then - echo "VIRL simulation start failed" - exit ${retval} -fi - -if [[ ! "${VIRL_SID}" =~ session-[a-zA-Z0-9_]{6} ]]; then - echo "No VIRL session ID reported." - exit 127 -fi - -# Upon script exit, cleanup the simulation execution -trap stop_virl_simulation EXIT -echo ${VIRL_SID} - -ssh_do ${VIRL_USERNAME}@${VIRL_SERVER} cat /scratch/${VIRL_SID}/topology.yaml - -# Download the topology file from virl session -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/topology.yaml \ - topologies/enabled/topology.yaml - -retval=$? -if [ "${retval}" -ne "0" ]; then - echo "Failed to copy topology file from VIRL simulation" - exit ${retval} -fi - -virtualenv --system-site-packages env -. env/bin/activate - -echo pip install -pip install -r ${SCRIPT_DIR}/requirements.txt - -pykwalify -s ${SCRIPT_DIR}/resources/topology_schemas/3_node_topology.sch.yaml \ - -s ${SCRIPT_DIR}/resources/topology_schemas/topology.sch.yaml \ - -d ${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - -vvv - -if [ "$?" -ne "0" ]; then - echo "Topology schema validation failed." - echo "However, the tests will start." -fi - -rm -rf ~/*karaf* -cp /nfs/common/karaf_${ODL} ~ - -# TODO(CSIT-994): reenable NSH -PYTHONPATH=`pwd` pybot -L TRACE -W 136\ - -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - --suite "tests.honeycomb.func" \ - --include HC_FUNC \ - --exclude hc_nshORhc_rest_only \ - --noncritical EXPECTED_FAILING \ - --variable HC_ODL:${ODL} \ - tests/ - -RETURN_STATUS=$? - -# Get Honeycomb log file from virl host -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true - -# Get ODL karaf log file from virl host -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/karaf.log . || true - -# Archive JOB artifacts in jenkins -for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/ -done -# Archive JOB artifacts to logs.fd.io -for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/ -done - -exit ${RETURN_STATUS} diff --git a/bootstrap-hc2vpp-verify.sh b/bootstrap-hc2vpp-verify.sh deleted file mode 100755 index 70466c30a3..0000000000 --- a/bootstrap-hc2vpp-verify.sh +++ /dev/null @@ -1,254 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -set -x - -cat /etc/hostname -cat /etc/hosts - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -VIRL_SERVERS=("10.30.51.28" "10.30.51.29" "10.30.51.30") -VIRL_SERVER="" - -VIRL_USERNAME=jenkins-in -VIRL_PKEY=priv_key -VIRL_SERVER_STATUS_FILE="status" -VIRL_SERVER_EXPECTED_STATUS="PRODUCTION" - -JOB_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) -LOG_ARCHIVE_ARTIFACTS=(log.html output.xml report.html honeycomb.log) -JOB_ARCHIVE_DIR="archive" -LOG_ARCHIVE_DIR="$WORKSPACE/archives" -mkdir -p ${JOB_ARCHIVE_DIR} -mkdir -p ${LOG_ARCHIVE_DIR} -OS=$1 - -if [ -f "/etc/redhat-release" ]; then - DISTRO="CENTOS" - sudo yum install -y python-devel python-virtualenv openssh-clients sshpass - VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_CENTOS) - VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_CENTOS) -else - DISTRO="UBUNTU" - export DEBIAN_FRONTEND=noninteractive - sudo apt-get -y update - sudo apt-get -y install libpython2.7-dev python-virtualenv - VIRL_TOPOLOGY=$(cat ${SCRIPT_DIR}/VIRL_TOPOLOGY_UBUNTU) - VIRL_RELEASE=$(cat ${SCRIPT_DIR}/VIRL_RELEASE_UBUNTU) -fi - -SSH_OPTIONS="-i ${VIRL_PKEY} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o BatchMode=yes -o LogLevel=error" - -function ssh_do() { - echo - echo "### " ssh $@ - ssh ${SSH_OPTIONS} $@ -} - -rm -f ${VIRL_PKEY} -cat > ${VIRL_PKEY} <<EOF ------BEGIN RSA PRIVATE KEY----- -MIIEpQIBAAKCAQEA+IHXq87GcqMR1C47rzx6Cbip5Ghq8pKrbqKrP5Nf41HcYrT6 -GOXl9nFWKsMOzIlIn+8y7Il27eZh7csQGApbg8QLiHMtcYEmWNzKZpkqg4nuAPxX -VXwlKgnKX902SrET9Gp9TDayiHtCRWVfrlPPPSA0UEXW6BjLN/uHJ+W/Xzrrab+9 -asBVa05vT2W6n0KJ66zfCaeDM912mQ6SttscAwFoWDmdHlegiVqrlIG2ABxOvxxz -L3dM3iSmlmQlzv9bThjo+nI4KFYh6m5wrZmAo5r/4q9CIJc21HVnTqkGOWJIZz6J -73lePJVSq5gYqaoGw3swFEA/MDkOx7baWKSoLQIDAQABAoIBAQCNBeolNp+JWJ76 -gQ4fwLsknyXSV6sxYyhkDW4PEwwcTU06uqce0AAzXVffxne0fMe48x47+zqBgPbb -4huM+Pu8B9nfojUMr5TaYtl9Zbgpk3F8H7dT7LKOa6XrxvZTZrADSRc30+Z26zPN -e9zTaf42Gvt0/l0Zs1BHwbaOXqO+XuwJ3/F9Sf3PQYWXD3EOWjpHDP/X/1vAs6lV -SLkm6J/9KKE1m6I6LTYjIXuYt4SXybW6N2TSy54hhQtYcDUnIU2hR/PHVWKrGA0J -kELgrtTNTdbML27O5gFWU4PLUEYTZ9fN11D6qUZKxLcPOiPPHXkiILMRCCnG5DYI -ksBAU/YlAoGBAPxZO9VO18TYc8THV1nLKcvT2+1oSs1UcA2wNQMU55t910ZYinRa -MRwUhMOf8Mv5wOeiZaRICQB1PnVWtDVmGECgPpK6jUxqAwn8rgJcnoafLGL5YKMY -RVafTe6N5LXgCaOcJrk21wxs6v7ninEbUxxc575urOvZMBkymDw91dwbAoGBAPwa -YRhKhrzFKZzdK0RadVjnxKvolUllpoqqg3XuvmeAJHAOAnaOgVWq68NAcp5FZJv0 -2D2Up7TX8pjf9MofP1SJbcraKBpK4NzfNkA0dSdEi+FhVofAJ9umB2o5LW1n7sab -UIrjsdzSJK/9Zb9yTTHPyibYzNEgaJV1HsbxfEFXAoGAYO2RmvRm0phll18OQVJV -IpKk9kLKAKZ/R/K32hAsikBC8SVPQTPniyaifFWx81diblalff2hX4ipTf7Yx24I -wMIMZuW7Im/R7QMef4+94G3Bad7p7JuE/qnAEHJ2OBnu+eYfxaK35XDsrq6XMazS -NqHE7hOq3giVfgg+C12hCKMCgYEAtu9dbYcG5owbehxzfRI2/OCRsjz/t1bv1seM -xVMND4XI6xb/apBWAZgZpIFrqrWoIBM3ptfsKipZe91ngBPUnL9s0Dolx452RVAj -yctHB8uRxWYgqDkjsxtzXf1HnZBBkBS8CUzYj+hdfuddoeKLaY3invXLCiV+PpXS -U4KAK9kCgYEAtSv0m5+Fg74BbAiFB6kCh11FYkW94YI6B/E2D/uVTD5dJhyEUFgZ -cWsudXjMki8734WSpMBqBp/J8wG3C9ZS6IpQD+U7UXA+roB7Qr+j4TqtWfM+87Rh -maOpG56uAyR0w5Z9BhwzA3VakibVk9KwDgZ29WtKFzuATLFnOtCS46E= ------END RSA PRIVATE KEY----- -EOF -chmod 600 ${VIRL_PKEY} - -# -# Pick a random host from the array of VIRL servers, and attempt -# to reach it and verify it's status. -# -# The server must be reachable, and have a "status" file with -# the content "PRODUCTION", to be selected. -# -# If the server is not reachable, or does not have the correct -# status, remove it from the array and start again. -# -# Abort if there are no more servers left in the array. -# -while [[ ! "$VIRL_SERVER" ]] -do - num_hosts=${#VIRL_SERVERS[@]} - if [ $num_hosts == 0 ] - then - echo "No more VIRL candidate hosts available, failing." - exit 127 - fi - element=$[ $RANDOM % $num_hosts ] - virl_server_candidate=${VIRL_SERVERS[$element]} - virl_server_status=$(ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${virl_server_candidate} cat $VIRL_SERVER_STATUS_FILE 2>&1) - echo VIRL HOST $virl_server_candidate status is \"$virl_server_status\" - if [ "$virl_server_status" == "$VIRL_SERVER_EXPECTED_STATUS" ] - then - # Candidate is in good status. Select this server. - VIRL_SERVER="$virl_server_candidate" - else - # Candidate is in bad status. Remove from array. - VIRL_SERVERS=("${VIRL_SERVERS[@]:0:$element}" "${VIRL_SERVERS[@]:$[$element+1]}") - fi -done - -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" - -# VPP, VPP plugin and Honeycomb packages should already be in working directory -if [ "${OS}" == "centos7" ]; then - VPP_PKGS=(*.rpm) -else - VPP_PKGS=(*.deb) -fi -echo ${VPP_PKGS[@]} -VIRL_DIR_LOC="/tmp" -VPP_PKGS_FULL=(${VPP_PKGS[@]}) - -# Prepend directory location at remote host to package file list -for index in "${!VPP_PKGS_FULL[@]}"; do - VPP_PKGS_FULL[${index}]=${VIRL_DIR_LOC}/${VPP_PKGS_FULL[${index}]} -done - -echo "Updated file names: " ${VPP_PKGS_FULL[@]} - -cat ${VIRL_PKEY} - -# Copy the files to VIRL hosts -DONE="" -for index in "${!VIRL_SERVER[@]}"; do - # Do not copy files in case they have already been copied to the VIRL host - [[ "${DONE[@]}" =~ "${VIRL_SERVER[${index}]}" ]] && copy=0 || copy=1 - - if [ "${copy}" -eq "0" ]; then - echo "files have already been copied to the VIRL host ${VIRL_SERVER[${index}]}" - else - if [ "${OS}" == "centos7" ]; then - scp ${SSH_OPTIONS} *.rpm \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - else - scp ${SSH_OPTIONS} *.deb \ - ${VIRL_USERNAME}@${VIRL_SERVER[${index}]}:${VIRL_DIR_LOC}/ - fi - result=$? - if [ "${result}" -ne "0" ]; then - echo "Failed to copy files to VIRL host ${VIRL_SERVER[${index}]}" - echo ${result} - exit ${result} - else - echo "files successfully copied to the VIRL host ${VIRL_SERVER[${index}]}" - fi - DONE+=(${VIRL_SERVER[${index}]}) - fi -done - -# Start a simulation on VIRL server -echo "Starting simulation on VIRL server" - -function stop_virl_simulation { - ssh ${SSH_OPTIONS} ${VIRL_USERNAME}@${VIRL_SERVER}\ - "stop-testcase ${VIRL_SID}" -} - -VIRL_SID=$(ssh ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER} \ - "start-testcase -c ${VIRL_TOPOLOGY} -r ${VIRL_RELEASE} ${VPP_PKGS_FULL[@]}") -retval=$? -if [ "${retval}" -ne "0" ]; then - echo "VIRL simulation start failed" - exit ${retval} -fi - -if [[ ! "${VIRL_SID}" =~ session-[a-zA-Z0-9_]{6} ]]; then - echo "No VIRL session ID reported." - exit 127 -fi - -# Upon script exit, cleanup the simulation execution -trap stop_virl_simulation EXIT -echo ${VIRL_SID} - -ssh_do ${VIRL_USERNAME}@${VIRL_SERVER} cat /scratch/${VIRL_SID}/topology.yaml - -# Download the topology file from virl session -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/topology.yaml \ - topologies/enabled/topology.yaml - -retval=$? -if [ "${retval}" -ne "0" ]; then - echo "Failed to copy topology file from VIRL simulation" - exit ${retval} -fi - -virtualenv --system-site-packages env -. env/bin/activate - -echo pip install -pip install -r ${SCRIPT_DIR}/requirements.txt - -pykwalify -s ${SCRIPT_DIR}/resources/topology_schemas/3_node_topology.sch.yaml \ - -s ${SCRIPT_DIR}/resources/topology_schemas/topology.sch.yaml \ - -d ${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - -vvv - -if [ "$?" -ne "0" ]; then - echo "Topology schema validation failed." - echo "However, the tests will start." -fi - -# TODO(CSIT-994): reenable NSH -PYTHONPATH=`pwd` pybot -L TRACE -W 136\ - -v TOPOLOGY_PATH:${SCRIPT_DIR}/topologies/enabled/topology.yaml \ - --suite "tests.honeycomb.func" \ - --include HC_FUNC \ - --exclude HC_NSH \ - --noncritical EXPECTED_FAILING \ - tests/ - -RETURN_STATUS=$? - -# Get Honeycomb log file from virl host -scp ${SSH_OPTIONS} \ - ${VIRL_USERNAME}@${VIRL_SERVER}:/scratch/${VIRL_SID}/honeycomb.log . || true - -# Archive JOB artifacts in jenkins -for i in ${JOB_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${JOB_ARCHIVE_DIR}/ -done -# Archive JOB artifacts to logs.fd.io -for i in ${LOG_ARCHIVE_ARTIFACTS[@]}; do - cp $( readlink -f ${i} | tr '\n' ' ' ) ${LOG_ARCHIVE_DIR}/ -done - -exit ${RETURN_STATUS} diff --git a/bootstrap-multilink.sh b/bootstrap-multilink.sh deleted file mode 100755 index 1f7698b3e4..0000000000 --- a/bootstrap-multilink.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - - - -sudo apt-get -y install python-virtualenv - -virtualenv --system-site-packages env -. env/bin/activate -pip install -r requirements.txt - -cat > mock.robot <<EOF -*** test cases *** -| Temoporary placeholder test for multilink -| | log | nothing here to see -EOF - -pybot mock.robot - - -exit 0 diff --git a/docs/honeycomb_url_files.rst b/docs/honeycomb_url_files.rst deleted file mode 100644 index 4dfa10c516..0000000000 --- a/docs/honeycomb_url_files.rst +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -Documentation to files used to store URLs to resources in Honeycomb. -==================================================================== - -A URL file is a text file encoded in utf-8 with a path to a resource in -Honeycomb. There is only one line in each file. - -The URL is stored without host and port with leading slash. There is no slash at -the end, e.g.: - /restconf/config/v3po:vpp/bridge-domains diff --git a/docs/report/detailed_test_results/honeycomb_functional_results/index.rst b/docs/report/detailed_test_results/honeycomb_functional_results/index.rst deleted file mode 100644 index ea31695619..0000000000 --- a/docs/report/detailed_test_results/honeycomb_functional_results/index.rst +++ /dev/null @@ -1,13 +0,0 @@ -HoneyComb Functional -==================== - -.. note:: - - Data sources for reported test results: i) `FD.io test executor Honeycomb - functional jobs`_, ii) archived FD.io jobs test result `output files - <../../_static/archive/>`_. - -.. toctree:: - - honeycomb_functional_results - diff --git a/docs/report/honeycomb_functional_tests/csit_release_notes.rst b/docs/report/honeycomb_functional_tests/csit_release_notes.rst deleted file mode 100644 index ec0bb75b31..0000000000 --- a/docs/report/honeycomb_functional_tests/csit_release_notes.rst +++ /dev/null @@ -1,23 +0,0 @@ -Release Notes -============= - -Changes in |csit-release| -------------------------- - -No changes. - -Known Issues ------------- - -Here is the list of known issues in |csit-release| for Honeycomb functional -tests in VIRL: - -+---+----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| # | JiraID | Issue Description | -+===+==============================================+========================================================================================================+ -| 1 | `HC2VPP-263 | LISP PITR feature configuration. | -| | <https://jira.fd.io/browse/HC2VPP-263>`_ | Locator set reference in operational data is incorrect. | -+---+----------------------------------------------+--------------------------------------------------------------------------------------------------------+ -| 2 | `CSIT-1210 | Unnumbered interface configuration. | -| | <https://jira.fd.io/browse/CSIT-1210>`_ | VPP does not send IP addresses for unnumbered interfaces anymore. HC CSIT tests were relying on that. | -+---+----------------------------------------------+--------------------------------------------------------------------------------------------------------+ diff --git a/docs/report/honeycomb_functional_tests/documentation.rst b/docs/report/honeycomb_functional_tests/documentation.rst deleted file mode 100644 index 354c4062f6..0000000000 --- a/docs/report/honeycomb_functional_tests/documentation.rst +++ /dev/null @@ -1,5 +0,0 @@ -Documentation -============= - -`CSIT Honeycomb Functional Tests Documentation`_ contains detailed -functional description and input parameters for each test case. diff --git a/docs/report/honeycomb_functional_tests/index.rst b/docs/report/honeycomb_functional_tests/index.rst deleted file mode 100644 index ba0b8a0c19..0000000000 --- a/docs/report/honeycomb_functional_tests/index.rst +++ /dev/null @@ -1,9 +0,0 @@ -HoneyComb Functional -==================== - -.. toctree:: - - overview - csit_release_notes - test_environment - documentation diff --git a/docs/report/honeycomb_functional_tests/overview.rst b/docs/report/honeycomb_functional_tests/overview.rst deleted file mode 100644 index 2332169729..0000000000 --- a/docs/report/honeycomb_functional_tests/overview.rst +++ /dev/null @@ -1,237 +0,0 @@ -Overview -======== - -Virtual Topologies ------------------- - -CSIT HoneyComb functional tests are executed in VM-based virtual topologies -created on demand using :abbr:`VIRL (Virtual Internet Routing Lab)` -simulation platform contributed by Cisco. VIRL runs on physical -baremetal servers hosted by LF FD.io project. - -All tests are executed in two-node virtual test topology shown in the -figure below. - -.. only:: latex - - .. raw:: latex - - \begin{figure}[H] - \centering - \graphicspath{{../_tmp/src/vpp_functional_tests/}} - \includegraphics[width=0.90\textwidth]{virtual-2n-nic2nic} - \label{fig:virtual-2n-nic2nic} - \end{figure} - -.. only:: html - - .. figure:: ../vpp_functional_tests/virtual-2n-nic2nic.svg - :alt: virtual-2n-nic2nic - :align: center - -SUT (System Under Test) is a VM running Ubuntu Linux (or Centos, -depending on the test suite), TG (Traffic Generator) is another VM -running Ubuntu Linux. SUT VMs run HoneyComb management agent and VPP in -Linux user-mode as a combined DUT (Device Under Test). TG runs Scapy -application as a packet Traffic Generator. Virtual connectivity between -SUT and TG is provided using virtual NICs using VMs' virtio drivers. - -Functional Tests Coverage -------------------------- - -|csit-release| includes following HoneyComb functionality tested in -virtual VM environment: - -+-----------------------+----------------------------------------------+ -| Functionality | Description | -+=======================+==============================================+ -| ACL | - CRD for low-level classifiers: table and | -| | session management, interface assignment. | -| | - Configure up to 2 classify tables. | -| | - Configure up to 2 classify sessions on one | -| | table. | -| | - Assign classify session to a physical | -| | interface. | -| | - Remove tables, sessions, interface | -| | assignments. | -| | - Test case count: 9. | -+-----------------------+----------------------------------------------+ -| ACL-PLUGIN | - CRD for high-level classifier. | -| | - MAC + IP address classification. | -| | - IPv4, IPv6 address classification. | -| | - TCP, UDP, ICMP, ICMPv6 protocol and | -| | next-header classification. | -| | - port number classification. | -| | - ICMP, ICMPv6 code and type classification. | -| | - Test case count: 15. | -+-----------------------+----------------------------------------------+ -| Basic interface | - CRUD for interface state. | -| management | - ipv4/ipv6 address, ipv4 neighbor, MTU | -| | value. | -| | - Test case count: 14. | -+-----------------------+----------------------------------------------+ -| Border Gateway | - CRUD and functional tests for BGP. | -| Protocol | - Configure peers and routes | -| | - Check interactions with another BGP peer. | -| | - Test case count: 13. | -+-----------------------+----------------------------------------------+ -| DHCP Relay | - CRD for DHCP relay feature. | -| | - Configure DHCP Relays. | -| | - IPv4 and IPv6 variants. | -| | - Test case count: 4. | -+-----------------------+----------------------------------------------+ -| Honeycomb | - Configuration persistence. | -| Infractructure | - Netconf notifications for interface | -| | events. | -| | - Netconf negative tests aimed at specific | -| | issues. | -| | - Netconf/Restconf northbound over IPv6. | -| | - Test case count: 14. | -+-----------------------+----------------------------------------------+ -| L2BD | - CRUD for L2 Bridge-Domain, interface | -| | assignment. | -| | - Create up to two bridge domains with all | -| | implemented functions turned on: | -| | flooding, unknown-unicast flooding, | -| | forwarding, learning, arp-termination. | -| | - Assign up to two physical interfaces to a | -| | single bridge domain. | -| | - Remove interface assignments, remove | -| | bridge domains. | -| | - Test case count: 5. | -+-----------------------+----------------------------------------------+ -| L2FIB | - CRD for L2-FIB entries. | -| | - Create 4 FIB entries: | -| | one of each for filter/forward, | -| | static/dynamic combinations. | -| | - Remove FIB entries. | -| | - Test case count: 7. | -+-----------------------+----------------------------------------------+ -| LISP | - CRD for Lisp: mapping, locator set, | -| | adjacency, mapresolver. | -| | - Toggle Lisp feature status. | -| | - Configure and delete Lisp mapping as local | -| | and remote. | -| | - Configure and delete Lisp adjacency | -| | mapping. | -| | - Configure and delete Lisp map resolver, | -| | proxy ITR. | -| | - Test case count: 18. | -+-----------------------+----------------------------------------------+ -| LISP GPE | - CRUD for LISP GPE mappings. | -| | - Toggle Lisp GPE feature status. | -| | - Configure Lisp GPE mappings. | -| | - Traffic test verifying encapsulation. | -| | - Test case count: 12. | -+-----------------------+----------------------------------------------+ -| NAT | - CRD for NAT entries, interface assignment. | -| | - Configure and delete up to two NAT | -| | entries. | -| | - Assign NAT entries to a physical | -| | interface. | -| | - Test case count: 6. | -+-----------------------+----------------------------------------------+ -| NSH_SFC (excluded) | - CRD for NSH maps and entries, using | -| | NSH_SFC plugin. | -| | - Configure up to 2 NSH entries. | -| | - Configure up to 2 NSH maps. | -| | - Modify and delete NSH maps and entries. | -| | - Test case count: 8. | -+-----------------------+----------------------------------------------+ -| PBB | - CRD for provider backbone bridge | -| | sub-interface. | -| | - Configure, modify and remove a PBB | -| | sub-interface over a physical interface. | -| | - Test case count: 8. | -+-----------------------+----------------------------------------------+ -| Policer | - CRD for traffic policing feature. | -| | - Configure Policing rules. | -| | - Assign to interface. | -| | - Test case count: 6. | -+-----------------------+----------------------------------------------+ -| Port mirroring | - CRD for SPAN port mirroring, interface | -| | assignment. | -| | - Configure SPAN port mirroring on a | -| | physical interface, mirroring. | -| | - up to 2 interfaces. | -| | - Remove SPAN configuration from interfaces. | -| | - Test case count: 14. | -+-----------------------+----------------------------------------------+ -| ProxyARP | - CRD for proxyARP feature. | -| | - Configure proxyARP. | -| | - Assign to interface. | -| | - Test case count: 3. | -+-----------------------+----------------------------------------------+ -| ProxyND6 | - CRD for Neighbor Discovery Proxy. | -| | - Configure ProxyND6 feature on interface. | -| | - Test case count: 4. | -+-----------------------+----------------------------------------------+ -| Routing | - CRD for routing. | -| | - Configure single-hop route. | -| | - Configure multi-hop routes. | -| | - Configure blackhole route. | -| | - IPv4 and IPv6 variants. | -| | - Test case count: 6. | -+-----------------------+----------------------------------------------+ -| SLAAC | - CRD for Stateless Address | -| | AutoConfiguration. | -| | - Configure SLAAC feature on interfaces. | -| | - Test case count: 7. | -+-----------------------+----------------------------------------------+ -| Vhost-user | - CRUD for Vhost-user interfaces. | -| | - Create, modify and delete Vhost-user | -| | interface, as client and server. | -| | - Test case count: 8. | -+-----------------------+----------------------------------------------+ -| VLAN | - CRUD for VLAN sub-interface management. | -| | - Create VLAN sub-interface over a physical | -| | interface. | -| | - Toggle interface state separately for | -| | super-interface and sub-interface. | -| | - Configure IP address and bridge domain | -| | assignment on sub-interface. | -| | - Configure VLAN tag rewrite on | -| | sub-interface. | -| | - Test case count: 24. | -+-----------------------+----------------------------------------------+ -| VxLAN | - CRD for VxLAN tunnels. | -| | - Create VxLAN interface. | -| | - Disable VxLAN interface. | -| | - Re-create a disabled VxLAN interface. | -| | - Test case count: 6. | -+-----------------------+----------------------------------------------+ -| VxLAN-GPE | - CRD for VxLAN GPE tunnels. | -| | - Create VxLAN GPE interface. | -| | - Disable VxLAN interface. | -| | - Re-create a disabled VxLAN interface. | -| | - Test case count: 7. | -+-----------------------+----------------------------------------------+ -| TAP | - CRUD for Tap interface management. | -| | - Create, modify and delete TAP interface. | -| | - Test case count: 3. | -+-----------------------+----------------------------------------------+ - -Total 213 Honeycomb functional tests in the |csit-release|. - -Operational data in Honeycomb should mirror configuration data at all -times. Because of this, test cases follow this general pattern: - -#. read operational data of the feature using restconf. -#. read status of the feature using VPP API dump. -#. modify configuration of the feature using restconf. -#. verify changes to operational data using restconf. -#. verify changes using VPP API dump, OR -#. send a packet to VPP node and observe behaviour to verify configuration. - -Test cases involving network interfaces utilize the first two interfaces -on the DUT node. - -Functional Tests Naming ------------------------ - -|csit-release| follows a common structured naming convention for all -performance and system functional tests, introduced in CSIT-17.01. - -The naming should be intuitive for majority of the tests. Complete -description of CSIT test naming convention is provided on -:ref:`csit_test_naming`. diff --git a/docs/report/honeycomb_functional_tests/test_environment.rst b/docs/report/honeycomb_functional_tests/test_environment.rst deleted file mode 100644 index c0e13b5423..0000000000 --- a/docs/report/honeycomb_functional_tests/test_environment.rst +++ /dev/null @@ -1,7 +0,0 @@ -Test Environment -================ - -FD.io CSIT HoneyComb functional tests are executed in the same FD.io -virtual environment as used CSIT VPP functional tests. See description -in `VPP Functional Tests Environment -<../vpp_functional_tests/test_environment.html>`_. diff --git a/docs/report/index.html.template b/docs/report/index.html.template index a5e57e9617..141ffbf370 100644 --- a/docs/report/index.html.template +++ b/docs/report/index.html.template @@ -63,16 +63,6 @@ CSIT-1908 .. .. toctree:: :maxdepth: 2 - :caption: HoneyComb Functional - - honeycomb_functional_tests/overview - honeycomb_functional_tests/csit_release_notes - honeycomb_functional_tests/test_environment - honeycomb_functional_tests/documentation - -.. - .. toctree:: - :maxdepth: 2 :caption: NSH_SFC Functional nsh_sfc_functional_tests/overview @@ -101,7 +91,6 @@ CSIT-1908 detailed_test_results/vpp_device_results_ubuntu/index .. - detailed_test_results/honeycomb_functional_results/index detailed_test_results/dmm_functional_results/index detailed_test_results/nshsfc_functional_results/index diff --git a/docs/report/introduction/introduction.rst b/docs/report/introduction/introduction.rst index 5470cca4e9..be63cf5c1e 100644 --- a/docs/report/introduction/introduction.rst +++ b/docs/report/introduction/introduction.rst @@ -83,16 +83,6 @@ available for download. - **Documentation**: Pointers to CSIT source code documentation for VPP functional tests. -#. HONEYCOMB FUNCTIONAL: Honeycomb functional tests executed in - virtual FD.io testbeds. - - - **Overview**: Tested virtual topologies, test coverage and naming - specifics; - - **Release Notes**: Changes in |csit-release|, known issues. - - **Test Environment**: Functional test environment configuration. - - **Documentation**: Pointers to CSIT source code documentation for - Honeycomb functional tests. - #. DETAILED RESULTS: Detailed result tables auto-generated from CSIT test job executions using RF (Robot Framework) output files as sources. diff --git a/resources/libraries/bash/function/artifacts_hc.sh b/resources/libraries/bash/function/artifacts_hc.sh deleted file mode 100644 index 7a866f6596..0000000000 --- a/resources/libraries/bash/function/artifacts_hc.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -set -exuo pipefail - -function download_artifacts_hc () { - - # Download or install HC artifacts from packagecloud.io. - # - # Variables read: - # - CSIT_DIR - Path to existing root of local CSIT git repository. - # Variables set: - # - REPO_URL - FD.io Packagecloud repository. - # Functions conditionally called (see their documentation for side effects): - # - download_ubuntu_artifacts_hc - # - download_centos_artifacts_hc - - set -exuo pipefail - - os_id=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g') || { - die "Get OS release failed." - } - - repo_url_path="${CSIT_DIR}/VPP_REPO_URL" - if [ -e "${repo_url_path}" ]; then - REPO_URL="$(<${repo_url_path})" || { - die "Read repo URL from ${repo_url_path} failed." - } - else - REPO_URL="https://packagecloud.io/install/repositories/fdio/master" - fi - - if [ "${os_id}" == "ubuntu" ]; then - download_ubuntu_artifacts_hc || die - elif [ "${os_id}" == "centos" ]; then - download_centos_artifacts_hc || die - else - die "${os_id} is not yet supported." - fi -} - -function download_ubuntu_artifacts_hc () { - - # Download or install Ubuntu HC artifacts from packagecloud.io. - # - # Variables read: - # - REPO_URL - FD.io Packagecloud repository. - # - HC_VERSION - HC version. - # - INSTALL - Whether install packages (if set to "true") or download only. - # Default: "false". - - set -exuo pipefail - - curl -s "${REPO_URL}"/script.deb.sh | sudo bash || { - die "Packagecloud FD.io repo fetch failed." - } - # If version is set we will add suffix. - artifacts=() - hc=(honeycomb) - if [ -z "${HC_VERSION-}" ]; then - artifacts+=(${hc[@]}) - else - artifacts+=(${hc[@]/%/=${HC_VERSION-}}) - fi - - if [[ "${INSTALL:-false}" == "true" ]]; then - sudo apt-get -y install "${artifacts[@]}" || { - die "Install HC artifacts failed." - } - else - apt-get -y download "${artifacts[@]}" || { - die "Download HC artifacts failed." - } - fi -} - -function download_centos_artifacts_hc () { - - # Download or install CentOS HC artifacts from packagecloud.io. - # - # Variables read: - # - REPO_URL - FD.io Packagecloud repository. - # - HC_VERSION - HC version. - # - INSTALL - Whether install packages (if set to "true") or download only. - # Default: "false". - - set -exuo pipefail - - curl -s "${REPO_URL}"/script.rpm.sh | sudo bash || { - die "Packagecloud FD.io repo fetch failed." - } - # If version is set we will add suffix. - artifacts=() - hc=(honeycomb) - if [ -z "${HC_VERSION-}" ]; then - artifacts+=(${hc[@]}) - else - artifacts+=(${hc[@]/%/-${HC_VERSION-}}) - fi - - if [[ "${INSTALL:-false}" == "true" ]]; then - sudo yum -y install "${artifacts[@]}" || { - die "Install HC artifact failed." - } - else - sudo yum -y install --downloadonly --downloaddir=. "${artifacts[@]}" || { - die "Download HC artifacts failed." - } - fi -} diff --git a/resources/libraries/python/Constants.py b/resources/libraries/python/Constants.py index 0b0d6f866e..3fa9ae28dc 100644 --- a/resources/libraries/python/Constants.py +++ b/resources/libraries/python/Constants.py @@ -187,21 +187,6 @@ class Constants(object): # TRex install directory TREX_INSTALL_DIR = '/opt/trex-core-2.61' - # Honeycomb directory location at topology nodes: - REMOTE_HC_DIR = '/opt/honeycomb' - - # Honeycomb persistence files location - REMOTE_HC_PERSIST = '/var/lib/honeycomb/persist' - - # Honeycomb log file location - REMOTE_HC_LOG = '/var/log/honeycomb/honeycomb.log' - - # Honeycomb templates location - RESOURCES_TPL_HC = 'resources/templates/honeycomb' - - # ODL Client Restconf listener port - ODL_PORT = 8181 - # Sysctl kernel.core_pattern KERNEL_CORE_PATTERN = '/tmp/%p-%u-%g-%s-%t-%h-%e.core' diff --git a/resources/libraries/python/honeycomb/BGP.py b/resources/libraries/python/honeycomb/BGP.py deleted file mode 100644 index 976e41d379..0000000000 --- a/resources/libraries/python/honeycomb/BGP.py +++ /dev/null @@ -1,396 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Keywords to manipulate BGP configuration using Honeycomb REST API.""" - -from resources.libraries.python.Constants import Constants as Const -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil - - -class BGPKeywords(object): - """Keywords to manipulate BGP configuration. - - Implements keywords which read configuration and operational data for - the BGP feature, and configure BGP parameters using Honeycomb REST API. - """ - - def __init__(self): - """Initializer.""" - pass - - @staticmethod - def _configure_bgp_peer(node, path, data=None): - """Send BGP peer configuration data and check the response. - - :param node: Honeycomb node. - :param path: Additional path to append to the base BGP config path. - :param data: Configuration data to be sent in PUT request. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response to PUT is not - 200 = OK or 201 = ACCEPTED. - """ - - if data is None: - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_bgp_peer", path) - else: - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_bgp_peer", data, path) - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of BGP peer was not successful. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def _configure_bgp_route(node, path, data=None): - """Send BGP route configuration data and check the response. - - :param node: Honeycomb node. - :param path: Additional path to append to the base BGP config path. - :param data: Configuration data to be sent in PUT request. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response to PUT is not - 200 = OK or 201 = ACCEPTED. - """ - - if data is None: - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_bgp_route", path) - else: - status_code, resp = HcUtil. \ - put_honeycomb_data(node, "config_bgp_route", data, path) - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of BGP route was not successful. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def get_full_bgp_configuration(node): - """Get BGP configuration from the node. - - :param node: Honeycomb node. - :type node: dict - :returns: BGP configuration data. - :rtype: dict - :raises HoneycombError: If the status code in response is not 200 = OK. - """ - - status_code, resp = HcUtil. \ - get_honeycomb_data(node, "config_bgp_peer") - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about BGP." - " Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def get_bgp_peer(node, address, datastore='config'): - """Get BGP configuration of the specified peer from the node. - - :param node: Honeycomb node. - :param address: IP address of the peer. - :param datastore: Get data from config or operational datastore. - :type node: dict - :type address: str - :type datastore: str - :returns: BGP peer configuration data. - :rtype: dict - :raises HoneycombError: If the status code in response is not 200 = OK. - """ - - path = "bgp-openconfig-extensions:neighbors/" \ - "neighbor/{0}".format(address) - if datastore != "operational": - url = "config_bgp_peer" - else: - url = "oper_bgp" - path = "peer/bgp:%2F%2F{0}".format(address) - status_code, resp = HcUtil. \ - get_honeycomb_data(node, url, path) - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about the BGP" - " peer. Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def add_bgp_peer(node, address, data): - """Configure a BGP peer on the node. - - :param node: Honeycomb node. - :param address: IP address of the peer. - :param data: Peer configuration data. - :type node: dict - :type address: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = "bgp-openconfig-extensions:neighbors/neighbor/{address}".format( - address=address) - return BGPKeywords._configure_bgp_peer(node, path, data) - - @staticmethod - def remove_bgp_peer(node, address): - """Remove a BGP peer from the configuration. - - :param node: Honeycomb node. - :param address: IP address of the peer. - :type node: dict - :type address: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "bgp-openconfig-extensions:neighbors/neighbor/{address}".format( - address=address) - return BGPKeywords._configure_bgp_peer(node, path) - - @staticmethod - def configure_bgp_route(node, peer_address, data, route_address, - index, ip_version): - """Configure a route for the BGP peer specified by peer IP address. - - :param node: Honeycomb node. - :param peer_address: IP address of the BGP peer. - :param data: Route configuration data. - :param route_address: IP address of the route. - :param index: Index number of the route within specified peer. - :param ip_version: IP protocol version. ipv4 or ipv6 - :type node: dict - :type peer_address: str - :type data: dict - :type route_address: str - :type index: int - :type ip_version: str - :returns: Content of response. - :rtype: bytearray - """ - - route_address = route_address.replace("/", "%2F") - - if ip_version.lower() == "ipv4": - path = "{0}/tables/bgp-types:ipv4-address-family/" \ - "bgp-types:unicast-subsequent-address-family/" \ - "bgp-inet:ipv4-routes/ipv4-route/{1}/{2}" \ - .format(peer_address, route_address, index) - else: - path = "{0}/tables/bgp-types:ipv6-address-family/" \ - "bgp-types:unicast-subsequent-address-family/" \ - "bgp-inet:ipv6-routes/ipv6-route/{1}/{2}" \ - .format(peer_address, route_address, index) - - return BGPKeywords._configure_bgp_route(node, path, data) - - @staticmethod - def get_bgp_route(node, peer_address, route_address, index, ip_version): - """Get all BGP peers from operational data. - - :param node: Honeycomb node. - :param peer_address: IP address of the BGP peer. - :param route_address: IP address of the route. - :param index: Index number of the route within specified peer. - :param ip_version: IP protocol version. ipv4 or ipv6 - :type node: dict - :type peer_address: str - :type route_address: str - :type index: int - :type ip_version: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response is not 200 = OK. - """ - - route_address = route_address.replace("/", "%2F") - - if ip_version.lower() == "ipv4": - path = "{0}/tables/bgp-types:ipv4-address-family/" \ - "bgp-types:unicast-subsequent-address-family/" \ - "bgp-inet:ipv4-routes/ipv4-route/{1}/{2}" \ - .format(peer_address, route_address, index) - else: - path = "{0}/tables/bgp-types:ipv6-address-family/" \ - "bgp-types:unicast-subsequent-address-family/" \ - "bgp-inet:ipv6-routes/ipv6-route/{1}/{2}" \ - .format(peer_address, route_address, index) - status_code, resp = HcUtil. \ - get_honeycomb_data(node, "config_bgp_route", path) - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about the BGP" - " route. Status code: {0}.".format(status_code)) - - return resp - - @staticmethod - def get_all_peer_routes(node, peer_address, ip_version): - """Get all configured routes for the given BGP peer. - - :param node: Honeycomb node. - :param peer_address: IP address of the peer. - :param ip_version: IP protocol version. ipv4 or ipv6 - :type node: dict - :type peer_address: str - :type ip_version: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response is not 200 = OK. - """ - - if ip_version.lower() == "ipv4": - path = "{0}/tables/bgp-types:ipv4-address-family/" \ - "bgp-types:unicast-subsequent-address-family/" \ - "bgp-inet:ipv4-routes".format(peer_address) - else: - path = "{0}/tables/bgp-types:ipv6-address-family/" \ - "bgp-types:unicast-subsequent-address-family/" \ - "bgp-inet:ipv6-routes".format(peer_address) - status_code, resp = HcUtil. \ - get_honeycomb_data(node, "config_bgp_route", path) - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about BGP" - " routes. Status code: {0}.".format(status_code)) - - return resp - - @staticmethod - def remove_bgp_route(node, peer_address, route_address, index, ip_version): - """Remove the specified BGP route from configuration. - - :param node: Honeycomb node. - :param peer_address: IP address of the BGP peer. - :param route_address: IP address of the route. - :param index: Index number of the route within specified peer. - :param ip_version: IP protocol version. ipv4 or ipv6 - :type node: dict - :type peer_address: str - :type route_address: str - :type index: int - :type ip_version: str - :returns: Content of response. - :rtype: bytearray - """ - - route_address = route_address.replace("/", "%2F") - - if ip_version.lower() == "ipv4": - path = "{0}/tables/bgp-types:ipv4-address-family/" \ - "bgp-types:unicast-subsequent-address-family/" \ - "bgp-inet:ipv4-routes/ipv4-route/{1}/{2}" \ - .format(peer_address, route_address, index) - else: - path = "{0}/tables/bgp-types:ipv6-address-family/" \ - "bgp-types:unicast-subsequent-address-family/" \ - "bgp-inet:ipv6-routes/ipv6-route/{1}/{2}" \ - .format(peer_address, route_address, index) - - return BGPKeywords._configure_bgp_route(node, path) - - @staticmethod - def get_bgp_local_rib(node): - """Get local RIB table from the Honeycomb node. - - :param node: Honeycomb node. - :type node: dict - :returns: RIB operational data. - :rtype: dict - :raises HoneycombError: If the status code in response is not 200 = OK. - """ - - path = "loc-rib" - - status_code, resp = HcUtil. \ - get_honeycomb_data(node, "oper_bgp", path) - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational data from BGP local RIB." - " Status code: {0}.".format(status_code)) - - return resp - - @staticmethod - def configure_bgp_base(node, ip_address, port, as_number): - """Modify BGP config file. Requires a restart of Honeycomb to take - effect. - - :param node: Honeycomb node. - :param ip_address: BGP peer identifier/binding address. - :param port: BGP binding port. - :param as_number: Autonomous System ID number. - :type node: dict - :type ip_address: str - :type port: int - :type as_number: int - :raises HoneycombError: If modifying the configuration fails. - """ - - from resources.libraries.python.ssh import SSH - - config = { - '\\"bgp-binding-address\\"': '\\"{0}\\"'.format(ip_address), - '\\"bgp-port\\"': port, - '\\"bgp-as-number\\"': as_number} - - path = "{0}/config/bgp.json".format(Const.REMOTE_HC_DIR) - - for key, value in config.items(): - find = key - replace = '"{0}": "{1}",'.format(key, value) - - argument = '"/{0}/c\\ {1}"'.format(find, replace) - command = "sed -i {0} {1}".format(argument, path) - - ssh = SSH() - ssh.connect(node) - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify configuration on " - "node {0}, {1}".format(node, stderr)) - - @staticmethod - def compare_rib_tables(data, ref): - """Compare provided RIB table with reference. All reference entries must - be present in data. Data entries not present in reference are ignored. - - :param data: Data from Honeycomb node. - :param ref: Reference data to compare against. - :type data: dict - :type ref: dict - :raises HoneycombError: If the tables do not match. - """ - - # Remove runtime attributes from data - for item in data: - item.pop("attributes", "") - - for item in ref: - if item not in data: - raise HoneycombError( - "RIB entry {0} not found in operational data {1}." - .format(item, data)) diff --git a/resources/libraries/python/honeycomb/DHCP.py b/resources/libraries/python/honeycomb/DHCP.py deleted file mode 100644 index 56cfdb2a78..0000000000 --- a/resources/libraries/python/honeycomb/DHCP.py +++ /dev/null @@ -1,110 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Keywords to manipulate NAT configuration using Honeycomb REST API.""" - -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil - - -class DHCPRelayKeywords(object): - """Keywords for NAT configuration.""" - - def __init__(self): - pass - - @staticmethod - def _set_dhcp_relay_properties(node, path, data=None): - """Set DHCP relay properties and check the return code. - - :param node: Honeycomb node. - :param path: Path which is added to the base path to identify the data. - :param data: The new data to be set. If None, the item will be removed. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response is not - 200 = OK or 201 = ACCEPTED. - """ - - if data: - status_code, resp = HcUtil. \ - put_honeycomb_data(node, "config_dhcp_relay", data, path, - data_representation=DataRepresentation.JSON) - else: - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_dhcp_relay", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of DHCP relay was not successful. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def add_dhcp_relay(node, data, ip_version, entry_id): - """Add a DHCP relay entry to the list on entries. - - :param node: Honeycomb node. - :param data: Configuration for the relay entry. - :param ip_version: IP protocol version, ipv4 or ipv6. - :param entry_id: Numeric ID. - :type node: dict - :type data: dict - :type ip_version: str - :type entry_id: int - :returns: Content of response. - :rtype: bytearray - """ - - path = "/relay/vpp-fib-table-management:{0}/{1}".format(ip_version, - entry_id) - - return DHCPRelayKeywords._set_dhcp_relay_properties(node, path, data) - - @staticmethod - def clear_dhcp_relay_configuration(node): - """Remove all DHCP relay configuration from the node. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - """ - return DHCPRelayKeywords._set_dhcp_relay_properties(node, "") - - @staticmethod - def get_dhcp_relay_oper_data(node): - """Get operational data about the DHCP relay feature. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response is not 200 = OK. - """ - - status_code, resp = HcUtil. \ - get_honeycomb_data(node, "config_dhcp_relay") - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Could not retrieve DHCP relay configuration. " - "Status code: {0}.".format(status_code)) - return resp diff --git a/resources/libraries/python/honeycomb/FIB.py b/resources/libraries/python/honeycomb/FIB.py deleted file mode 100644 index bfccf5a029..0000000000 --- a/resources/libraries/python/honeycomb/FIB.py +++ /dev/null @@ -1,139 +0,0 @@ -# Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. -# 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. - -"""This module implements keywords to manipulate FIB tables using -Honeycomb REST API.""" - -from robot.api import logger - -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil - - -class FibKeywords(object): - """Implementation of keywords which make it possible to: - - add/remove FIB tables, - - add/remove FIB table entries - - get operational data about FIB tables, - """ - - def __init__(self): - pass - - @staticmethod - def _set_fib_table_properties(node, path, data=None): - """Set FIB table properties and check the return code. - - :param node: Honeycomb node. - :param path: Path which is added to the base path to identify the data. - :param data: The new data to be set. If None, the item will be removed. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response is not - 200 = OK. - """ - - if data: - status_code, resp = HcUtil. \ - put_honeycomb_data(node, "config_fib_table", data, path, - data_representation=DataRepresentation.JSON) - else: - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_fib_table", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - if data is None and '"error-tag":"data-missing"' in resp: - logger.debug("data does not exist in path.") - else: - raise HoneycombError( - "The configuration of FIB table was not successful. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def configure_fib_table(node, ip_version, vrf=1): - """Configure a FIB table according to the data provided. - - :param node: Honeycomb node. - :param ip_version: IP protocol version, ipv4 or ipv6. - :param vrf: vrf-id to attach configuration to. - :type node: dict - :type ip_version: str - :type vrf: int - :returns: Content of response. - :rtype: bytearray - """ - full_data = { - "vpp-fib-table-management:table": [ - { - "table-id": vrf, - "address-family": "vpp-fib-table-management:{0}" - .format(ip_version), - "name": "{0}-VRF:{1}".format(ip_version, vrf) - } - ] - } - path = "/table/{0}/vpp-fib-table-management:{1}".format(vrf, ip_version) - return FibKeywords._set_fib_table_properties(node, path, full_data) - - @staticmethod - def delete_fib_table(node, ip_version, vrf=1): - """Delete the specified FIB table from configuration data. - - :param node: Honeycomb node. - :param ip_version: IP protocol version, ipv4 or ipv6. - :param vrf: vrf-id to attach configuration to. - :type node: dict - :type ip_version: str - :type vrf: int - :returns: Content of response. - :rtype: bytearray - """ - - path = "/table/{0}/vpp-fib-table-management:{1}".format(vrf, ip_version) - return FibKeywords._set_fib_table_properties(node, path) - - @staticmethod - def get_fib_table_oper(node, ip_version, vrf=1): - """Retrieve operational data about the specified FIB table. - - :param node: Honeycomb node. - :param ip_version: IP protocol version, ipv4 or ipv6. - :param vrf: vrf-id to attach configuration to. - :type node: dict - :type ip_version: str - :type vrf: int - :returns: FIB table operational data. - :rtype: list - :raises HoneycombError: If the operation fails. - """ - - path = "/table/{0}/vpp-fib-table-management:{1}".format(vrf, ip_version) - status_code, resp = HcUtil. \ - get_honeycomb_data(node, "oper_fib_table", path) - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about the " - "FIB tables. Status code: {0}.".format(status_code)) - - data = resp['vpp-fib-table-management:table'][0] - - return data diff --git a/resources/libraries/python/honeycomb/HcAPIKwACL.py b/resources/libraries/python/honeycomb/HcAPIKwACL.py deleted file mode 100644 index b2848411a1..0000000000 --- a/resources/libraries/python/honeycomb/HcAPIKwACL.py +++ /dev/null @@ -1,374 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -"""This module implements keywords to manipulate ACL data structures using -Honeycomb REST API.""" - - -from robot.api import logger - -from resources.libraries.python.topology import Topology -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation - - -class ACLKeywords(object): - """Implementation of keywords which make it possible to: - - add classify table(s), - - remove classify table(s), - - get operational data about classify table(s), - - add classify session(s), - - remove classify session(s), - - get operational data about classify sessions(s). - """ - - def __init__(self): - pass - - @staticmethod - def _set_classify_table_properties(node, path, data=None): - """Set classify table properties and check the return code. - - :param node: Honeycomb node. - :param path: Path which is added to the base path to identify the data. - :param data: The new data to be set. If None, the item will be removed. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response to PUT is not - 200 = OK. - """ - - if data: - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_classify_table", data, path, - data_representation=DataRepresentation.JSON) - else: - status_code, resp = HcUtil.\ - delete_honeycomb_data(node, "config_classify_table", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - if data is None and '"error-tag":"data-missing"' in resp: - logger.debug("data does not exist in path.") - else: - raise HoneycombError( - "The configuration of classify table was not successful. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def add_classify_table(node, table): - """Add a classify table to the list of classify tables. The keyword does - not validate given data. - - :param node: Honeycomb node. - :param table: Classify table to be added. - :type node: dict - :type table: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = "/classify-table/" + table["name"] - data = {"classify-table": [table, ]} - return ACLKeywords._set_classify_table_properties(node, path, data) - - @staticmethod - def remove_all_classify_tables(node): - """Remove all classify tables defined on the node. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - """ - - return ACLKeywords._set_classify_table_properties(node, path="") - - @staticmethod - def remove_classify_table(node, table_name): - """Remove the given classify table. - - :param node: Honeycomb node. - :param table_name: Name of the classify table to be removed. - :type node: dict - :type table_name: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/classify-table/" + table_name - return ACLKeywords._set_classify_table_properties(node, path) - - @staticmethod - def get_all_classify_tables_oper_data(node): - """Get operational data about all classify tables present on the node. - - :param node: Honeycomb node. - :type node: dict - :returns: List of classify tables. - :rtype: list - """ - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "oper_classify_table") - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about the " - "classify tables. Status code: {0}.".format(status_code)) - - return resp["vpp-classifier-state"]["classify-table"] - - @staticmethod - def get_classify_table_oper_data(node, table_name): - """Get operational data about the given classify table. - - :param node: Honeycomb node. - :param table_name: Name of the classify table. - :type node: dict - :type table_name: str - :returns: Operational data about the given classify table. - :rtype: dict - """ - - tables = ACLKeywords.get_all_classify_tables_oper_data(node) - for table in tables: - if table["name"] == table_name: - return table - raise HoneycombError("Table {0} not found in ACL table list.".format( - table_name)) - - @staticmethod - def get_all_classify_tables_cfg_data(node): - """Get configuration data about all classify tables present on the node. - - :param node: Honeycomb node. - :type node: dict - :returns: List of classify tables. - :rtype: list - """ - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_classify_table") - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about the " - "classify tables. Status code: {0}.".format(status_code)) - try: - return resp["vpp-classifier"]["classify-table"] - except (KeyError, TypeError): - return [] - - @staticmethod - def add_classify_session(node, table_name, session): - """Add a classify session to the classify table. - - :param node: Honeycomb node. - :param table_name: Name of the classify table. - :param session: Classify session to be added to the classify table. - :type node: dict - :type table_name: str - :type session: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = "/classify-table/" + table_name + \ - "/classify-session/" + session["match"] - data = {"classify-session": [session, ]} - return ACLKeywords._set_classify_table_properties(node, path, data) - - @staticmethod - def remove_classify_session(node, table_name, session_match): - """Remove the given classify session from the classify table. - - :param node: Honeycomb node. - :param table_name: Name of the classify table. - :param session_match: Classify session match. - :type node: dict - :type table_name: str - :type session_match: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/classify-table/" + table_name + \ - "/classify-session/" + session_match - return ACLKeywords._set_classify_table_properties(node, path) - - @staticmethod - def get_all_classify_sessions_oper_data(node, table_name): - """Get operational data about all classify sessions in the classify - table. - - :param node: Honeycomb node. - :param table_name: Name of the classify table. - :type node: dict - :type table_name: str - :returns: List of classify sessions present in the classify table. - :rtype: list - """ - - table_data = ACLKeywords.get_classify_table_oper_data(node, table_name) - - return table_data["classify-session"] - - @staticmethod - def get_classify_session_oper_data(node, table_name, session_match): - """Get operational data about the given classify session in the classify - table. - - :param node: Honeycomb node. - :param table_name: Name of the classify table. - :param session_match: Classify session match. - :type node: dict - :type table_name: str - :type session_match: str - :returns: Classify session operational data. - :rtype: dict - :raises HoneycombError: If no session the specified match Id is found. - """ - - sessions = ACLKeywords.get_all_classify_sessions_oper_data( - node, table_name) - for session in sessions: - if session["match"] == session_match: - return session - raise HoneycombError( - "Session with match value \"{0}\" not found" - " under ACL table {1}.".format(session_match, table_name)) - - @staticmethod - def create_acl_plugin_classify_chain(node, list_name, data): - """Create classify chain using the ietf-acl node. - - :param node: Honeycomb node. - :param list_name: Name for the classify list. - :param data: Dictionary of settings to send to Honeycomb. - :type node: dict - :type list_name: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the operation fails. - """ - - path = "/acl/{0}".format(list_name) - - status_code, resp = HcUtil.put_honeycomb_data( - node, "config_plugin_acl", data, path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Could not create classify chain." - "Status code: {0}.".format(status_code)) - - return resp - - @staticmethod - def set_acl_plugin_interface(node, interface, acl_name, direction): - """Assign an interface to an ietf-acl classify chain. - - :param node: Honeycomb node. - :param interface: Name of an interface on the node. - :param acl_name: Name of an ACL chain configured through ACL-plugin. - :param direction: Classify incoming or outgoing packets. - Valid options are: ingress, egress - :type node: dict - :type interface: str or int - :type acl_name: str - :type direction: str - :returns: Content of response. - :rtype: bytearray - :raises ValueError: If the direction argument is incorrect. - :raises HoneycombError: If the operation fails. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - interface = interface.replace("/", "%2F") - - if direction not in ("ingress", "egress"): - raise ValueError("Unknown traffic direction {0}. " - "Valid options are: ingress, egress." - .format(direction)) - - path = "/attachment-points/interface/{0}/{1}/acl-sets/".format( - interface, direction) - - data = { - "acl-sets": { - "acl-set": { - "name": acl_name - } - } - } - - status_code, resp = HcUtil.put_honeycomb_data( - node, "config_plugin_acl", data, path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Could not configure ACL on interface. " - "Status code: {0}.".format(status_code)) - - return resp - - @staticmethod - def delete_interface_plugin_acls(node, interface): - """Remove all plugin-acl assignments from an interface. - - :param node: Honeycomb node. - :param interface: Name of an interface on the node. - :type node: dict - :type interface: str or int - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - interface = interface.replace("/", "%2F") - - path = "/attachment-points/interface/{0}/".format(interface) - status_code, _ = HcUtil.delete_honeycomb_data( - node, "config_plugin_acl", path) - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Could not remove ACL assignment from interface. " - "Status code: {0}.".format(status_code)) - - @staticmethod - def delete_acl_plugin_classify_chains(node): - """Remove all plugin-ACL classify chains. - - :param node: Honeycomb node. - :type node: dict - """ - - status_code, _ = HcUtil.delete_honeycomb_data( - node, "config_plugin_acl") - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Could not remove plugin-acl chain. " - "Status code: {0}.".format(status_code)) diff --git a/resources/libraries/python/honeycomb/HcAPIKwBridgeDomain.py b/resources/libraries/python/honeycomb/HcAPIKwBridgeDomain.py deleted file mode 100644 index 576124794c..0000000000 --- a/resources/libraries/python/honeycomb/HcAPIKwBridgeDomain.py +++ /dev/null @@ -1,482 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Keywords to manipulate bridge domain configuration using Honeycomb REST API. - -The keywords make possible to put and get configuration data and to get -operational data. -""" - -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil - - -class BridgeDomainKeywords(object): - """Keywords to manipulate bridge domain configuration. - - Implements keywords which get configuration and operational data about - bridge domains and put the bridge domains' parameters using Honeycomb REST - API. - """ - - PARAMS = ("flood", "forward", "learn", "unknown-unicast-flood", - "arp-termination") - - def __init__(self): - pass - - @staticmethod - def _configure_bd(node, bd_name, data, - data_representation=DataRepresentation.JSON): - """Send bridge domain configuration data and check the response. - - :param node: Honeycomb node. - :param bd_name: The name of bridge domain. - :param data: Configuration data to be sent in PUT request. - :param data_representation: How the data is represented. - :type node: dict - :type bd_name: str - :type data: dict - :type data_representation: DataRepresentation - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response on PUT is not - 200 = OK. - """ - - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_bridge_domain", data, - data_representation=data_representation) - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of bridge domain '{0}' was not successful. " - "Status code: {1}.".format(bd_name, status_code)) - return resp - - @staticmethod - def _set_bd_properties(node, bd_name, path, new_value=None): - """Set bridge domain properties. - - This method reads bridge domain configuration data, creates, changes or - removes the requested data and puts it back to Honeycomb. - - :param node: Honeycomb node. - :param bd_name: The name of bridge domain. - :param path: Path to data we want to change, create or remove. - :param new_value: The new value to be set. If None, the item will be - removed. - :type node: dict - :type bd_name: str - :type path: tuple - :type new_value: str, dict or list - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If it is not possible to get or set the data. - """ - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_bridge_domain") - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Not possible to get configuration information about the " - "bridge domains. Status code: {0}.".format(status_code)) - - if new_value: - new_data = HcUtil.set_item_value(resp, path, new_value) - else: - new_data = HcUtil.remove_item(resp, path) - - return BridgeDomainKeywords._configure_bd(node, bd_name, new_data) - - @staticmethod - def _create_bd_structure(bd_name, **kwargs): - """Create the bridge domain data structure as it is expected by - Honeycomb REST API. - - :param bd_name: Bridge domain name. - :param kwargs: Parameters and their values. The accepted parameters are - defined in BridgeDomainKeywords.PARAMS. - :type bd_name: str - :type kwargs: dict - :returns: Bridge domain data structure. - :rtype: dict - """ - - bd_structure = {"name": bd_name} - - for param, value in kwargs.items(): - if param not in BridgeDomainKeywords.PARAMS: - raise HoneycombError("The parameter {0} is invalid.". - format(param)) - bd_structure[param] = str(value) - - return bd_structure - - @staticmethod - def get_all_bds_cfg_data(node): - """Get configuration data about all bridge domains from Honeycomb. - - :param node: Honeycomb node. - :type node: dict - :returns: Configuration data about all bridge domains from Honeycomb. - :rtype: list - :raises HoneycombError: If it is not possible to get configuration data. - """ - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_bridge_domain") - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about the " - "bridge domains. Status code: {0}.".format(status_code)) - try: - return resp["bridge-domains"]["bridge-domain"] - - except (KeyError, TypeError): - return [] - - @staticmethod - def get_bd_cfg_data(node, bd_name): - """Get configuration data about the given bridge domain from Honeycomb. - - :param node: Honeycomb node. - :param bd_name: The name of bridge domain. - :type node: dict - :type bd_name: str - :returns: Configuration data about the given bridge domain from - Honeycomb. - :rtype: dict - """ - - intfs = BridgeDomainKeywords.get_all_bds_cfg_data(node) - for intf in intfs: - if intf["name"] == bd_name: - return intf - return {} - - @staticmethod - def get_all_bds_oper_data(node): - """Get operational data about all bridge domains from Honeycomb. - - :param node: Honeycomb node. - :type node: dict - :returns: Operational data about all bridge domains from Honeycomb. - :rtype: list - :raises HoneycombError: If it is not possible to get operational data. - """ - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "oper_bridge_domains") - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about the " - "bridge domains. Status code: {0}.".format(status_code)) - try: - return resp["bridge-domains-state"]["bridge-domain"] - - except (KeyError, TypeError): - return [] - - @staticmethod - def get_bd_oper_data(node, bd_name): - """Get operational data about the given bridge domain from Honeycomb. - - :param node: Honeycomb node. - :param bd_name: The name of bridge domain. - :type node: dict - :type bd_name: str - :returns: Operational data about the given bridge domain from Honeycomb. - :rtype: dict - """ - - intfs = BridgeDomainKeywords.get_all_bds_oper_data(node) - for intf in intfs: - if intf["name"] == bd_name: - return intf - return {} - - @staticmethod - def add_first_bd(node, bd_name, **kwargs): - """Add the first bridge domain. - - If there are any other bridge domains configured, they will be removed. - - :param node: Honeycomb node. - :param bd_name: Bridge domain name. - :param kwargs: Parameters and their values. The accepted parameters are - defined in BridgeDomainKeywords.PARAMS - :type node: dict - :type bd_name: str - :type kwargs: dict - :returns: Bridge domain data structure. - :rtype: dict - """ - - new_bd = BridgeDomainKeywords._create_bd_structure(bd_name, **kwargs) - bridge_domain = {"bridge-domains": {"bridge-domain": [new_bd, ]}} - return BridgeDomainKeywords._configure_bd(node, bd_name, bridge_domain) - - @staticmethod - def add_bd(node, bd_name, **kwargs): - """Add a bridge domain. - - :param node: Honeycomb node. - :param bd_name: Bridge domain name. - :param kwargs: Parameters and their values. The accepted parameters are - defined in BridgeDomainKeywords.PARAMS - :type node: dict - :type bd_name: str - :type kwargs: dict - :returns: Bridge domain data structure. - :rtype: dict - """ - - path = ("bridge-domains", "bridge-domain") - new_bd = BridgeDomainKeywords._create_bd_structure(bd_name, **kwargs) - bridge_domain = [new_bd, ] - return BridgeDomainKeywords._set_bd_properties(node, bd_name, path, - bridge_domain) - - @staticmethod - def remove_all_bridge_domains(node): - """Remove all bridge domains. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If it is not possible to remove all bridge - domains. - """ - - data = {"bridge-domains": {"bridge-domain": []}} - - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_bridge_domain", data) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError("Not possible to remove all bridge domains. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def remove_bridge_domain(node, bd_name): - """Remove a bridge domain. - - :param node: Honeycomb node. - :param bd_name: The name of bridge domain to be removed. - :type node: dict - :type bd_name: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If it is not possible to remove the bridge - domain. - """ - - path = ("bridge-domains", ("bridge-domain", "name", bd_name)) - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_bridge_domain") - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about the " - "bridge domains. Status code: {0}.".format(status_code)) - - new_data = HcUtil.remove_item(resp, path) - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_bridge_domain", new_data) - if status_code != HTTPCodes.OK: - raise HoneycombError("Not possible to remove bridge domain {0}. " - "Status code: {1}.". - format(bd_name, status_code)) - return resp - - @staticmethod - def configure_bridge_domain(node, bd_name, param, value): - """Configure a bridge domain. - - :param node: Honeycomb node. - :param bd_name: Bridge domain name. - :param param: Parameter to set, change or remove. The accepted - parameters are defined in BridgeDomainKeywords.PARAMS - :param value: The new value to be set, change or remove. If None, the - item will be removed. - :type node: dict - :type bd_name: str - :type param: str - :type value: str - :returns: Content of response. - :rtype: bytearray - """ - - if param not in BridgeDomainKeywords.PARAMS: - raise HoneycombError("The parameter {0} is invalid.".format(param)) - - path = ("bridge-domains", ("bridge-domain", "name", bd_name), param) - return BridgeDomainKeywords.\ - _set_bd_properties(node, bd_name, path, value) - - @staticmethod - def add_l2_fib_entry(node, bd_name, l2_fib_entry): - """Add an L2 FIB entry to the bridge domain's list of L2 FIB entries. - - :param node: Honeycomb node. - :param bd_name: Bridge domain's name. - :param l2_fib_entry: L2 FIB entry to be added to the L2 FIB table. - :type node: dict - :type bd_name: str - :type l2_fib_entry: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = ("bridge-domains", - ("bridge-domain", "name", bd_name), - "l2-fib-table", - "l2-fib-entry") - - new_l2_fib_entry = [l2_fib_entry, ] - return BridgeDomainKeywords._set_bd_properties( - node, bd_name, path, new_l2_fib_entry) - - @staticmethod - def modify_l2_fib_entry(node, bd_name, mac, param, value): - """Modify an existing L2 FIB entry in the bridge domain's L2 FIB table. - The L2 FIB entry is specified by MAC address. - - :param node: Honeycomb node. - :param bd_name: Bridge domain's name. - :param mac: MAC address used as the key in L2 FIB data structure. - :param param: The parameter to be modified. - :param value: The new value of the parameter. - :type node: dict - :type bd_name: str - :type mac: str - :type param: str - :type value: str or int - :returns: Content of response. - :rtype: bytearray - """ - - path = ("bridge-domains", - ("bridge-domain", "name", bd_name), - "l2-fib-table", - ("l2-fib-entry", "phys-address", mac), - param) - - return BridgeDomainKeywords._set_bd_properties( - node, bd_name, path, value) - - @staticmethod - def remove_l2_fib_entry(node, bd_name, mac): - """Remove an L2 FIB entry from bridge domain's L2 FIB table. The - entry is specified by MAC address. - - :param node: Honeycomb node. - :param bd_name: Bridge domain's name. - :param mac: MAC address used as the key in L2 FIB data structure. - :type node: dict - :type bd_name: str - :type mac: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If it is not possible to remove the specified - entry. - """ - - path = ("bridge-domains", - ("bridge-domain", "name", bd_name), - "l2-fib-table", - ("l2-fib-entry", "phys-address", str(mac))) - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_bridge_domain") - if status_code != HTTPCodes.OK: - raise HoneycombError("Not possible to get configuration information" - " about the L2 FIB entry {0} from bridge " - "domain {1}. Status code: {2}.". - format(mac, bd_name, status_code)) - - new_data = HcUtil.remove_item(resp, path) - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_bridge_domain", new_data) - if status_code != HTTPCodes.OK: - raise HoneycombError("Not possible to remove L2 FIB entry {0} from " - "bridge domain {1}. Status code: {2}.". - format(mac, bd_name, status_code)) - return resp - - - @staticmethod - def remove_all_l2_fib_entries(node, bd_name): - """Remove all entries from the bridge domain's L2 FIB table. - - :param node: Honeycomb node. - :param bd_name: Bridge domain's name. - :type node: dict - :type bd_name: str - :returns: Content of response. - :rtype: bytearray - """ - - path = ("bridge-domains", - ("bridge-domain", "name", bd_name), - "l2-fib-table") - - return BridgeDomainKeywords._set_bd_properties( - node, bd_name, path, None) - - @staticmethod - def get_all_l2_fib_entries(node, bd_name): - """Retrieves all entries from the bridge domain's L2 FIB table. - - :param node: Honeycomb node. - :param bd_name: Bridge domain's name. - :type node: dict - :type bd_name: str - :returns: Bridge domain's L2 FIB table or empty list if the table does - not exist or it is empty. - :rtype: list - """ - - bd_data = BridgeDomainKeywords.get_bd_oper_data(node, bd_name) - try: - return bd_data["l2-fib-table"]["l2-fib-entry"] - except KeyError: - return [] - - @staticmethod - def get_l2_fib_entry(node, bd_name, mac): - """Retrieves an entry from bridge domain's L2 FIB table. The entry is - specified by MAC address. - - :param node: Honeycomb node. - :param bd_name: Bridge domain's name. - :param mac: MAC address used as the key in L2 FIB data structure. - :type node: dict - :type bd_name: str - :type mac: str - :returns: The requested entry from bridge domain's L2 FIB table or empty - dictionary if it does not exist in the L2 FIB table. - :rtype: dict - """ - - l2_fib = BridgeDomainKeywords.get_all_l2_fib_entries(node, bd_name) - for entry in l2_fib: - if entry["phys-address"] == mac: - return entry - return {} diff --git a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py deleted file mode 100644 index 662fedca10..0000000000 --- a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py +++ /dev/null @@ -1,1908 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Keywords to manipulate interface configuration using Honeycomb REST API. - -The keywords make possible to put and get configuration data and to get -operational data. -""" -from robot.api import logger - -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil -from resources.libraries.python.topology import Topology - - -class InterfaceKeywords(object): - """Keywords for Interface manipulation. - - Implements keywords which get configuration and operational data about - vpp interfaces and set the interface's parameters using Honeycomb REST API. - """ - - INTF_PARAMS = ("name", "description", "type", "enabled", - "link-up-down-trap-enable", "v3po:l2", "v3po:vxlan-gpe", - "vpp-vlan:sub-interfaces") - IPV4_PARAMS = ("enabled", "forwarding", "mtu") - IPV6_PARAMS = ("enabled", "forwarding", "mtu", "dup-addr-detect-transmits") - IPV6_AUTOCONF_PARAMS = ("create-global-addresses", - "create-temporary-addresses", - "temporary-valid-lifetime", - "temporary-preferred-lifetime") - ETH_PARAMS = ("mtu", ) - ROUTING_PARAMS = ("ipv4-vrf-id", "ipv6-vrf-id") - VXLAN_PARAMS = ("src", "dst", "vni", "encap-vrf-id") - L2_PARAMS = ("bridge-domain", "split-horizon-group", - "bridged-virtual-interface") - TAP_PARAMS = ("id", "tx-ring-size", "rx-ring-size", "host-mac", - "host-interface-name", "host-namespace", "host-bridge", - "host-ipv4-address", "host-ipv6-address", "tag", - "host-ipv4-gateway", "host-ipv6-gateway", "mac") - VHOST_USER_PARAMS = ("socket", "role") - SUB_IF_PARAMS = ("identifier", - "vlan-type", - "enabled") - SUB_IF_MATCH = ("default", - "untagged", - "vlan-tagged", - "vlan-tagged-exact-match") - BD_PARAMS = ("bridge-domain", - "split-horizon-group", - "bridged-virtual-interface") - VXLAN_GPE_PARAMS = ("local", - "remote", - "vni", - "next-protocol", - "encap-vrf-id", - "decap-vrf-id") - - def __init__(self): - pass - - @staticmethod - def _configure_interface(node, interface, data, - data_representation=DataRepresentation.JSON): - """Send interface configuration data and check the response. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param data: Configuration data to be sent in PUT request. - :param data_representation: How the data is represented. - :type node: dict - :type interface: str - :type data: dict - :type data_representation: DataRepresentation - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response on PUT is not - 200 = OK. - """ - - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_vpp_interfaces", data, - data_representation=data_representation) - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of interface '{0}' was not successful. " - "Status code: {1}.".format(interface, status_code)) - return resp - - @staticmethod - def get_all_interfaces_cfg_data(node): - """Get configuration data about all interfaces from Honeycomb. - - :param node: Honeycomb node. - :type node: dict - :returns: Configuration data about all interfaces from Honeycomb. - :rtype: list - :raises HoneycombError: If it is not possible to get configuration data. - """ - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_vpp_interfaces") - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about the " - "interfaces. Status code: {0}.".format(status_code)) - try: - return resp["interfaces"]["interface"] - - except (KeyError, TypeError): - return [] - - @staticmethod - def get_interface_cfg_data(node, interface): - """Get configuration data about the given interface from Honeycomb. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Configuration data about the given interface from Honeycomb. - :rtype: dict - """ - - intfs = InterfaceKeywords.get_all_interfaces_cfg_data(node) - for intf in intfs: - if intf["name"] == interface: - return intf - return {} - - @staticmethod - def get_all_interfaces_oper_data(node): - """Get operational data about all interfaces from Honeycomb. - - :param node: Honeycomb node. - :type node: dict - :returns: Operational data about all interfaces from Honeycomb. - :rtype: list - :raises HoneycombError: If it is not possible to get operational data. - """ - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "oper_vpp_interfaces") - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about the " - "interfaces. Status code: {0}.".format(status_code)) - try: - return resp["interfaces"]["interface"] - - except (KeyError, TypeError): - return [] - - @staticmethod - def get_disabled_interfaces_oper_data(node): - """Get operational data about all disabled interfaces from Honeycomb. - - :param node: Honeycomb node. - :type node: dict - :returns: Operational data about disabled interfaces. - :rtype: list - :raises HoneycombError: If it is not possible to get operational data. - """ - - status_code, resp = HcUtil. \ - get_honeycomb_data(node, "oper_disabled_interfaces") - if status_code == HTTPCodes.NOT_FOUND: - raise HoneycombError( - "No disabled interfaces present on node." - ) - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about the " - "interfaces. Status code: {0}.".format(status_code)) - try: - return resp["disabled-interfaces"]["disabled-interface-index"] - - except (KeyError, TypeError): - return [] - - @staticmethod - def get_interface_oper_data(node, interface): - """Get operational data about the given interface from Honeycomb. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Operational data about the given interface from Honeycomb. - :rtype: dict - """ - - try: - interface = Topology.convert_interface_reference( - node, interface, "name") - except RuntimeError: - if isinstance(interface, basestring): - # Probably name of a custom interface (TAP, VxLAN, Vhost, ...) - pass - else: - raise - - intfs = InterfaceKeywords.get_all_interfaces_oper_data(node) - for intf in intfs: - if intf["name"] == interface: - return intf - return {} - - @staticmethod - def _set_interface_properties(node, interface, path, new_value=None): - """Set interface properties. - - This method reads interface configuration data, creates, changes or - removes the requested data and puts it back to Honeycomb. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param path: Path to data we want to change / create / remove. - :param new_value: The new value to be set. If None, the item will be - removed. - :type node: dict - :type interface: str - :type path: tuple - :type new_value: str, dict or list - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If it is not possible to get or set the data. - """ - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_vpp_interfaces") - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about the " - "interfaces. Status code: {0}.".format(status_code)) - - if new_value: - new_data = HcUtil.set_item_value(resp, path, new_value) - else: - new_data = HcUtil.remove_item(resp, path) - return InterfaceKeywords._configure_interface(node, interface, new_data) - - @staticmethod - def honeycomb_set_interface_state(node, interface, state="up"): - """Set VPP interface state. - - The keyword changes the administration state of interface to up or down - depending on the parameter "state". - - :param node: Honeycomb node. - :param interface: Interface name, key, link name or sw_if_index. - :param state: The requested state, only "up" and "down" are valid - values. - :type node: dict - :type interface: str - :type state: str - :returns: Content of response. - :rtype: bytearray - :raises KeyError: If the argument "state" is nor "up" or "down". - :raises HoneycombError: If the interface is not present on the node. - """ - - intf_state = {"up": "true", - "down": "false"} - - interface = Topology.convert_interface_reference( - node, interface, "name") - - intf = interface.replace("/", "%2F") - path = "/interface/{0}".format(intf) - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_vpp_interfaces", path) - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about the " - "interfaces. Status code: {0}.".format(status_code)) - - resp["interface"][0]["enabled"] = intf_state[state.lower()] - - status_code, resp = HcUtil. \ - put_honeycomb_data(node, "config_vpp_interfaces", resp, path, - data_representation=DataRepresentation.JSON) - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of interface '{0}' was not successful. " - "Status code: {1}.".format(interface, status_code)) - return resp - - @staticmethod - def set_interface_up(node, interface): - """Set the administration state of VPP interface to up. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Content of response - :rtype: bytearray - """ - - return InterfaceKeywords.honeycomb_set_interface_state( - node, interface, "up") - - @staticmethod - def set_interface_down(node, interface): - """Set the administration state of VPP interface to down. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - """ - - return InterfaceKeywords.honeycomb_set_interface_state( - node, interface, "down") - - @staticmethod - def add_bridge_domain_to_interface(node, interface, bd_name, - split_horizon_group=None, bvi=None): - """Add a new bridge domain to an interface and set its parameters. - - :param node: Honeycomb node. - :param interface: Interface name, key, link name or sw_if_index. - :param bd_name: Bridge domain name. - :param split_horizon_group: Split-horizon group name. - :param bvi: The bridged virtual interface. - :type node: dict - :type interface: str - :type bd_name: str - :type split_horizon_group: str - :type bvi: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the interface is not present on the node. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - v3po_l2 = {"bridge-domain": str(bd_name)} - if split_horizon_group: - v3po_l2["split-horizon-group"] = str(split_horizon_group) - if bvi: - v3po_l2["bridged-virtual-interface"] = str(bvi) - - path = ("interfaces", ("interface", "name", str(interface)), "v3po:l2") - - return InterfaceKeywords._set_interface_properties( - node, interface, path, v3po_l2) - - @staticmethod - def remove_bridge_domain_from_interface(node, interface): - """Remove bridge domain assignment from interface. - - :param node: Honeycomb node. - :param interface: Interface name, key, link name or sw_if_index. - :type node: dict - :type interface: str or int - :raises HoneycombError: If the operation fails. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - intf = interface.replace("/", "%2F") - - path = "/interface/{0}/v3po:l2".format(intf) - - status_code, response = HcUtil.delete_honeycomb_data( - node, "config_vpp_interfaces", path) - - if status_code != HTTPCodes.OK: - if '"error-tag":"data-missing"' in response: - logger.debug("Data does not exist in path.") - else: - raise HoneycombError( - "Could not remove bridge domain assignment from interface " - "'{0}'. Status code: {1}.".format(interface, status_code)) - - @staticmethod - def get_bd_oper_data_from_interface(node, interface): - """Returns operational data about bridge domain settings in the - interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Operational data about bridge domain settings in the - interface. - :rtype: dict - """ - - if_data = InterfaceKeywords.get_interface_oper_data(node, interface) - - if if_data: - try: - return if_data["v3po:l2"] - except KeyError: - return {} - return {} - - @staticmethod - def configure_interface_base(node, interface, param, value): - """Configure the base parameters of interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param param: Parameter to configure (set, change, remove) - :param value: The value of parameter. If None, the parameter will be - removed. - :type node: dict - :type interface: str - :type param: str - :type value: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - if param not in InterfaceKeywords.INTF_PARAMS: - raise HoneycombError("The parameter {0} is invalid.".format(param)) - - path = ("interfaces", ("interface", "name", interface), param) - return InterfaceKeywords._set_interface_properties( - node, interface, path, value) - - @staticmethod - def configure_interface_ipv4(node, interface, param, value): - """Configure IPv4 parameters of interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param param: Parameter to configure (set, change, remove) - :param value: The value of parameter. If None, the parameter will be - removed. - :type node: dict - :type interface: str - :type param: str - :type value: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - if param not in InterfaceKeywords.IPV4_PARAMS: - raise HoneycombError("The parameter {0} is invalid.".format(param)) - - path = ("interfaces", ("interface", "name", interface), - "ietf-ip:ipv4", param) - return InterfaceKeywords._set_interface_properties( - node, interface, path, value) - - @staticmethod - def add_first_ipv4_address(node, interface, ip_addr, network): - """Add the first IPv4 address. - - If there are any other addresses configured, they will be removed. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param ip_addr: IPv4 address to be set. - :param network: Netmask or length of network prefix. - :type node: dict - :type interface: str - :type ip_addr: str - :type network: str or int - :returns: Content of response. - :rtype: bytearray - :raises ValueError: If the provided netmask or prefix is not valid. - :raises HoneycombError: If the operation fails. - """ - - interface = InterfaceKeywords.handle_interface_reference( - node, interface) - - path = "/interface/{0}/ietf-ip:ipv4".format(interface) - if isinstance(network, basestring): - data = { - "ietf-ip:ipv4": { - "address": [{"ip": ip_addr, "netmask": network}, ]}} - elif isinstance(network, int) and (0 < network < 33): - data = { - "ietf-ip:ipv4": { - "address": [{"ip": ip_addr, "prefix-length": network}, ]}} - else: - raise ValueError("Value {0} is not a valid netmask or network " - "prefix length.".format(network)) - status_code, _ = HcUtil.put_honeycomb_data( - node, "config_vpp_interfaces", data, path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Configuring IPv4 address failed. " - "Status code:{0}".format(status_code)) - - @staticmethod - def add_ipv4_address(node, interface, ip_addr, network): - """Add IPv4 address. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param ip_addr: IPv4 address to be set. - :param network: Netmask or length of network prefix. - :type node: dict - :type interface: str - :type ip_addr: str - :type network: str or int - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the provided netmask or prefix is not valid. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv4", - "address") - if isinstance(network, basestring): - address = [{"ip": ip_addr, "netmask": network}] - elif isinstance(network, int) and (0 < network < 33): - address = [{"ip": ip_addr, "prefix-length": network}] - else: - raise HoneycombError("Value {0} is not a valid netmask or network " - "prefix length.".format(network)) - return InterfaceKeywords._set_interface_properties( - node, interface, path, address) - - @staticmethod - def remove_all_ipv4_addresses(node, interface): - """Remove all IPv4 addresses from interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv4", - "address") - return InterfaceKeywords._set_interface_properties( - node, interface, path, None) - - @staticmethod - def add_ipv4_neighbor(node, interface, ip_addr, link_layer_address): - """Add the IPv4 neighbour. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param ip_addr: IPv4 address of neighbour to be set. - :param link_layer_address: Link layer address. - :type node: dict - :type interface: str - :type ip_addr: str - :type link_layer_address: str - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv4", - "neighbor") - neighbor = [{"ip": ip_addr, "link-layer-address": link_layer_address}, ] - return InterfaceKeywords._set_interface_properties( - node, interface, path, neighbor) - - @staticmethod - def remove_all_ipv4_neighbors(node, interface): - """Remove all IPv4 neighbours. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv4", - "neighbor") - return InterfaceKeywords._set_interface_properties( - node, interface, path, None) - - @staticmethod - def configure_interface_ipv6(node, interface, param, value): - """Configure IPv6 parameters of interface - - :param node: Honeycomb node. - :param interface: The name of interface. - :param param: Parameter to configure (set, change, remove) - :param value: The value of parameter. If None, the parameter will be - removed. - :type node: dict - :type interface: str - :type param: str - :type value: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - if param in InterfaceKeywords.IPV6_PARAMS: - path = ("interfaces", ("interface", "name", interface), - "ietf-ip:ipv6", param) - elif param in InterfaceKeywords.IPV6_AUTOCONF_PARAMS: - path = ("interfaces", ("interface", "name", interface), - "ietf-ip:ipv6", "autoconf", param) - else: - raise HoneycombError("The parameter {0} is invalid.".format(param)) - - return InterfaceKeywords._set_interface_properties( - node, interface, path, value) - - @staticmethod - def add_first_ipv6_address(node, interface, ip_addr, prefix_len): - """Add the first IPv6 address. - - If there are any other addresses configured, they will be removed. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param ip_addr: IPv6 address to be set. - :param prefix_len: Prefix length. - :type node: dict - :type interface: str - :type ip_addr: str - :type prefix_len: str - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv6") - address = {"address": [{"ip": ip_addr, "prefix-length": prefix_len}, ]} - return InterfaceKeywords._set_interface_properties( - node, interface, path, address) - - @staticmethod - def add_ipv6_address(node, interface, ip_addr, prefix_len): - """Add IPv6 address. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param ip_addr: IPv6 address to be set. - :param prefix_len: Prefix length. - :type node: dict - :type interface: str - :type ip_addr: str - :type prefix_len: str - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv6", - "address") - address = [{"ip": ip_addr, "prefix-length": prefix_len}, ] - return InterfaceKeywords._set_interface_properties( - node, interface, path, address) - - @staticmethod - def remove_all_ipv6_addresses(node, interface): - """Remove all IPv6 addresses from interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv6", - "address") - return InterfaceKeywords._set_interface_properties( - node, interface, path, None) - - @staticmethod - def add_ipv6_neighbor(node, interface, ip_addr, link_layer_address): - """Add the IPv6 neighbour. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param ip_addr: IPv6 address of neighbour to be set. - :param link_layer_address: Link layer address. - :type node: dict - :type interface: str - :type ip_addr: str - :type link_layer_address: str - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv6", - "neighbor") - neighbor = [{"ip": ip_addr, "link-layer-address": link_layer_address}, ] - return InterfaceKeywords._set_interface_properties( - node, interface, path, neighbor) - - @staticmethod - def remove_all_ipv6_neighbors(node, interface): - """Remove all IPv6 neighbours. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv6", - "neighbor") - return InterfaceKeywords._set_interface_properties( - node, interface, path, None) - - @staticmethod - def configure_interface_ethernet(node, interface, param, value): - """Configure the ethernet parameters of interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param param: Parameter to configure (set, change, remove) - :param value: The value of parameter. If None, the parameter will be - removed. - :type node: dict - :type interface: str - :type param: str - :type value: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - if param not in InterfaceKeywords.ETH_PARAMS: - raise HoneycombError("The parameter {0} is invalid.".format(param)) - path = ("interfaces", ("interface", "name", interface), "v3po:ethernet", - param) - return InterfaceKeywords._set_interface_properties( - node, interface, path, value) - - @staticmethod - def configure_interface_routing(node, interface, param, value): - """Configure the routing parameters of interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param param: Parameter to configure (set, change, remove) - :param value: The value of parameter. If None, the parameter will be - removed. - :type node: dict - :type interface: str - :type param: str - :type value: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - if param not in InterfaceKeywords.ROUTING_PARAMS: - raise HoneycombError("The parameter {0} is invalid.".format(param)) - - path = ("interfaces", ("interface", "name", interface), "v3po:routing", - param) - return InterfaceKeywords._set_interface_properties( - node, interface, path, value) - - @staticmethod - def honeycomb_create_vxlan_interface(node, interface, **kwargs): - """Create a new VxLAN interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param kwargs: Parameters and their values. The accepted parameters are - defined in InterfaceKeywords.VXLAN_PARAMS. - :type node: dict - :type interface: str - :type kwargs: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - new_vx_lan = { - "name": interface, - "type": "v3po:vxlan-tunnel", - "v3po:vxlan": {} - } - for param, value in kwargs.items(): - if param not in InterfaceKeywords.VXLAN_PARAMS: - raise HoneycombError("The parameter {0} is invalid.". - format(param)) - new_vx_lan["v3po:vxlan"][param] = value - - path = ("interfaces", "interface") - vx_lan_structure = [new_vx_lan, ] - return InterfaceKeywords._set_interface_properties( - node, interface, path, vx_lan_structure) - - @staticmethod - def delete_interface(node, interface): - """Delete an interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If it is not possible to get information about - interfaces or it is not possible to delete the interface. - """ - - path = ("interfaces", ("interface", "name", interface)) - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_vpp_interfaces") - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get configuration information about the " - "interfaces. Status code: {0}.".format(status_code)) - - new_data = HcUtil.remove_item(resp, path) - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_vpp_interfaces", new_data) - if status_code != HTTPCodes.OK: - raise HoneycombError("Not possible to remove interface {0}. " - "Status code: {1}.". - format(interface, status_code)) - return resp - - @staticmethod - def honeycomb_configure_interface_vxlan(node, interface, **kwargs): - """Configure VxLAN on the interface. - - The keyword configures VxLAN parameters on the given interface. The type - of interface must be set to "v3po:vxlan-tunnel". - The new VxLAN parameters overwrite the current configuration. If a - parameter in new configuration is missing, it is removed from VxLAN - configuration. - If the dictionary kwargs is empty, VxLAN configuration is removed. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param kwargs: Parameters and their values. The accepted parameters are - defined in InterfaceKeywords.VXLAN_PARAMS. - :type node: dict - :type interface: str - :type kwargs: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - vx_lan_structure = dict() - for param, value in kwargs.items(): - if param not in InterfaceKeywords.VXLAN_PARAMS: - raise HoneycombError("The parameter {0} is invalid.". - format(param)) - vx_lan_structure[param] = value - - path = ("interfaces", ("interface", "name", interface), "v3po:vxlan") - return InterfaceKeywords._set_interface_properties( - node, interface, path, vx_lan_structure) - - @staticmethod - def configure_interface_l2(node, interface, param, value): - """Configure the L2 parameters of interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param param: Parameter to configure (set, change, remove) - :param value: The value of parameter. If None, the parameter will be - removed. - :type node: dict - :type interface: str - :type param: str - :type value: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - if param not in InterfaceKeywords.L2_PARAMS: - raise HoneycombError("The parameter {0} is invalid.".format(param)) - path = ("interfaces", ("interface", "name", interface), "v3po:l2", - param) - return InterfaceKeywords._set_interface_properties( - node, interface, path, value) - - @staticmethod - def create_tap_interface(node, interface, **kwargs): - """Create a new TAP interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param kwargs: Parameters and their values. The accepted parameters are - defined in InterfaceKeywords.TAP_PARAMS. - :type node: dict - :type interface: str - :type kwargs: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - new_tap = { - "name": interface, - "type": "v3po:tap-v2", - "v3po:tap-v2": {} - } - for param, value in kwargs.items(): - if param not in InterfaceKeywords.TAP_PARAMS: - raise HoneycombError( - "The parameter {0} is invalid.".format(param)) - new_tap["v3po:tap-v2"][param] = value - - path = ("interfaces", "interface") - new_tap_structure = [new_tap, ] - return InterfaceKeywords._set_interface_properties( - node, interface, path, new_tap_structure) - - @staticmethod - def configure_interface_tap(node, interface, **kwargs): - """Configure TAP on the interface. - - The keyword configures TAP parameters on the given interface. The type - of interface must be set to "v3po:tap-v2". - The new TAP parameters overwrite the current configuration. If a - parameter in new configuration is missing, it is removed from TAP - configuration. - If the dictionary kwargs is empty, TAP configuration is removed. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param kwargs: Parameters and their values. The accepted parameters are - defined in InterfaceKeywords.TAP_PARAMS. - :type node: dict - :type interface: str - :type kwargs: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - tap_structure = dict() - for param, value in kwargs.items(): - if param not in InterfaceKeywords.TAP_PARAMS: - raise HoneycombError("The parameter {0} is invalid.". - format(param)) - tap_structure[param] = value - - path = ("interfaces", ("interface", "name", interface), "v3po:tap-v2") - return InterfaceKeywords._set_interface_properties( - node, interface, path, tap_structure) - - @staticmethod - def configure_interface_vhost_user(node, interface, **kwargs): - """Configure vhost-user on the interface. - - The keyword configures vhost-user parameters on the given interface. - The type of interface must be set to "v3po:vhost-user". - The new vhost-user parameters overwrite the current configuration. If a - parameter in new configuration is missing, it is removed from vhost-user - configuration. - If the dictionary kwargs is empty, vhost-user configuration is removed. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param kwargs: Parameters and their values. The accepted parameters are - defined in InterfaceKeywords.VHOST_USER_PARAMS. - :type node: dict - :type interface: str - :type kwargs: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - vhost_structure = dict() - for param, value in kwargs.items(): - if param not in InterfaceKeywords.VHOST_USER_PARAMS: - raise HoneycombError("The parameter {0} is invalid.". - format(param)) - vhost_structure[param] = value - - path = ("interfaces", ("interface", "name", interface), - "v3po:vhost-user") - return InterfaceKeywords._set_interface_properties( - node, interface, path, vhost_structure) - - @staticmethod - def create_vhost_user_interface(node, interface, **kwargs): - """Create a new vhost-user interface. - - :param node: Honeycomb node. - :param interface: The name of interface. - :param kwargs: Parameters and their values. The accepted parameters are - defined in InterfaceKeywords.VHOST_USER_PARAMS. - :type node: dict - :type interface: str - :type kwargs: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - """ - - new_vhost = { - "name": interface, - "type": "v3po:vhost-user", - "v3po:vhost-user": {} - } - for param, value in kwargs.items(): - if param not in InterfaceKeywords.VHOST_USER_PARAMS: - raise HoneycombError("The parameter {0} is invalid.". - format(param)) - new_vhost["v3po:vhost-user"][param] = value - - path = ("interfaces", "interface") - new_vhost_structure = [new_vhost, ] - return InterfaceKeywords._set_interface_properties( - node, interface, path, new_vhost_structure) - - @staticmethod - def honeycomb_create_sub_interface(node, super_interface, match, tags=None, - **kwargs): - """Create a new sub-interface. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param match: Match type. The valid values are defined in - InterfaceKeywords.SUB_IF_MATCH. - :param tags: List of tags. - :param kwargs: Parameters and their values. The accepted parameters are - defined in InterfaceKeywords.SUB_IF_PARAMS. - :type node: dict - :type super_interface: str - :type match: str - :type tags: list - :type kwargs: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the parameter is not valid. - :raises KeyError: If the parameter 'match' is invalid. - """ - - super_interface = Topology.convert_interface_reference( - node, super_interface, "name") - - match_type = { - "default": - {"default": {}}, - "untagged": - {"untagged": {}}, - "vlan-tagged": - {"vlan-tagged": {"match-exact-tags": "false"}}, - "vlan-tagged-exact-match": - {"vlan-tagged": {"match-exact-tags": "true"}} - } - - new_sub_interface = { - "tags": { - "tag": [] - }, - } - - for param, value in kwargs.items(): - if param in InterfaceKeywords.SUB_IF_PARAMS: - new_sub_interface[param] = value - else: - raise HoneycombError("The parameter {0} is invalid.". - format(param)) - try: - new_sub_interface["match"] = match_type[match] - except KeyError: - raise HoneycombError("The value '{0}' of parameter 'match' is " - "invalid.".format(match)) - - if tags: - new_sub_interface["tags"]["tag"].extend(tags) - - path = ("interfaces", - ("interface", "name", super_interface), - "vpp-vlan:sub-interfaces", - "sub-interface") - new_sub_interface_structure = [new_sub_interface, ] - return InterfaceKeywords._set_interface_properties( - node, super_interface, path, new_sub_interface_structure) - - @staticmethod - def get_sub_interface_oper_data(node, super_interface, identifier): - """Retrieves sub-interface operational data using Honeycomb API. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param identifier: The ID of sub-interface. - :type node: dict - :type super_interface: str - :type identifier: int - :returns: Sub-interface operational data. - :rtype: dict - :raises HoneycombError: If there is no sub-interface with the given ID. - """ - - if_data = InterfaceKeywords.get_interface_oper_data(node, - super_interface) - for sub_if in if_data["vpp-vlan:sub-interfaces"]["sub-interface"]: - if str(sub_if["identifier"]) == str(identifier): - return sub_if - - raise HoneycombError("The interface {0} does not have sub-interface " - "with ID {1}".format(super_interface, identifier)) - - @staticmethod - def remove_all_sub_interfaces(node, super_interface): - """Remove all sub-interfaces from the given interface. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :type node: dict - :type super_interface: str - :returns: Content of response. - :rtype: bytearray - """ - - path = ("interfaces", - ("interface", "name", super_interface), - "vpp-vlan:sub-interfaces") - - return InterfaceKeywords._set_interface_properties( - node, super_interface, path, {}) - - @staticmethod - def set_sub_interface_state(node, super_interface, identifier, state): - """Set the administrative state of sub-interface. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param identifier: The ID of sub-interface. - :param state: Required sub-interface state - up or down. - :type node: dict - :type super_interface: str - :type identifier: int - :type state: str - :returns: Content of response. - :rtype: bytearray - """ - - super_interface = Topology.convert_interface_reference( - node, super_interface, "name") - - intf_state = {"up": "true", - "down": "false"} - - path = ("interfaces", - ("interface", "name", super_interface), - "vpp-vlan:sub-interfaces", - ("sub-interface", "identifier", int(identifier)), - "enabled") - - return InterfaceKeywords._set_interface_properties( - node, super_interface, path, intf_state[state]) - - @staticmethod - def add_bridge_domain_to_sub_interface(node, super_interface, identifier, - config): - """Add a sub-interface to a bridge domain and set its parameters. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param identifier: The ID of sub-interface. - :param config: Bridge domain configuration. - :type node: dict - :type super_interface: str - :type identifier: int - :type config: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = ("interfaces", - ("interface", "name", super_interface), - "vpp-vlan:sub-interfaces", - ("sub-interface", "identifier", int(identifier)), - "l2") - - return InterfaceKeywords._set_interface_properties( - node, super_interface, path, config) - - @staticmethod - def get_bd_data_from_sub_interface(node, super_interface, identifier): - """Get the operational data about the bridge domain from sub-interface. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param identifier: The ID of sub-interface. - :type node: dict - :type super_interface: str - :type identifier: int - :returns: Operational data about the bridge domain. - :rtype: dict - :raises HoneycombError: If there is no sub-interface with the given ID. - """ - - try: - bd_data = InterfaceKeywords.get_sub_interface_oper_data( - node, super_interface, identifier)["l2"] - return bd_data - except KeyError: - raise HoneycombError("The operational data does not contain " - "information about a bridge domain.") - - @staticmethod - def configure_tag_rewrite(node, super_interface, identifier, config): - """Add / change / disable vlan tag rewrite on a sub-interface. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param identifier: The ID of sub-interface. - :param config: Rewrite tag configuration. - :type node: dict - :type super_interface: str - :type identifier: int - :type config: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = ("interfaces", - ("interface", "name", super_interface), - "vpp-vlan:sub-interfaces", - ("sub-interface", "identifier", int(identifier)), - "l2", - "rewrite") - - return InterfaceKeywords._set_interface_properties( - node, super_interface, path, config) - - @staticmethod - def get_tag_rewrite_oper_data(node, super_interface, identifier): - """Get the operational data about tag rewrite. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param identifier: The ID of sub-interface. - :type node: dict - :type super_interface: str - :type identifier: int - :returns: Operational data about tag rewrite. - :rtype: dict - :raises HoneycombError: If there is no sub-interface with the given ID. - """ - - try: - tag_rewrite = InterfaceKeywords.get_sub_interface_oper_data( - node, super_interface, identifier)["l2"]["rewrite"] - return tag_rewrite - except KeyError: - raise HoneycombError("The operational data does not contain " - "information about the tag-rewrite.") - - @staticmethod - def add_ip_address_to_sub_interface(node, super_interface, identifier, - ip_addr, network, ip_version): - """Add an ipv4 address to the specified sub-interface, with the provided - netmask or network prefix length. Any existing ipv4 addresses on the - sub-interface will be replaced. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param identifier: The ID of sub-interface. - :param ip_addr: IPv4 address to be set. - :param network: Network mask or network prefix length. - :param ip_version: ipv4 or ipv6 - :type node: dict - :type super_interface: str - :type identifier: int - :type ip_addr: str - :type network: str or int - :type ip_version: string - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the provided netmask or prefix is not valid. - """ - - path = ("interfaces", - ("interface", "name", super_interface), - "vpp-vlan:sub-interfaces", - ("sub-interface", "identifier", int(identifier)), - ip_version.lower()) - - if isinstance(network, basestring) and ip_version.lower() == "ipv4": - address = {"address": [{"ip": ip_addr, "netmask": network}, ]} - - elif isinstance(network, int) and 0 < network < 33: - address = {"address": [{"ip": ip_addr, "prefix-length": network}, ]} - - else: - raise HoneycombError("{0} is not a valid netmask or prefix length." - .format(network)) - - return InterfaceKeywords._set_interface_properties( - node, super_interface, path, address) - - @staticmethod - def remove_all_ip_addresses_from_sub_interface(node, super_interface, - identifier, ip_version): - """Remove all ipv4 addresses from the specified sub-interface. - - :param node: Honeycomb node. - :param super_interface: Super interface. - :param identifier: The ID of sub-interface. - :param ip_version: ipv4 or ipv6 - :type node: dict - :type super_interface: str - :type identifier: int - :type ip_version: string - :returns: Content of response. - :rtype: bytearray - """ - - path = ("interfaces", - ("interface", "name", super_interface), - "vpp-vlan:sub-interfaces", - ("sub-interface", "identifier", int(identifier)), - str(ip_version), "address") - - return InterfaceKeywords._set_interface_properties( - node, super_interface, path, None) - - @staticmethod - def compare_data_structures(data, ref, _path=''): - """Checks if data obtained from UUT is as expected. If it is not, - proceeds down the list/dictionary tree and finds the point of mismatch. - - :param data: Data to be checked. - :param ref: Referential data used for comparison. - :param _path: Used in recursive calls, stores the path taken down - the JSON tree. - :type data: dict - :type ref: dict - :type _path: str - - :raises HoneycombError: If the data structures do not match in some way, - or if they are not in deserialized JSON format. - """ - - if data == ref: - return True - - elif isinstance(data, dict) and isinstance(ref, dict): - for key in ref: - if key not in data: - raise HoneycombError( - "Key {key} is not present in path {path}. Keys in path:" - "{data_keys}".format( - key=key, - path=_path, - data_keys=data.keys())) - - if data[key] != ref[key]: - if isinstance(data[key], list) \ - or isinstance(data[key], dict): - InterfaceKeywords.compare_data_structures( - data[key], ref[key], - _path + '[{0}]'.format(key)) - else: - raise HoneycombError( - "Data mismatch, key {key} in path {path} has value" - " {data}, but should be {ref}".format( - key=key, - path=_path, - data=data[key], - ref=ref[key])) - - elif isinstance(data, list) and isinstance(ref, list): - for item in ref: - if item not in data: - if isinstance(item, dict): - InterfaceKeywords.compare_data_structures( - data[0], item, - _path + '[{0}]'.format(ref.index(item))) - else: - raise HoneycombError( - "Data mismatch, list item {index} in path {path}" - " has value {data}, but should be {ref}".format( - index=ref.index(item), - path=_path, - data=data[0], - ref=item)) - - else: - raise HoneycombError( - "Unexpected data type {data_type} in path {path}, reference" - " type is {ref_type}. Must be list or dictionary.".format( - data_type=type(data), - ref_type=type(ref), - path=_path)) - - @staticmethod - def compare_interface_lists(list1, list2): - """Compare provided lists of interfaces by name. - - :param list1: List of interfaces. - :param list2: List of interfaces. - :type list1: list - :type list2: list - :raises HoneycombError: If an interface exists in only one of the lists. - """ - - ignore = ["vx_tunnel0", "vxlan_gpe_tunnel0"] - # these have no equivalent in config data and no effect on VPP - - names1 = [x['name'] for x in list1] - names2 = [x['name'] for x in list2] - - for name in names1: - if name not in names2 and name not in ignore: - raise HoneycombError("Interface {0} not present in list {1}" - .format(name, list2)) - for name in names2: - if name not in names1 and name not in ignore: - raise HoneycombError("Interface {0} not present in list {1}" - .format(name, list1)) - - @staticmethod - def create_vxlan_gpe_interface(node, interface, **kwargs): - """Create a new VxLAN GPE interface. - - :param node: Honeycomb node. - :param interface: The name of interface to be created. - :param kwargs: Parameters and their values. The accepted parameters are - defined in InterfaceKeywords.VXLAN_GPE_PARAMS. - :type node: dict - :type interface: str - :type kwargs: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If a parameter in kwargs is not valid. - """ - - new_vxlan_gpe = { - "name": interface, - "type": "v3po:vxlan-gpe-tunnel", - "v3po:vxlan-gpe": {} - } - for param, value in kwargs.items(): - if param in InterfaceKeywords.INTF_PARAMS: - new_vxlan_gpe[param] = value - elif param in InterfaceKeywords.VXLAN_GPE_PARAMS: - new_vxlan_gpe["v3po:vxlan-gpe"][param] = value - else: - raise HoneycombError("The parameter {0} is invalid.". - format(param)) - path = ("interfaces", "interface") - vxlan_gpe_structure = [new_vxlan_gpe, ] - return InterfaceKeywords._set_interface_properties( - node, interface, path, vxlan_gpe_structure) - - @staticmethod - def enable_acl_on_interface(node, interface, table_name): - """Enable ACL on the given interface. - - :param node: Honeycomb node. - :param interface: The interface where the ACL will be enabled. - :param table_name: Name of the classify table. - :type node: dict - :type interface: str - :type table_name: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the configuration of interface is not - successful. - """ - - interface = interface.replace("/", "%2F") - - data = { - "vpp-interface-acl:acl": { - "ingress": { - "ip4-acl": { - "classify-table": table_name - }, - "l2-acl": { - "classify-table": table_name - } - } - } - } - - path = "/interface/" + interface + "/vpp-interface-acl:acl" - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_vpp_interfaces", data, path, - data_representation=DataRepresentation.JSON) - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of interface '{0}' was not successful. " - "Status code: {1}.".format(interface, status_code)) - return resp - - @staticmethod - def enable_policer_on_interface(node, interface, table_name): - """Enable Policer on the given interface. - - :param node: Honeycomb node. - :param interface: The interface where policer will be enabled. - :param table_name: Name of the classify table. - :type node: dict - :type interface: str - :type table_name: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the configuration of interface is not - successful. - """ - interface = Topology.convert_interface_reference( - node, interface, "name") - interface = interface.replace("/", "%2F") - - data = { - "interface-policer:policer": { - "ip4-table": table_name - } - } - - path = "/interface/" + interface + "/interface-policer:policer" - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_vpp_interfaces", data, path, - data_representation=DataRepresentation.JSON) - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of interface '{0}' was not successful. " - "Status code: {1}.".format(interface, status_code)) - return resp - - @staticmethod - def disable_policer_on_interface(node, interface): - """Disable Policer on the given interface. - - :param node: Honeycomb node. - :param interface: The interface where policer will be disabled. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the configuration of interface is not - successful. - """ - interface = Topology.convert_interface_reference( - node, interface, "name") - interface = interface.replace("/", "%2F") - - path = "/interface/" + interface + "/interface-policer:policer" - status_code, resp = HcUtil.\ - delete_honeycomb_data(node, "config_vpp_interfaces", path) - if status_code != HTTPCodes.OK: - raise HoneycombError( - "The configuration of interface '{0}' was not successful. " - "Status code: {1}.".format(interface, status_code)) - return resp - - @staticmethod - def disable_acl_on_interface(node, interface): - """Disable ACL on the given interface. - - :param node: Honeycomb node. - :param interface: The interface where the ACL will be disabled. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the configuration of interface is not - successful. - """ - - interface = interface.replace("/", "%2F") - - path = "/interface/" + interface + "/vpp-interface-acl:acl" - - status_code, resp = HcUtil.\ - delete_honeycomb_data(node, "config_vpp_interfaces", path) - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "The configuration of interface '{0}' was not successful. " - "Status code: {1}.".format(interface, status_code)) - return resp - - @staticmethod - def create_pbb_sub_interface(node, intf, params): - """Creates a PBB sub-interface on the given interface and sets its - parameters. - - :param node: Honeycomb node. - :param intf: The interface where PBB sub-interface will be configured. - :param params: Configuration parameters of the sub-interface to be - created. - :type node: dict - :type intf: str - :type params: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the configuration of sub-interface is not - successful. - """ - - interface = intf.replace("/", "%2F") - path = "/interface/{0}/pbb-rewrite".format(interface) - status_code, resp = HcUtil. \ - put_honeycomb_data(node, "config_vpp_interfaces", params, path, - data_representation=DataRepresentation.JSON) - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of PBB sub-interface '{0}' was not " - "successful. Status code: {1}.".format(intf, status_code)) - return resp - - @staticmethod - def delete_pbb_sub_interface(node, intf): - """Deletes the given PBB sub-interface. - - :param node: Honeycomb node. - :param intf: The interface where PBB sub-interface will be deleted. - :type node: dict - :type intf: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the removal of sub-interface is not - successful. - """ - - interface = intf.replace("/", "%2F") - path = "/interface/{0}/pbb-rewrite".format(interface) - - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_vpp_interfaces", path) - if status_code != HTTPCodes.OK: - raise HoneycombError( - "The removal of pbb sub-interface '{0}' was not successful. " - "Status code: {1}.".format(intf, status_code)) - return resp - - @staticmethod - def get_pbb_sub_interface_oper_data(node, intf, sub_if_id): - """Retrieves PBB sub-interface operational data from Honeycomb. - - :param node: Honeycomb node. - :param intf: The interface where PBB sub-interface is located. - :param sub_if_id: ID of the PBB sub-interface. - :type node: dict - :type intf: str - :type sub_if_id: str or int - :returns: PBB sub-interface operational data. - :rtype: dict - :raises HoneycombError: If the removal of sub-interface is not - successful. - """ - - raise NotImplementedError - - @staticmethod - def check_disabled_interface(node, interface): - """Retrieves list of disabled interface indices from Honeycomb, - and matches with the provided interface by index. - - :param node: Honeycomb node. - :param interface: Index number of an interface on the node. - :type node: dict - :type interface: int - :returns: True if the interface exists in disabled interfaces. - :rtype: bool - :raises HoneycombError: If the interface is not present - in retrieved list of disabled interfaces. - """ - data = InterfaceKeywords.get_disabled_interfaces_oper_data(node) - # decrement by one = conversion from HC if-index to VPP sw_if_index - interface -= 1 - - for item in data: - if item["index"] == interface: - return True - raise HoneycombError("Interface index {0} not present in list" - " of disabled interfaces.".format(interface)) - - @staticmethod - def configure_interface_span(node, dst_interface, src_interfaces=None): - """Configure SPAN port mirroring on the specified interfaces. If no - source interface is provided, SPAN will be disabled. - - :param node: Honeycomb node. - :param dst_interface: Interface to mirror packets to. - :param src_interfaces: List of interfaces to mirror packets from. - :type node: dict - :type dst_interface: str or int - :type src_interfaces: list of dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If SPAN could not be configured. - """ - - interface = Topology.convert_interface_reference( - node, dst_interface, "name") - interface = interface.replace("/", "%2F") - path = "/interface/" + interface + "/span" - - if not src_interfaces: - status_code, _ = HcUtil.delete_honeycomb_data( - node, "config_vpp_interfaces", path) - else: - for src_interface in src_interfaces: - src_interface["iface-ref"] = Topology.\ - convert_interface_reference( - node, src_interface["iface-ref"], "name") - data = { - "span": { - "mirrored-interfaces": { - "mirrored-interface": src_interfaces - } - } - } - - status_code, _ = HcUtil.put_honeycomb_data( - node, "config_vpp_interfaces", data, path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Configuring SPAN failed. Status code:{0}".format(status_code)) - - @staticmethod - def configure_sub_interface_span(node, super_interface, dst_interface_index, - src_interfaces=None): - """Configure SPAN port mirroring on the specified sub-interface. If no - source interface is provided, SPAN will be disabled. - - Note: Does not support source sub-interfaces, only destination. - - :param node: Honeycomb node. - :param super_interface: Name, link name or sw_if_index - of the destination interface's super-interface. - :param dst_interface_index: Index of sub-interface to mirror packets to. - :param src_interfaces: List of interfaces to mirror packets from. - :type node: dict - :type super_interface: str or int - :type dst_interface_index: int - :type src_interfaces: list of dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If SPAN could not be configured. - """ - - super_interface = Topology.convert_interface_reference( - node, super_interface, "name") - super_interface = super_interface.replace("/", "%2F") - - path = "/interface/{0}/vpp-vlan:sub-interfaces/sub-interface/{1}/span"\ - .format(super_interface, dst_interface_index) - - if not src_interfaces: - status_code, _ = HcUtil.delete_honeycomb_data( - node, "config_vpp_interfaces", path) - else: - for src_interface in src_interfaces: - src_interface["iface-ref"] = Topology. \ - convert_interface_reference( - node, src_interface["iface-ref"], "name") - data = { - "span": { - "mirrored-interfaces": { - "mirrored-interface": src_interfaces - } - } - } - - status_code, _ = HcUtil.put_honeycomb_data( - node, "config_vpp_interfaces", data, path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Configuring SPAN failed. Status code:{0}".format(status_code)) - - @staticmethod - def add_interface_local0_to_topology(node): - """Use Topology methods to add interface "local0" to working topology, - if not already present. - - :param node: DUT node. - :type node: dict - """ - - if Topology.get_interface_by_sw_index(node, 0) is None: - local0_key = Topology.add_new_port(node, "localzero") - Topology.update_interface_sw_if_index(node, local0_key, 0) - Topology.update_interface_name(node, local0_key, "local0") - - @staticmethod - def configure_interface_unnumbered(node, interface, interface_src=None): - """Configure the specified interface as unnumbered. The interface - borrows IP address from the specified source interface. If not source - interface is provided, unnumbered configuration will be removed. - - :param node: Honeycomb node. - :param interface: Name, link name or sw_if_index of an interface. - :param interface_src: Name of source interface. - :type node: dict - :type interface: str or int - :type interface_src: str - :raises HoneycombError: If the configuration fails. - """ - - interface = InterfaceKeywords.handle_interface_reference( - node, interface) - - path = "/interface/{0}/unnumbered-interfaces:unnumbered"\ - .format(interface) - - if interface_src: - data = { - "unnumbered": { - "use": interface_src - } - } - status_code, _ = HcUtil.put_honeycomb_data( - node, "config_vpp_interfaces", data, path) - else: - status_code, _ = HcUtil.delete_honeycomb_data( - node, "config_vpp_interfaces", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Configuring unnumbered interface failed. " - "Status code:{0}".format(status_code)) - - @staticmethod - def handle_interface_reference(node, interface): - """Convert any interface reference to interface name used by Honeycomb. - - :param node: Honeycomb node. - :param interface: Name, link name or sw_if_index of an interface, - name of a custom interface or name of a sub-interface. - :type node: Honeycomb node. - :type interface: str or int - :returns: Name of interface that can be used in Honeycomb requests. - :rtype: str - """ - - try: - interface = Topology.convert_interface_reference( - node, interface, "name") - interface = interface.replace("/", "%2F") - except RuntimeError: - # interface is not in topology - if "." in interface: - # Assume it's the name of a sub-interface - interface, index = interface.split(".") - interface = interface.replace("/", "%2F") - interface = "{0}/vpp-vlan:sub-interfaces/sub-interface/{1}".\ - format(interface, index) - else: - # Assume it's the name of a custom interface (pbb, vxlan, etc.) - interface = interface.replace("/", "%2F") - - return interface diff --git a/resources/libraries/python/honeycomb/HcAPIKwNSH.py b/resources/libraries/python/honeycomb/HcAPIKwNSH.py deleted file mode 100644 index e042fdd423..0000000000 --- a/resources/libraries/python/honeycomb/HcAPIKwNSH.py +++ /dev/null @@ -1,173 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""This module implements keywords to manipulate NSH-SFC data structures using -Honeycomb REST API.""" - -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation - - -class NSHKeywords(object): - """Implementation of keywords which make it possible to: - - add and remove NSH entries, - - get operational data about NSH entries, - - add and remove NSH maps, - - get operational data about NSH maps. - """ - - def __init__(self): - pass - - @staticmethod - def _set_nsh_properties(node, path, data=None): - """Set NSH properties and check the return code. - - :param node: Honeycomb node. - :param path: Path which is added to the base path to identify the data. - :param data: The new data to be set. If None, the item will be removed. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response to PUT is not - OK or ACCEPTED. - """ - - if data: - status_code, resp = HcUtil. \ - put_honeycomb_data(node, "config_nsh", data, path, - data_representation=DataRepresentation.JSON) - else: - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_nsh", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of NSH-SFC was not successful. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def add_nsh_entry(node, name, data): - """Add an NSH entry to the list of entries. The keyword does - not validate given data. - - :param node: Honeycomb node. - :param name: Name for the NSH entry. - :param data: Settings for the new entry. - :type node: dict - :type name: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = "/nsh-entries/nsh-entry/{0}".format(name) - - return NSHKeywords._set_nsh_properties(node, path, data) - - @staticmethod - def add_nsh_map(node, name, data): - """Add an NSH map to the list of maps. The keyword does - not validate given data. - - :param node: Honeycomb node. - :param name: Name for the NSH map. - :param data: Settings for the new map. - :type node: dict - :type name: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - """ - path = "/nsh-maps/nsh-map/{0}".format(name) - - return NSHKeywords._set_nsh_properties(node, path, data) - - @staticmethod - def remove_nsh_entry(node, name): - """Remove an NSH entry from the list of entries. - :param node: Honeycomb node. - :param name: Name of the NSH entry. - :type node: dict - :type name: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/nsh-entries/nsh-entry/{0}".format(name) - return NSHKeywords._set_nsh_properties(node, path) - - @staticmethod - def remove_nsh_map(node, name): - """Remove an NSH map from the list of maps. - :param node: Honeycomb node. - :param name: Name of the NSH map. - :type node: dict - :type name: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/nsh-maps/nsh-map/{0}".format(name) - return NSHKeywords._set_nsh_properties(node, path) - - @staticmethod - def get_nsh_oper_data(node, entry_name=None, map_name=None): - """Get all NSH operational data present on the node. Optionally - filter out data for a specific entry or map. - - :param node: Honeycomb node. - :param entry_name: Name of a specific NSH entry. Optional. - :param map_name: Name of a specific NSH map. Optional. Do not use - together with entry_name. - :type node: dict - :type entry_name: str - :type map_name: str - :returns: List of classify tables. - :rtype: list - """ - if entry_name: - path = "/nsh-entries/nsh-entry/{0}".format(entry_name) - elif map_name: - path = "/nsh-maps/nsh-map/{0}".format(map_name) - else: - path = '' - - status_code, resp = HcUtil. \ - get_honeycomb_data(node, "oper_nsh", path) - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about the " - "classify tables. Status code: {0}.".format(status_code)) - - return resp - - @staticmethod - def clear_nsh_settings(node): - """Remove the entire NSH container with all of its entries and maps. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - """ - - return NSHKeywords._set_nsh_properties(node, '') diff --git a/resources/libraries/python/honeycomb/HcPersistence.py b/resources/libraries/python/honeycomb/HcPersistence.py deleted file mode 100644 index 1627375f72..0000000000 --- a/resources/libraries/python/honeycomb/HcPersistence.py +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Implementation of keywords for managing Honeycomb persistence files.""" - -from robot.api import logger - -from resources.libraries.python.Constants import Constants as Const -from resources.libraries.python.honeycomb.HoneycombUtil import HoneycombError -from resources.libraries.python.ssh import SSH -from resources.libraries.python.topology import NodeType - - -class HcPersistence(object): - """Implements keywords for managing Honeycomb persistence files. - - The keywords implemented in this class make possible to: - - find and replace strings in config.json persistence file - """ - - def __init__(self): - pass - - @staticmethod - def clear_persisted_honeycomb_config(*nodes): - """Remove configuration data persisted from last Honeycomb session. - Default configuration will be used instead. - - :param nodes: List of DUTs to execute on. - :type nodes: list - :raises HoneycombError: If persisted configuration could not be removed. - """ - cmd = "rm -rf {}/*".format(Const.REMOTE_HC_PERSIST) - for node in nodes: - if node['type'] == NodeType.DUT: - ssh = SSH() - ssh.connect(node) - (ret_code, _, stderr) = ssh.exec_command_sudo(cmd) - if ret_code != 0: - if "No such file or directory" not in stderr: - raise HoneycombError('Could not clear persisted ' - 'configuration on node {0}, {1}' - .format(node['host'], stderr)) - else: - logger.info("Persistence data was not present on node" - " {0}".format(node['host'])) - else: - logger.info("Persistence files removed on node {0}" - .format(node['host'])) - - @staticmethod - def modify_persistence_files(node, find, replace): - """Searches contents of persistence file data.json for the provided - string, and replaces all occurrences with another string. - - :param node: Honeycomb node. - :param find: Text to find in file. - :param replace: String to replace anything found with. - :type node: dict - :type find: string - :type replace: string - :raises HoneycombError: If persistent configuration couldn't be - modified. - """ - - argument = "\"s/{0}/{1}/g\"".format(find, replace) - path = "{0}/config/data.json".format(Const.REMOTE_HC_PERSIST) - command = "sed -i {0} {1}".format(argument, path) - - ssh = SSH() - ssh.connect(node) - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify persistence file on node" - " {0}, {1}".format(node, stderr)) - - @staticmethod - def log_persisted_configuration(node): - """Read contents of Honeycomb persistence files and print them to log. - - :param node: Honeycomb node. - :type node: dict - """ - - commands = [ - "cat {0}/config/data.json".format(Const.REMOTE_HC_PERSIST), - "cat {0}/context/data.json".format(Const.REMOTE_HC_PERSIST), - ] - - ssh = SSH() - ssh.connect(node) - for command in commands: - (_, _, _) = ssh.exec_command_sudo(command) - - @staticmethod - def configure_persistence(node, state): - """Enable or disable Honeycomb configuration data persistence. - - :param node: Honeycomb node. - :param state: Enable or Disable. - :type node: dict - :type state: str - :raises ValueError: If the state argument is incorrect. - :raises HoneycombError: If the operation fails. - """ - - state = state.lower() - if state == "enable": - state = "true" - elif state == "disable": - state = "false" - else: - raise ValueError("Unexpected value of state argument:" - " {0} provided. Must be enable or disable." - .format(state)) - - for setting in ("persist-config", "persist-context"): - # find the setting, replace entire line with 'setting: state' - find = '\\"{setting}\\":'.format(setting=setting) - replace = '\\"{setting}\\": \\"{state}\\",'.format( - setting=setting, state=state) - - argument = '"/{0}/c\\ {1}"'.format(find, replace) - path = "{0}/config/honeycomb.json".format(Const.REMOTE_HC_DIR) - command = "sed -i {0} {1}".format(argument, path) - - ssh = SSH() - ssh.connect(node) - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify configuration on " - "node {0}, {1}".format(node, stderr)) diff --git a/resources/libraries/python/honeycomb/HoneycombSetup.py b/resources/libraries/python/honeycomb/HoneycombSetup.py deleted file mode 100644 index 796639e879..0000000000 --- a/resources/libraries/python/honeycomb/HoneycombSetup.py +++ /dev/null @@ -1,821 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Implementation of keywords for Honeycomb setup.""" - -from json import loads -from time import time, sleep - -from ipaddress import IPv6Address, AddressValueError - -from robot.api import logger - -from resources.libraries.python.HTTPRequest import HTTPRequest, HTTPCodes, \ - HTTPRequestError -from resources.libraries.python.Constants import Constants as Const -from resources.libraries.python.honeycomb.HoneycombUtil import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil -from resources.libraries.python.ssh import SSH -from resources.libraries.python.topology import NodeType - - -class HoneycombSetup(object): - """Implements keywords for Honeycomb setup. - - The keywords implemented in this class make possible to: - - start Honeycomb, - - stop Honeycomb, - - check the Honeycomb start-up state, - - check the Honeycomb shutdown state, - - add VPP to the topology. - """ - - def __init__(self): - pass - - @staticmethod - def start_honeycomb_on_duts(*nodes): - """Start Honeycomb on specified DUT nodes. - - This keyword starts the Honeycomb service on specified DUTs. - The keyword just starts the Honeycomb and does not check its startup - state. Use the keyword "Check Honeycomb Startup State" to check if the - Honeycomb is up and running. - Honeycomb must be installed in "/opt" directory, otherwise the start - will fail. - - :param nodes: List of nodes to start Honeycomb on. - :type nodes: list - :raises HoneycombError: If Honeycomb fails to start. - """ - - HoneycombSetup.print_environment(nodes) - - cmd = "sudo service honeycomb start" - - for node in nodes: - if node['type'] == NodeType.DUT: - logger.console( - "\n(re)Starting Honeycomb service on node {0}".format( - node["host"])) - ssh = SSH() - ssh.connect(node) - (ret_code, _, _) = ssh.exec_command_sudo(cmd) - if int(ret_code) != 0: - raise HoneycombError('Node {0} failed to start Honeycomb.'. - format(node['host'])) - else: - logger.info("Starting the Honeycomb service on node {0} is " - "in progress ...".format(node['host'])) - - @staticmethod - def stop_honeycomb_on_duts(*nodes): - """Stop the Honeycomb service on specified DUT nodes. - - This keyword stops the Honeycomb service on specified nodes. It just - stops the Honeycomb and does not check its shutdown state. Use the - keyword "Check Honeycomb Shutdown State" to check if Honeycomb has - stopped. - - :param nodes: List of nodes to stop Honeycomb on. - :type nodes: list - :raises HoneycombError: If Honeycomb failed to stop. - """ - - cmd = "sudo service honeycomb stop" - errors = [] - - for node in nodes: - if node['type'] == NodeType.DUT: - logger.console( - "\nShutting down Honeycomb service on node {0}".format( - node["host"])) - ssh = SSH() - ssh.connect(node) - (ret_code, _, _) = ssh.exec_command_sudo(cmd) - if int(ret_code) != 0: - errors.append(node['host']) - else: - logger.info("Stopping the Honeycomb service on node {0} is " - "in progress ...".format(node['host'])) - if errors: - raise HoneycombError('Node(s) {0} failed to stop Honeycomb.'. - format(errors)) - - @staticmethod - def restart_honeycomb_on_dut(node): - """Restart Honeycomb on specified DUT nodes. - - This keyword restarts the Honeycomb service on specified DUTs. Use the - keyword "Check Honeycomb Startup State" to check if the Honeycomb is up - and running. - - :param node: Node to restart Honeycomb on. - :type node: dict - :raises HoneycombError: If Honeycomb fails to start. - """ - - logger.console( - "\n(re)Starting Honeycomb service on node {0}".format(node["host"])) - - cmd = "sudo service honeycomb restart" - - ssh = SSH() - ssh.connect(node) - (ret_code, _, _) = ssh.exec_command_sudo(cmd) - if int(ret_code) != 0: - raise HoneycombError('Node {0} failed to restart Honeycomb.'. - format(node['host'])) - else: - logger.info( - "Honeycomb service restart is in progress on node {0}".format( - node['host'])) - - @staticmethod - def check_honeycomb_startup_state(node, timeout=360, retries=20, - interval=15): - """Repeatedly check the status of Honeycomb startup until it is fully - started or until timeout or max retries is reached. - - :param node: Honeycomb node. - :param timeout: Timeout value in seconds. - :param retries: Max number of retries. - :param interval: Interval between checks, in seconds. - :type node: dict - :type timeout: int - :type retries: int - :type interval: int - :raises HoneycombError: If the Honeycomb process IP cannot be found, - or if timeout or number of retries is exceeded. - """ - - ssh = SSH() - ssh.connect(node) - - count = 0 - start = time() - while time() - start < timeout and count < retries: - count += 1 - - try: - status_code_version, _ = HcUtil.get_honeycomb_data( - node, "oper_vpp_version") - status_code_if_cfg, _ = HcUtil.get_honeycomb_data( - node, "config_vpp_interfaces") - status_code_if_oper, _ = HcUtil.get_honeycomb_data( - node, "oper_vpp_interfaces") - except HTTPRequestError: - sleep(interval) - continue - if status_code_if_cfg == HTTPCodes.OK\ - and status_code_if_cfg == HTTPCodes.OK\ - and status_code_if_oper == HTTPCodes.OK: - logger.info("Check successful, Honeycomb is up and running.") - break - else: - logger.debug( - "Attempt ${count} failed on Restconf check. Status codes:\n" - "Version: {version}\n" - "Interface config: {if_cfg}\n" - "Interface operational: {if_oper}".format( - count=count, - version=status_code_version, - if_cfg=status_code_if_cfg, - if_oper=status_code_if_oper)) - sleep(interval) - continue - else: - _, vpp_status, _ = ssh.exec_command("sudo service vpp status") - raise HoneycombError( - "Timeout or max retries exceeded. Status of VPP:\n" - "{vpp_status}".format(vpp_status=vpp_status)) - - @staticmethod - def check_honeycomb_shutdown_state(node): - """Check state of Honeycomb service during shutdown on specified nodes. - - Honeycomb nodes reply with connection refused or the following status - codes depending on shutdown progress: codes 200, 404. - - :param node: List of DUT nodes stopping Honeycomb. - :type node: dict - :returns: True if all GETs fail to connect. - :rtype: bool - """ - cmd = "pgrep honeycomb" - - ssh = SSH() - ssh.connect(node) - (ret_code, _, _) = ssh.exec_command_sudo(cmd) - if ret_code == 0: - raise HoneycombError('Honeycomb on node {0} is still ' - 'running.'.format(node['host']), - enable_logging=False) - else: - logger.info("Honeycomb on node {0} has stopped". - format(node['host'])) - return True - - @staticmethod - def configure_restconf_binding_address(node): - """Configure Honeycomb to accept restconf requests from all IP - addresses. IP version is determined by node data. - - :param node: Information about a DUT node. - :type node: dict - :raises HoneycombError: If the configuration could not be changed. - """ - - find = "restconf-binding-address" - try: - IPv6Address(unicode(node["host"])) - # if management IP of the node is in IPv6 format - replace = '\\"restconf-binding-address\\": \\"0::0\\",' - except (AttributeError, AddressValueError): - replace = '\\"restconf-binding-address\\": \\"0.0.0.0\\",' - - argument = '"/{0}/c\\ {1}"'.format(find, replace) - path = "{0}/config/restconf.json".format(Const.REMOTE_HC_DIR) - command = "sed -i {0} {1}".format(argument, path) - - ssh = SSH() - ssh.connect(node) - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify configuration on " - "node {0}, {1}".format(node, stderr)) - - @staticmethod - def configure_jvpp_timeout(node, timeout=10): - """Configure timeout value for Java API commands Honeycomb sends to VPP. - - :param node: Information about a DUT node. - :param timeout: Timeout value in seconds. - :type node: dict - :type timeout: int - :raises HoneycombError: If the configuration could not be changed. - """ - - find = "jvpp-request-timeout" - replace = '\\"jvpp-request-timeout\\": {0}'.format(timeout) - - argument = '"/{0}/c\\ {1}"'.format(find, replace) - path = "{0}/config/jvpp.json".format(Const.REMOTE_HC_DIR) - command = "sed -i {0} {1}".format(argument, path) - - ssh = SSH() - ssh.connect(node) - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify configuration on " - "node {0}, {1}".format(node, stderr)) - - @staticmethod - def print_environment(nodes): - """Print information about the nodes to log. The information is defined - by commands in cmds tuple at the beginning of this method. - - :param nodes: List of DUT nodes to get information about. - :type nodes: list - """ - - # TODO: When everything is set and running in VIRL env, transform this - # method to a keyword checking the environment. - - cmds = ("uname -a", - "df -lh", - "echo $JAVA_HOME", - "echo $PATH", - "which java", - "java -version", - "dpkg --list | grep openjdk", - "ls -la /opt/honeycomb", - "cat /opt/honeycomb/modules/*module-config") - - for node in nodes: - if node['type'] == NodeType.DUT: - logger.info("Checking node {} ...".format(node['host'])) - for cmd in cmds: - logger.info("Command: {}".format(cmd)) - ssh = SSH() - ssh.connect(node) - ssh.exec_command_sudo(cmd) - - @staticmethod - def print_ports(node): - """Uses "sudo netstat -anp | grep java" to print port where a java - application listens. - - :param node: Honeycomb node where we want to print the ports. - :type node: dict - """ - - cmds = ("netstat -anp | grep java", - "ps -ef | grep [h]oneycomb") - - logger.info("Checking node {} ...".format(node['host'])) - for cmd in cmds: - logger.info("Command: {}".format(cmd)) - ssh = SSH() - ssh.connect(node) - ssh.exec_command_sudo(cmd) - - @staticmethod - def configure_log_level(node, level): - """Set Honeycomb logging to the specified level. - - :param node: Honeycomb node. - :param level: Log level (INFO, DEBUG, TRACE). - :type node: dict - :type level: str - """ - - find = 'logger name=\\"io.fd\\"' - replace = '<logger name=\\"io.fd\\" level=\\"{0}\\"/>'.format(level) - - argument = '"/{0}/c\\ {1}"'.format(find, replace) - path = "{0}/config/logback.xml".format(Const.REMOTE_HC_DIR) - command = "sed -i {0} {1}".format(argument, path) - - ssh = SSH() - ssh.connect(node) - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify configuration on " - "node {0}, {1}".format(node, stderr)) - - @staticmethod - def manage_honeycomb_features(node, feature, disable=False): - """Configure Honeycomb to use features that are disabled by default, or - disable previously enabled features. - - ..Note:: If the module is not enabled in VPP, Honeycomb will - be unable to establish VPP connection. - - :param node: Honeycomb node. - :param feature: Feature to enable. - :param disable: Disable the specified feature instead of enabling it. - :type node: dict - :type feature: string - :type disable: bool - :raises HoneycombError: If the configuration could not be changed. - """ - - disabled_features = { - "NSH": ["io.fd.hc2vpp.vppnsh.impl.VppNshModule"], - "BGP": ["io.fd.hc2vpp.bgp.inet.BgpInetModule", - "io.fd.honeycomb.infra.bgp.BgpModule", - "io.fd.honeycomb.infra.bgp.BgpReadersModule", - "io.fd.honeycomb.infra.bgp.BgpWritersModule", - "io.fd.honeycomb.northbound.bgp.extension.InetModule", - "io.fd.honeycomb.northbound.bgp.extension.EvpnModule", - "io.fd.honeycomb.northbound.bgp.extension.L3VpnV4Module", - "io.fd.honeycomb.northbound.bgp.extension.L3VpnV6Module", - "io.fd.honeycomb.northbound.bgp.extension." - "LabeledUnicastModule", - "io.fd.honeycomb.northbound.bgp.extension.LinkstateModule"] - } - - ssh = SSH() - ssh.connect(node) - - if feature in disabled_features.keys(): - # for every module, uncomment by replacing the entire line - for item in disabled_features[feature]: - find = replace = "{0}".format(item) - if disable: - replace = "// {0}".format(find) - - argument = '"/{0}/c\\ {1}"'.format(find, replace) - path = "{0}/modules/*module-config"\ - .format(Const.REMOTE_HC_DIR) - command = "sed -i {0} {1}".format(argument, path) - - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify configuration on " - "node {0}, {1}".format(node, stderr)) - else: - raise HoneycombError( - "Unrecognized feature {0}.".format(feature)) - - @staticmethod - def copy_java_libraries(node): - """Copy Java libraries installed by vpp-api-java package to honeycomb - lib folder. - - This is a (temporary?) workaround for jvpp version mismatches. - - :param node: Honeycomb node - :type node: dict - """ - - ssh = SSH() - ssh.connect(node) - (_, stdout, _) = ssh.exec_command_sudo( - "ls /usr/share/java | grep ^jvpp-*") - - files = stdout.split("\n")[:-1] - for item in files: - # example filenames: - # jvpp-registry-17.04.jar - # jvpp-core-17.04.jar - - parts = item.split("-") - version = "{0}-SNAPSHOT".format(parts[2][:5]) - artifact_id = "{0}-{1}".format(parts[0], parts[1]) - - directory = "{0}/lib/io/fd/vpp/{1}/{2}".format( - Const.REMOTE_HC_DIR, artifact_id, version) - cmd = "sudo mkdir -p {0}; " \ - "sudo cp /usr/share/java/{1} {0}/{2}-{3}.jar".format( - directory, item, artifact_id, version) - - (ret_code, _, stderr) = ssh.exec_command(cmd) - if ret_code != 0: - raise HoneycombError("Failed to copy JVPP libraries on " - "node {0}, {1}".format(node, stderr)) - - @staticmethod - def copy_odl_client(node, odl_name, src_path, dst_path): - """Copy ODL Client from source path to destination path. - - :param node: Honeycomb node. - :param odl_name: Name of ODL client version to use. - :param src_path: Source Path where to find ODl client. - :param dst_path: Destination path. - :type node: dict - :type odl_name: str - :type src_path: str - :type dst_path: str - :raises HoneycombError: If the operation fails. - """ - - ssh = SSH() - ssh.connect(node) - - cmd = "sudo rm -rf {dst}/*karaf_{odl_name} && " \ - "cp -r {src}/*karaf_{odl_name}* {dst}".format( - src=src_path, odl_name=odl_name, dst=dst_path) - - ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=180) - if int(ret_code) != 0: - raise HoneycombError( - "Failed to copy ODL client on node {0}".format(node["host"])) - - @staticmethod - def setup_odl_client(node, path): - """Start ODL client on the specified node. - - Karaf should be located in the provided path, and VPP and Honeycomb - should already be running, otherwise the start will fail. - - :param node: Node to start ODL client on. - :param path: Path to ODL client on node. - :type node: dict - :type path: str - :raises HoneycombError: If Honeycomb fails to start. - """ - - logger.console("\nStarting ODL client ...") - ssh = SSH() - ssh.connect(node) - - cmd = "{path}/*karaf*/bin/start clean".format(path=path) - ret_code, _, _ = ssh.exec_command_sudo(cmd) - - if int(ret_code) != 0: - raise HoneycombError('Node {0} failed to start ODL.'. - format(node['host'])) - else: - logger.info("Starting the ODL client on node {0} is " - "in progress ...".format(node['host'])) - - @staticmethod - def install_odl_features(node, path, *features): - """Install required features on a running ODL client. - - :param node: Honeycomb node. - :param path: Path to ODL client on node. - :param features: Optional, list of additional features to install. - :type node: dict - :type path: str - :type features: list - """ - - ssh = SSH() - ssh.connect(node) - - auth = "-u karaf -p karaf" - - cmd = "{path}/*karaf*/bin/client {auth} feature:install " \ - "odl-restconf-all " \ - "odl-netconf-connector-all " \ - "odl-netconf-topology".format(path=path, auth=auth) - for feature in features: - cmd += " {0}".format(feature) - - ret_code, _, _ = ssh.exec_command_sudo(cmd, timeout=250) - - if int(ret_code) != 0: - raise HoneycombError("Feature install did not succeed.") - - @staticmethod - def check_odl_startup_state(node): - """Check the status of ODL client startup. - - :param node: Honeycomb node. - :param node: dict - :returns: True when ODL is started. - :rtype: bool - :raises HoneycombError: When the response is not code 200: OK. - """ - - path = HcUtil.read_path_from_url_file( - "odl_client/odl_netconf_connector") - expected_status_codes = (HTTPCodes.UNAUTHORIZED, - HTTPCodes.FORBIDDEN, - HTTPCodes.NOT_FOUND, - HTTPCodes.SERVICE_UNAVAILABLE, - HTTPCodes.INTERNAL_SERVER_ERROR) - - status_code, _ = HTTPRequest.get(node, path, timeout=10, - enable_logging=False) - if status_code == HTTPCodes.OK: - logger.info("ODL client on node {0} is up and running". - format(node['host'])) - elif status_code in expected_status_codes: - if status_code == HTTPCodes.UNAUTHORIZED: - logger.info('Unauthorized. If this triggers keyword ' - 'timeout, verify username and password.') - raise HoneycombError('ODL client on node {0} running but ' - 'not yet ready.'.format(node['host']), - enable_logging=False) - else: - raise HoneycombError('Unexpected return code: {0}.'. - format(status_code)) - return True - - @staticmethod - def check_odl_shutdown_state(node): - """Check the status of ODL client shutdown. - - :param node: Honeycomb node. - :type node: dict - :returns: True when ODL is stopped. - :rtype: bool - :raises HoneycombError: When the response is not code 200: OK. - """ - - cmd = "pgrep -f karaf" - path = HcUtil.read_path_from_url_file( - "odl_client/odl_netconf_connector") - - try: - HTTPRequest.get(node, path, timeout=10, enable_logging=False) - raise HoneycombError("ODL client is still running.") - except HTTPRequestError: - logger.debug("Connection refused, checking process state....") - ssh = SSH() - ssh.connect(node) - ret_code, _, _ = ssh.exec_command(cmd) - if ret_code == 0: - raise HoneycombError("ODL client is still running.") - - return True - - @staticmethod - def mount_honeycomb_on_odl(node): - """Tell ODL client to mount Honeycomb instance over netconf. - - :param node: Honeycomb node. - :type node: dict - :raises HoneycombError: When the response is not code 200: OK. - """ - - path = HcUtil.read_path_from_url_file( - "odl_client/odl_netconf_connector") - - url_file = "{0}/{1}".format(Const.RESOURCES_TPL_HC, - "odl_client/mount_honeycomb.json") - - with open(url_file) as template: - data = template.read() - - data = loads(data) - - status_code, _ = HTTPRequest.post( - node, - path, - headers={"Content-Type": "application/json", - "Accept": "text/plain"}, - json=data, - timeout=10, - enable_logging=False) - - if status_code == HTTPCodes.OK: - logger.info("ODL mount point configured successfully.") - elif status_code == HTTPCodes.CONFLICT: - logger.info("ODL mount point was already configured.") - else: - raise HoneycombError('Mount point configuration not successful') - - @staticmethod - def stop_odl_client(node, path): - """Stop ODL client service on the specified node. - - :param node: Node to start ODL client on. - :param path: Path to ODL client. - :type node: dict - :type path: str - :raises HoneycombError: If ODL client fails to stop. - """ - - ssh = SSH() - ssh.connect(node) - - cmd = "{0}/*karaf*/bin/stop".format(path) - - ssh = SSH() - ssh.connect(node) - ret_code, _, _ = ssh.exec_command_sudo(cmd) - if int(ret_code) != 0: - logger.debug("ODL Client refused to shut down.") - cmd = "pkill -f 'karaf'" - (ret_code, _, _) = ssh.exec_command_sudo(cmd) - if int(ret_code) != 0: - raise HoneycombError('Node {0} failed to stop ODL.'. - format(node['host'])) - - logger.info("ODL client service stopped.") - - @staticmethod - def set_static_arp(node, ip_address, mac_address): - """Configure a static ARP entry using arp. - - :param node: Node in topology. - :param ip_address: IP address for the entry. - :param mac_address: MAC adddress for the entry. - :type node: dict - :type ip_address: str - :type mac_address: str - :raises RuntimeError: If the operation fails. - """ - - ssh = SSH() - ssh.connect(node) - ret_code, _, _ = ssh.exec_command_sudo("arp -s {0} {1}".format( - ip_address, mac_address)) - - if ret_code != 0: - raise RuntimeError("Failed to configure static ARP adddress.") - - -class HoneycombStartupConfig(object): - """Generator for Honeycomb startup configuration. - """ - def __init__(self): - """Initializer.""" - - self.template = """#!/bin/sh - - STATUS=100 - - while [ $STATUS -eq 100 ] - do - {java_call} -jar $(dirname $0)/{jar_filename} - STATUS=$? - echo "Honeycomb exited with status: $STATUS" - if [ $STATUS -eq 100 ] - then - echo "Restarting..." - fi - done - """ - - self.java_call = "{scheduler} {affinity} java{jit_mode}{params}" - - self.scheduler = "" - self.core_affinity = "" - self.jit_mode = "" - self.params = "" - self.numa = "" - - self.config = "" - self.ssh = SSH() - - def apply_config(self, node): - """Generate configuration file /opt/honeycomb/honeycomb on the specified - node. - - :param node: Honeycomb node. - :type node: dict - """ - - self.ssh.connect(node) - _, filename, _ = self.ssh.exec_command("ls /opt/honeycomb | grep .jar") - - java_call = self.java_call.format(scheduler=self.scheduler, - affinity=self.core_affinity, - jit_mode=self.jit_mode, - params=self.params) - self.config = self.template.format(java_call=java_call, - jar_filename=filename) - - self.ssh.connect(node) - cmd = "echo '{config}' > /tmp/honeycomb " \ - "&& chmod +x /tmp/honeycomb " \ - "&& sudo mv -f /tmp/honeycomb /opt/honeycomb".\ - format(config=self.config) - self.ssh.exec_command(cmd) - - def set_cpu_scheduler(self, scheduler="FIFO"): - """Use alternate CPU scheduler. - - Note: OTHER scheduler doesn't load-balance over isolcpus. - - :param scheduler: CPU scheduler to use. - :type scheduler: str - """ - - schedulers = {"FIFO": "-f 99", # First In, First Out - "RR": "-r 99", # Round Robin - "OTHER": "-o", # Ubuntu default - } - self.scheduler = "chrt {0}".format(schedulers[scheduler]) - - def set_cpu_core_affinity(self, low, high=None): - """Set core affinity for the honeycomb process and subprocesses. - - :param low: Lowest core ID number. - :param high: Highest core ID number. Leave empty to use a single core. - :type low: int - :type high: int - """ - - self.core_affinity = "taskset -c {low}-{high}".format( - low=low, high=high if high else low) - - def set_jit_compiler_mode(self, jit_mode): - """Set running mode for Java's JIT compiler. - - :param jit_mode: Desiret JIT mode. - :type jit_mode: str - """ - - modes = {"client": " -client", # Default - "server": " -server", # Higher performance but longer warmup - "classic": " -classic" # Disables JIT compiler - } - - self.jit_mode = modes[jit_mode] - - def set_memory_size(self, mem_min, mem_max=None): - """Set minimum and maximum memory use for the JVM. - - :param mem_min: Minimum amount of memory (MB). - :param mem_max: Maximum amount of memory (MB). Default is 4 times - minimum value. - :type mem_min: int - :type mem_max: int - """ - - self.params += " -Xms{min}m -Xmx{max}m".format( - min=mem_min, max=mem_max if mem_max else mem_min*4) - - def set_metaspace_size(self, mem_min, mem_max=None): - """Set minimum and maximum memory used for class metadata in the JVM. - - :param mem_min: Minimum metaspace size (MB). - :param mem_max: Maximum metaspace size (MB). Defailt is 4 times - minimum value. - :type mem_min: int - :type mem_max: int - """ - - self.params += " -XX:MetaspaceSize={min}m " \ - "-XX:MaxMetaspaceSize={max}m".format( - min=mem_min, max=mem_max if mem_max else mem_min*4) - - def set_numa_optimization(self): - """Use optimization of memory use and garbage collection for NUMA - architectures.""" - - self.params += " -XX:+UseNUMA -XX:+UseParallelGC" - - def set_ssh_security_provider(self): - """Disables BouncyCastle for SSHD.""" - # Workaround for issue described in: - # https://wiki.fd.io/view/Honeycomb/Releases/1609/Honeycomb_and_ODL - - self.params += " -Dorg.apache.sshd.registerBouncyCastle=false" diff --git a/resources/libraries/python/honeycomb/HoneycombUtil.py b/resources/libraries/python/honeycomb/HoneycombUtil.py deleted file mode 100644 index 59483f4672..0000000000 --- a/resources/libraries/python/honeycomb/HoneycombUtil.py +++ /dev/null @@ -1,512 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Implementation of low level functionality used in communication with -Honeycomb. - -Exception HoneycombError is used in all methods and in all modules with -Honeycomb keywords. - -Class HoneycombUtil implements methods used by Honeycomb keywords. They must not -be used directly in tests. Use keywords implemented in the module -HoneycombAPIKeywords instead. -""" - -from json import loads, dumps -from enum import Enum, unique - -from robot.api import logger - -from resources.libraries.python.ssh import SSH -from resources.libraries.python.HTTPRequest import HTTPRequest -from resources.libraries.python.Constants import Constants as Const - - -@unique -class DataRepresentation(Enum): - """Representation of data sent by PUT and POST requests.""" - NO_DATA = 0 - JSON = 1 - XML = 2 - TXT = 3 - - -# Headers used in requests. Key - content representation, value - header. -HEADERS = {DataRepresentation.NO_DATA: - {}, # It must be empty dictionary. - DataRepresentation.JSON: - {"Content-Type": "application/json", - "Accept": "text/plain"}, - DataRepresentation.XML: - {"Content-Type": "application/xml", - "Accept": "text/plain"}, - DataRepresentation.TXT: - {"Content-Type": "text/plain", - "Accept": "text/plain"} - } - - -class HoneycombError(Exception): - - """Exception(s) raised by methods working with Honeycomb. - - When raising this exception, put this information to the message in this - order: - - - short description of the encountered problem (parameter msg), - - relevant messages if there are any collected, e.g., from caught - exception (optional parameter details), - - relevant data if there are any collected (optional parameter details). - - The logging is performed on two levels: 1. error - short description of the - problem; 2. debug - detailed information. - """ - - def __init__(self, msg, details='', enable_logging=True): - """Sets the exception message and enables / disables logging. - - It is not wanted to log errors when using these keywords together - with keywords like "Wait until keyword succeeds". So you can disable - logging by setting enable_logging to False. - - :param msg: Message to be displayed and logged. - :param enable_logging: When True, logging is enabled, otherwise - logging is disabled. - :type msg: str - :type enable_logging: bool - """ - super(HoneycombError, self).__init__() - self._msg = "{0}: {1}".format(self.__class__.__name__, msg) - self._details = details - if enable_logging: - logger.debug(self._details) - - def __repr__(self): - return repr(self._msg) - - def __str__(self): - return str(self._msg) - - -class HoneycombUtil(object): - """Implements low level functionality used in communication with Honeycomb. - - There are implemented methods to get, put and delete data to/from Honeycomb. - They are based on functionality implemented in the module HTTPRequests which - uses HTTP requests GET, PUT, POST and DELETE to communicate with Honeycomb. - - It is possible to PUT the data represented as XML or JSON structures or as - plain text. - Data received in the response of GET are always represented as a JSON - structure. - - There are also two supportive methods implemented: - - - read_path_from_url_file which reads URL file and returns a path (see - docs/honeycomb_url_files.rst). - - parse_json_response which parses data from response in JSON - representation according to given path. - """ - - def __init__(self): - pass - - @staticmethod - def read_path_from_url_file(url_file): - """Read path from .url file. - - For more information about .url file see docs/honeycomb_url_files.rst - - :param url_file: URL file. The argument contains only the name of file - without extension, not the full path. - :type url_file: str - :returns: Requested path. - :rtype: str - """ - - url_file = "{0}/{1}.url".format(Const.RESOURCES_TPL_HC, url_file) - with open(url_file) as template: - path = template.readline() - return path - - @staticmethod - def find_item(data, path): - """Find a data item (single leaf or sub-tree) in data received from - Honeycomb REST API. - - Path format: - The path is a tuple with items navigating to requested data. The items - can be strings or tuples: - - - string item represents a dictionary key in data, - - tuple item represents list item in data. - - Example:: - - data = \ - { - "interfaces": { - "interface": [ - { - "name": "GigabitEthernet0/8/0", - "enabled": "true", - "type": "iana-if-type:ethernetCsmacd", - }, - { - "name": "local0", - "enabled": "false", - "type": "iana-if-type:ethernetCsmacd", - } - ] - } - } - - path = ("interfaces", ("interface", "name", "local0"), "enabled") - This path points to "false". - - The tuple ("interface", "name", "local0") consists of:: - - index 0 - dictionary key pointing to a list, - index 1 - key which identifies an item in the list, it is also marked - as the key in corresponding yang file. - index 2 - key value. - - :param data: Data received from Honeycomb REST API. - :param path: Path to data we want to find. - :type data: dict - :type path: tuple - :returns: Data represented by path. - :rtype: str, dict, or list - :raises HoneycombError: If the data has not been found. - """ - - for path_item in path: - try: - if isinstance(path_item, str): - data = data[path_item] - elif isinstance(path_item, tuple): - for data_item in data[path_item[0]]: - if data_item[path_item[1]] == path_item[2]: - data = data_item - except KeyError as err: - raise HoneycombError("Data not found: {0}".format(err)) - - return data - - @staticmethod - def remove_item(data, path): - """Remove a data item (single leaf or sub-tree) in data received from - Honeycomb REST API. - - :param data: Data received from Honeycomb REST API. - :param path: Path to data we want to remove. - :type data: dict - :type path: tuple - :returns: Original data without removed part. - :rtype: dict - """ - - origin_data = previous_data = data - try: - for path_item in path: - previous_data = data - if isinstance(path_item, str): - data = data[path_item] - elif isinstance(path_item, tuple): - for data_item in data[path_item[0]]: - if data_item[path_item[1]] == path_item[2]: - data = data_item - except KeyError as err: - logger.debug("Data not found: {0}".format(err)) - return origin_data - - if isinstance(path[-1], str): - previous_data.pop(path[-1]) - elif isinstance(path[-1], tuple): - previous_data[path[-1][0]].remove(data) - if not previous_data[path[-1][0]]: - previous_data.pop(path[-1][0]) - - return origin_data - - @staticmethod - def set_item_value(data, path, new_value): - """Set or change the value (single leaf or sub-tree) in data received - from Honeycomb REST API. - - If the item is not present in the data structure, it is created. - - :param data: Data received from Honeycomb REST API. - :param path: Path to data we want to change or create. - :param new_value: The value to be set. - :type data: dict - :type path: tuple - :type new_value: str, dict or list - :returns: Original data with the new value. - :rtype: dict - """ - - origin_data = data - for path_item in path[:-1]: - if isinstance(path_item, str): - try: - data = data[path_item] - except KeyError: - data[path_item] = {} - data = data[path_item] - elif isinstance(path_item, tuple): - try: - flag = False - index = 0 - for data_item in data[path_item[0]]: - if data_item[path_item[1]] == path_item[2]: - data = data[path_item[0]][index] - flag = True - break - index += 1 - if not flag: - data[path_item[0]].append({path_item[1]: path_item[2]}) - data = data[path_item[0]][-1] - except KeyError: - data[path_item] = [] - - if not path[-1] in data.keys(): - data[path[-1]] = {} - - if isinstance(new_value, list) and isinstance(data[path[-1]], list): - for value in new_value: - data[path[-1]].append(value) - else: - data[path[-1]] = new_value - - return origin_data - - @staticmethod - def get_honeycomb_data(node, url_file, path=""): - """Retrieve data from Honeycomb according to given URL. - - :param node: Honeycomb node. - :param url_file: URL file. The argument contains only the name of file - without extension, not the full path. - :param path: Path which is added to the base path to identify the data. - :type node: dict - :type url_file: str - :type path: str - :returns: Status code and content of response. - :rtype: tuple - """ - - base_path = HoneycombUtil.read_path_from_url_file(url_file) - path = base_path + path - status_code, resp = HTTPRequest.get(node, path) - - try: - data = loads(resp) - except ValueError: - logger.debug("Failed to deserialize JSON data.") - data = None - - return status_code, data - - @staticmethod - def put_honeycomb_data(node, url_file, data, path="", - data_representation=DataRepresentation.JSON): - """Send configuration data using PUT request and return the status code - and response content. - - :param node: Honeycomb node. - :param url_file: URL file. The argument contains only the name of file - without extension, not the full path. - :param data: Configuration data to be sent to Honeycomb. - :param path: Path which is added to the base path to identify the data. - :param data_representation: How the data is represented. - :type node: dict - :type url_file: str - :type data: dict, str - :type path: str - :type data_representation: DataRepresentation - :returns: Status code and content of response. - :rtype: tuple - :raises HoneycombError: If the given data representation is not defined - in HEADERS. - """ - - try: - header = HEADERS[data_representation] - except AttributeError as err: - raise HoneycombError("Wrong data representation: {0}.". - format(data_representation), repr(err)) - if data_representation == DataRepresentation.JSON: - data = dumps(data) - - logger.trace(data) - - base_path = HoneycombUtil.read_path_from_url_file(url_file) - path = base_path + path - logger.trace(path) - return HTTPRequest.put( - node=node, path=path, headers=header, payload=data) - - @staticmethod - def post_honeycomb_data(node, url_file, data=None, - data_representation=DataRepresentation.JSON, - timeout=10): - """Send a POST request and return the status code and response content. - - :param node: Honeycomb node. - :param url_file: URL file. The argument contains only the name of file - without extension, not the full path. - :param data: Configuration data to be sent to Honeycomb. - :param data_representation: How the data is represented. - :param timeout: How long to wait for the server to send data before - giving up. - :type node: dict - :type url_file: str - :type data: dict, str - :type data_representation: DataRepresentation - :type timeout: int - :returns: Status code and content of response. - :rtype: tuple - :raises HoneycombError: If the given data representation is not defined - in HEADERS. - """ - - try: - header = HEADERS[data_representation] - except AttributeError as err: - raise HoneycombError("Wrong data representation: {0}.". - format(data_representation), repr(err)) - if data_representation == DataRepresentation.JSON: - data = dumps(data) - - path = HoneycombUtil.read_path_from_url_file(url_file) - return HTTPRequest.post( - node=node, path=path, headers=header, payload=data, timeout=timeout) - - @staticmethod - def delete_honeycomb_data(node, url_file, path=""): - """Delete data from Honeycomb according to given URL. - - :param node: Honeycomb node. - :param url_file: URL file. The argument contains only the name of file - without extension, not the full path. - :param path: Path which is added to the base path to identify the data. - :type node: dict - :type url_file: str - :type path: str - :returns: Status code and content of response. - :rtype: tuple - """ - - base_path = HoneycombUtil.read_path_from_url_file(url_file) - path = base_path + path - return HTTPRequest.delete(node, path) - - @staticmethod - def append_honeycomb_log(node, suite_name): - """Append Honeycomb log for the current test suite to the full log. - - :param node: Honeycomb node. - :param suite_name: Name of the current test suite. ${SUITE_NAME} - variable in robotframework. - :type node: dict - :type suite_name: str - """ - - ssh = SSH() - ssh.connect(node) - - ssh.exec_command( - "echo '{separator}' >> /tmp/honeycomb.log".format(separator="="*80)) - ssh.exec_command( - "echo 'Log for suite: {suite}' >> /tmp/honeycomb.log".format( - suite=suite_name)) - ssh.exec_command( - "cat {hc_log} >> /tmp/honeycomb.log".format( - hc_log=Const.REMOTE_HC_LOG)) - - @staticmethod - def append_odl_log(node, odl_name, suite_name): - """Append ODL karaf log for the current test suite to the full log. - - :param node: Honeycomb node. - :param odl_name: Name of ODL client version to use. - :param suite_name: Name of the current test suite. ${SUITE_NAME} - variable in robotframework. - :type node: dict - :type odl_name: str - :type suite_name: str - """ - - ssh = SSH() - ssh.connect(node) - - ssh.exec_command( - "echo '{separator}' >> /tmp/karaf.log".format(separator="="*80)) - ssh.exec_command( - "echo 'Log for suite: {suite}' >> /tmp/karaf.log".format( - suite=suite_name)) - ssh.exec_command( - "cat /tmp/karaf_{odl_name}/data/log/karaf.log >> /tmp/karaf.log" - .format(odl_name=odl_name)) - - @staticmethod - def clear_honeycomb_log(node): - """Delete the Honeycomb log file for the current test suite. - - :param node: Honeycomb node. - :type node: dict - """ - - ssh = SSH() - ssh.connect(node) - - ssh.exec_command("sudo rm {hc_log}".format(hc_log=Const.REMOTE_HC_LOG)) - - @staticmethod - def archive_honeycomb_log(node, perf=False): - """Copy honeycomb log file from DUT node to VIRL for archiving. - - :param node: Honeycomb node. - :param perf: Alternate handling, for use with performance test topology. - :type node: dict - :type perf: bool - """ - - ssh = SSH() - ssh.connect(node) - - if not perf: - cmd = "cp /tmp/honeycomb.log /scratch/" - ssh.exec_command_sudo(cmd, timeout=60) - else: - ssh.scp( - ".", - "/tmp/honeycomb.log", - get=True, - timeout=60) - ssh.exec_command("rm /tmp/honeycomb.log") - - @staticmethod - def archive_odl_log(node): - """Copy ODL karaf log file from DUT node to VIRL for archiving. - - :param node: Honeycomb node. - :type node: dict - """ - - ssh = SSH() - ssh.connect(node) - - cmd = "cp /tmp/karaf.log /scratch/" - ssh.exec_command_sudo(cmd, timeout=60) diff --git a/resources/libraries/python/honeycomb/IPv6Management.py b/resources/libraries/python/honeycomb/IPv6Management.py deleted file mode 100644 index deec041103..0000000000 --- a/resources/libraries/python/honeycomb/IPv6Management.py +++ /dev/null @@ -1,147 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -"""Keywords used for setup and testing of Honeycomb's control-plane interface -using IPv6. -""" - -from resources.libraries.python.ssh import SSH - - -class IPv6Management(object): - """Utilities for managing IPv6 contol-plane interfaces.""" - - def __init__(self): - pass - - @staticmethod - def get_interface_name_by_mac(node, mac): - """Get the name of an interface using its MAC address. - - :param node: Node in topology. - :param mac: MAC address. - :type node: dict - :type mac: str - :returns: Name of the interface. - :rtype: str - :raises RuntimeError: If no interface is found. - """ - - cmd = " | ".join([ - "fgrep -ls '{0}' /sys/class/net/*/address".format(mac), - "awk -F '/' '{print $5}'" - ]) - - ssh = SSH() - ssh.connect(node) - ret_code, stdout, _ = ssh.exec_command(cmd) - - if ret_code == 0: - return stdout.strip() - else: - raise RuntimeError("No interface found using the specified MAC " - "address.") - - @staticmethod - def clear_interface_configuration(node, interface): - """Remove all configured IP addresses from the specified interface - and set it into down state. - - :param node: Node in topology. - :param interface: Name of an interface on the node. - :type node: dict - :type interface: str - :raises RuntimeError: If the configuration could not be cleared. - """ - - cmd = " && ".join([ - "sudo ip addr flush dev {interface}".format(interface=interface), - "sudo ip link set dev {interface} down".format(interface=interface) - ]) - - ssh = SSH() - ssh.connect(node) - ret_code, _, _ = ssh.exec_command(cmd) - if ret_code != 0: - raise RuntimeError("Could not clear interface configuration.") - - @staticmethod - def set_management_interface_address(node, interface, address, prefix): - """Configure an IP address on the specified interface. - - :param node: Node in topology. - :param interface: Name of an interface on the node. - :param address: IP address to configure. - :param prefix: IP network prefix. - :type node: dict - :type interface: str - :type address: str - :type prefix: int - :raises RuntimeError: If the configuration fails. - """ - - ssh = SSH() - ssh.connect(node) - - # Enable IPv6 for only the specified interface - cmd = "sudo sysctl net.ipv6.conf.{0}.disable_ipv6=0".format(interface) - - ret_code, _, _ = ssh.exec_command(cmd) - if ret_code != 0: - raise RuntimeError("Could not enable IPv6 on interface.") - - # Configure IPv6 address on the interface - cmd = "sudo ip address add {address}/{prefix} dev {interface}".format( - interface=interface, - address=address, - prefix=prefix) - - ret_code, _, _ = ssh.exec_command(cmd) - if ret_code != 0: - raise RuntimeError("Could not configure IP address on interface.") - - # Set the interface up - cmd = "sudo ip link set {interface} up".format(interface=interface) - - ret_code, _, _ = ssh.exec_command(cmd) - if ret_code != 0: - raise RuntimeError("Could not change the interface to 'up' state.") - - @staticmethod - def configure_control_interface_tunnel(node, src_port, dst_ip, dst_port): - """Configure a tunnel on the specified node, tunelling any IPv4 traffic - from one port to the specified address. - - :param node: Node in topology. - :param src_port: Port to tunnel traffic from. - :param dst_ip: IP address to tunnel traffic to. - :param dst_port: Port to tunnel traffic to. - :type node: dict - :type src_port: int - :type dst_ip: str - :type dst_port: int - :raises RuntimeError: If tunnel creation is not successful. - """ - - cmd = "nohup socat TCP4-LISTEN:{src_port},fork,su=nobody " \ - "TCP6:[{dst_ip}]:{dst_port} $@ > " \ - "/tmp/socat.log 2>&1 &".format( - src_port=src_port, - dst_ip=dst_ip, - dst_port=dst_port) - - ssh = SSH() - ssh.connect(node) - ret_code, _, _ = ssh.exec_command_sudo(cmd) - if ret_code != 0: - raise RuntimeError("Could not configure tunnel.") diff --git a/resources/libraries/python/honeycomb/Lisp.py b/resources/libraries/python/honeycomb/Lisp.py deleted file mode 100644 index 6ff6f834cc..0000000000 --- a/resources/libraries/python/honeycomb/Lisp.py +++ /dev/null @@ -1,671 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""This module implements keywords to manipulate LISP data structures using -Honeycomb REST API.""" - -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation -from resources.libraries.python.topology import Topology - - -class LispKeywords(object): - """Implementation of keywords which make it possible to: - - enable/disable LISP feature - - configure LISP mappings - - configure locator sets - - configure map resolver - - configure LISP PITR feature - - read operational data for all of the above - """ - - def __init__(self): - """Initializer.""" - pass - - @staticmethod - def _set_lisp_properties(node, path, data=None): - """Set LISP properties and check the return code. - - :param node: Honeycomb node. - :param path: Path which is added to the base path to identify the data. - :param data: The new data to be set. If None, the item will be removed. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response to PUT is not - 200 = OK or 201 = ACCEPTED. - """ - - if data: - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_lisp", data, path, - data_representation=DataRepresentation.JSON) - else: - status_code, resp = HcUtil.\ - delete_honeycomb_data(node, "config_lisp", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Lisp configuration unsuccessful. " - "Status code: {0}.".format(status_code)) - else: - return resp - - @staticmethod - def get_lisp_operational_data(node): - """Retrieve Lisp properties from Honeycomb operational data. - - :param node: Honeycomb node. - :type node: dict - :returns: List operational data. - :rtype: bytearray - """ - - status_code, resp = HcUtil.get_honeycomb_data(node, "oper_lisp") - - if status_code != HTTPCodes.OK: - raise HoneycombError("Could not retrieve LISP operational data." - "Status code: {0}.".format(status_code)) - else: - # get rid of empty vni-table entry - resp["lisp-state"]["lisp-feature-data"]["eid-table"][ - "vni-table"].remove( - { - "virtual-network-identifier": 0, - "vrf-subtable": {"table-id": 0} - } - ) - return resp - - @staticmethod - def verify_map_server_data_from_honeycomb(data, ip_addresses): - """Verify whether MAP server data from Honeycomb is correct. - - :param data: LISP operational data containing map server IP addresses. - :param ip_addresses: IP addresses to verify map server data against. - :type data: dict - :type ip_addresses: list - :returns: Boolean Value indicating equality of IP Lists. - :rtype: bool - """ - - data =\ - data['lisp-state']['lisp-feature-data']['map-servers']['map-server'] - - data = sorted([entry['ip-address'] for entry in data]) - ip_addresses.sort() - - return data == ip_addresses - - @staticmethod - def verify_map_server_data_from_vat(data, ip_addresses): - """Verify whether MAP server data from VAT is correct. - - :param data: LISP operational data containing map server IP addresses. - :param ip_addresses: IP addresses to verify map server data against. - :type data: dict - :type ip_addresses: list - :returns: Boolean Value indicating equality of IP Lists. - :rtype: bool - """ - - data = sorted([entry['map-server'] for entry in data]) - ip_addresses.sort() - - return data == ip_addresses - - @staticmethod - def set_lisp_state(node, state=True): - """Enable or disable the LISP feature. - - :param node: Honeycomb node. - :param state: Enable or disable LISP. - :type node: dict - :type state: bool - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the return code is not 200:OK - or 404:NOT FOUND. - """ - - ret_code, data = HcUtil.get_honeycomb_data(node, "config_lisp") - if ret_code == HTTPCodes.OK: - data["lisp"]["enable"] = bool(state) - elif ret_code == HTTPCodes.NOT_FOUND: - data = {"lisp": {"enable": bool(state)}} - else: - raise HoneycombError("Unexpected return code when getting existing" - " LISP configuration.") - - return LispKeywords._set_lisp_properties(node, '', data) - - @staticmethod - def set_rloc_probe_state(node, state=False): - """Enable or disable the Routing Locator probe. - - :param node: Honeycomb node. - :param state: Enable or Disable the Rloc probe. - :type node: dict - :type state: bool - :returns: Content of response. - :rtype: bytearray - """ - - path = "/lisp-feature-data/rloc-probe" - - data = { - "rloc-probe": { - "enabled": bool(state) - } - } - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def add_locator(node, interface, locator_set, priority=1, weight=1): - """Configure a new LISP locator set. - - :param node: Honeycomb node. - :param interface: An interface on the node. - :param locator_set: Name for the new locator set. - :param priority: Priority parameter for the locator. - :param weight: Weight parameter for the locator. - :type node: dict - :type interface: str - :type locator_set: str - :type priority: int - :type weight: int - :returns: Content of response. - :rtype: bytearray - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - path = "/lisp-feature-data/locator-sets/locator-set" \ - "/{0}".format(locator_set) - - data = { - "locator-set": { - "name": locator_set, - "interface": { - "interface-ref": interface, - "priority": priority, - "weight": weight - } - } - } - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def configure_lisp_mapping(node, data): - """Modify eid-table configuration to the data provided. - - :param node: Honeycomb node. - :param data: Settings for the LISP mappings. - :type node: dict - :type data: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = "/lisp-feature-data/eid-table" - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def configure_lisp_map_request_mode(node, option): - """Modify LISP Map Request Mode configuration to the data provided. - - :param node: Honeycomb node. - :param option: Settings for the LISP map request mode. - :type node: dict - :type option: str - :returns: Content of response. - :rtype: bytearray - """ - - data = { - "map-request-mode": { - "mode": option - } - } - - path = "/lisp-feature-data/map-request-mode" - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def add_lisp_adjacency(node, vni_id, map_name, adjacency_name, data): - """Add an adjacency to an existing LISP mapping. - - :param node: Honeycomb node. - :param vni_id: vni_id of the mapping. - :param map_name: Name of the mapping. - :param adjacency_name: Name for the new adjacency. - :param data: Adjacency settings. - :type node: dict - :type vni_id: int - :type map_name: str - :type adjacency_name: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = ( - "/lisp-feature-data/eid-table/vni-table/{vni_id}/" - "vrf-subtable/remote-mappings/remote-mapping/{map_name}/" - "adjacencies/adjacency/{adjacency_name}" - ) - path = path.format( - vni_id=vni_id, - map_name=map_name, - adjacency_name=adjacency_name - ) - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def add_map_resolver(node, ip_address): - """Configure map resolver with the specified IP address. - - :param node: Honeycomb node. - :param ip_address: IP address to configure map resolver with. - :type node: dict - :type ip_address: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/lisp-feature-data/map-resolvers/map-resolver/{0}".format( - ip_address) - - data = { - "map-resolver": { - "ip-address": ip_address - } - } - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def set_map_register(node, map_register=False): - """Configure Map Register. - - :param node: Honeycomb node. - :param map_register: Enable or disable Map Register. - :type node: dict - :type map_register: bool - :returns: Content of response. - :rtype: bytearray - """ - - path = "/lisp-feature-data/map-register" - - data = { - "map-register": { - "enabled": bool(map_register) - } - } - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def set_map_request_mode(node, src_dst=False): - """Configure Map Request Mode. - - :param node: Honeycomb node. - :param src_dst: Configure Map Request Mode with source destination. - :type node: dict - :type src_dst: bool - :returns: Content of response. - :rtype: bytearray - """ - - path = "/lisp-feature-data/map-request-mode" - - data = { - "map-request-mode": { - "mode": "source-destination" if src_dst - else "target-destination" - } - } - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def delete_map_resolver(node): - """Delete an existing map resolver. - - :param node: Honeycomb node - :type node: dict - :returns: Content of response - :rtype: bytearray - """ - - path = "/lisp-feature-data/map-resolvers" - - return LispKeywords._set_lisp_properties(node, path) - - @staticmethod - def add_map_server(node, *ip_addresses): - """Configure map server with the specified IP addresses. - - :param node: Honeycomb node. - :param ip_addresses: IP addresses to configure map server with. - :type node: dict - :type ip_addresses: list - :returns: Content of response. - :rtype: bytearray - """ - - path = "/lisp-feature-data/map-servers" - - data = { - "map-servers": { - "map-server": [ - {"ip-address": ip_address} for ip_address in ip_addresses - ] - } - } - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def delete_map_server(node): - """Delete all map servers. - - :param node: Honeycomb node - :type node: dict - :returns: Content of response - :rtype: bytearray - """ - - path = "/lisp-feature-data/map-servers" - - return LispKeywords._set_lisp_properties(node, path) - - @staticmethod - def configure_pitr(node, locator_set=None): - """Configure PITR feature with the specified locator set. If not locator - set is specified, disable PITR instead. - - :param node: Honeycomb node. - :param locator_set: Name of a locator set. Optional. - :type node: dict - :type locator_set: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/lisp-feature-data/pitr-cfg" - - if locator_set: - data = { - "pitr-cfg": { - "locator-set": locator_set - } - } - else: - data = None - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def configure_petr(node, ip_address): - """Configure PETR feature with the specified IP. If no IP - specified, disable PETR instead. - - :param node: Honeycomb node. - :param ip_address: IPv6 address. - :type node: dict - :type ip_address: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/lisp-feature-data/petr-cfg" - - if ip_address: - data = { - "petr-cfg": { - "petr-address": ip_address - } - } - else: - data = None - - return LispKeywords._set_lisp_properties(node, path, data) - - @staticmethod - def disable_lisp(node): - """Remove all LISP settings on the node. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - """ - - return LispKeywords._set_lisp_properties(node, "") - - -class LispGPEKeywords(object): - """Implementation of keywords which make it possible to: - - enable/disable LISP GPE feature - - configure LISP GPE forwarding entries - - read operational data for all of the above - """ - - def __init__(self): - """Initializer.""" - pass - - @staticmethod - def _set_lispgpe_properties(node, path, data=None): - """Set LISP GPE properties and check the return code. - - :param node: Honeycomb node. - :param path: Path which is added to the base path to identify the data. - :param data: The new data to be set. If None, the item will be removed. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response to PUT is not - 200 = OK or 201 = ACCEPTED. - """ - - if data: - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_lisp_gpe", data, path, - data_representation=DataRepresentation.JSON) - else: - status_code, resp = HcUtil.\ - delete_honeycomb_data(node, "config_lisp_gpe", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Lisp GPE configuration unsuccessful. " - "Status code: {0}.".format(status_code)) - else: - return resp - - @staticmethod - def get_lispgpe_operational_data(node): - """Retrieve LISP GPE properties from Honeycomb operational data. - - :param node: Honeycomb node. - :type node: dict - :returns: LISP GPE operational data. - :rtype: bytearray - :raises HoneycombError: If the status code in response to GET is not - 200 = OK. - """ - - status_code, resp = HcUtil.get_honeycomb_data(node, "oper_lisp_gpe") - - if status_code != HTTPCodes.OK: - raise HoneycombError("Could not retrieve Lisp GPE operational data." - "Status code: {0}.".format(status_code)) - else: - return resp - - @staticmethod - def get_lispgpe_mapping(node, name): - """Retrieve LISP GPE operational data and parse for a specific mapping. - - :param node: Honeycomb node. - :param name: Name of the mapping to look for. - :type node: dict - :type name: str - :returns: LISP GPE mapping. - :rtype: dict - :raises HoneycombError: If the mapping is not present in operational - data. - """ - - data = LispGPEKeywords.get_lispgpe_operational_data(node) - try: - data = data["gpe-state"]["gpe-feature-data"]["gpe-entry-table"] \ - ["gpe-entry"] - except KeyError: - raise HoneycombError("No mappings present in operational data.") - for item in data: - if item["id"] == name: - mapping = item - break - else: - raise HoneycombError("Mapping with name {name} not found in " - "operational data.".format(name=name)) - - return mapping - - @staticmethod - def get_lispgpe_config_data(node): - """Retrieve LISP GPE properties from Honeycomb config data. - - :param node: Honeycomb node. - :type node: dict - :returns: LISP GPE config data. - :rtype: bytearray - :raises HoneycombError: If the status code in response to GET is not - 200 = OK. - """ - - status_code, resp = HcUtil.get_honeycomb_data(node, "config_lisp_gpe") - - if status_code != HTTPCodes.OK: - raise HoneycombError("Could not retrieve Lisp GPE config data." - "Status code: {0}.".format(status_code)) - else: - return resp - - @staticmethod - def set_lispgpe_state(node, state=True): - """Enable or disable the LISP GPE feature. - - :param node: Honeycomb node. - :param state: Enable or disable LISP. - :type node: dict - :type state: bool - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the return code is not 200:OK - or 404:NOT FOUND. - """ - - ret_code, data = HcUtil.get_honeycomb_data(node, "config_lisp_gpe") - if ret_code == HTTPCodes.OK: - data["gpe"]["gpe-feature-data"]["enable"] = bool(state) - elif ret_code == HTTPCodes.NOT_FOUND: - data = {"gpe": {"gpe-feature-data": {"enable": bool(state)}}} - else: - raise HoneycombError("Unexpected return code when getting existing" - " Lisp GPE configuration.") - - return LispGPEKeywords._set_lispgpe_properties(node, '', data) - - @staticmethod - def configure_lispgpe_mapping(node, data=None): - """Modify LISP GPE mapping configuration to the data provided. - - :param node: Honeycomb node. - :param data: Settings for the LISP GPE mappings. - :type node: dict - :type data: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = "/gpe-feature-data/gpe-entry-table" - if data: - data = {"gpe-entry-table": {"gpe-entry": data}} - return LispGPEKeywords._set_lispgpe_properties(node, path, data) - else: - return LispGPEKeywords._set_lispgpe_properties(node, path) - - @staticmethod - def add_lispgpe_mapping(node, name, data): - """Add the specified LISP GPE mapping. - - :param node: Honeycomb node. - :param name: Name for the mapping. - :param data: Mapping details. - :type node: dict - :type name: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - """ - - path = "/gpe-feature-data/gpe-entry-table/gpe-entry/{name}".format( - name=name) - - data = {"gpe-entry": data} - return LispGPEKeywords._set_lispgpe_properties(node, path, data) - - @staticmethod - def delete_lispgpe_mapping(node, mapping): - """Delete the specified LISP GPE mapping from configuration. - - :param node: Honeycomb node. - :param mapping: Name of the mapping to remove. - :type node: dict - :type mapping: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/gpe-feature-data/gpe-entry-table/gpe-entry/{0}".format(mapping) - return LispGPEKeywords._set_lispgpe_properties(node, path) - - @staticmethod - def disable_lispgpe(node): - """Remove all LISP GPE settings on the node. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - """ - - return LispGPEKeywords._set_lispgpe_properties(node, "") diff --git a/resources/libraries/python/honeycomb/NAT.py b/resources/libraries/python/honeycomb/NAT.py deleted file mode 100644 index 759b801026..0000000000 --- a/resources/libraries/python/honeycomb/NAT.py +++ /dev/null @@ -1,143 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Keywords to manipulate NAT configuration using Honeycomb REST API.""" - -from resources.libraries.python.topology import Topology -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil - - -class NATKeywords(object): - """Keywords for NAT configuration.""" - - def __init__(self): - pass - - @staticmethod - def _set_nat_properties(node, path, data=None): - """Set NAT properties and check the return code. - - :param node: Honeycomb node. - :param path: Path which is added to the base path to identify the data. - :param data: The new data to be set. If None, the item will be removed. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response to PUT is not - OK or ACCEPTED. - """ - - if data: - status_code, resp = HcUtil. \ - put_honeycomb_data(node, "config_nat", data, path, - data_representation=DataRepresentation.JSON) - else: - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_nat", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "The configuration of NAT was not successful. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def get_nat_oper_data(node): - """Read NAT operational data. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the operation fails or the response - is not as expected. - """ - - status_code, resp = HcUtil.get_honeycomb_data(node, "oper_nat") - - if status_code != HTTPCodes.OK: - raise HoneycombError("Could not retrieve NAT operational data.") - - if "nat" not in resp.keys(): - raise HoneycombError( - "Unexpected format, response does not contain nat container.") - return resp['nat'] - - @staticmethod - def configure_nat_entries(node, data, instance=0, entry=1): - """Configure NAT entries on node. - - :param node: Honeycomb node. - :param data: Data to be configured on node. - :param instance: NAT instance ID. - :param entry: NAT entry index. - :type node: dict - :type data: dict - :type instance: int - :type entry: int - :returns: Content of response. - :rtype: bytearray - """ - - return NATKeywords._set_nat_properties( - node, - '/instances/instance/{0}/' - 'mapping-table/mapping-entry/{1}/'.format(instance, entry), - data) - - @staticmethod - def configure_nat_on_interface(node, interface, direction, delete=False): - """Configure NAT on the specified interface. - - :param node: Honeycomb node. - :param interface: Name of an interface on the node. - :param direction: NAT direction, outbound or inbound. - :param delete: Delete an existing interface NAT configuration. - :type node: dict - :type interface: str - :type direction: str - :type delete: bool - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the operation fails. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - - interface = interface.replace("/", "%2F") - path = "/interface/{0}/interface-nat:nat/{1}".format( - interface, direction) - - data = {direction: {}} - - if delete: - status_code, resp = HcUtil.delete_honeycomb_data( - node, "config_vpp_interfaces", path) - else: - status_code, resp = HcUtil.put_honeycomb_data( - node, "config_vpp_interfaces", data, path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Could not configure NAT on interface. " - "Status code: {0}.".format(status_code)) - - return resp diff --git a/resources/libraries/python/honeycomb/Netconf.py b/resources/libraries/python/honeycomb/Netconf.py deleted file mode 100644 index caca14ed1a..0000000000 --- a/resources/libraries/python/honeycomb/Netconf.py +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -"""Keywords used to connect to Honeycomb through Netconf, send messages - and receive replies.""" - -import socket -from time import time - -import paramiko -from robot.api import logger - -from resources.libraries.python.honeycomb.HoneycombUtil import HoneycombError - - -class Netconf(object): - """Implements methods for creating and managing Netconf sessions.""" - - def __init__(self, delimiter=']]>]]>'): - """Initializer. - - Note: Passing the channel object as a robotframework argument closes - the channel. Class variables are used instead, - to persist the connection channel throughout test cases. - """ - - self.client = None - self.channel = None - self.delimiter = delimiter - - def create_session(self, node, hello, time_out=10): - """Create an SSH session, connect to Honeycomb on the specified node, - open a communication channel to the Netconf subsystem and exchange hello - messages. - - :param node: Honeycomb node. - :param hello: Hello message and capability list to be sent to Honeycomb. - :param time_out: Timeout value for the connection in seconds. - :type node: dict - :type hello: str - :type time_out: int - """ - - start = time() - client = paramiko.SSHClient() - client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - - client.connect(node['host'], - username=node['honeycomb']['user'], - password=node['honeycomb']['passwd'], - pkey=None, - port=node['honeycomb']['netconf_port'], - timeout=time_out) - - logger.trace('Connect took {0} seconds'.format(time() - start)) - logger.debug('New ssh: {0}'.format(client)) - logger.debug('Connect peer: {0}'. - format(client.get_transport().getpeername())) - logger.debug(client) - - channel = client.get_transport().open_session() - channel.settimeout(time_out) - channel.set_combine_stderr(True) - channel.get_pty() - channel.invoke_subsystem("netconf") - logger.debug(channel) - - self.client = client - self.channel = channel - - # read OpenDaylight's hello message and capability list - self.get_response( - size=131072, - err="Timeout on getting hello message." - ) - - self.channel.send(hello) - if not self.channel.active: - raise HoneycombError("Channel closed on capabilities exchange.") - - def get_response(self, size=4096, err="Unspecified Error."): - """Iteratively read data from the receive buffer and catenate together - until message ends with the message delimiter, or - until timeout is reached. - - :param size: Maximum number of bytes to read in one iteration. - :param err: Error message to provide when timeout is reached. - :type size: int - :type err: str - :returns: Content of response. - :rtype: str - :raises HoneycombError: If the read process times out. - """ - - reply = '' - - try: - while not reply.endswith(self.delimiter) or \ - self.channel.recv_ready(): - try: - chunk = self.channel.recv(size) - if not chunk: - break - reply += chunk - if self.channel.exit_status_ready(): - logger.debug('Channel exit status ready.') - break - except socket.timeout: - raise HoneycombError("Socket timeout.", - enable_logging=False) - - except RuntimeError: - raise HoneycombError(err + " Content of buffer: {0}".format(reply), - enable_logging=False) - - logger.trace(reply) - return reply.replace(self.delimiter, "") - - def get_all_responses(self, size=4096): - """Read responses from the receive buffer and catenate together - until a read operation times out. - - :param size: Maximum number of bytes to read in one iteration. - :type size: int - :returns: Content of response. - :rtype: str - """ - - response = "" - err = "Expected timeout occurred." - - while True: - try: - response += self.get_response(size, err) - except HoneycombError: - break - - return response - - def send(self, message, **params): - """Sends provided message through the channel. - - :param message: Message to be sent to Honeycomb. - :param params: Format the message string with these parameters. - :type message: str - :type params: dict - """ - - message = message.format(**params) - - if not message.endswith(self.delimiter): - message += self.delimiter - - logger.debug(message) - - self.channel.send(message) diff --git a/resources/libraries/python/honeycomb/Notifications.py b/resources/libraries/python/honeycomb/Notifications.py deleted file mode 100644 index 38f1fd3093..0000000000 --- a/resources/libraries/python/honeycomb/Notifications.py +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -"""Implementation of keywords for managing Honeycomb notifications.""" - -from robot.api import logger - -from resources.libraries.python.honeycomb.HoneycombUtil import HoneycombError -from resources.libraries.python.honeycomb.Netconf import Netconf - - -class Notifications(Netconf): - """Implements keywords for receiving Honeycomb notifications. - - The keywords implemented in this class make it possible to: - - receive notifications from Honeycomb - - read received notifications - """ - - def add_notification_listener(self, subscription): - """Open a new channel on the SSH session, connect to Netconf subsystem - and subscribe to receive Honeycomb notifications. - - :param subscription: RPC for subscription to notifications. - :type subscription: str - :raises HoneycombError: If subscription to notifications fails. - """ - - logger.debug(subscription) - self.send(subscription) - - reply = self.get_response( - err="Timeout on notifications subscription." - ) - - if "<ok/>" not in reply: - raise HoneycombError("Notifications subscription failed with" - " message: {0}".format(reply)) - - logger.debug("Notifications subscription successful.") - - def get_notification(self, time_out=10): - """Read and return the next notification message. - - :param time_out: Timeout value for the read operation in seconds. - :type time_out: int - :returns: Data received from buffer. - :rtype: str - """ - - logger.debug("Getting notification. Timeout set to {0} seconds." - .format(time_out)) - - reply = self.get_response( - err="Timeout on getting notification." - ) - - return reply diff --git a/resources/libraries/python/honeycomb/Performance.py b/resources/libraries/python/honeycomb/Performance.py deleted file mode 100644 index b81b9fd3db..0000000000 --- a/resources/libraries/python/honeycomb/Performance.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""Implementation of keywords for testing Honeycomb performance.""" - -from resources.libraries.python.ssh import SSH -from resources.libraries.python.Constants import Constants as Const -from resources.libraries.python.honeycomb.HoneycombUtil import HoneycombError - - -class Performance(object): - """Keywords used in Honeycomb performance testing.""" - - def __init__(self): - """Initializer.""" - pass - - @staticmethod - def configure_netconf_threads(node, threads): - """Set Honeycomb's Netconf thread count in configuration. - - :param node: Honeycomb node. - :param threads: Number of threads. - :type node: dict - :type threads: int - :raises HoneycombError: If the operation fails. - """ - - find = "netconf-netty-threads" - replace = '\\"netconf-netty-threads\\": {0},'.format(threads) - - argument = '"/{0}/c\\ {1}"'.format(find, replace) - path = "{0}/config/netconf.json".format(Const.REMOTE_HC_DIR) - command = "sed -i {0} {1}".format(argument, path) - - ssh = SSH() - ssh.connect(node) - (ret_code, _, stderr) = ssh.exec_command_sudo(command) - if ret_code != 0: - raise HoneycombError("Failed to modify configuration on " - "node {0}, {1}".format(node, stderr)) - - @staticmethod - def run_traffic_script_on_dut(node, script, cores, reserved=2, - *args, **kwargs): - """Copy traffic script over to the specified node and execute with - the provided arguments. - - :param node: Node in topology. - :param script: Name of the script to execute. - :param cores: Number of processor cores to use. - :param reserved: Number of cores reserved for other tasks. Default is 2, - one for system tasks and one for VPP main thread. - :param args: Sequential arguments for the script. - :param kwargs: Named arguments for the script. - :type node: dict - :type script: str - :type cores: int - :type reserved: int - :type args: list - :type kwargs: dict - """ - - path = "resources/traffic_scripts/honeycomb/{0}".format(script) - - # Assemble arguments for traffic script - arguments = "" - for arg in args: - arguments += "{0} ".format(arg) - - for key, value in kwargs.items(): - arguments += "--{0} {1} ".format(key, value) - - ssh = SSH() - ssh.connect(node) - ssh.scp(path, "/tmp") - - # Use alternate scheduler, Ubuntu's default can't load-balance - # over isolcpus - scheduler = "chrt -f 99" - core_afi = "taskset -c {first}-{last}".format( - first=reserved, last=cores-1) - - cmd = "{scheduler} {affinity} python /tmp/{script} {args}".format( - scheduler=scheduler, - affinity=core_afi, - script=script, - args=arguments) - - ret_code, stdout, _ = ssh.exec_command_sudo(cmd, timeout=600) - - ssh.exec_command("sudo pkill python ; rm /tmp/{0}".format(script)) - if ret_code != 0: - raise HoneycombError("Traffic script failed to execute.") - for line in stdout.splitlines(): - if "Avg. requests" in line: - return line - - @staticmethod - def log_core_schedule(node, process): - """Determine which cores the process' threads are running on. - - :param node: Honeycomb node. - :param process: Name of the process. - :type node: dict - :type process: str - """ - - # Get info on process and all of its children - cmd1 = """cat /proc/`pidof {0}`/task/*/stat""".format(process) - - # Parse process ID, name and core index - cmd2 = """awk '{print $1" "$2" "$39}'""" - - cmd = "{0} | {1}".format(cmd1, cmd2) - - ssh = SSH() - ssh.connect(node) - ssh.exec_command(cmd) diff --git a/resources/libraries/python/honeycomb/ProxyARP.py b/resources/libraries/python/honeycomb/ProxyARP.py deleted file mode 100644 index adc525d279..0000000000 --- a/resources/libraries/python/honeycomb/ProxyARP.py +++ /dev/null @@ -1,232 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""This module implements keywords to configure proxyARP using Honeycomb -REST API.""" - -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation -from resources.libraries.python.topology import Topology - - -class ProxyARPKeywords(object): - """Implementation of keywords which make it possible to: - - configure proxyARP behaviour - - enable/disable proxyARP on individual interfaces - """ - - def __init__(self): - """Initializer.""" - pass - - @staticmethod - def configure_proxyarp(node, data): - """Configure the proxyARP feature and check the return code. - - :param node: Honeycomb node. - :param data: Configuration to use. - :type node: dict - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response to PUT is not - 200 = OK or 201 = ACCEPTED. - """ - - data = { - "proxy-ranges": { - "proxy-range": [ - data, - ] - } - } - - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_proxyarp_ranges", data, - data_representation=DataRepresentation.JSON) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "proxyARP configuration unsuccessful. " - "Status code: {0}.".format(status_code)) - else: - return resp - - @staticmethod - def remove_proxyarp_configuration(node): - """Delete the proxyARP node, removing all of its configuration. - - :param node: Honeycomb node. - :type node: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response is not 200 = OK. - """ - - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_proxyarp_ranges") - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "proxyARP removal unsuccessful. " - "Status code: {0}.".format(status_code)) - else: - return resp - - @staticmethod - def get_proxyarp_operational_data(node): - """Retrieve proxyARP properties from Honeycomb operational data. - Note: The proxyARP feature has no operational data available. - - :param node: Honeycomb node. - :type node: dict - :returns: proxyARP operational data. - :rtype: bytearray - """ - - raise NotImplementedError("Not supported in VPP.") - - @staticmethod - def set_proxyarp_interface_config(node, interface, state): - """Enable or disable the proxyARP feature on the specified interface. - - :param node: Honeycomb node. - :param interface: Name or sw_if_index of an interface on the node. - :param state: Desired proxyARP state: enable, disable. - :type node: dict - :type interface: str - :type state: str - :raises ValueError: If the state argument is incorrect. - :raises HoneycombError: If the status code in response is not - 200 = OK or 201 = ACCEPTED. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - interface = interface.replace("/", "%2F") - - path = "/interface/{0}/proxy-arp".format(interface) - - if state == "disable": - status_code, _ = HcUtil.delete_honeycomb_data( - node, "config_vpp_interfaces", path) - elif state == "enable": - data = {"proxy-arp": {}} - status_code, _ = HcUtil.put_honeycomb_data( - node, "config_vpp_interfaces", data, path) - else: - raise ValueError("State argument has to be enable or disable.") - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "Interface proxyARP configuration on node {0} was not" - " successful.".format(node["host"])) - - @staticmethod - def get_proxyarp_interface_assignment(node, interface): - """Read the status of proxyARP feature on the specified interface. - Note: The proxyARP feature has no operational data available. - - :param node: Honeycomb node. - :param interface: Name or sw_if_index of an interface on the node. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - """ - - raise NotImplementedError("Not supported in VPP.") - - -class IPv6NDProxyKeywords(object): - """Keywords for IPv6 Neighbor Discovery proxy configuration.""" - - def __init__(self): - pass - - @staticmethod - def configure_ipv6nd(node, interface, addresses=None): - """Configure IPv6 Neighbor Discovery proxy on the specified interface, - or remove/replace an existing configuration. - - :param node: Honeycomb node. - :param interface: Name of an interface on the node. - :param addresses: IPv6 addresses to configure ND proxy with. If no - address is provided, ND proxy configuration will be removed. - :type node: dict - :type interface: str - :type addresses: list - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the operation fails. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - interface = interface.replace("/", "%2F") - - path = "/interface/{0}/ietf-ip:ipv6/nd-proxies".format(interface) - - if addresses is None: - status_code, resp = HcUtil. \ - delete_honeycomb_data(node, "config_vpp_interfaces", path) - else: - data = { - "nd-proxies": { - "nd-proxy": [{"address": x} for x in addresses] - } - } - - status_code, resp = HcUtil. \ - put_honeycomb_data(node, "config_vpp_interfaces", data, path, - data_representation=DataRepresentation.JSON) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - "IPv6 ND proxy configuration unsuccessful. " - "Status code: {0}.".format(status_code)) - else: - return resp - - @staticmethod - def get_ipv6nd_configuration(node, interface): - """Read IPv6 Neighbor Discovery proxy configuration on the specified - interface. - - :param node: Honeycomb node. - :param interface: Name of an interface on the node. - :type node: dict - :type interface: str - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the configuration could not be read. - """ - - interface = Topology.convert_interface_reference( - node, interface, "name") - interface = interface.replace("/", "%2F") - - path = "/interface/{0}/ietf-ip:ipv6/nd-proxies".format(interface) - - status_code, resp = HcUtil.get_honeycomb_data( - node, "config_vpp_interfaces", path) - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Could not read IPv6 ND proxy configuration. " - "Status code: {0}.".format(status_code)) - else: - return resp diff --git a/resources/libraries/python/honeycomb/Routing.py b/resources/libraries/python/honeycomb/Routing.py deleted file mode 100644 index 314c3fe64d..0000000000 --- a/resources/libraries/python/honeycomb/Routing.py +++ /dev/null @@ -1,328 +0,0 @@ -# Copyright (c) 2018 Cisco and/or its affiliates. -# 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. - -"""This module implements keywords to manipulate routing tables using -Honeycomb REST API.""" - -from robot.api import logger - -from resources.libraries.python.topology import Topology -from resources.libraries.python.HTTPRequest import HTTPCodes -from resources.libraries.python.honeycomb.HoneycombSetup import HoneycombError -from resources.libraries.python.honeycomb.HoneycombUtil \ - import HoneycombUtil as HcUtil -from resources.libraries.python.honeycomb.HoneycombUtil \ - import DataRepresentation -from resources.libraries.python.VatExecutor import VatTerminal - - -class RoutingKeywords(object): - """Implementation of keywords which make it possible to: - - add/remove routing tables, - - add/remove routing table entries - - get operational data about routing tables, - """ - - def __init__(self): - pass - - @staticmethod - def _set_routing_table_properties(node, path, data=None): - """Set routing table properties and check the return code. - - :param node: Honeycomb node. - :param path: Path which is added to the base path to identify the data. - :param data: The new data to be set. If None, the item will be removed. - :type node: dict - :type path: str - :type data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If the status code in response is not - 200 = OK. - """ - - if data: - status_code, resp = HcUtil.\ - put_honeycomb_data(node, "config_routing_table", data, path, - data_representation=DataRepresentation.JSON) - else: - status_code, resp = HcUtil.\ - delete_honeycomb_data(node, "config_routing_table", path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - if data is None and '"error-tag":"data-missing"' in resp: - logger.debug("data does not exist in path.") - else: - raise HoneycombError( - "The configuration of routing table was not successful. " - "Status code: {0}.".format(status_code)) - return resp - - @staticmethod - def configure_routing_table(node, name, ip_version, data, vrf=1, - special=False): - """Configure a routing table according to the data provided. - - :param node: Honeycomb node. - :param name: Name for the table. - :param ip_version: IP protocol version, ipv4 or ipv6. - :param data: Route configuration that should be set. - :param vrf: vrf-id to attach configuration to. - :param special: Must be True if the configuration is a special route. - :type node: dict - :type name: str - :type ip_version: str - :type data: dict - :type vrf: int - :type special: bool - :returns: Content of response. - :rtype: bytearray - """ - if special: - ip_version = "hc2vpp-ietf-{0}-unicast-routing:{0}".format( - ip_version) - protocol = "vpp-routing:vpp-protocol-attributes" - else: - ip_version = ip_version - protocol = "vpp-protocol-attributes" - - full_data = { - "control-plane-protocol": [ - { - "name": name, - "description": "hc2vpp-csit test route", - "type": "static", - protocol: { - "primary-vrf": vrf - }, - "static-routes": { - ip_version: { - "route": data - } - } - } - ] - } - - path = "/control-plane-protocol/hc2vpp-ietf-routing:static/{0}".format( - name) - return RoutingKeywords._set_routing_table_properties( - node, path, full_data) - - @staticmethod - def delete_routing_table(node, name): - """Delete the specified routing table from configuration data. - - :param node: Honeycomb node. - :param name: Name of the table. - :type node: dict - :type name: str - :returns: Content of response. - :rtype: bytearray - """ - - path = "/control-plane-protocol/hc2vpp-ietf-routing:static/{0}".format( - name) - return RoutingKeywords._set_routing_table_properties(node, path) - - @staticmethod - def get_routing_table_oper(node, name, ip_version): - """Retrieve operational data about the specified routing table. - - :param node: Honeycomb node. - :param name: Name of the routing table. - :param ip_version: IP protocol version, ipv4 or ipv6. - :type node: dict - :type name: str - :type ip_version: str - :returns: Routing table operational data. - :rtype: list - :raises HoneycombError: If the operation fails. - """ - - path = "/control-plane-protocol/hc2vpp-ietf-routing:static/{0}".format( - name) - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "oper_routing_table", path) - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about the " - "routing tables. Status code: {0}.".format(status_code)) - - data = RoutingKeywords.clean_routing_oper_data( - resp['control-plane-protocol'][0]['static-routes'] - ['hc2vpp-ietf-{0}-unicast-routing:{0}'.format(ip_version)]['route']) - - return data - - @staticmethod - def clean_routing_oper_data(data): - """Prepare received routing operational data to be verified against - expected data. - - :param data: Routing operational data. - :type data: list - :returns: Routing operational data without entry ID numbers. - :rtype: list - """ - - for item in data: - # ID values are auto-incremented based on existing routes in VPP - item.pop("id", None) - if "next-hop-list" in item.keys(): - for item2 in item["next-hop-list"]["next-hop"]: - item2.pop("id", None) - - if "next-hop-list" in item.keys(): - # List items come in random order - item["next-hop-list"]["next-hop"].sort() - - return data - - @staticmethod - def log_routing_configuration(node): - """Retrieve route configuration using VAT and print the response - to robot log. - - :param node: VPP node. - :type node: dict - """ - - with VatTerminal(node) as vat: - vat.vat_terminal_exec_cmd("ip_fib_dump") - - @staticmethod - def configure_interface_slaac(node, interface, slaac_data=None): - """Configure SLAAC on the specified interfaces. - - :param node: Honeycomb node. - :param interface: Interface to configure SLAAC. - :param slaac_data: Dictionary of configurations to apply. \ - If it is None then the existing configuration is removed. - :type node: dict - :type interface: str - :type slaac_data: dict of dicts - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If RA could not be configured. - """ - - interface = Topology.convert_interface_reference( - node, interface, 'name') - interface = interface.replace('/', '%2F') - path = 'interface/' + interface + '/ipv6/ipv6-router-advertisements' - - if not slaac_data: - status_code, _ = HcUtil.delete_honeycomb_data( - node, 'config_slaac', path) - else: - data = { - 'ipv6-router-advertisements': slaac_data - } - - status_code, _ = HcUtil.put_honeycomb_data( - node, 'config_slaac', data, path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - 'Configuring SLAAC failed. Status code:{0}'.format(status_code)) - - @staticmethod - def get_interface_slaac_oper_data(node, interface): - """Get operational data about SLAAC table present on the node. - - :param node: Honeycomb node. - :param interface: Interface SLAAC data are retrieved from. - :type node: dict - :type interface: str - :returns: dict of SLAAC operational data. - :rtype: dict - :raises HoneycombError: If status code differs from successful. - """ - interface = Topology.convert_interface_reference( - node, interface, 'name') - interface = interface.replace('/', '%2F') - path = 'interface/' + interface + '/ipv6/ipv6-router-advertisements' - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "config_slaac", path) - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about SLAAC. " - "Status code: {0}.".format(status_code)) - try: - dict_of_str = resp[ - 'hc2vpp-ietf-ipv6-unicast-routing:ipv6-router-advertisements'] - return {k: str(v) for k, v in dict_of_str.items()} - except (KeyError, TypeError): - return {} - - @staticmethod - def configure_policer(node, policy_name, policer_data=None): - """Configure Policer on the specified node. - - :param node: Honeycomb node. - :param policer_data: Dictionary of configurations to apply. \ - If it is None then the existing configuration is removed. - :type node: dict - :type policer_data: dict - :returns: Content of response. - :rtype: bytearray - :raises HoneycombError: If policer could not be configured. - """ - - path = '/' + policy_name - - if not policer_data: - status_code, _ = HcUtil.delete_honeycomb_data( - node, 'config_policer', path) - else: - data = { - 'policer': policer_data - } - - status_code, _ = HcUtil.put_honeycomb_data( - node, 'config_policer', data, path) - - if status_code not in (HTTPCodes.OK, HTTPCodes.ACCEPTED): - raise HoneycombError( - 'Configuring policer failed. Status code:{0}'\ - .format(status_code)) - - @staticmethod - def get_policer_oper_data(node, policy_name): - """Get operational data about Policer on the node. - - :param node: Honeycomb node. - :type node: dict - :returns: dict of Policer operational data. - :rtype: dict - :raises HoneycombError: If status code differs from successful. - """ - - path = '/' + policy_name - - status_code, resp = HcUtil.\ - get_honeycomb_data(node, "oper_policer", path) - - if status_code != HTTPCodes.OK: - raise HoneycombError( - "Not possible to get operational information about Policer. " - "Status code: {0}.".format(status_code)) - try: - return resp['policer'] - except (KeyError, TypeError): - return {} diff --git a/resources/libraries/python/honeycomb/__init__.py b/resources/libraries/python/honeycomb/__init__.py deleted file mode 100644 index c35326d604..0000000000 --- a/resources/libraries/python/honeycomb/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -""" -__init__ file for directory resources/libraries/python/honeycomb -""" diff --git a/resources/libraries/robot/honeycomb/access_control_lists.robot b/resources/libraries/robot/honeycomb/access_control_lists.robot deleted file mode 100644 index 57016f9a1a..0000000000 --- a/resources/libraries/robot/honeycomb/access_control_lists.robot +++ /dev/null @@ -1,447 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -*** Variables *** -#TODO: update based on resolution of bug https://jira.fd.io/browse/HONEYCOMB-119 - -*** Settings *** -| Library | resources.libraries.python.Classify -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.honeycomb.HcAPIKwACL.ACLKeywords -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Documentation | Keywords used to manage ACLs. - -*** Keywords *** -| Honeycomb creates ACL table -| | [Documentation] | Uses Honeycomb API to create an ACL table. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - settings - ACL table settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb creates ACL table \| ${nodes['DUT1']} \ -| | ... | \| ${settings} \| -| | [Arguments] | ${node} | ${settings} -| | Add classify table | ${node} | ${settings} - -| Honeycomb removes ACL table -| | [Documentation] | Uses Honeycomb API to remove and existing ACL table. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_name - name of an ACL table. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes ACL table \| ${nodes['DUT1']} \| table0 \| -| | [Arguments] | ${node} | ${table_name} -| | Remove classify table | ${node} | ${table_name} - -| Honeycomb adds ACL session -| | [Documentation] | Uses Honeycomb API to create an ACL session. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_name - name of an ACL table. Type: string -| | ... | - settings - ACL session settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds ACL session \| ${nodes['DUT1']} \ -| | ... | \| table0 \| ${settings} \| -| | [Arguments] | ${node} | ${table_name} | ${settings} -| | Add classify session | ${node} | ${table_name} | ${settings} - -| Honeycomb removes ACL session -| | [Documentation] | Uses Honeycomb API to remove an ACL session. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_name - name of an ACL table. Type: string -| | ... | - match - ACL session match setting. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes ACL session \| ${nodes['DUT1']} \ -| | ... | \| table0 \| 00:00:00:00:00:00:01:02:03:04:05:06:00:00:00:00 \| -| | [Arguments] | ${node} | ${table_name} | ${match} -| | Remove classify session | ${node} | ${table_name} | ${match} - -| Honeycomb enables ACL on interface -| | [Documentation] | Uses Honeycomb API to enable ACL on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - table_name - name of an ACL table. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb enables ACL on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabithEthernet0/8/0 \| table0 \| -| | [Arguments] | ${node} | ${interface} | ${table_name} -| | Enable ACL on interface -| | ... | ${node} | ${interface} | ${table_name} - -| Honeycomb disables ACL on interface -| | [Documentation] | Uses Honeycomb API to disable ACL on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb disables ACL on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabithEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | Disable ACL on interface | ${node} | ${interface} - -| ACL table from Honeycomb should be -| | [Documentation] | Retrieves ACL table information from Honeycomb\ -| | ... | and compares with expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - settings - expected ACL table settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ACL table from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| ${settings} \| -| | [Arguments] | ${node} | ${settings} -| | ${data}= | Get classify table oper data | ${node} | ${settings['name']} -| | Compare data structures | ${data} | ${settings} - -| ACL table from VAT should be -| | [Documentation] | Retrieves ACL table information from VAT\ -| | ... | and compares with expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_index - VPP internal index of an ACL table. Type: integer -| | ... | - settings - expected ACL table settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ACL session from PAPI should be \| ${nodes['DUT1']} \ -| | ... | \| ${0} \| ${settings} \| -| | [Arguments] | ${node} | ${table_index} | ${settings} -| | ${data}= | Get classify table data | ${node} | ${table_index} -| | Compare data structures | ${data} | ${settings} - -| ACL table from Honeycomb should not exist -| | [Documentation] | Retrieves ACL table information from Honeycomb\ -| | ... | and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_name - name of an ACL table. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ACL table from Honeycomb should not exist \| ${nodes['DUT1']} \ -| | ... | \| table0 \| -| | [Arguments] | ${node} | ${table_name} -| | Run keyword and expect error | * -| | ... | Get classify table oper data | ${node} | ${table_name} - -| ACL table from VAT should not exist -| | [Documentation] | Retrieves ACL table information from VAT\ -| | ... | and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_index - VPP internal index of an ACL table. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ACL table from VAT should not exist \| ${nodes['DUT1']} \ -| | ... | \| ${0} \| -| | [Arguments] | ${node} | ${table_index} -| | Run keyword and expect error | * -| | ... | Get classify table data | ${node} | ${table_index} - -| ACL session from Honeycomb should be -| | [Documentation] | Retrieves ACL session information from Honeycomb\ -| | ... | and compares with expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_name - name of an ACL table. Type: string -| | ... | - settings - expected ACL session settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ACL session from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| table0 \| ${settings} \| -| | [Arguments] | ${node} | ${table_name} | ${settings} -| | ${data}= | Get classify session oper data -| | ... | ${node} | ${table_name} | ${settings['match']} -| | Compare data structures | ${data} | ${settings} - -| ACL session from PAPI should be -| | [Documentation] | Retrieves ACL session information from PAPI\ -| | ... | and compares with expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_index - VPP internal index of an ACL table. Type: integer -| | ... | - settings - expected ACL session settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ACL session from PAPI should be \| ${nodes['DUT1']} \ -| | ... | \| ${0} \| ${settings} \| -| | [Arguments] | ${node} | ${table_index} | ${session_index} | ${settings} -| | ${data}= | Get classify session data | ${node} | ${table_index} -| | Compare data structures | ${data} | ${settings} - -| ACL session from Honeycomb should not exist -| | [Documentation] | Retrieves ACL session information from Honeycomb\ -| | ... | and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_name - name of an ACL table. Type: string -| | ... | - session_match - ACL session match setting. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ACL session from Honeycomb should not exist \| ${nodes['DUT1']} \ -| | ... | \| table0 \| 00:00:00:00:00:00:01:02:03:04:05:06:00:00:00:00 \| -| | [Arguments] | ${node} | ${table_name} | ${session_match} -| | Run keyword and expect error | *KeyError:* -| | ... | Get classify session oper data -| | ... | ${node} | ${table_name} | ${session_match} - -| ACL session from PAPI should not exist -| | [Documentation] | Retrieves ACL session information from PAPI\ -| | ... | and compares with expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - table_index - VPP internal index of an ACL table. Type: integer -| | ... | - session_index - VPP internal index of an ACL session. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ACL session from PAPI should not exist \| ${nodes['DUT1']} \ -| | ... | \| ${0} \| -| | [Arguments] | ${node} | ${table_index} -| | Run keyword if | ${session_index} == 0 -| | ... | Run keyword and expect error -| | ... | ValueError: No JSON object could be decoded -| | ... | Get classify session data | ${node} | ${table_index} -| | Run keyword if | ${session_index} > 0 -| | ... | Run keyword and expect error -| | ... | IndexError: list index out of range -| | ... | Get classify session data | ${node} | ${table_index} - -| Interface ACL configuration from Honeycomb should be -| | [Documentation] | Retrieves ACL interface settings from Honeycomb\ -| | ... | and compares with expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - table_name - expected ACL table name. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface ACL configuration from Honeycomb should be \ -| | ... | \| ${nodes['DUT1']} \| GigabithEthernet0/8/0 \| table0 \| -| | [Arguments] | ${node} | ${interface} | ${table_name} -| | ${data}= | Get interface oper data | ${node} | ${interface} -| | Should be equal -| | ... | ${table_name} -| | ... | ${data['vpp-interface-acl:acl']['ingress']['l2-acl']['classify-table']} -| | ... | ${data['vpp-interface-acl:acl']['ingress']['ip4-acl']['classify-table']} - -| Interface ACL configuration from VAT should be -| | [Documentation] | Retrieves ACL interface settings from VAT\ -| | ... | and compares with expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - table_index - VPP internal index of an ACL table. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface ACL configuration from VAT should be \ -| | ... | \| ${nodes['DUT1']} \| GigabithEthernet0/8/0 \| ${0} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${table_index} -| | ${data}= | Get interface classify table | ${node} | ${interface} -| | Should be equal | ${table_index} | ${data['l2_table_id']} -| | Should be equal | ${table_index} | ${data['ip4_table_id']} - -| Interface ACL configuration from Honeycomb should be empty -| | [Documentation] | Retrieves ACL interface settings from Honeycomb\ -| | ... | and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface ACL configuration from Honeycomb should be empty \ -| | ... | \| ${nodes['DUT1']} \| GigabithEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | ${data}= | Get interface oper data | ${node} | ${interface} -| | Run keyword and expect error | *KeyError: 'vpp-interface-acl:acl' -| | ... | Set Variable -| | ... | ${data['vpp-interface-acl:acl']['l2-acl']['classify-table']} - -| Interface ACL configuration from VAT should be empty -| | [Documentation] | Retrieves ACL interface settings from VAT\ -| | ... | and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface ACL configuration from Honeycomb should be empty \ -| | ... | \| ${nodes['DUT1']} \| GigabithEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | ${data}= | Get interface classify table | ${node} | ${interface} -| | ${bitwise_non_zero}= | Convert To Integer | ${0xFFFFFFFF} -| | Should be equal | ${data['l2_table_id']} | ${bitwise_non_zero} -| | Should be equal | ${data['ip4_table_id']} | ${bitwise_non_zero} - -| Clear all ACL settings -| | [Documentation] | Removes all ACL sessions and tables from Honeycomb\ -| | ... | configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Clear all ACL settings \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Remove all classify tables | ${node} - -| Honeycomb creates ACL chain through ACL plugin -| | [Documentation] | Creates classify chain using the ACL plugin. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - acl_list_name - Name for the classify chain. Type: string -| | ... | - acl_list_settings - classify rules. Type: dictionary -| | ... | - macip - Use MAC+IP classifier. Optional. Type: boolean -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb creates ACL chain through ACL plugin \ -| | ... | \| ${nodes['DUT1']} \| acl_test \| ${settings} \| -| | [Arguments] | ${node} | ${acl_list_name} | ${acl_list_settings} -| | ... | ${macip}=${False} -| | Create ACL plugin classify chain -| | ... | ${node} | ${acl_list_name} | ${acl_list_settings} - -| Honeycomb assigns plugin-ACL chain to interface -| | [Documentation] | Applies classification through the high-level\ -| | ... | IETF-ACL node to an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - Interface to assign classifier to. Type: string -| | ... | - acl_list_name - Name of the clasify chain. Type: string -| | ... | - direction - Classifier direction, ingress or egress. Type: string -| | ... | - macip - Use MAC+IP classifier. Optional. Type: boolean -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb assigns plugin-ACL chain to interface \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| acl_test \| ingress \| -| | [Arguments] -| | ... | ${node} | ${interface} | ${acl_list_name} | ${direction} -| | ... | ${macip}=${False} -| | Set ACL plugin interface -| | ... | ${node} | ${interface} | ${acl_list_name} | ${direction} - -| Clear plugin-ACL configuration -| | [Documentation] | Removes ACl assignment from interface, then deletes\ -| | ... | IETF-ACL chain. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - Interface to clean classifiers from. | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Clear plugin-ACL configuration | ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | Delete interface plugin ACLs | ${node} | ${interface} -| | Delete ACL plugin classify chains | ${node} - -| Read plugin-ACL configuration from VAT -| | [Documentation] | Obtains ACL-plugin configuration through VAT and logs\ -| | ... | the reply. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Read plugin-ACL configuration from VAT \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | VPP log plugin acl settings | ${node} -| | VPP log plugin acl interface assignment | ${node} - -| Send ICMP packet with type and code and verify received packet -| | [Documentation] | Sends an ICMP packet with specified code and type. -| | ... -| | ... | *Arguments:* -| | ... -| | ... | _NOTE:_ Arguments are based on topology: -| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) -| | ... -| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary -| | ... | - src_ip - IP of source interface (TG-if1). Type: integer -| | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer -| | ... | - tx_port - Source interface (TG-if1). Type: string -| | ... | - tx_mac - MAC address of source interface (TG-if1). Type: string -| | ... | - rx_port - Destionation interface (TG-if1). Type: string -| | ... | - rx_mac - MAC address of destination interface (TG-if1). Type: string -| | ... | - icmp_type - ICMP type to use. Type: int -| | ... | - icmp_code - ICMP code to use. Type: int -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Send ICMP packet with type and code and verify received packet \| ${nodes['TG']} \ -| | ... | \| 16.0.0.1 \| 32.0.0.1 \| eth2 \| 08:00:27:cc:4f:54 \ -| | ... | \| eth4 \| 08:00:27:c9:6a:d5 \| ${1} \| ${1} \| -| | ... -| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} | -| | ... | ${tx_mac} | ${rx_port} | ${rx_mac} | ${icmp_type} | ${icmp_code} -| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port} -| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} -| | ${args}= | Catenate | --src_mac | ${tx_mac} -| | ... | --dst_mac | ${rx_mac} -| | ... | --src_ip | ${src_ip} -| | ... | --dst_ip | ${dst_ip} -| | ... | --tx_if | ${tx_port_name} -| | ... | --rx_if | ${rx_port_name} -| | ... | --icmp_type | ${icmp_type} -| | ... | --icmp_code | ${icmp_code} -| | Run Traffic Script On Node | send_icmp_type_code.py -| | ... | ${tg_node} | ${args} diff --git a/resources/libraries/robot/honeycomb/bgp.robot b/resources/libraries/robot/honeycomb/bgp.robot deleted file mode 100644 index b39055196a..0000000000 --- a/resources/libraries/robot/honeycomb/bgp.robot +++ /dev/null @@ -1,277 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.BGP.BGPKeywords -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords - -*** Keywords *** -| Configure BGP module -| | [Documentation] | Edit Honeycomb's configuration file for the BGP feature.\ -| | ... | Honeycomb needs to be restarted for the changes to take effect. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - ip_address - IP address to bind BGP listener to. Type: string -| | ... | - port - Port number to bind BGP listener to. Type: integer -| | ... | - as_number - Autonomous System (AS) ID number. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Configure BGP module \| ${nodes['DUT1']} \| 192.168.0.1 \| ${179} \ -| | ... | \| ${65000} \| -| | ... -| | [Arguments] | ${node} | ${ip_address} | ${port} | ${as_number} -| | Configure BGP base | ${node} | ${ip_address} | ${port} | ${as_number} - -| No BGP peers should be configured -| | [Documentation] | Uses Honeycomb API to read BGP configuration and checks -| | ... | if there ary BGP peers conffigured. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| No BGP peers should be configured \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | ${oper_data}= | Get Full BGP Configuration | ${node} -| | Should be Empty | ${oper_data['bgp-openconfig-extensions:bgp']} - -| Honeycomb adds BGP peer -| | [Documentation] | Uses Honeycomb API to add a BGP peer. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - address - IP address of the peer. Type: string -| | ... | - data - Peer configuration data. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds BGP peer \| ${nodes['DUT1']} \| 192.168.0.1 \ -| | ... | \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${address} | ${data} -| | ... -| | Add BGP Peer | ${node} | ${address} | ${data} - -| BGP Peer From Honeycomb Should be -| | [Documentation] | Uses Honeycomb API to verify BGP peer config data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - address - IP address of the peer. Type: string -| | ... | - data - Peer configuration data. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| BGP Peer From Honeycomb Should be \ -| | ... | \| ${nodes['DUT1']} \| 192.168.0.1 \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${address} | ${data} -| | ... -| | ${oper_data}= | Get BGP Peer | ${node} | ${address} -| | Compare Data Structures | ${oper_data} | ${data} - -| Peer Operational Data From Honeycomb Should be -| | [Documentation] | Uses Honeycomb API to verify BGP peer operational data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - address - IP address of the peer. Type: string -| | ... | - data - Peer configuration data. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| BGP Peer From Honeycomb Should be \ -| | ... | \| ${nodes['DUT1']} \| 192.168.0.1 \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${address} -| | ... -| | ${oper_data}= | Get BGP Peer | ${node} | ${address} | operational -| | Should be Equal | ${oper_data['peer'][0]['peer-id']} | bgp://${address} - -| Honeycomb removes BGP peer -| | [Documentation] | Uses Honeycomb API to add a BGP peer. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - address - IP address of the peer. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds BGP peer \| ${nodes['DUT1']} \| 192.168.0.1 \| -| | ... -| | [Arguments] | ${node} | ${address} -| | ... -| | Remove BGP Peer | ${node} | ${address} - -| Honeycomb configures BGP route -| | [Documentation] | Uses Honeycomb API to add a BGP route\ -| | ... | to the specified peer. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - peer_address - IP address of the peer. Type: string -| | ... | - data - Peer configuration data. Type: dictionary -| | ... | - route_address - IP address of the route. Type: string -| | ... | - route_index - Numeric index of the route under the peer.\ -| | ... | Type: integer -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds BGP peer \| ${nodes['DUT1']} \| 192.168.0.1 \ -| | ... | \| ${data} \| 192.168.0.2 \| ${0} \| ipv4 \| -| | ... -| | [Arguments] | ${node} | ${peer_address} | ${data} -| | ... | ${route_address} | ${route_index} | ${ip_version} -| | ... -| | Configure BGP Route | ${node} | ${peer_address} | ${data} -| | ... | ${route_address} | ${route_index} | ${ip_version} - -| BGP Route From Honeycomb Should be -| | [Documentation] | Uses Honeycomb API to verify BGP route operational data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - peer_address - IP address of the peer. Type: string -| | ... | - data - Peer configuration data. Type: dictionary -| | ... | - route_address - IP address of the route. Type: string -| | ... | - route_index - Numeric index of the route under the peer.\ -| | ... | Type: integer -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| BGP Peers From Honeycomb Should Include \ -| | ... | \| ${nodes['DUT1']} \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${peer_address} | ${data} -| | ... | ${route_address} | ${route_index} | ${ip_version} -| | ... -| | ${oper_data}= | Get BGP Route | ${node} | ${peer_address} -| | ... | ${route_address} | ${route_index} | ${ip_version} -| | Compare Data Structures | ${oper_data} | ${data} - -| Honeycomb removes BGP route -| | [Documentation] | Uses Honeycomb API to remove a BGP route. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - peer_address - IP address of the peer. Type: string -| | ... | - route_address - IP address of the route. Type: string -| | ... | - route_index - Numeric index of the route under the peer.\ -| | ... | Type: integer -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes BGP route \| ${nodes['DUT1']} \| 192.168.0.1 \ -| | ... | \| 192.168.0.2 \| ${0} \| ipv4 \| -| | ... -| | [Arguments] | ${node} | ${peer_address} | ${route_address} -| | ... | ${route_index} | ${ip_version} -| | ... -| | Remove BGP Route | ${node} | ${peer_address} | ${route_address} -| | ... | ${route_index} | ${ip_version} - -| No BGP routes should be configured -| | [Documentation] | Uses Honeycomb API to verify that no BGP routes\ -| | ... | are configured under the specified peer. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - peer_address - IP address of the peer. Type: string -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| No BGP routes should be configured \| ${nodes['DUT1']} \ -| | ... | \| 192.168.0.1 \| ipv4 \| -| | ... -| | [Arguments] | ${node} | ${peer_address} | ${ip_version} -| | ... -| | ${oper_data}= | Get All Peer Routes -| | ... | ${node} | ${peer_address} | ${ip_version} -| | Should be Empty | ${oper_data['bgp-inet:${ip_version}-routes']} - -| No BGP routes should exist -| | [Documentation] | Uses Honeycomb API to verify that no BGP routes\ -| | ... | exist under the specified peer. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - peer_address - IP address of the peer. Type: string -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| No BGP routes should be configured \| ${nodes['DUT1']} \ -| | ... | \| 192.168.0.1 \| ipv4 \| -| | ... -| | [Arguments] | ${node} | ${peer_address} | ${ip_version} -| | ... -| | Run keyword and expect error | *Status code: 404* -| | ... | Get All Peer Routes -| | ... | ${node} | ${peer_address} | ${ip_version} - -| BGP Loc-RIB table should include -| | [Documentation] | Uses Honeycomb API to retrieve local BGP RIB table\ -| | ... | And verifies that it contains the specified entry. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - data - RIB that should be present in operational data.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| BGP Loc-RIB table should include \| ${nodes['DUT1']} \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${data} -| | ... -| | ${oper_data}= | Get BGP Local RIB | ${node} -| | ${oper_data}= | Set Variable | ${oper_data['loc-rib']['tables']} -| | ${data}= | Set Variable | ${data['loc-rib']['tables']} -| | Compare RIB Tables | ${oper_data} | ${data} - -| Receive BGP OPEN message -| | [Documentation] | Open a TCP listener on BGP port(179) and listen\ -| | ... | for BGP OPEN message. Verify ID and holdtime fields. -| | ... -| | ... | *Arguments:* -| | ... | - tg_node - Information about the TG node. Type: dictionary -| | ... | - rx_ip - IP address to listen on. Type: string -| | ... | - src_ip - IP address of the BGP speaker. Also acts as BGP peer ID.\ -| | ... | Type: string -| | ... | - holdtime - Expected value of HOLD_TIME field in received message.\ -| | ... | Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Receive BGP OPEN message \| ${node['TG']} \ -| | ... | \| 192.168.0.1 \| 192.168.0.2 \| ${0} -| | ... -| | [Arguments] | ${tg_node} | ${rx_ip} | ${src_ip} | ${port} | ${as_number} -| | ... | ${holdtime} -| | ... -| | ${args}= | Catenate | --rx_ip | ${rx_ip} -| | ... | --src_ip | ${src_ip} -| | ... | --rx_port | ${port} -| | ... | --as_number | ${as_number} -| | ... | --holdtime | ${holdtime} -| | Run Traffic Script On Node | honeycomb/bgp_open.py -| | ... | ${tg_node} | ${args} diff --git a/resources/libraries/robot/honeycomb/bridge_domain.robot b/resources/libraries/robot/honeycomb/bridge_domain.robot deleted file mode 100644 index 44dd450944..0000000000 --- a/resources/libraries/robot/honeycomb/bridge_domain.robot +++ /dev/null @@ -1,284 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.L2Util -| Library | resources.libraries.python.honeycomb.HcAPIKwBridgeDomain.BridgeDomainKeywords -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Library | resources.libraries.python.InterfaceUtil - -*** Keywords *** -| Honeycomb creates first L2 bridge domain -| | [Documentation] | Uses Honeycomb API to create a bridge domain on the \ -| | ... | VPP node. Any other bridge domains will be removed in the process. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the created bridge domain. Type: string -| | ... | - settings - Settings for the created bridge domain. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb creates first L2 bridge domain \| ${nodes['DUT1']} \ -| | ... | \| bd-04 \| ${{flood:True, learn:False}} \| -| | [Arguments] | ${node} | ${bd_name} | ${settings} -| | Add first BD | ${node} | ${bd_name} | &{settings} - -| Honeycomb creates L2 bridge domain -| | [Documentation] | Uses Honeycomb API to create a bridge domain on the \ -| | ... | VPP node. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the created bridge domain. Type: string -| | ... | - settings - Settings for the created bridge domain. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb creates L2 bridge domain \| ${nodes['DUT1']} \ -| | ... | \| bd-04 \| ${{flood:True, learn:False}} \| -| | [Arguments] | ${node} | ${bd_name} | ${settings} -| | Add BD | ${node} | ${bd_name} | &{settings} - -| Bridge domain Operational Data From Honeycomb Should Be -| | [Documentation] | Uses Honeycomb API to verify bridge domain settings\ -| | ... | against provided values. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - settings - Expected settings for the bridge domain. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Bridge domain Operational Data From Honeycomb Should Be \ -| | ... | \| ${nodes['DUT1']} \| bd-04 \| ${{flood:True,learn:False}} \| -| | [Arguments] | ${node} | ${bd_name} | ${settings} -| | ${api_data}= | Get bd oper data | ${node} | ${bd_name} -| | :FOR | ${key} | IN | @{settings.keys()} -| | | Should be equal | ${settings['${key}']} | ${api_data['${key}']} - -| Bridge domain Operational Data From VAT Should Be -| | [Documentation] | Uses VAT to verify bridge domain settings\ -| | ... | against provided values. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - settings - Expected settings for the bridge domain. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Bridge domain Operational Data From VAT Should Be \ -| | ... | \| ${nodes['DUT1']} \| bd-04 \| ${{flood:True,learn:False}} \| -| | [Arguments] | ${node} | ${bd_index} | ${settings} -| | ${vat_data}= | VPP get bridge domain data | ${node} -| | ${vat_data}= | Set Variable | ${vat_data[${bd_index}]} -| | :FOR | ${key} | IN | @{settings.keys()} -| | | Run keyword if | $key in $vat_data.keys() -| | | ... | Should be equal | ${settings['${key}']} | ${vat_data['${key}']} - -| Honeycomb adds interfaces to bridge domain -| | [Documentation] | Uses Honeycomb API to assign interfaces to a bridge\ -| | ... | domain. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface1, interface2 - Names of interfaces to assign to bridge\ -| | ... | domain. Type: string -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - settings - Bridge domain specific interface settings.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds interfaces to bridge domain \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \| bd-04 \ -| | ... | \| ${{split_horizon_group:2, bvi:False}} \| -| | [Arguments] | ${node} | ${interface1} | ${interface2} | ${bd_name} -| | ... | ${settings} -| | Add bridge domain to interface -| | ... | ${node} | ${interface1} | ${bd_name} | &{settings} -| | Add bridge domain to interface -| | ... | ${node} | ${interface2} | ${bd_name} | &{settings} - -| Honeycomb should show interfaces assigned to bridge domain -| | [Documentation] | Uses Honeycomb API to verify interface assignment to\ -| | ... | bridge domain. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface1, interface2 - Names of interfaces to assign to bridge\ -| | ... | domain. Type: string -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - settings - Bridge domain specific interface settings.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb should show interfaces assigned to bridge domain \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \ -| | ... | \| bd-04 \| ${{split_horizon_group:2, bvi:False}} \| -| | [Arguments] | ${node} | ${interface1} | ${interface2} | ${bd_name} -| | ... | ${settings} -| | ${if1_data}= | Get interface oper data -| | ... | ${node} | ${interface1} -| | ${if2_data}= | Get interface oper data -| | ... | ${node} | ${interface2} -| | Should be equal | ${if1_data['v3po:l2']['bridge-domain']} -| | ... | ${if2_data['v3po:l2']['bridge-domain']} | ${bd_name} -| | Should be equal | ${if1_data['v3po:l2']['split-horizon-group']} -| | ... | ${if2_data['v3po:l2']['split-horizon-group']} -| | ... | ${settings['split_horizon_group']} -| | Should be equal | ${if1_data['v3po:l2']['bridged-virtual-interface']} -| | ... | ${if2_data['v3po:l2']['bridged-virtual-interface']} -| | ... | ${settings['bvi']} - -| PAPI should show interfaces assigned to bridge domain -| | [Documentation] | Uses VAT to verify interface assignment to\ -| | ... | bridge domain. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - index - Index of bridge domains on VPP node. Starts from 0,\ -| | ... | new BDs reuse numbers after a bridge domain is removed. Type: int -| | ... | - interface1, interface2 - names of interfaces to check bridge domain\ -| | ... | assignment on. Type: string -| | ... | - settings - bridge domain specific interface settings.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| PAPI should show interfaces assigned to bridge domain \ -| | ... | \| ${nodes['DUT1']} \| ${4} \| GigabitEthernet0/8/0 \ -| | ... | \| GigabitEthernet0/9/0 \| ${{split_horizon_group:2, bvi:False}} \| -| | [Arguments] | ${node} | ${index} | ${interface1} | ${interface2} -| | ... | ${settings} -| | ${if1_link}= | Get interface by name | ${node} | ${interface1} -| | ${if2_link}= | Get interface by name | ${node} | ${interface2} -| | ${if_indices}= | Create list -| | ... | ${node['interfaces']['${if1_link}']['vpp_sw_index']} -| | ... | ${node['interfaces']['${if2_link}']['vpp_sw_index']} -| | ${bd_data}= | VPP get bridge domain data | ${node} -| | ${bd_interfaces}= | Set Variable | ${bd_data[${index}]['sw_if_details']} -| | @{bd_interfaces}= | Create List | ${bd_interfaces[0]} | ${bd_interfaces[1]} -| | :FOR | ${interface} | IN | @{bd_interfaces} -# interface[1] = sw_if_index, interface[2] = shg -| | | Should contain | ${if_indices} | ${interface[1]} -| | | Should be equal | ${interface[2]} | ${settings['split_horizon_group']} - -| Honeycomb removes all bridge domains -| | [Documentation] | Uses Honeycomb API to remove all bridge domains from the \ -| | ... | VPP node. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes all bridge domains \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} | @{interfaces} -| | :FOR | ${interface} | IN | @{interfaces} -| | | Remove bridge domain from interface | ${node} | ${interface} -| | Remove all bridge domains | ${node} - -| Honeycomb should show no bridge domains -| | [Documentation] | Uses Honeycomb API to verify the removal of all\ -| | ... | bridge domains. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb should show no bridge domains \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Run keyword and expect error | *Not possible*Status code: 404* -| | ... | Get all BDs oper data | ${node} - -| PAPI should show no bridge domains -| | [Documentation] | Uses VAT to verify the removal of all bridge domains. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| PAPI should show no bridge domains \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | ${data}= | VPP get bridge domain data | ${node} -| | Should be empty | ${data} - -| Honeycomb adds interface to bridge domain -| | [Documentation] | Uses Honeycomb API to assign interface to a bridge\ -| | ... | domain. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - Name of interface to assign to bridge domain.\ -| | ... | Type: string -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - settings - Bridge domain specific interface settings.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds interfaces to bridge domain \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| bd-04 \ -| | ... | \| ${{split_horizon_group:2, bvi:False}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${bd_name} | ${settings} -| | ... -| | Add bridge domain to interface -| | ... | ${node} | ${interface} | ${bd_name} -| | ... | ${settings['split-horizon-group']} -| | ... | ${settings['bridged-virtual-interface']} - -| Bridge domain Operational Interface Assignment should be empty -| | [Documentation] | Get interface operational data and retrieve bridge -| | ... | domain configuration from it. It should be empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - Name of interface where the bridge domain parameters \ -| | ... | will be checked.Type: string -| | ... -| | ... | *Example:* -| | ... | \| Bridge domain Operational Interface Assignment should \ -| | ... | be empty \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ... -| | ${if_data}= | Get BD Oper Data From Interface -| | ... | ${node} | ${interface} -| | Should be empty | ${if_data} - -| Bridge domain Operational Interface Assignment should be -| | [Documentation] | Get interface operational data and retrieve bridge -| | ... | domain configuration from it. Compare the data to the expected one. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - Name of interface where the bridge domain parameters \ -| | ... | will be checked. Type: string -| | ... | - bd_settings - The referential bridge domain data. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Bridge domain Operational Interface Assignment should \ -| | ... | be \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${if_bd_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${bd_settings} -| | ... -| | ${if_data}= | Get BD Oper Data From Interface -| | ... | ${node} | ${interface} -| | Compare Data Structures | ${if_data} | ${bd_settings} diff --git a/resources/libraries/robot/honeycomb/dhcp.robot b/resources/libraries/robot/honeycomb/dhcp.robot deleted file mode 100644 index 966c73f85c..0000000000 --- a/resources/libraries/robot/honeycomb/dhcp.robot +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.DHCP.DHCPRelayKeywords -| Library | resources.libraries.python.Dhcp.DhcpProxy -| Documentation | Keywords used to test Honeycomb DHCP features. - -*** Keywords *** -| DHCP relay Operational Data From Honeycomb Should Be empty -| | [Documentation] | Uses Honeycomb API to retrieve DHCP relay configuration\ -| | ... | and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| DHCP relay Operational Data From Honeycomb Should Be empty \ -| | ... | \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Run keyword and expect error | *Status code: 404* -| | ... | Get DHCP relay oper data | ${node} - -| Log DHCP relay configuration from VAT -| | [Documentation] | Uses VAT to retrieve DHCP relay configuration from VPP. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Log DHCP relay configuration from VAT \ -| | ... | \| ${nodes['DUT1']} \| ipv4 \| -| | [Arguments] | ${node} | ${ip_version} -| | VPP get DHCP proxy | ${node} | ${ip_version} - -| Honeycomb configures DHCP relay -| | [Documentation] | Uses Honeycomb API to configure DHCP relay. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - data - settings for the DHCP relay. Type: dictionary -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type: string -| | ... | - vrf - vrf ID to configure DHCP on. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures DHCP relay \| ${nodes['DUT1']} \| ${data} \ -| | ... | \| ipv4 \| ${0} \| -| | [Arguments] | ${node} | ${data} | ${ip_version} | ${vrf} -| | Add DHCP relay | ${node} | ${data} | ${ip_version} | ${vrf} - -| Honeycomb clears DHCP relay configuration -| | [Documentation] | Uses Honeycomb API to delete all configured DHCP relays. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb clears DHCP relay configuration \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Clear DHCP relay configuration | ${node} - -| DHCP relay configuration from Honeycomb should contain -| | [Documentation] | Retrieves oper data for DHCP relay and compares\ -| | ... | with provided values. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - data - expected DHCP relay settings. Type dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| DHCP relay configuration from Honeycomb should contain \ -| | ... | \| ${nodes['DUT1']} \| ${data} \| -| | [Arguments] | ${node} | ${data} -| | ${oper_data}= | Get DHCP relay oper data | ${node} -| | ${oper_data}= | Set Variable | ${oper_data['relays']['relay'][0]} -| | Sort List | ${oper_data['server']} -| | Sort List | ${data['server']} -| | Should be equal | ${oper_data} | ${data} diff --git a/resources/libraries/robot/honeycomb/fib.robot b/resources/libraries/robot/honeycomb/fib.robot deleted file mode 100644 index 8209db7512..0000000000 --- a/resources/libraries/robot/honeycomb/fib.robot +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 2018 Bell Canada, Pantheon Technologies and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.FIB.FibKeywords -| Documentation | Keywords used to test Honeycomb FIB tables. - -*** Keywords *** -| Honeycomb configures FIB table -| | [Documentation] | Uses Honeycomb API to configure a FIB table. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type:string -| | ... | - vrf - vrf-id the new table will belong to. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures FIB table \| ${nodes['DUT1']} \ -| | ... | \| ipv4 \| ${vrf} \| -| | [Arguments] | ${node} | ${ip_version} | ${vrf} -| | Configure FIB table | ${node} | ${ip_version} | ${vrf} - -| FIB table data from Honeycomb should contain -| | [Documentation] | Uses Honeycomb API to retrieve operational data about\ -| | ... | a FIB table, and compares with the data provided. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type:string -| | ... | - vrf - vrf-id the new table will belong to. Type: integer -| | ... | - expected_data - Data to compare against. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| FIB table data from Honeycomb should contain \| ${nodes['DUT1']} \ -| | ... | \| ipv4 \| ${data} \| -| | [Arguments] | ${node} | ${ip_version} | ${vrf} | ${expected_data} -| | ${data}= | Get FIB Table Oper | ${node} | ${ip_version} | ${vrf} -| | Should Contain | ${data} | ${expected_data} - -| Honeycomb removes FIB configuration -| | [Documentation] | Uses Honeycomb API to remove Honeycomb-created\ -| | ... | FIB configuration from the node. Entries configured automatically\ -| | ... | by VPP will not be removed. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type:string -| | ... | - vrf - vrf-id the new table will belong to. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes FIB configuration \| ${nodes['DUT1']} \ -| | ... | \| ${ip_version} \| ${vrf} \| -| | [Arguments] | ${node} | ${ip_version} | ${vrf} -| | Delete FIB table | ${node} | ${ip_version} | ${vrf} diff --git a/resources/libraries/robot/honeycomb/honeycomb.robot b/resources/libraries/robot/honeycomb/honeycomb.robot deleted file mode 100644 index cf89229dfd..0000000000 --- a/resources/libraries/robot/honeycomb/honeycomb.robot +++ /dev/null @@ -1,375 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.HoneycombSetup -| Library | resources.libraries.python.honeycomb.HoneycombUtil -| Library | resources.libraries.python.honeycomb.HcPersistence -| Library | resources.libraries.python.DUTSetup -| Library | resources.libraries.python.InterfaceUtil -| Resource | resources/libraries/robot/shared/default.robot - -*** Keywords *** -| Configure Honeycomb service on DUTs -| | [Documentation] | *Setup environment for honeycomb testing.* -| | ... -| | ... | _Setup steps:_ -| | ... | - 1. Login to each honeycomb node using ssh -| | ... | - 2. Startup honeycomb service -| | ... | - 3. Monitor service startup using HTTP GET request loop -| | ... | Expected sequence of HTTP replies: -| | ... | connection refused -> 404 -> 401 -> 503 or 500 -> 200 (pass) -| | ... | - 4. Configure honeycomb nodes using HTTP PUT request -| | ... -| | ... | _Arguments:_ -| | ... | - duts - list of nodes to setup Honeycomb on -| | ... -| | ... | _Used global constants and variables:_ -| | ... | - RESOURCES_TPL_HC - path to honeycomb templates directory -| | ... | - HTTPCodes - HTTP protocol status codes -| | ... -| | [Arguments] | @{duts} -| | Start honeycomb on DUTs | @{duts} -| | :FOR | ${dut} | IN | @{duts} -| | | Check honeycomb startup state | @{duts} -| | | Sleep | 5s | Make sure all modules are loaded and ready. - -| Stop Honeycomb service on DUTs -| | [Documentation] | *Cleanup environment after honeycomb testing.* -| | ... -| | ... | _Teardown steps:_ -| | ... | - 1. Login to each honeycomb node using ssh -| | ... | - 2. Stop honeycomb service -| | ... | - 3. Monitor service shutdown using HTTP GET request loop -| | ... | Expected sequence of HTTP replies: -| | ... | 200 -> 404 -> connection refused (pass) -| | ... -| | ... | _Arguments:_ -| | ... | - duts - list of nodes to stop Honeycomb on -| | ... -| | ... | _Used global constants and variables:_ -| | ... | - RESOURCES_TPL_HC - path to honeycomb templates directory -| | ... | - HTTPCodes - HTTP protocol status codes -| | ... -| | [Arguments] | @{duts} -| | Stop honeycomb on DUTs | @{duts} -| | :FOR | ${dut} | IN | @{duts} -| | | Wait until keyword succeeds | 60sec | 15sec -| | | ... | Check honeycomb shutdown state | @{duts} - -| Clear persisted Honeycomb configuration -| | [Documentation] | *Delete saved configuration.* -| | ... -| | ... | *Arguments:* -| | ... | - duts - one or more nodes to clear persistence on. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Clear persisted Honeycomb configuration \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | @{duts} -| | Clear persisted Honeycomb config | @{duts} - -| Restart Honeycomb and VPP and clear persisted configuration -| | [Documentation] | Restarts Honeycomb and VPP with default configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Restart Honeycomb and VPP and clear persisted configuration \ -| | ... | \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Stop Honeycomb service on DUTs | ${node} -| | Clear persisted Honeycomb configuration | ${node} -| | Restart Vpp Service | ${node} -| | Verify Vpp | ${node} -| | VPP Enable Traces On DUT | ${node} -| | Configure Honeycomb service on DUTs | ${node} - -| Restart Honeycomb and VPP -| | [Documentation] | Stops the Honeycomb service and verifies it is stopped. -| | ... | Then restarts VPP, starts Honeycomb again and verifies it is running. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Restart Honeycomb and VPP \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Stop Honeycomb service on DUTs | ${node} -| | Restart Vpp Service | ${node} -| | Verify Vpp | ${node} -| | VPP Enable Traces On DUT | ${node} -| | Configure Honeycomb service on DUTs | ${node} - -| Restart Honeycomb and VPP in performance test -| | [Documentation] | Stops Honeycomb and VPP and verifies HC is stopped. -| | ... | Then restarts VPP, starts Honeycomb again and verifies it is running. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Restart Honeycomb and VPP \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Stop Honeycomb service on DUTs | ${node} -| | Restart Vpp Service | ${node} -| | Verify Vpp | ${node} -| | VPP Enable Traces On DUT | ${node} -| | Configure Honeycomb service on DUTs | ${node} -| | Check honeycomb startup state | ${node} | timeout=120 - -| Archive Honeycomb logs -| | [Documentation] | Copies log files from Honeycomb node\ -| | ... | to test executor. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - perf - Running on performance testbed? Yes/no Type: boolean -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Archive Honeycomb logs \| ${nudes['DUT1']} \| -| | ... -| | [Arguments] | ${node} | ${perf}=${False} -| | Archive Honeycomb log | ${node} | ${perf} -| | Archive ODL log | ${node} - -| Configure ODL Client Service On DUT -| | [Documentation] | Configure and start ODL client, then repeatedly check if -| | ... | it is running. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - odl_name - Name of ODL client version. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Configure ODL Client Service on DUT \| ${nodes['DUT1']} \ -| | ... | \| carbon-SR1 \| -| | ... -| | [Arguments] | ${node} | ${odl_name} -| | Copy ODL Client | ${node} | ${odl_name} | /mnt/common | /tmp -| | Setup ODL Client | ${node} | /tmp -| | Wait until keyword succeeds | 3min | 30sec -| | ... | Install ODL Features | ${node} | /tmp -| | Wait until keyword succeeds | 4min | 15sec -| | ... | Mount Honeycomb on ODL | ${node} -| | Wait until keyword succeeds | 2min | 15sec -| | ... | Check ODL startup state | ${node} -| | Check honeycomb startup state | ${node} | timeout=120 - -| Configure Honeycomb for functional testing -| | [Documentation] | Configure Honeycomb with parameters for functional -| | ... | testing, then start Honeycomb and repeatedly check startup status. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Configure Honeycomb for functional testing \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Configure Restconf binding address | ${node} -| | Configure Log Level | ${node} | TRACE -| | Configure Persistence | ${node} | disable -| | Configure jVPP timeout | ${node} | ${10} -| | Generate Honeycomb startup configuration for ODL test | ${node} -| | Clear Persisted Honeycomb Configuration | ${node} -| | Configure Honeycomb service on DUTs | ${node} - -| Configure ODL Client for functional testing -| | [Documentation] | Read external variable HC_ODL. Depending on its -| | ... | value either: do nothing, or setup ODL client for testing and -| | ... | create a global variable that modifies Restconf requests to use ODL. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Configure ODL Client for functional testing \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ${use_odl_client}= | Get Variable Value | ${HC_ODL} -| | Run Keyword If | '${use_odl_client}' != '${NONE}' -| | ... | Run Keywords -| | ... | Set Global Variable | ${use_odl_client} | AND -| | ... | Configure ODL Client Service On DUT | ${node} | ${use_odl_client} -| | ... | ELSE | Log | Variable HC_ODL is not present. Not using ODL. -| | ... | level=INFO - -| Set Up Honeycomb Functional Test Suite -| | [Documentation] | Generic test suite setup for Honeycomb functional tests. -| | ... | Restarts VPP, then enables Honeycomb and optionally ODL, based -| | ... | on external variable. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Set Up Honeycomb Functional Test Suite \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Restart Vpp Service | ${node} -| | Verify Vpp | ${node} -| | VPP Enable Traces On DUT | ${node} -| | All TGs Set Interface Default Driver | ${nodes} -| | Configure Honeycomb for functional testing | ${node} -| | Configure ODL Client for functional testing | ${node} - -| Tear Down Honeycomb Functional Test Suite -| | [Documentation] | Generic test suite teardown for Honeycomb functional -| | ... | tests. Stops ODL client (if used), then stops Honeycomb and verifies -| | ... | that they are both stopped. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Tear Down Honeycomb Functional Test Suite \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Append suite to Honeycomb log file | ${node} -| | ${use_odl_client}= | Get Variable Value | ${HC_ODL} -| | Run Keyword If | '${use_odl_client}' != '${NONE}' -| | ... | Run Keywords -| | ... | Append suite to ODL log file | ${node} | ${use_odl_client} | AND -| | ... | Stop ODL Client | ${node} | /tmp | AND -| | ... | Wait until keyword succeeds | 3min | 15sec -| | ... | Check ODL shutdown state | ${node} | AND -| | ... | Set Global Variable | ${use_odl_client} | ${NONE} -| | Stop Honeycomb service on DUTs | ${node} -| | Clear Honeycomb Log | ${node} -| | Stop VPP Service | ${node} - -| Enable Honeycomb Feature -| | [Documentation] | Enable the specified feature in Honeycomb configuration. -| | ... | Requires a restart of Honeycomb to take effect. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Enable Honeycomb Feature \| ${nodes['DUT1']} \| NSH \| -| | ... -| | [arguments] | ${node} | ${feature} -| | Manage Honeycomb Features | ${node} | ${feature} - -| Disable Honeycomb Feature -| | [Documentation] | Disable the specified feature in Honeycomb configuration. -| | ... | Requires a restart of Honeycomb to take effect. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Disable Honeycomb Feature \| ${nodes['DUT1']} \| NSH \| -| | ... -| | [arguments] | ${node} | ${feature} -| | Manage Honeycomb Features | ${node} | ${feature} | disable=${True} - -| Honeycomb Performance Suite Setup Generic -| | [Documentation] | Generic test suite setup for Honeycomb performance tests. -| | ... | Performs multiple attempts to start Honeycomb+VPP stack. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb Performance Suite Setup Generic \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Wait until keyword succeeds | 8min | 2min -| | ... | Restart Honeycomb and VPP in Performance test | ${node} - -| Honeycomb Performance Suite Teardown Generic -| | [Documentation] | Generic test suite teardown for Honeycomb performance -| | ... | tests. Logs CPU usage before stopping Honeycomb. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb Performance Suite Teardown Generic \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Log Honeycomb and VPP process distribution on cores | ${node} -| | Append suite to Honeycomb log file | ${node} -| | Stop Honeycomb service on DUTs | ${node} -| | Clear Honeycomb Log | ${node} -| | Stop VPP Service | ${node} - -| Append suite to Honeycomb log file -| | [Documentation] | Add the contents of honeycomb.log for the current suite\ -| | ... | to the full log which will be archived. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Append suite to Honeycomb log file \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Append Honeycomb log | ${node} | ${SUITE_NAME} - -| Append suite to ODL log file -| | [Documentation] | Add the contents of ODL karaf.log for the current suite\ -| | ... | to the full log which will be archived. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - odl_name - name of ODL client version. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Append suite to ODL karaf log file \| ${nodes['DUT1']} \ -| | ... | \| Oxygen \| -| | ... -| | [Arguments] | ${node} | ${odl_name} -| | Append ODL log | ${node} | ${odl_name} | ${SUITE_NAME} - -| Generate Honeycomb startup configuration for ODL test -| | [Documentation] | Create HC startup configuration and apply to config -| | ... | file on DUT. Requires Honeycomb restart to take effect. -| | ... -| | ... | *Arguments:* -| | ... | - node - Honeycomb node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Generate Honeycomb startup configuration for ODL test \ -| | ... | \| ${nodes[DUT1]} \| -| | ... -| | [Arguments] | ${node} -| | Import Library | resources.libraries.python.honeycomb.HoneycombSetup.HoneycombStartupConfig -| | ... | WITH NAME | HC_config -| | Run Keyword | HC_config.Set SSH Security provider -| | Run Keyword | HC_config.Set Memory Size | ${32} -| | Run Keyword | HC_config.Set Metaspace Size | ${32} -| | Run Keyword | HC_config.Apply config | ${node} diff --git a/resources/libraries/robot/honeycomb/interfaces.robot b/resources/libraries/robot/honeycomb/interfaces.robot deleted file mode 100644 index 06428c0c96..0000000000 --- a/resources/libraries/robot/honeycomb/interfaces.robot +++ /dev/null @@ -1,813 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.TrafficScriptExecutor - -*** Keywords *** -| Honeycomb configures interface state -| | [Documentation] | Uses Honeycomb API to change the admin state\ -| | ... | of the specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - state - state to set on interface. Type:string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures interface state \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| up \| -| | [Arguments] | ${node} | ${interface} | ${state} -| | Honeycomb Set Interface State | ${node} | ${interface} | ${state} - -| Interface state from Honeycomb should be -| | [Documentation] | Retrieves interface admin state through Honeycomb and\ -| | ... | compares with state supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - state - expected interface state. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface state from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| up \| -| | [Arguments] | ${node} | ${interface} | ${state} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${api_state}= | Set Variable | ${api_data['admin-status']} -| | Should be equal | ${api_state} | ${state} - -| Interface state from VAT should be -| | [Documentation] | Retrieves interface admin state through VAT and compares\ -| | ... | with state supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - state - expected interface state. Type: string -| | ... -| | ... | _NOTE:_ Vat returns state as int (1/0) instead of string (up/down). -| | ... | This keyword also handles translation. -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface state from VAT should be \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| up \| -| | [Arguments] | ${node} | ${interface} | ${state} -| | ${vat_data}= | VPP get interface data | ${node} | ${interface} -| | ${vat_state}= | Set Variable if -| | ... | ${vat_data['admin_up_down']} == 1 | up | down -| | Should be equal | ${vat_state} | ${state} - -| Honeycomb sets interface IPv4 address -| | [Documentation] | Uses Honeycomb API to change ipv4 address\ -| | ... | of the specified interface. Any existing addresses will be removed. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to set. Type: string -| | ... | - netmask - subnet mask to set. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb sets interface IPv4 address \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 192.168.0.2 \| 255.255.255.0 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${netmask} -| | Add first ipv4 address -| | ... | ${node} | ${interface} | ${address} | ${netmask} - -| Honeycomb sets interface IPv4 address with prefix -| | [Documentation] | Uses Honeycomb API to assign an ipv4 address to the\ -| | ... | specified interface. Any existing addresses will be removed. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to set. Type: string -| | ... | - prefix - length of address network prefix. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb sets interface IPv4 address with prefix \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 192.168.0.2 \| 24 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} -| | Add first ipv4 address -| | ... | ${node} | ${interface} | ${address} | ${prefix} - -| Honeycomb adds interface IPv4 address -| | [Documentation] | Uses Honeycomb API to add an ipv4 address to the\ -| | ... | specified interface, without removing existing addresses. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to set. Type: string -| | ... | - prefix - length of address network prefix. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds interface IPv4 address \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 192.168.0.2 \| 24 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} -| | Add ipv4 address -| | ... | ${node} | ${interface} | ${address} | ${prefix} - -| Honeycomb fails to add interface IPv4 address -| | [Documentation] | Uses Honeycomb API to add an ipv4 address to the\ -| | ... | specified interface, and expects to fail with code 500. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to set. Type: string -| | ... | - prefix - length of address network prefix. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb fails to add interface IPv4 address \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 192.168.0.2 \| 24 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} -| | Run Keyword and Expect Error | *not successful. Status code: 500. -| | ... | Honeycomb adds interface IPv4 address -| | ... | ${node} | ${interface} | ${address} | ${prefix} - -| IPv4 address from Honeycomb should be -| | [Documentation] | Retrieves interface ipv4 address through Honeycomb\ -| | ... | and compares with state supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to expect. Type: string -| | ... | - prefix - prefix length to expect. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv4 address from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 192.168.0.2 \| ${24} \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${settings}= | Create Dictionary -| | ... | ip=${address} | prefix-length=${prefix} -| | Should contain | ${api_data['ietf-ip:ipv4']['address']} | ${settings} - -| IPv4 address from VAT should be -| | [Documentation] | Retrieves interface ipv4 address through VAT and\ -| | ... | compares with state supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to expect. Type: string -| | ... | - prefix - prefix length to expect. Type: string -| | ... | - netmask - subnet mask to expect. Type: string -| | ... | - sw_if_index - Index of interface. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv4 address from VAT should be \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 192.168.0.2 \| ${24} \| 255.255.255.0 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} | ${netmask} -| | ${sw_if_index}= | Vpp Get Interface Sw Index | ${node} | ${interface} -| | ${vpp_data}= | VPP get interface ip addresses -| | ... | ${node} | ${interface} | ipv4 -| | ${settings}= | Create Dictionary -| | ... | ip=${address} | netmask=${netmask} | sw_if_index=${sw_if_index} -| | ... | prefix_length=${prefix} | is_ipv6=${0} -| | Should contain | ${vpp_data} | ${settings} - -| Honeycomb removes interface IPv4 addresses -| | [Documentation] | Removes all configured ipv4 addresses from the specified\ -| | ... | interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes interface IPv4 addresses \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | Remove all ipv4 addresses | ${node} | ${interface} - -| IPv4 address from Honeycomb should be empty -| | [Documentation] | Retrieves interface ipv4 configuration through Honeycomb\ -| | ... | and expects to find no IPv4 addresses. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv4 address from Honeycomb should be empty\| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Run keyword and expect error | *KeyError:* -| | ... | Set Variable | ${api_data['ietf-ip:ipv4']['address']} - -| IPv4 address from VAT should be empty -| | [Documentation] | Retrieves interface ipv4 configuration through VAT and\ -| | ... | and expects to find no ipv4 addresses. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv4 config from VAT should be empty \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | ${data}= | VPP get interface ip addresses | ${node} | ${interface} | ipv4 -| | Should be empty | ${data} - -| Honeycomb adds interface IPv4 neighbor -| | [Documentation] | Uses Honeycomb API to assign an ipv4 neighbor to the\ -| | ... | specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - fib_address - IP address to add to fib table. Type: string -| | ... | - fib_mac - MAC address to add to fib table. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds interface IPv4 neighbor \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 192.168.0.3 \| 08:00:27:c0:5d:37 \ -| | [Arguments] | ${node} | ${interface} | ${fib_address} | ${fib_mac} -| | Add ipv4 neighbor -| | ... | ${node} | ${interface} | ${fib_address} | ${fib_mac} - -| IPv4 neighbor from Honeycomb should be -| | [Documentation] | Retrieves ipv4 neighbor list through Honeycomb\ -| | ... | and checks if it contains address supplied in arguments. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - ip_address - ipv4 address of expected neighbor entry. Type: string -| | ... | - mac_address - MAC address of expected neighbor entry. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv4 neighbor from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 192.168.0.4 \| 08:00:27:60:26:ab \| -| | [Arguments] | ${node} | ${interface} | ${ip_address} | ${mac_address} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${settings}= | Create Dictionary -| | ... | ip=${ip_address} | link-layer-address=${mac_address} | origin=static -| | Should contain | ${api_data['ietf-ip:ipv4']['neighbor']} | ${settings} - -| Honeycomb clears all interface IPv4 neighbors -| | [Documentation] | Uses Honeycomb API to remove all ipv4 neighbors from the\ -| | ... | specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb clears all interface IPv4 neighbors \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | Remove all ipv4 neighbors | ${node} | ${interface} - -| IPv4 neighbor from Honeycomb should be empty -| | [Documentation] | Retrieves ipv4 neighbor list through Honeycomb\ -| | ... | and expects to find no ipv4 neighbors. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv4 neighbor from Honeycomb should be empty \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Run keyword and expect error | *KeyError:* -| | ... | Set Variable | ${api_data['ietf-ip:ipv4']['neighbor'][0]['ip']} - -| Honeycomb sets interface IPv6 address -| | [Documentation] | Uses Honeycomb API to change ipv6 address\ -| | ... | of the specified interface. Existing IPv6 addresses will be removed,\ -| | ... | with the exception of self-configured link-layer IPv6. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to set. Type: string -| | ... | - prefix - length of subnet prefix to set. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb sets interface IPv6 address \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 64 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} -| | Add first ipv6 address -| | ... | ${node} | ${interface} | ${address} | ${prefix} - -| Honeycomb adds interface IPv6 address -| | [Documentation] | Uses Honeycomb API to add an ipv6 address\ -| | ... | to the specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to set. Type: string -| | ... | - prefix - length of subnet prefix to set. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds interface IPv6 address \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 64 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} -| | Add ipv6 address -| | ... | ${node} | ${interface} | ${address} | ${prefix} - -| Honeycomb fails to add interface IPv6 address -| | [Documentation] | Uses Honeycomb API to add an ipv6 address to the\ -| | ... | specified interface, and expects to fail with code 500. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to set. Type: string -| | ... | - prefix - length of address network prefix. Type:integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb fails to add interface IPv6 address \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 10::10 \| 64 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} -| | Run Keyword and Expect Error | *not successful. Status code: 500. -| | ... | Honeycomb adds interface IPv6 address -| | ... | ${node} | ${interface} | ${address} | ${prefix} - -| IPv6 address from Honeycomb should contain -| | [Documentation] | Retrieves interface ipv6 address through Honeycomb\ -| | ... | and compares with state supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to expect. Type: string -| | ... | - prefix - length of subnet prefix to expect. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv6 address from Honeycomb should contain \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 64 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${settings}= | Create Dictionary -| | ... | ip=${address} | prefix-length=${prefix} -| | Should contain | ${api_data['ietf-ip:ipv6']['address']} | ${settings} - -| IPv6 address from VAT should contain -| | [Documentation] | Retrieves interface ipv6 address through VAT and\ -| | ... | compares with state supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - address - IP address to expect. Type: string -| | ... | - prefix - length of subnet prefix to expect. Type: string -| | ... | - sw_if_index - index of interface. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv6 address from VAT should contain \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 64 \| -| | [Arguments] | ${node} | ${interface} | ${address} | ${prefix} | ${netmask} -| | ${sw_if_index}= | Vpp Get Interface Sw Index | ${node} | ${interface} -| | ${vpp_data}= | VPP get interface ip addresses -| | ... | ${node} | ${interface} | ipv6 -| | ${settings}= | Create Dictionary -| | ... | ip=${address} | netmask=${netmask} | sw_if_index=${sw_if_index} -| | ... | prefix_length=${prefix} | is_ipv6=${1} -| | Should contain | ${vpp_data} | ${settings} - -| Honeycomb removes interface IPv6 addresses -| | [Documentation] | Removes all configured ipv6 addresses from the specified\ -| | ... | interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes interface IPv6 addresses \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | Remove all ipv6 addresses | ${node} | ${interface} - -| IPv6 address from Honeycomb should be empty -| | [Documentation] | Retrieves interface ipv6 configuration through Honeycomb\ -| | ... | and expects to find no IPv6 addresses. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv6 address from Honeycomb should be empty\| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Run keyword and expect error | *KeyError:* -| | ... | Set Variable | ${api_data['ietf-ip:ipv6']['address']} - -| IPv6 address from VAT should be empty -| | [Documentation] | Retrieves interface ipv6 configuration through VAT and\ -| | ... | expects to find no ipv6 addresses. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv6 config from VAT should be empty \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | ${data}= | VPP get interface ip addresses | ${node} | ${interface} | ipv6 -| | Should be empty | ${data} - -| Honeycomb adds interface IPv6 neighbor -| | [Documentation] | Uses Honeycomb API to assign an ipv6 neighbor to the\ -| | ... | specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - fib_address - IP address to add to fib table. Type: string -| | ... | - fib_mac - MAC address to add to fib table. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds interface IPv6 neighbor \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 192.168.0.3 \| 08:00:27:c0:5d:37 \| -| | [Arguments] | ${node} | ${interface} | ${fib_address} | ${fib_mac} -| | Add ipv6 neighbor -| | ... | ${node} | ${interface} | ${fib_address} | ${fib_mac} - -| IPv6 neighbor from Honeycomb should be -| | [Documentation] | Retrieves ipv6 neighbor list through Honeycomb\ -| | ... | and checks if it contains address supplied in arguments. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - ip_address - ipv6 address of expected neighbor entry. Type: string -| | ... | - mac_address - MAC address of expected neighbor entry. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv6 neighbor from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 192.168.0.4 \| 08:00:27:60:26:ab \| -| | [Arguments] | ${node} | ${interface} | ${ip_address} | ${mac_address} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${settings}= | Create Dictionary -| | ... | ip=${ip_address} | link-layer-address=${mac_address} | origin=static -| | Should contain | ${api_data['ietf-ip:ipv6']['neighbor']} | ${settings} - -| Honeycomb clears all interface IPv6 neighbors -| | [Documentation] | Uses Honeycomb API to remove all ipv6 neighbors from the\ -| | ... | specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb clears all interface IPv6 neighbors \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | Remove all ipv6 neighbors | ${node} | ${interface} - -| IPv6 neighbor from Honeycomb should be empty -| | [Documentation] | Retrieves ipv6 neighbor list through Honeycomb\ -| | ... | and expects to find no ipv6 neighbors. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv6 neighbor from Honeycomb should be empty \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Run keyword and expect error | *KeyError:* -| | ... | Set Variable | ${api_data['ietf-ip:ipv6']['neighbor'][0]['ip']} - -| Honeycomb sets interface ethernet configuration -| | [Documentation] | Uses Honeycomb API to change interface ethernet\ -| | ... | configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - ethernet - interface ethernet settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb sets interface ethernet configuration \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${{'mtu': 1500}} \ -| | [Arguments] | ${node} | ${interface} | ${ethernet} -| | :FOR | ${key} | IN | @{ethernet.keys()} -| | | Configure interface ethernet -| | | ... | ${node} | ${interface} | ${key} | ${ethernet['${key}']} - -| Interface ethernet Operational Data From Honeycomb Should Be -| | [Documentation] | Retrieves interface ethernet configuration\ -| | ... | through Honeycomb and compares with settings supplied in arguments. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - ethernet - interface ethernet settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface ethernet Operational Data From Honeycomb Should Be \ -| | ... | should be \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \ -| | ... | \| ${{'mtu': 1500}} \| -| | [Arguments] | ${node} | ${interface} | ${ethernet} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | :FOR | ${key} | IN | @{ethernet.keys()} -| | | Should be equal -| | | ... | ${api_data['v3po:ethernet']['${key}']} | ${ethernet['${key}']} - -| Interface ethernet Operational Data From VAT Should Be -| | [Documentation] | Retrieves interface ethernet configuration\ -| | ... | through VAT and compares with settings supplied in arguments. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - mtu - value of maximum transmission unit expected. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface ethernet Operational Data From VAT Should Be \ -| | ... | should be \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1500} \| -| | [Arguments] | ${node} | ${interface} | ${mtu} -| | ${vat_data}= | VPP get interface data | ${node} | ${interface} -| | Should be equal | ${vat_data['mtu']} | ${mtu} - -| Honeycomb sets interface VRF ID -| | [Documentation] | Uses Honeycomb API to change interface vrf\ -| | ... | configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - vrf_id - vrf ID to configure. Type:integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb sets interface VRF ID \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| ipv4 \| -| | [Arguments] | ${node} | ${interface} | ${vrf_id} | ${ip_version} -| | Configure interface routing -| | ... | ${node} | ${interface} | ${ip_version}-vrf-id | ${vrf_id} - -| Interface VRF ID from Honeycomb should be -| | [Documentation] | Retrieves interface ethernet configuration\ -| | ... | through Honeycomb and compares with settings supplied in arguments. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - vrf_id - vrf ID to expect. Type:integer -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface VRF ID from Honeycomb should be \ -| | ... | should be \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \ -| | ... | \| ipv4 \| -| | [Arguments] | ${node} | ${interface} | ${vrf_id} | ${ip_version} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} | -| | Should be equal -| | ... | ${api_data['v3po:routing']['${ip_version}-vrf-id']} | ${vrf_id} - -| Interface VRF ID from VAT should be -| | [Documentation] | Retrieves interface ethernet configuration\ -| | ... | through VAT and compares with settings supplied in arguments. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - vrf_id - vrf ID to expect. Type:integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface VRF ID from VAT should be \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| -| | [Arguments] | ${node} | ${interface} | ${vrf_id} -| | ${vat_data}= | get interface vrf table -| | ... | ${node} | ${interface} -| | Should be equal | ${vat_data} | ${vrf_id} - -| Interface Operational Data From Honeycomb Should Be empty -| | [Documentation] | Attempts to retrieve interface configuration through\ -| | ... | Honeycomb and expects to get empty dictionary. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of a interface on the specified node. Type:\ -| | ... | string -| | ... -| | ... | *Example:* -| | ... | \| Interface Operational Data From Honeycomb Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Should be empty | ${api_data} - -| Interface Operational Data From VAT Should Be empty -| | [Documentation] | Attempts to retrieve Interface configuration through\ -| | ... | VAT and expects to get empty dictionary. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of a Interface on the specified node. Type:\ -| | ... | string -| | ... -| | ... | *Example:* -| | ... | \| Interface Operational Data From VAT Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} | -| | ${vat_data}= | VPP get interface data | ${node} | ${interface} -| | Should be empty | ${vat_data} - -| Interface indices from Honeycomb and VAT should correspond -| | [Documentation] | Uses VAT and Honeycomb to get operational data about the\ -| | ... | given interface and compares the interface indexes. The interface -| | ... | index from Honeycomb should be greater than index from VAT by one. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of the interface to be checked. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface indices from Honeycomb and VAT should correspond \ -| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ... -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${vat_data}= | VPP get interface data | ${node} | ${interface} -| | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1 -| | Should be equal as strings -| | ... | ${api_data['if-index']} | ${sw_if_index} - -| Get interface index from oper data -| | [Documentation] | Retrieves interface operational data and returns\ -| | ... | if-index of the specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of the interface. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Get interface index from oper data \| ${nodes['DUT1']} \| local0 \| -| | [Arguments] | ${node} | ${interface} -| | ${data}= | Get interface oper data | ${node} | ${interface} -| | Return from keyword | ${data['if-index']} - -| Honeycomb should show disabled interface in oper data -| | [Documentation] | Retrieves list of disabled interfaces\ -| | ... | and verifies that there is at least one. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - index - index of the interface to be checked. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb should show disabled interface in oper data \ -| | ... | \| ${nodes['DUT1']} \| ${vx_interface} \| -| | [Arguments] | ${node} | ${index} -| | check disabled interface | ${node} | ${index} - -| Honeycomb should not show disabled interface in oper data -| | [Documentation] | Retrieves list of disabled interfaces\ -| | ... | and expects to fail with a 404 - not found. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - index - index of the interface to be checked. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb should not show disabled interface in oper data \ -| | ... | \| ${nodes['DUT1']} \| ${vx_interface} \| -| | [Arguments] | ${node} | ${index} -| | Run keyword and expect error | * -| | ... | Honeycomb should show disabled interface in oper data -| | ... | ${node} | ${index} - -| Ping and verify IP address -| | [Documentation] | Sends ICMP packet from IP (with source mac) to IP -| | ... | (with dest mac), then waits for ICMP reply. -| | ... -| | ... | *Arguments:* -| | ... -| | ... | _NOTE:_ Arguments are based on topology: -| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) -| | ... -| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary -| | ... | - src_ip - IP of source interface (TG-if1). Type: integer -| | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer -| | ... | - tx_port - Source interface (TG-if1). Type: string -| | ... | - tx_mac - MAC address of source interface (TG-if1). Type: string -| | ... | - rx_port - Destionation interface (TG-if1). Type: string -| | ... | - rx_mac - MAC address of destination interface (TG-if1). Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Ping verify IP address \| ${nodes['TG']} \ -| | ... | \| 16.0.0.1 \| 32.0.0.1 \| eth2 \| 08:00:27:cc:4f:54 \ -| | ... | \| eth4 \| 08:00:27:c9:6a:d5 \| -| | ... -| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} | -| | ... | ${tx_mac} | ${rx_port} | ${rx_mac} -| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port} -| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} -| | ${args}= | Catenate | --src_mac | ${tx_mac} -| | ... | --dst_mac | ${rx_mac} -| | ... | --src_ip | ${src_ip} -| | ... | --dst_ip | ${dst_ip} -| | ... | --tx_if | ${tx_port_name} -| | ... | --rx_if | ${rx_port_name} -| | ... | --timeout | ${5} -| | Run Traffic Script On Node | send_icmp_wait_for_reply.py -| | ... | ${tg_node} | ${args} - -| Honeycomb adds unnumbered configuration to interface -| | [Documentation] | Adds unnumbered configuration to interface, borrowing IP -| | ... | address from the other specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - Name of the interface to be configured. Type: string -| | ... | - interface_src - Name of the interface to borrow IP address from.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds unnumbered configuration to interface \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \| -| | ... -| | [Arguments] | ${node} | ${Interface} | ${interface_src} -| | Configure interface unnumbered | ${node} | ${interface} | ${interface_src} - -| Honeycomb removes unnumbered configuration from interface -| | [Documentation] | Removes unnumbered configuration from the specified -| | ... | interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - Name of the interface to be configured. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds unnumbered configuration to interface \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${Interface} -| | Configure interface unnumbered | ${node} | ${interface} diff --git a/resources/libraries/robot/honeycomb/ipv6_control.robot b/resources/libraries/robot/honeycomb/ipv6_control.robot deleted file mode 100644 index 8e50a31927..0000000000 --- a/resources/libraries/robot/honeycomb/ipv6_control.robot +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.DHCP.DHCPRelayKeywords -| Library | resources.libraries.python.Dhcp.DhcpProxy -| Library | resources.libraries.python.DUTSetup -| Documentation | Keywords used to test Honeycomb DHCP features. - -*** Keywords *** -| Convert data-plane interface to control-plane -| | [Documentation] | Unbinds an interface from VPP and binds it to kernel\ -| | ... | driver specified in topology. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the interface in topology. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Convert data-plane interface to control-plane \| ${nodes['DUT1']} \ -| | ... | \| port3 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ${new_driver}= | Get Variable Value -| | ... | ${node['interfaces']['${interface}']['driver']} -| | PCI Driver Unbind | ${node} -| | ... | ${node['interfaces']['${interface}']['pci_address']} -| | Run Keyword If | '${new_driver}' == 'None' -| | ... | PCI Driver Bind | ${node} -| | ... | ${node['interfaces']['${interface}']['pci_address']} | virtio-pci -| | ... | ELSE -| | ... | PCI Driver Bind | ${node} -| | ... | ${node['interfaces']['${interface}']['pci_address']} | ${new_driver} diff --git a/resources/libraries/robot/honeycomb/l2_fib.robot b/resources/libraries/robot/honeycomb/l2_fib.robot deleted file mode 100644 index d103d41de6..0000000000 --- a/resources/libraries/robot/honeycomb/l2_fib.robot +++ /dev/null @@ -1,186 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.HcAPIKwBridgeDomain.BridgeDomainKeywords -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Resource | resources/libraries/robot/honeycomb/papi.robot - -*** Keywords *** -| Honeycomb adds L2 FIB entry to bridge domain -| | [Documentation] | Add L2 FIB entry to the specified bridge domain using \ -| | ... | Honyecomb API. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - l2_fib_settings - The parameters of the new L2 FIB entry. \ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb adds L2 FIB entry to bridge domain \ -| | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_forward_cfg} \| -| | ... -| | [Arguments] | ${node} | ${bd_name} | ${l2_fib_settings} -| | ... -| | Add L2 FIB Entry | ${node} | ${bd_name} | ${l2_fib_settings} - -| L2 FIB Table from Honeycomb should be empty -| | [Documentation] | Check if the L2 FIB table in the specified bridge domain \ -| | ... | is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... -| | ... | *Example:* -| | ... | \| L2 FIB Table from Honeycomb should be empty \ -| | ... | \| ${nodes['DUT1']} \| test_bd \| -| | ... -| | [Arguments] | ${node} | ${bd_name} -| | ... -| | ${l2_fib_data}= | Get All L2 FIB Entries | ${node} | ${bd_name} -| | Should be empty | ${l2_fib_data} - -| L2 FIB Entry from Honeycomb should be -| | [Documentation] | Retrieves the operational data about the specified L2 \ -| | ... | FIB entry and checks if they are as expected. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - l2_fib_ref_data - L2 FIB entry referential data. Type: dictionay -| | ... -| | ... | *Example:* -| | ... | \| L2 FIB Entry from Honeycomb should be \ -| | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_forward_oper} \| -| | ... -| | [Arguments] | ${node} | ${bd_name} | ${l2_fib_ref_data} -| | ... -| | ${l2_fib_data}= | Get L2 FIB Entry | ${node} | ${bd_name} -| | ... | ${l2_fib_ref_data['phys-address']} -| | Compare Data Structures | ${l2_fib_data} | ${l2_fib_ref_data} - -| Honeycomb removes L2 FIB entry -| | [Documentation] | Remove the specified L2 FIB entry from the bridge \ -| | ... | domain's L2 FIB table. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - mac - MAC address used as the key in L2 FIB data structure. \ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb removes L2 FIB entry \ -| | ... | \| ${nodes['DUT1']} \| test_bd \ -| | ... | \| ${l2_fib_forward_oper['phys-address']} \| -| | ... -| | [Arguments] | ${node} | ${bd_name} | ${mac} -| | ... -| | Remove L2 FIB Entry | ${node} | ${bd_name} | ${mac} - -| Honeycomb removes all L2 FIB entries -| | [Documentation] | Remove all L2 FIB enties from the bridge domain's L2 FIB \ -| | ... | table. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb removes all L2 FIB entries \ -| | ... | \| ${nodes['DUT1']} \| test_bd \| -| | ... -| | [Arguments] | ${node} | ${bd_name} -| | ... -| | Remove all L2 FIB entries | ${node} | ${bd_name} - -| Honeycomb fails to add wrong L2 FIB entry -| | [Documentation] | Honeycomb tries to add a wrong L2 FIB entry and expects \ -| | ... | that it fails. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - l2_fib_settings - The wrong parameters of the new L2 FIB entry. \ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails to add wrong L2 FIB entry \ -| | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_wrong_cfg} \| -| | ... -| | [Arguments] | ${node} | ${bd_name} | ${l2_fib_settings} -| | ... -| | Run keyword and expect error | *HoneycombError: * was not successful. *00. -| | ... | Add L2 FIB Entry | ${node} | ${bd_name} | ${l2_fib_settings} - -| Honeycomb fails to modify L2 FIB entry -| | [Documentation] | Honeycomb tries to modify an existing L2 FIB entry and \ -| | ... | expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_name - Name of the bridge domain. Type: string -| | ... | - mac - MAC address used as the key in L2 FIB data structure. \ -| | ... | Type: string -| | ... | - param - The parameter to be modified. Type: string -| | ... | - value - The new value of the parameter. Type: string or integer -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails to modify L2 FIB entry \ -| | ... | \| ${nodes['DUT1']} \| test_bd \ -| | ... | \| ${l2_fib_forward_oper['phys-address']} \| action \ -| | ... | \| l2-fib-forward \| -| | ... -| | [Arguments] | ${node} | ${bd_name} | ${mac} | ${param} | ${value} -| | ... -| | Run keyword and expect error | *HoneycombError: * was not successful. *00. -| | ... | Modify L2 FIB Entry -| | ... | ${node} | ${bd_name} | ${mac} | ${param} | ${value} - -| L2 FIB entry from PAPI should be -| | [Documentation] | Retrieves the operational data about the specified L2 \ -| | ... | FIB entry using Python API and checks if it is as expected. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_index - Index of the bridge domain. Type: integer -| | ... | - l2_fib_ref_data - L2 FIB entry referential data. Type: dictionay -| | ... -| | ... | *Example:* -| | ... | \| L2 FIB entry from PAPI should be \ -| | ... | \| ${nodes['DUT1']} \| test_bd \| ${l2_fib_forward_oper} \| -| | ... -| | [Arguments] | ${node} | ${bd_index} | ${l2_fib_ref_data} -| | ... -| | ${l2_fib_data}= | Get L2 FIB entry PAPI | ${node} | ${bd_index} -| | ... | ${l2_fib_ref_data['mac']} -| | Compare Data Structures | ${l2_fib_data} | ${l2_fib_ref_data} - -| L2 FIB Table from PAPI should be empty -| | [Documentation] | Check if the L2 FIB table in the specified bridge domain \ -| | ... | is empty. Python API is used to get operational data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_index - Index of the bridge domain. Type: integer -| | ... -| | ... | *Example:* -| | ... | \| L2 FIB Table from PAPI should be empty \ -| | ... | \| ${nodes['DUT1']} \| test_bd \| -| | ... -| | [Arguments] | ${node} | ${bd_index} -| | ... -| | ${l2_fib_data}= | Get L2 FIB table PAPI | ${node} | ${bd_index} -| | Should be empty | ${l2_fib_data} diff --git a/resources/libraries/robot/honeycomb/lisp.robot b/resources/libraries/robot/honeycomb/lisp.robot deleted file mode 100644 index 5decf6b6e8..0000000000 --- a/resources/libraries/robot/honeycomb/lisp.robot +++ /dev/null @@ -1,718 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.Lisp.LispKeywords -| Library | resources.libraries.python.LispUtil -| Documentation | Keywords used to test Honeycomb Lisp features. - -*** Keywords *** -| Honeycomb enables LISP -| | [Documentation] | Uses Honeycomb API to enable LISP. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb enables LISP \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Set LISP state | ${node} | ${TRUE} - -| Honeycomb disables LISP -| | [Documentation] | Uses Honeycomb API to disable LISP. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb disables LISP \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Set LISP state | ${node} | ${FALSE} - -| Honeycomb adds locator set -| | [Documentation] | Uses Honeycomb API to enable LISP. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - Name of an interface on the node. Type: string -| | ... | - locator_set - Name for the new locator set. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds locator set \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| loc_01 \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${locator_set} -| | ... -| | Add locator | ${node} | ${interface} | ${locator_set} - -| Honeycomb adds LISP Mapping -| | [Documentation] | Uses Honeycomb API to configure a LISP mapping. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - data - LISP settings to use. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds LISP Mapping \| ${nodes['DUT1']} \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${data} -| | ... -| | Configure LISP Mapping | ${node} | ${data} - -| Honeycomb removes all LISP mappings -| | [Documentation] | Uses Honeycomb API to clear the eid-table. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes all LISP mappings \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Configure LISP mapping | ${node} | ${NONE} - -| LISP should not be configured -| | [Documentation] | Retrieves LISP configuration from Honeycomb operational\ -| | ... | data, and expects an empty dictionary. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP should not be configured \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Run keyword and Expect Error | KeyError: 'lisp-feature-data' -| | ... | Get LISP operational data | ${node} - -| LISP state from Honeycomb should be -| | [Documentation] | Retrieves LISP state from Honeycomb operational\ -| | ... | data, and compares LISP state with expected value. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - Expected LISP state. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP state from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| enabled \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ${data}= | Get LISP operational data | ${node} -| | ... -| | Run keyword if | $state == 'enabled' -| | ... | Should be equal as strings -| | ... | ${data['lisp-state']['enable']} | ${True} -| | Run keyword if | $state == 'disabled' -| | ... | Should be equal as strings -| | ... | ${data['lisp-state']['enable']} | ${False} - -| LISP state from VAT should be -| | [Documentation] | Retrieves LISP state from VAT,\ -| | ... | and compares LISP state with expected value. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - Expected LISP state. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP state from VAT should be \| ${nodes['DUT1']} \| enabled \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ... -| | ${status}= | VPP show LISP State | ${node} -| | Should match | ${status['feature_status']} | ${state} - -| LISP mapping from Honeycomb should be -| | [Documentation] | Retrieves LISP mapping from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - settings - Expected LISP mapping data. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP mapping from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| ${settings} \| -| | ... -| | [Arguments] | ${node} | ${settings} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']} -| | ${data}= | Set Variable | ${data['eid-table']['vni-table'][0]} -| | Compare data structures | ${data} | ${settings} - -| LISP mapping from VAT should be -| | [Documentation] | Retrieves LISP mapping from VAT,\ -| | ... | and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - settings - Expected LISP mapping data. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP mapping from VAT should be \| ${nodes['DUT1']} \ -| | ... | \| ${settings} \| -| | ... -| | [Arguments] | ${node} | ${settings} -| | ... -| | ${data}= | VPP show LISP eid table | ${node} -| | Compare data structures | ${data[0]} | ${settings} - -| LISP mappings from Honeycomb should not exist -| | [Documentation] | Retrieves LISP mappings from operational\ -| | ... | data, and expects to find none. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP mappings from Honeycomb should not exist \ -| | ... | \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']} -| | Should be empty | ${data['eid-table']['vni-table']} - -| LISP mappings from VAT should not exist -| | [Documentation] | Retrieves LISP mappings from VAT,\ -| | ... | and expects to receive an empty list. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP mappings from VAT should not exist \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | ${data}= | VPP show LISP eid table | ${node} -| | Should be empty | ${data} - -| Locator set from Honeycomb should be -| | [Documentation] | Retrieves LISP locator set from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - Interface that should be referenced by locator.\ -| | ... | Type: dictionary -| | ... | - locator_set - Expected locator set name. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Locator set From Honeycomb Should Be \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| loc01 \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${locator_set} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${loc_data}= | Set Variable -| | ... | ${data['lisp-state']['lisp-feature-data']['locator-sets']} -| | Should be equal -| | ... | ${loc_data['locator-set'][0]['name']} -| | ... | ${locator_set} -| | Should be equal -| | ... | ${loc_data['locator-set'][0]['interface'][0]['interface-ref']} -| | ... | ${interface} - -| Honeycomb adds LISP adjacency -| | [Documentation] | Uses Honeycomb API to configure LISP adjacency. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - vni - Virtual network identifier number. Type: integer -| | ... | - map - Name of an existing remote mapping. Type: string -| | ... | - adjacency - Name for the new adjacency. Type: string -| | ... | - data - LISP adjacency settings to use. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds LISP adjacency \| ${nodes['DUT1']} \| ${1} \| map1\ -| | ... | \| adj1 \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${vni} | ${map} | ${adjacency} | ${data} -| | ... -| | Add LISP adjacency -| | ... | ${node} | ${vni} | ${map} | ${adjacency} | ${data} - -| Honeycomb adds LISP map resolver -| | [Documentation] | Uses Honeycomb API to configure LISP map resolver. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - ip_address - IP address for the map resolver. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds LISP map resolver \| ${nodes['DUT1']} \ -| | ... | \| 192.168.0.2 \| -| | ... -| | [Arguments] | ${node} | ${ip_address} -| | ... -| | Add map resolver | ${node} | ${ip_address} - -| Honeycomb adds LISP Map register -| | [Documentation] | Uses Honeycomb API to configure LISP map register. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - add_map_register - Set boolean value of map register. Type: bool -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds LISP Map register \| ${nodes['DUT1']} \ -| | ... | \| ${True} \| -| | ... -| | [Arguments] | ${node} | ${add_map_register} -| | ... -| | Set Map Register | ${node} | ${add_map_register} - -| Honeycomb sets LISP Map request Mode -| | [Documentation] | Uses Honeycomb API to configure LISP map request mode. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - set_map_request - Set boolean value of map request mode. Type: bool -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds LISP Map Request Mode \| ${nodes['DUT1']} \ -| | ... | \| ${True} \| -| | ... -| | [Arguments] | ${node} | ${set_map_request} -| | ... -| | Set Map Request Mode | ${node} | ${set_map_request} - -| Map resolver from Honeycomb should be -| | [Documentation] | Retrieves LISP map resolver from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - ip_address - IP address that should be referenced in map resolver.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Map resolver From Honeycomb Should Be \| ${nodes['DUT1']} \ -| | ... | \| 192.168.1.2 \| -| | ... -| | [Arguments] | ${node} | ${ip_address} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']} -| | ${data}= | Set Variable | ${data['map-resolvers']['map-resolver'][0]} -| | Should be equal | ${data['ip-address']} | ${ip_address} - -| Map resolver from VAT should be -| | [Documentation] | Retrieves LISP mapping from VAT,\ -| | ... | and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - ip_address - IP address that should be referenced in map resolver.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Map resolver From VAT Should Be \| ${nodes['DUT1']} \ -| | ... | \| 192.168.1.2 \| -| | ... -| | [Arguments] | ${node} | ${ip_address} -| | ... -| | ${data}= | Vpp show LISP map resolver | ${node} -| | Should be equal | ${data[0]['map resolver']} | ${ip_address} - -| Honeycomb adds LISP Map Server -| | [Documentation] | Uses Honeycomb API to configure LISP Map Server. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - ip_addresses - IP addresses for the Map Server.\ -| | ... | Type: any number of strings -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds LISP Map Server \| ${nodes['DUT1']} \ -| | ... | \| 192.168.0.2 \| 192.168.0.3 \| -| | ... -| | [Arguments] | ${node} | @{ip_addresses} -| | ... -| | Add Map Server | ${node} | @{ip_addresses} - -| Map Register from Honeycomb should be -| | [Documentation] | Retrieves LISP Map Register from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - Desired state - True. Type: bool -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Map Register From Honeycomb Should Be \| ${nodes['DUT1']} \ -| | ... | \| ${True} \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']} -| | ${data}= | Set Variable | ${data['map-register']} -| | Should be equal | ${data['enabled']} | ${state} - -| Map Server from Honeycomb should be -| | [Documentation] | Retrieves LISP Map Server from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - ip_addresses - IP addresses that should be referenced\ -| | ... | in Map Server. Type: any number of strings -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Map Server From Honeycomb Should Be \| ${nodes['DUT1']} \ -| | ... | \| 192.168.1.2 \| 192.168.1.7 \| -| | ... -| | [Arguments] | ${node} | @{ip_addresses} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | Verify Map Server Data from Honeycomb | ${data} | ${ip_addresses} - - -| Map Server from VAT should be -| | [Documentation] | Retrieves LISP mapping from VAT,\ -| | ... | and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - ip_addresses - IP addresses that should be referenced\ -| | ... | in Map Server. Type: any number of strings -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Map Server From VAT Should Be \| ${nodes['DUT1']} \ -| | ... | \| 192.168.1.2 \| 192.168.1.7 \| -| | ... -| | [Arguments] | ${node} | @{ip_addresses} -| | ... -| | ${data}= | Vpp show LISP Map Server | ${node} -| | Verify Map Server Data from VAT | ${data} | ${ip_addresses} - -| Map Register from VAT should be -| | [Documentation] | Retrieves LISP mapping from VAT,\ -| | ... | and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - Desired state - "enabled". Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Map Register From VAT Should Be \| ${nodes['DUT1']} \ -| | ... | \| enabled \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ... -| | ${data}= | Vpp show LISP Map Register | ${node} -| | Should be equal | ${data['state']} | ${state} - -| Map Request Mode from VAT should be -| | [Documentation] | Retrieves LISP Request Mode from VAT,\ -| | ... | and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - destination - Source or Destination in Map\ -| | ... | Request Mode. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Map Request Mode From VAT Should Be \| ${nodes['DUT1']} \ -| | ... | \| src-dst \| -| | ... -| | [Arguments] | ${node} | ${destination} -| | ... -| | ${data}= | Vpp show LISP Map Request Mode | ${node} -| | Should be equal | ${data['map_request_mode']} | ${destination} - -| Honeycomb enables LISP PITR feature -| | [Documentation] | Uses Honeycomb API to configure LISP PITR feature. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - locator_set - Name of an existing locator set. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb enables LISP PITR feature \| ${nodes['DUT1']} \| loc1 \| -| | ... -| | [Arguments] | ${node} | ${locator_set} -| | ... -| | Configure PITR | ${node} | ${locator_set} - -| Honeycomb enables LISP PETR feature -| | [Documentation] | Uses Honeycomb API to configure LISP PETR feature. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - ip_address - IP address. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb enables LISP PETR feature \| ${nodes['DUT1']}\ -| | ... | \| 192.168.0.1 \| -| | ... -| | [Arguments] | ${node} | ${ip_address} -| | ... -| | Configure PETR | ${node} | ${ip_address} - -| Honeycomb enables LISP RLOC feature -| | [Documentation] | Uses Honeycomb API to enable the LISP RLOC feature. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb enables LISP RLOC feature\ -| | ... | \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Set RLOC probe state | ${node} | ${TRUE} - -| PITR config from Honeycomb should be -| | [Documentation] | Retrieves PITR config from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - locator_set - Name of locator set that should be referenced\ -| | ... | in PITR config. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| PITR config from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| loc01 \| -| | ... -| | [Arguments] | ${node} | ${locator_set} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']} -| | ${data}= | Set Variable | ${data['pitr-cfg']} -| | Should be equal | ${data['locator-set']} | ${locator_set} - -| PETR configuration from Honeycomb should be -| | [Documentation] | Retrieves PETR config from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - ip_address - IP address for PETR config. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| PETR config from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| 192.168.0.1 \| -| | ... -| | [Arguments] | ${node} | ${ip_address} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']} -| | ${data}= | Set Variable | ${data['petr-cfg']['petr-address']} -| | Should be equal | ${data} | ${ip_address} - -| Map Request Mode from Honeycomb should be -| | [Documentation] | Retrieves List Map Request Mode from Honeycomb\ -| | ... | operational data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - destination - source-destination. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| List Map Request Mode from Honeycomb should be \| ${nodes['DUT1']}\ -| | ... | \| 192.168.0.1 \| -| | ... -| | [Arguments] | ${node} | ${destination} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']} -| | ${data}= | Set Variable | ${data['map-request-mode']['mode']} -| | Should be equal | ${data} | ${destination} - -| RLOC probing from Honeycomb should be -| | [Documentation] | Retrieves RLOC config from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - desired state -True/False. Type: bool -| | ... -| | ... | *Example:* -| | ... -| | ... | \| RLOC probing from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| ${True} \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ... -| | ${data}= | Get LISP operational data | ${node} -| | ${data}= | Set Variable | ${data['lisp-state']['lisp-feature-data']} -| | ${data}= | Set Variable | ${data['rloc-probe']['enabled']} -| | Should be equal | ${data} | ${state} - -| PETR configuration from VAT should be -| | [Documentation] | Retrieves LISP mapping from VAT,\ -| | ... | and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - state of PETR config - enabled/disabled.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| PETR configuration From VAT Should Be \| ${nodes['DUT1']} \ -| | ... | \| enabled \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ... -| | ${data}= | Vpp show LISP PETR config | ${node} -| | Should be equal | ${data['status']} | ${state} - -| RLOC probing from VAT should be -| | [Documentation] | Retrieves LISP mapping from VAT,\ -| | ... | and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - state of RLOC config - enabled/disabled.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| RLOC configuration From VAT Should Be \| ${nodes['DUT1']} \ -| | ... | \| enabled \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ... -| | ${data}= | Vpp show LISP RLOC config | ${node} -| | Should be equal | ${data['state']} | ${state} - -| PITR config from VAT should be -| | [Documentation] | Retrieves PITR config from VAT,\ -| | ... | and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - locator_set - Name of locator set that should be referenced\ -| | ... | in PITR config. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| PITR config from VAT should be \| ${nodes['DUT1']} \ -| | ... | \| loc01 \| -| | ... -| | [Arguments] | ${node} | ${locator_set} -| | ... -| | ${data}= | VPP show LISP PITR | ${node} -| | Should be equal | ${data['status']} | enabled -| | Should be equal | ${data['locator_set']} | ${locator_set} - -| Honeycomb disables all LISP features -| | [Documentation] | Uses Honeycomb API to remove all LISP configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb disables all LISP features \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Disable LISP | ${node} - -| Send packet and verify LISP encap -| | [Documentation] | Send ICMP packet to DUT out one interface and receive\ -| | ... | a LISP encapsulated packet on the other interface. -| | ... -| | ... | *Arguments:* -| | ... -| | ... | _NOTE:_ Arguments are based on topology: -| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) -| | ... -| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary -| | ... | - src_ip - IP of source interface (TG-if1). Type: string -| | ... | - dst_ip - IP of destination interface (TG-if2). Type: string -| | ... | - tx_src_port - Interface of TG-if1. Type: string -| | ... | - tx_src_mac - MAC address of TG-if1. Type: string -| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string -| | ... | - rx_port - Interface of TG-if1. Type: string -| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string -| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string -| | ... | - src_rloc - configured RLOC source address. Type: string -| | ... | - dst_rloc - configured RLOC destination address. Type: string -| | ... -| | ... | *Return:* -| | ... | - No value returned -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Send packet and verify LISP encap \| ${nodes['TG']} \| 10.0.0.1 \ -| | ... | \| 32.0.0.1 \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \ -| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \| 10.0.1.1 \ -| | ... | \| 10.0.1.2 \| -| | ... -| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port} -| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac} -| | ... | ${rx_dst_mac} | ${src_rloc} | ${dst_rloc} -| | ... -| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port} -| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} -| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac -| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac -| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip} -| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name} -| | ... | --src_rloc | ${src_rloc} | --dst_rloc | ${dst_rloc} -| | Run Traffic Script On Node | lisp/lisp_check.py | ${tg_node} -| | ... | ${args} - -| LISP Functional Traffic Test Teardown -| | [Documentation] | Teardown for LISP functional traffic test. -| | Show Packet Trace on all DUTs | ${nodes} -| | VPP Show LISP EID Table | ${node} -| | Disable LISP | ${node} diff --git a/resources/libraries/robot/honeycomb/lisp_gpe.robot b/resources/libraries/robot/honeycomb/lisp_gpe.robot deleted file mode 100644 index 2b265c83c6..0000000000 --- a/resources/libraries/robot/honeycomb/lisp_gpe.robot +++ /dev/null @@ -1,252 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.Lisp.LispGPEKeywords -| Library | resources.libraries.python.LispUtil -| Documentation | Keywords used to test Honeycomb Lisp GPE features. - -*** Keywords *** -| Honeycomb enables LISP GPE -| | [Documentation] | Uses Honeycomb API to enable LISP GPE. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb enables LISP GPE \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Set LISPGPE state | ${node} | ${TRUE} - -| Honeycomb disables LISP GPE -| | [Documentation] | Uses Honeycomb API to disable LISP GPE. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb disables LISP GPE \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Set LISPGPE state | ${node} | ${FALSE} - -| Honeycomb adds first LISP GPE Mapping -| | [Documentation] | Uses Honeycomb API to configure a LISP mapping. Removes -| | ... | any existing mappings. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - data - LISP settings to use. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds first LISP GPE Mapping \| ${nodes['DUT1']} \ -| | ... | \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${data} -| | ... -| | Configure LISPGPE Mapping | ${node} | ${data} - -| Honeycomb adds LISP GPE Mapping -| | [Documentation] | Uses Honeycomb API to configure a LISP mapping. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - data - LISP settings to use. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb adds LISP GPE Mapping \| ${nodes['DUT1']} \| ${data} \| -| | ... -| | [Arguments] | ${node} | ${data} -| | ... -| | Add LISPGPE Mapping | ${node} | ${data['id']} | ${data} - -| Honeycomb removes LISP GPE mapping -| | [Documentation] | Uses Honeycomb API to remove the specified mapping. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes LISP GPE mapping \| ${nodes['DUT1']} \ -| | ... | \| map_name \| -| | ... -| | [Arguments] | ${node} | ${mapping} -| | ... -| | Delete LISPGPE mapping | ${node} | ${mapping} - -| LISP GPE should not be configured -| | [Documentation] | Retrieves LISP GPE configuration from Honeycomb operational\ -| | ... | data, and expects an empty dictionary. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP GPE should not be configured \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | ${data}= | Get LISP GPE operational data | ${node} -| | Should be Equal -| | ... | ${data['gpe-state']['gpe-feature-data']['enable']} | ${FALSE} - -| LISP GPE state from Honeycomb should be -| | [Documentation] | Retrieves LISP GPE state from Honeycomb operational\ -| | ... | data, and compares LISP state with expected value. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - Expected LISP state. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP GPE state from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| enabled \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ... -| | ${data}= | Get LISPGPE operational data | ${node} -| | Run keyword if | $state == 'enabled' -| | ... | Should be equal as strings -| | ... | ${data['gpe-state']['gpe-feature-data']['enable']} | ${True} -| | Run keyword if | $state == 'disabled' -| | ... | Should be equal as strings -| | ... | ${data['gpe-state']['gpe-feature-data']['enable']} | ${False} - -| LISP GPE state from VAT should be -| | [Documentation] | Retrieves LISP state from VAT,\ -| | ... | and compares LISP state with expected value. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - state - Expected LISP state. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP state from VAT should be \| ${nodes['DUT1']} \| enabled \| -| | ... -| | [Arguments] | ${node} | ${state} -| | ... -| | ${status}= | VPP show LISP State | ${node} -| | Should match | ${status['gpe_status']} | ${state} - -| LISP GPE mapping from Honeycomb should be -| | [Documentation] | Retrieves LISP GPE mapping from Honeycomb operational\ -| | ... | data, and compares with expected data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - settings - Expected LISP mapping data. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP GPE mapping from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| ${settings} \| -| | ... -| | [Arguments] | ${node} | ${settings} -| | ... -| | ${data}= | Get LISPGPE mapping | ${node} | ${settings['id']} -| | Compare data structures | ${data} | ${settings} - -| LISP GPE mappings from Honeycomb should not exist -| | [Documentation] | Retrieves LISP GPE mappings from operational\ -| | ... | data, and expects to find none. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| LISP GPE mappings from Honeycomb should not exist \ -| | ... | \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | ${data}= | Get LISPGPE operational data | ${node} -| | Variable Should Not Exist -| | ... | ${data['gpe-state']['gpe-feature-data']['gpe-entry']} - -| Honeycomb disables all LISP GPE features -| | [Documentation] | Uses Honeycomb API to remove all LISP GPE configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb disables all LISP GPE features \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ... -| | Disable LISPGPE | ${node} - -| Send packet and verify LISP GPE encap -| | [Documentation] | Send ICMP packet to DUT out one interface and receive\ -| | ... | a LISP-GPE encapsulated packet on the other interface. -| | ... -| | ... | *Arguments:* -| | ... -| | ... | _NOTE:_ Arguments are based on topology: -| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) -| | ... -| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary -| | ... | - src_ip - IP of source interface (TG-if1). Type: string -| | ... | - dst_ip - IP of destination interface (TG-if2). Type: string -| | ... | - tx_src_port - Interface of TG-if1. Type: string -| | ... | - tx_src_mac - MAC address of TG-if1. Type: string -| | ... | - tx_dst_mac - MAC address of DUT-if1. Type: string -| | ... | - rx_port - Interface of TG-if1. Type: string -| | ... | - rx_src_mac - MAC address of DUT1-if2. Type: string -| | ... | - rx_dst_mac - MAC address of TG-if2. Type: string -| | ... | - src_rloc - configured RLOC source address. Type: string -| | ... | - dst_rloc - configured RLOC destination address. Type: string -| | ... -| | ... | *Return:* -| | ... | - No value returned -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Send packet and verify LISP GPE encap \| ${nodes['TG']} \ -| | ... | \| 10.0.0.1 \| 32.0.0.1 \| -| | ... | \| eth2 \| 08:00:27:ee:fd:b3 \| 08:00:27:a2:52:5b \ -| | ... | \| eth3 \| 08:00:27:4d:ca:7a \| 08:00:27:7d:fd:10 \ -| | ... | \| 10.0.1.1 \| 10.0.1.2 \| -| | ... -| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_src_port} | -| | ... | ${tx_src_mac} | ${tx_dst_mac} | ${rx_port} | ${rx_src_mac} -| | ... | ${rx_dst_mac} | ${src_rloc} | ${dst_rloc} -| | ... -| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_src_port} -| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} -| | ${args}= | Catenate | --tg_src_mac | ${tx_src_mac} | --tg_dst_mac -| | ... | ${rx_dst_mac} | --dut_if1_mac | ${tx_dst_mac} | --dut_if2_mac -| | ... | ${rx_src_mac} | --src_ip | ${src_ip} | --dst_ip | ${dst_ip} -| | ... | --tx_if | ${tx_port_name} | --rx_if | ${rx_port_name} -| | ... | --src_rloc | ${src_rloc} | --dst_rloc | ${dst_rloc} -| | Run Traffic Script On Node | lisp/lispgpe_check.py | ${tg_node} -| | ... | ${args} - -| LISPGPE Functional Traffic Test Teardown -| | [Documentation] | Teardown for LISP GPE functional traffic test. -| | Show Packet Trace on all DUTs | ${nodes} -| | VPP Show LISP EID Table | ${node} -| | Disable LISPGPE | ${node} diff --git a/resources/libraries/robot/honeycomb/nat.robot b/resources/libraries/robot/honeycomb/nat.robot deleted file mode 100644 index c02507f412..0000000000 --- a/resources/libraries/robot/honeycomb/nat.robot +++ /dev/null @@ -1,157 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Library | resources.libraries.python.honeycomb.NAT.NATKeywords -| Documentation | Keywords used to test Honeycomb NAT node. - -*** Keywords *** -| NAT Operational Data From Honeycomb Should Be empty -| | [Documentation] | Uses Honeycomb API to retrieve NAT operational data\ -| | ... | and expects to find only default values. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - default_settings - NAT default settings. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NAT Operational Data From Honeycomb Should Be empty \ -| | ... | \| ${nodes['DUT1']} \| ${default_settings} \| -| | [Arguments] | ${node} | ${default_settings} -| | ${data}= | Get NAT Oper data | ${node} -| | Compare data structures | ${data} | ${default_settings} - -| Honeycomb configures NAT entry -| | [Documentation] | Uses Honeycomb API to configure a static NAT entry. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - data - NAT entry to configure. Type: dictionary -| | ... | - instance - NAT instance on VPP node. Type: integer -| | ... | - index - Index of NAT entry. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures NAT entry \| ${nodes['DUT1']} \| ${data} \ -| | ... | \| ${0} \| ${1} \| -| | [Arguments] | ${node} | ${data} | ${instance}=0 | ${index}=1 -| | Configure NAT entries | ${node} | ${data} | ${instance} | ${index} - -| NAT entries from Honeycomb should be -| | [Documentation] | Uses Honeycomb API to retrieve NAT operational data\ -| | ... | and compares against expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - settings - NAT entry to expect. Type: dictionary -| | ... | - instance - NAT instance on VPP node. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NAT entries from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| ${settings} \| ${0} \| -| | [Arguments] | ${node} | ${settings} | ${instance}=0 -| | ${data}= | Get NAT Oper data | ${node} -| | ${data}= | Set Variable -| | ... | ${data['instances']['instance'][${instance}]['mapping-table']} -| | Compare data structures | ${data} | ${settings} - -| Honeycomb configures NAT on interface -| | [Documentation] | Uses Honeycomb API to configure NAT on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... | - direction - NAT direction parameter, inbound or outbound.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures NAT on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| outbound \| -| | [Arguments] | ${node} | ${interface} | ${direction} -| | Configure NAT on interface -| | ... | ${node} | ${interface} | ${direction} - -| Honeycomb removes NAT interface configuration -| | [Documentation] | Uses Honeycomb API to remove an existing NAT interface\ -| | ... | configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... | - direction - NAT direction parameter, inbound or outbound.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes NAT interface configuration \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| outbound \| -| | [Arguments] | ${node} | ${interface} | ${direction} -| | Configure NAT on interface -| | ... | ${node} | ${interface} | ${direction} | ${True} - -| NAT interface Operational Data From Honeycomb Should Be -| | [Documentation] | Uses Honeycomb API to retrieve interface operational data\ -| | ... | and compares the NAT section against expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... | - direction - NAT direction parameter, inbound or outbound.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NAT interface Operational Data From Honeycomb Should Be \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| outbound \| -| | [Arguments] | ${node} | ${interface} | ${direction} -| | ${data}= | Get interface oper data | ${node} | ${interface} -| | Variable should exist | ${data['interface-nat:nat']['${direction}']} - -| NAT interface Operational Data From Honeycomb Should Be empty -| | [Documentation] | Uses Honeycomb API to retrieve interface operational data\ -| | ... | and expects to find no data for the given direction. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... | - direction - NAT direction parameter, inbound or outbound.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NAT interface Operational Data From Honeycomb Should Be empty \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| outbound \| -| | [Arguments] | ${node} | ${interface} | ${direction} -| | ${data}= | Get interface oper data | ${node} | ${interface} -| | Variable should not exist | ${data['interface-nat:nat']['${direction}']} - -| NAT interface Operational Data From VAT Should Be -| | [Documentation] | Uses Honeycomb API to retrieve NAT configured interfaces\ -| | ... | and compares with expected settings. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - settings - settings to expect. Type: dictionary -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NAT interface Operational Data From VAT Should Be \ -| | ... | \| ${nodes['DUT1']} \| ${settings} \| -| | [Arguments] | ${node} | ${settings} -| | ${data}= | VPP get NAT interfaces | ${node} -| | Compare data structures | ${data} | ${settings} diff --git a/resources/libraries/robot/honeycomb/netconf.robot b/resources/libraries/robot/honeycomb/netconf.robot deleted file mode 100644 index 1fd287dcd4..0000000000 --- a/resources/libraries/robot/honeycomb/netconf.robot +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.Netconf -| Variables | resources/test_data/honeycomb/netconf/hello.py -| Documentation | Keywords for managing Netconf communication. - -*** Keywords *** -| Netconf session should be established -| | [Documentation] | Open a communication channel on the Netconf session\ -| | ... | and exchange hello messages. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Netconf session should be established \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Create session | ${node} | ${hello} - -| Error trigger is sent -| | [Documentation] | Send the specified error trigger through the channel. -| | ... -| | ... | *Arguments:* -| | ... | - trigger - RPC sequence that triggers a specific error. Type: string -| | ... | - params - Parameters for the trigger template. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Error trigger is sent \| <rpc>_some data_</rpc>]]>]]> \| -| | [Arguments] | ${trigger} | &{params} -| | Send | ${trigger} | &{params} - -| Replies should not contain RPC errors -| | [Documentation] | Read response received through the channel, and check if\ -| | ... | it is an error report. -| | ... -| | ... | *Arguments:* -| | ... | none -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Replies should not contain RPC errors \| -| | ${resp}= | Get all responses -| | should not contain | ${resp} | rpc-error diff --git a/resources/libraries/robot/honeycomb/notifications.robot b/resources/libraries/robot/honeycomb/notifications.robot deleted file mode 100644 index c5a481739c..0000000000 --- a/resources/libraries/robot/honeycomb/notifications.robot +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.Notifications -| Variables | resources/test_data/honeycomb/netconf/hello.py -| Variables | resources/test_data/honeycomb/netconf/subscription.py -| Documentation | Keywords used to test Honeycomb notifications over Netconf. - -*** Keywords *** -| Notification listener should be established -| | [Documentation] | Connects to Honeycomb notification service. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Notification listener should be established \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Create session | ${node} | ${hello} -| | Add notification listener | ${subscription} - -| Honeycomb should send interface state notification -| | [Documentation] | Reads notification from Honeycomb and verifies\ -| | ... | notification type, interface name and interface admin-state. -| | ... -| | ... | *Arguments:* -| | ... | - interface - name of the affected interface. Type: string -| | ... | - state - expected state of interface, 'up' or 'down'. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb should send interface state notification \ -| | ... | \| GigabitEthernet0/8/0 \| up \| -| | [Arguments] | ${interface} | ${state} -| | ${reply}= | Get notification -| | Should contain | ${reply} | <interface-change -| | Should contain | ${reply} | <name>${interface}</name> -| | Should contain | ${reply} | <admin-status>${state}</admin-status> - -| Honeycomb should send interface deleted notification -| | [Documentation] | Reads notification from Honeycomb and verifies\ -| | ... | notification type and interface name. -| | ... -| | ... | *Arguments:* -| | ... | - interface - name of the deleted interface. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb should send interface deleted notification \ -| | ... | \| temp_interface \| -| | [Arguments] | ${interface} -| | ${reply}= | Get notification -| | Should contain | ${reply} | <interface-deleted -| | Should contain | ${reply} | <name>${interface}</name> diff --git a/resources/libraries/robot/honeycomb/nsh.robot b/resources/libraries/robot/honeycomb/nsh.robot deleted file mode 100644 index dfb0c989f6..0000000000 --- a/resources/libraries/robot/honeycomb/nsh.robot +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.honeycomb.HcAPIKwNSH.NSHKeywords -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Documentation | Keywords used to test Honeycomb NSH node. - -*** Keywords *** -| NSH Operational Data From Honeycomb Should Be empty -| | [Documentation] | Uses Honeycomb API to retrieve NSH configuration\ -| | ... | and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NSH Operational Data From Honeycomb Should Be empty \ -| | ... | \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Run keyword and expect error | *Status code: 404* -| | ... | Get NSH oper data | ${node} - -| Honeycomb adds NSH entry -| | [Documentation] | Uses Honeycomb API to configure an NSH entry. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... | - name - name for the NSH entry. Type: string -| | ... | - data - settings for the NSH entry. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures NSH entry \| ${nodes['DUT1']} \| nsh_1 \ -| | ... | \| ${data} \| -| | [Arguments] | ${node} | ${name} | ${data} -| | Add NSH entry | ${node} | ${name} | ${data} - -| Honeycomb removes NSH entry -| | [Documentation] | Uses Honeycomb API to delete the specified NSH entry. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... | - name - name of the NSH entry to be deleted. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes NSH entry \| ${nodes['DUT1']} \| nsh_1 \| -| | [Arguments] | ${node} | ${name} -| | Remove NSH entry | ${node} | ${name} - -| Honeycomb adds NSH map -| | [Documentation] | Uses Honeycomb API to configure an NSH map. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... | - name - name for the NSH map. Type: string -| | ... | - data - settings for the NSH map. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures NSH map \| ${nodes['DUT1']} \| nsh_1 \ -| | ... | \| ${data} \| -| | [Arguments] | ${node} | ${name} | ${data} -| | Add NSH map | ${node} | ${name} | ${data} - -| Honeycomb removes NSH map -| | [Documentation] | Uses Honeycomb API to delete an NSH map. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... | - name - name of the NSH map to be deleted. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes NSH map \| ${nodes['DUT1']} \| nsh_1 \| -| | [Arguments] | ${node} | ${name} -| | Remove NSH map | ${node} | ${name} - -| NSH entry from Honeycomb should be -| | [Documentation] | Retrieves oper data for NSH entry and compares\ -| | ... | with provided values. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... | - name - name of the NSH entry. Type: string -| | ... | - data - expected NSH entry settings. Type dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NSH entry from Honeycomb should be \| ${nodes['DUT1']} \| nsh_1 \ -| | ... | \| ${data} \| -| | [Arguments] | ${node} | ${name} | ${data} -| | ${oper_data}= | Get NSH oper data | ${node} | entry_name=${name} -| | Compare data structures | ${oper_data} | ${data} - -| NSH map from Honeycomb should be -| | [Documentation] | Retrieves oper data for NSH map and compares\ -| | ... | with provided values. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... | - name - name of the NSH map. Type: string -| | ... | - data - expected NSH map settings. Type dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NSH map from Honeycomb should be \| ${nodes['DUT1']} \| nsh_1 \ -| | ... | \| ${data} \| -| | [Arguments] | ${node} | ${name} | ${data} -| | ${oper_data}= | Get NSH oper data | ${node} | map_name=${name} -| | Compare data structures | ${oper_data} | ${data} - -| NSH map from Honeycomb should not exist -| | [Documentation] | Retrieves oper data for NSH map and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dict -| | ... | - name - name of the NSH map. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| NSH map from Honeycomb should not exist \| ${nodes['DUT1']} \ -| | ... | \| nsh_1 \| -| | [Arguments] | ${node} | ${name} -| | Run keyword and expect error | *Status code: 404* -| | ... | Get NSH oper data | ${node} | map_name=${name} - -| Honeycomb clears NSH configuration -| | [Documentation] | Uses Honeycomb API to remove all NSH settings. -| | ... -| | [Arguments] | ${node} -| | Clear NSH settings | ${node}
\ No newline at end of file diff --git a/resources/libraries/robot/honeycomb/papi.robot b/resources/libraries/robot/honeycomb/papi.robot deleted file mode 100644 index 33797f1aea..0000000000 --- a/resources/libraries/robot/honeycomb/papi.robot +++ /dev/null @@ -1,53 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.L2Util - -*** Keywords *** -| Get L2 FIB entry PAPI -| | [Documentation] | Retrieve the operational data about the specified L2 \ -| | ... | FIB entry using Python API. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_index - Index of the bridge domain. Type: integer -| | ... | - mac - MAC address. Type: string -| | ... -| | ... | *Example:* -| | ... | \| Get L2 FIB entry PAPI \ -| | ... | \| ${nodes['DUT1']} \| test_bd \| 00:fe:c8:e5:46:d1 \| -| | ... -| | [Arguments] | ${node} | ${bd_index} | ${mac} -| | ... -| | [Return] | ${l2_fib_data} -| | ... -| | ${l2_fib_data}= | Get L2 FIB entry by MAC | ${node} | ${bd_index} -| | ... | ${mac} - -| Get L2 FIB table PAPI -| | [Documentation] | Retrieve L2 FIB table data of the specified bridge \ -| | ... | domain using Python API. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - bd_index - Index of the bridge domain. Type: integer -| | ... -| | ... | *Example:* -| | ... | \| Get L2 FIB table PAPI \| ${nodes['DUT1']} \| test_bd \| -| | ... -| | [Arguments] | ${node} | ${bd_index} -| | ... -| | [Return] | ${l2_fib_data} -| | ... -| | ${l2_fib_data}= | Get L2 FIB table | ${node} | ${bd_index} diff --git a/resources/libraries/robot/honeycomb/performance.robot b/resources/libraries/robot/honeycomb/performance.robot deleted file mode 100644 index a4d8d101e7..0000000000 --- a/resources/libraries/robot/honeycomb/performance.robot +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.Performance -| Library | resources.libraries.python.InterfaceUtil -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Documentation | Keywords used in Honeycomb performance testing. - -*** Keywords *** -| Configure Honeycomb Netconf threads -| | [Documentation] | Modify thread configuration of Honeycomb's Netconf server, -| | ... | Requires a restart of Honeycomb to take effect. -| | ... -| | ... | *Arguments:* -| | ... | - node - Node to change configuration on. Type: dictionary -| | ... | - threads - Number of threads to configure. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Configure Honeycomb Netconf Threads \| ${nodes[DUT1]} \| ${2} \| -| | ... -| | [Arguments] | ${node} | ${threads} -| | Configure Netconf Threads | ${node} | ${threads} - -| Run base operational read performance trial -| | [Documentation] | Send Netconf requests over plain TCP to obtain VPP version -| | ... | from Honeycomb operational data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Node to run test on. Type: dictionary -| | ... | - cores - Number of available processor cores. Type: integer -| | ... | - cycles - Number of test cycles to run. Final results will\ -| | ... | be averaged across all runs. Type: integer -| | ... | - threads - Number of threads to use for generating traffic.\ -| | ... | Type: integer -| | ... | - requests - Number of requests to send in each thread and cycle.\ -| | ... | Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Run base operational read performance trial \| ${nodes[DUT1]} \ -| | ... | \| ${36} \| ${1} \| ${4} \| ${10000} \| -| | ... -| | [Arguments] | ${node} | ${cores} | ${cycles} | ${threads} | ${requests} -| | ${result}= | Run traffic script on DUT | ${node} | read_vpp_version.py -| | ... | ${cores} | cycles=${cycles} | threads=${threads} -| | ... | requests=${requests} -| | Set Test Message | ${result} - -| Generate VPP Startup Configuration for Honeycomb Test on DUT -| | [Arguments] | ${node} -| | [Documentation] | Create VPP base startup configuration on DUT, then restart -| | ... | VPP to apply the configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - VPP node to configure. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Generate VPP Startup Configuration for Honeycomb Test on DUT \ -| | ... | \| ${nodes[DUT1]} \| -| | ... -| | Import Library | resources.libraries.python.VppConfigGenerator -| | ... | WITH NAME | VPP_config -| | Run keyword | VPP_config.Set Node | ${node} -| | Run keyword | VPP_config.Add Unix Log -| | Run keyword | VPP_config.Add Unix CLI Listen -| | Run keyword | VPP_config.Add Unix Nodaemon -| | Run keyword | VPP_config.Add Socksvr -| | Run keyword | VPP_config.Add CPU Main Core | ${1} -| | Run keyword | VPP_config.Apply Config - -| Log Honeycomb and VPP process distribution on cores -| | [Documentation] | Log the distribution of VPP and Honeycomb child processes -| | ... | over the CPU cores. -| | ... -| | ... | *Arguments:* -| | ... | - node - Honeycomb node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Log Honeycomb and VPP process distribution on cores \ -| | ... | \| ${nodes[DUT1]} \| -| | ... -| | [Arguments] | ${node} -| | Log Core Schedule | ${node} | vpp -| | Log Core Schedule | ${node} | java - -| Generate Honeycomb startup configuration for performance test -| | [Documentation] | Create HC startup configuration and apply to config -| | ... | file on DUT. Requires Honeycomb restart to take effect. -| | ... -| | ... | *Arguments:* -| | ... | - node - Honeycomb node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Generate Honeycomb startup configuration for performance test \ -| | ... | \| ${nodes[DUT1]} \| -| | ... -| | [Arguments] | ${node} | ${cores} -| | Import Library | resources.libraries.python.honeycomb.HoneycombSetup.HoneycombStartupConfig -| | ... | WITH NAME | HC_config -| | Run Keyword | HC_config.Set CPU Scheduler | FIFO -| | Run Keyword | HC_config.Set CPU Core Affinity | ${2} | ${cores} -| | Run Keyword | HC_config.Set JIT Compiler Mode | server -| | Run Keyword | HC_config.Set Memory Size | ${512} | ${2048} -| | Run Keyword | HC_config.Set Metaspace Size | ${128} | ${512} -| | Run Keyword | HC_config.Set NUMA Optimization -| | Run Keyword | HC_config.apply config | ${node} diff --git a/resources/libraries/robot/honeycomb/persistence.robot b/resources/libraries/robot/honeycomb/persistence.robot deleted file mode 100644 index bc2b167f28..0000000000 --- a/resources/libraries/robot/honeycomb/persistence.robot +++ /dev/null @@ -1,332 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Library | resources.libraries.python.honeycomb.HcPersistence -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/vxlan.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Resource | resources/libraries/robot/honeycomb/tap.robot -| Resource | resources/libraries/robot/honeycomb/vhost_user.robot -| Resource | resources/libraries/robot/honeycomb/sub_interface.robot -| Variables | resources/test_data/honeycomb/persistence.py | ${interface} -| Documentation | Keywords used to test Honeycomb persistence. - -*** Keywords *** -| Restart Honeycomb -| | [Documentation] | Restarts Honeycomb without clearing persistence data. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Restart Honeycomb \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Stop Honeycomb service on DUTs | ${node} -| | Log Persisted Configuration | ${node} -| | Configure Honeycomb service on DUTs | ${node} - -| Restart VPP -| | [Documentation] | Restarts VPP and waits until it reconnects with Honeycomb. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Restart VPP \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Restart Vpp Service | ${node} -| | Verify Vpp | ${node} -| | VPP Enable Traces On DUT | ${node} -| | Check VPP connection | ${node} - -| Check VPP connection -| | [Documentation] | Checks if Honeycomb is connected to VPP by reading VPP\ -| | ... | version number from Honeycomb operational data. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Check VPP connection \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Wait until keyword succeeds | 2min | 20sec -| | ... | Check Honeycomb startup state | ${node} - -| Restart Honeycomb and VPP in pesistence test -| | [Documentation] | Stops Honeycomb, restarts VPP and then starts Honeycomb\ -| | ... | again. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Restart Honeycomb and VPP \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Stop Honeycomb service on DUTs | ${node} -| | Log Persisted Configuration | ${node} -| | Restart Vpp Service | ${node} -| | Verify Vpp | ${node} -| | VPP Enable Traces On DUT | ${node} -| | Configure Honeycomb service on DUTs | ${node} - -| Multi-Feature Persistence Test Configuration -| | [Documentation] | Uses Honeycomb to set basic settings for VxLAN,\ -| | ... | bridge domains, TAP, vhost-user and VLAN. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Multi-Feature Persistence Test Configuration \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | Honeycomb sets interface VxLAN configuration -| | ... | ${node} | ${vx_interface} | ${vxlan_settings} -| | Honeycomb creates first l2 bridge domain -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | Honeycomb creates TAP interface -| | ... | ${node} | ${tap_interface} | ${tap_settings} -| | Honeycomb creates vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} -| | Honeycomb creates sub-interface | ${node} | ${interface} -| | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings} -| | Honeycomb configures interface state | ${node} | ${interface} | up -| | Honeycomb sets the sub-interface up -| | ... | ${node} | ${interface} | ${sub_if_id} -| | Honeycomb adds sub-interface to bridge domain -| | ... | ${node} | ${interface} | ${sub_if_id} | ${sub_bd_settings} -| | Honeycomb configures tag rewrite -| | ... | ${node} | ${interface} | ${sub_if_id} | ${tag_rewrite_pop_1} - -| Multi-Feature persistence Test Verification -| | [Documentation] | Uses Honeycomb and VAT to verify settings for VxLAN,\ -| | ... | bridge domains, TAP, vhost-user and VLAN. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Multi-Feature persistence Test Verification \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | VxLAN Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vx_interface} | ${vxlan_settings} -| | VxLAN Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_settings} -| | Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | Bridge domain Operational Data From VAT Should Be -| | ... | ${node} | ${0} | ${bd_settings} -| | TAP Operational Data From Honeycomb Should Be -| | ... | ${node} | ${tap_interface} | ${tap_settings_oper} -| | TAP Operational Data From VAT Should Be -| | ... | ${node} | ${tap_interface_vat} | ${tap_settings_vat} -| | Vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} -| | Vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_client} -| | Sub-interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${interface} | ${sub_if_id} | ${sub_if_1_oper} -| | Sub-interface Operational Data From VAT Should Be -| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} -| | Interface state from Honeycomb should be | ${node} | ${interface} | up -| | Interface state from VAT should be | ${node} | ${interface} | up -| | Sub-interface bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${interface} | ${sub_if_id} | ${sub_bd_settings} -| | Sub-interface bridge domain Operational Data From PAPI Should Be -| | ... | ${node} | ${sub_if_name} | ${sub_bd_settings} -| | Rewrite tag from Honeycomb should be -| | ... | ${node} | ${interface} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} -| | Rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} -| | ${data_conf}= | Get all interfaces cfg data | ${node} -| | ${data_oper}= | Get all interfaces oper data | ${node} -| | Compare interface lists | ${data_conf} | ${data_oper} - -| Honeycomb and VPP should have default configuration -| | [Documentation] | Uses Honeycomb and VAT to verify settings for VxLAN,\ -| | ... | bridge domains, TAP, vhost-user and VLAN. Expects default\ -| | ... | configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb and VPP should have default configuration \| -| | ... | ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vx_interface} -| | VxLAN Operational Data From VAT Should Be empty | ${node} -| | Honeycomb should show no bridge domains | ${node} -| | PAPI should show no bridge domains | ${node} -| | TAP Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${tap_interface} -| | TAP Operational Data From VAT Should Be empty -| | ... | ${node} | ${tap_interface} -| | Vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vhost_interface} -| | Vhost-user Operational Data From VAT Should Be empty -| | ... | ${node} -| | interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down -| | And interface state from VAT should be -| | ... | ${node} | ${interface} | down - -| Persistence file is damaged during restart -| | [Documentation] | Shuts down Honeycomb, modifies persistence files to\ -| | ... | simulate damage, then restarts VPP and starts up Honeycomb again. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Persistence file is damaged during restart \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Stop Honeycomb service on DUTs | ${node} -| | Modify persistence files | ${node} | { | abc -| | Restart Vpp Service | ${node} -| | Verify Vpp | ${node} -| | VPP Enable Traces On DUT | ${node} -| | Configure Honeycomb service on DUTs | ${node} - -| Log persisted configuration on node -| | [Documentation] | Logs the content of Honeycomb's persitence files. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Log persisted configuration on node \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Log persisted configuration | ${node} - -| Interface Persistence Setup -| | [Documentation] | Configure interface state, ipv4 and ipv6 addresses -| | ... | and neighbors. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface Persistence Setup \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Honeycomb and VPP should have default configuration | ${node} -| | Import Variables | resources/test_data/honeycomb/interface_ip.py -| | Honeycomb configures interface state | ${node} | ${interface} | up -| | Honeycomb sets interface IPv4 address with prefix -| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} -| | Honeycomb adds interface IPv4 neighbor -| | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac} -| | Honeycomb sets interface IPv6 address -| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix} -| | Honeycomb adds interface IPv6 neighbor -| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac} - -| Interface Persistence Check -| | [Documentation] | Verify interface state, ipv4 and ipv6 addresses -| | ... | and neighbors. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface Persistence Check \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Interface state from Honeycomb should be | ${node} | ${interface} | up -| | IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} -| | IPv4 address from VAT should be -| | ... | ${node} | ${interface} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} -| | IPv4 neighbor from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac} -| | IPv6 address from Honeycomb should contain -| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix} -| | IPv6 address from VAT should contain -| | ... | ${node} | ${interface} | ${ipv6_address} -| | ... | ${ipv6_prefix} | ${ipv6_mask} -| | IPv6 neighbor from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac} - -| Bridge Domain Persistence Setup -| | [Documentation] | Configure bridge domain, BD interface assignment -| | ... | and L2 fib entry. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Bridge Domain Persistence Setup \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Honeycomb and VPP should have default configuration | ${node} -| | Import Variables | resources/test_data/honeycomb/l2_fib.py -| | ... | ${node} | ${interface} | ${interface} -| | Honeycomb creates first l2 bridge domain -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | Honeycomb adds interface to bridge domain -| | ... | ${node} | ${interface} | ${bd_name} | ${if_bd_settings} -| | Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} - -| Bridge Domain Persistence Check -| | [Documentation] | Verify bridge domain, BD interface assignment -| | ... | and L2 fib entry. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Bridge Domain Persistence Check \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | Bridge domain Operational Data From VAT Should Be -| | ... | ${node} | ${0} | ${bd_settings} -| | Bridge domain Operational Interface Assignment should be -| | ... | ${node} | ${interface} | ${if_bd_settings} -| | L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} -| | L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat}
\ No newline at end of file diff --git a/resources/libraries/robot/honeycomb/policer.robot b/resources/libraries/robot/honeycomb/policer.robot deleted file mode 100644 index 87b97470ac..0000000000 --- a/resources/libraries/robot/honeycomb/policer.robot +++ /dev/null @@ -1,162 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/shared/traffic.robot -| Library | resources.libraries.python.honeycomb.Routing.RoutingKeywords -| Variables | resources/test_data/honeycomb/policer_variables.py -| Documentation | Keywords used to test Policer using Honeycomb. - -*** Keywords *** -| Honeycomb Configures Policer -| | [Documentation] | Uses Honeycomb API to configure Policer on the specified\ -| | ... | interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - policer_data - data needed to configure Policer. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb Configures Policer \| ${node} \ -| | ... | \| ${policer_data} \| -| | ... -| | [Arguments] | ${node} | ${policer_data} -| | Configure Policer -| | ... | ${node} | ${policer_data['name']} | ${policer_data} - -| Policer Operational Data From Honeycomb Should Be -| | [Documentation] | Retrieves Policer operational data and verifies if\ -| | ... | Policer is configured correctly. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - policer_data - data to compare configuration Policer with.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Policer Operational Data From Honeycomb Should Be \ -| | ... | \| ${node} \| ${policer_data} \| -| | ... -| | [Arguments] | ${node} | ${policer_data} -| | ${data}= | Get Policer oper data | ${node} | ${policer_data['name']} -| | Compare data structures | ${data[0]} | ${policer_data} - -| Policer Operational Data From Honeycomb Should Be empty -| | [Documentation] | Checks whether Policer configuration from Honeycomb \ -| | ... | is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Policer Operational Data From Honeycomb Should Be empty \ -| | ... | \| ${node} \| -| | ... -| | [Arguments] | ${node} -| | Run keyword and expect error | HoneycombError*404* -| | ... | Get Policer oper data | ${node} | ${policer_data['name']} - -| Honeycomb removes Policer configuration -| | [Documentation] | Uses Honeycomb API to remove Policer configuration\ -| | ... | from the specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes Policer configuration \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} -| | Configure Policer | ${node} | ${policer_data['name']} - -| Tear down policer test -| | [Documentation] | Uses Honeycomb API to remove Policer configuration\ -| | ... | and reset interface state. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes Policer configuration \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} -| | Honeycomb removes Policer configuration | ${node} - -| Honeycomb enables Policer on interface -| | [Documentation] | Uses Honeycomb API to enable Policer on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - table_name - name of an ACL table. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb enables ACL on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabithEthernet0/8/0 \| table0 \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${table_name} -| | Enable Policer on interface -| | ... | ${node} | ${interface} | ${table_name} - -| Honeycomb disables Policer on interface -| | [Documentation] | Uses Honeycomb API to disable Policer on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb disables Policer on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabithEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | Disable Policer on interface -| | ... | ${node} | ${interface} - -| Honeycomb Send packet and verify marking -| | [Documentation] | Send packet and verify DSCP of the received packet. -| | ... -| | ... | *Arguments:* -| | ... | - node - TG node. Type: dictionary -| | ... | - tx_if - TG transmit interface. Type: string -| | ... | - rx_if - TG receive interface. Type: string -| | ... | - src_mac - Packet source MAC. Type: string -| | ... | - dst_mac - Packet destination MAC. Type: string -| | ... | - src_ip - Packet source IP address. Type: string -| | ... | - dst_ip - Packet destination IP address. Type: string -| | ... | - dscp_num - DSCP value to verify. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| ${dscp}= \| DSCP AF22 \| -| | ... | \| Send packet and verify marking \| ${nodes['TG']} \| eth1 \| eth2 \ -| | ... | \| 08:00:27:87:4d:f7 \| 52:54:00:d4:d8:22 \| 192.168.122.2 \ -| | ... | \| 192.168.122.1 \| ${dscp} \| -| | ... -| | [Arguments] | ${node} | ${tx_if} | ${rx_if} | ${src_mac} | ${dst_mac} -| | ... | ${src_ip} | ${dst_ip} | ${dscp_num} -| | ${tx_if_name}= | Get Interface Name | ${node} | ${tx_if} -| | ${rx_if_name}= | Get Interface Name | ${node} | ${rx_if} -| | ${args}= | Traffic Script Gen Arg | ${rx_if_name} | ${tx_if_name} -| | ... | ${src_mac} | ${dst_mac} | ${src_ip} | ${dst_ip} -| | ${args}= | Set Variable | ${args} --dscp ${dscp_num} -| | Run Traffic Script On Node | policer.py | ${node} | ${args} diff --git a/resources/libraries/robot/honeycomb/port_mirroring.robot b/resources/libraries/robot/honeycomb/port_mirroring.robot deleted file mode 100644 index 5ae0c46ae1..0000000000 --- a/resources/libraries/robot/honeycomb/port_mirroring.robot +++ /dev/null @@ -1,254 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Library | resources.libraries.python.telemetry.SPAN -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.Trace - -*** Keywords *** -| Honeycomb configures SPAN on interface -| | [Documentation] | Uses Honeycomb API to configure SPAN on the specified\ -| | ... | interface, mirroring one or more interfaces. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination interface. Type: string -| | ... | - src_interfaces - Mirroring source interfaces. Type: list \ -| | ... | of dictionaries -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures SPAN on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| [{'iface-ref': 'GigabitEthernet0/10/0', \ -| | ... | \| 'state': 'transmit'}, \ -| | ... | \| {'iface-ref': 'local0', 'state': 'both'}] \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} | @{src_interfaces} -| | Configure interface SPAN -| | ... | ${node} | ${dst_interface} | ${src_interfaces} - -| Interface SPAN Operational Data From Honeycomb Should Be -| | [Documentation] | Retrieves interface operational data and verifies that\ -| | ... | SPAN mirroring is configured with the provided interfaces. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination interface. Type: string -| | ... | - src_interfaces - Mirroring source interfaces. Type: Argument list -\ -| | ... | any number of strings -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface SPAN Operational Data From Honeycomb Should Be \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} | @{src_interfaces} -| | ${data}= | Get interface oper data | ${node} | ${dst_interface} -| | ${data}= | Set Variable -| | ... | ${data['v3po:span']['mirrored-interfaces']['mirrored-interface']} -| | Sort list | ${data} -| | Sort list | ${src_interfaces} -| | Lists should be equal | ${data} | ${src_interfaces} - -| Interface SPAN Operational Data From Honeycomb Should Be empty -| | [Documentation] | Checks whether SPAN configuration from Honeycomb is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination interface. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface SPAN Operational Data From Honeycomb Should Be empty \ -| | ... | \| ${node} \| GigabitEthernetO/8/0 \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} -| | ${data}= | Get interface oper data | ${node} | ${dst_interface} -| | Variable should not exist -| | ... | ${data['v3po:span']['mirrored-interfaces']['mirrored-interface']} - -| Interface SPAN Operational Data From VAT Should Be -| | [Documentation] | Retrieves SPAN configuration from VAT dump and verifies\ -| | ... | that SPAN mirroring is configured with the provided interfaces. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination interface. Type: string -| | ... | - src_interfaces - Mirroring source interfaces. Type: Argument list -\ -| | ... | any number of strings -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface SPAN Operational Data From VAT Should Be \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| GigabitEthernet0/9/0 \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} | @{src_interfaces} -| | ${data}= | VPP get SPAN configuration by interface -| | ... | ${node} | ${dst_interface} | name -| | Sort list | ${data} -| | Sort list | ${src_interfaces} -| | Lists should be equal | ${data} | ${src_interfaces} - -| Honeycomb removes interface SPAN configuration -| | [Documentation] | Uses Honeycomb API to remove SPAN configuration\ -| | ... | from the specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination interface. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes interface SPAN configuration \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} -| | Configure interface SPAN | ${node} | ${dst_interface} - -| Interface SPAN Operational Data from Honeycomb should not exist -| | [Documentation] | Retrieves interface operational data and verifies that\ -| | ... | SPAN mirroring is not configured. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination interface. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| -| | [Arguments] | ${node} | ${dst_interface} -| | ${data}= | Get interface oper data | ${node} | ${dst_interface} -| | Run keyword and expect error | *KeyError* | Set Variable -| | ... | ${data['span']['mirrored-interfaces']['mirrored-interface']} - -| SPAN Operational Data from VAT should not exist -| | [Documentation] | Attmepts to retrieve SPAN Operational Data from VAT dump,\ -| | ... | and expects to fail with no data retrieved. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| SPAN Operational Data from VAT should not exist \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Run keyword and expect error | ValueError: No JSON object could be decoded -| | ... | VPP get SPAN configuration by interface | ${node} | local0 - -| Honeycomb Configures SPAN on sub-interface -| | [Documentation] | Uses Honeycomb API to configure SPAN on the specified\ -| | ... | sub-interface, mirroring one or more interfaces. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination super-interface. Type: string -| | ... | - index - Index of mirroring destination sub-interface. Type: integer -| | ... | - src_interfaces - Mirroring source interfaces. Type: list \ -| | ... | of dictionaries -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb Configures SPAN on sub-interface \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| ${1} \ -| | ... | \|[{'iface-ref': 'GigabitEthernet0/10/0', 'state': 'transmit'}, \ -| | ... | \| {'iface-ref': 'local0', 'state': 'both'}] \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} | ${index} | @{src_interfaces} -| | Configure sub interface SPAN -| | ... | ${node} | ${dst_interface} | ${index} | ${src_interfaces} - -| Sub-Interface SPAN Operational Data from Honeycomb should be -| | [Documentation] | Retrieves sub-interface operational data and verifies\ -| | ... | that SPAN mirroring is configured with the provided interfaces. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination super-interface. Type: string -| | ... | - index - Index of mirroring destination sub-interface. Type: integer -| | ... | - src_interfaces - Mirroring source interfaces. Type: Argument list -\ -| | ... | any number of strings -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Sub-Interface SPAN Operational Data from Honeycomb should be \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \ -| | ... | \| GigabitEthernet0/9/0 \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} | ${index} | @{src_interfaces} -| | ${data}= | Get sub interface oper data -| | ... | ${node} | ${dst_interface} | ${index} -| | ${data}= | Set Variable -| | ... | ${data['subinterface-span:span']['mirrored-interfaces']['mirrored-interface']} -| | Sort list | ${data} -| | Sort list | ${src_interfaces} -| | Lists should be equal | ${data} | ${src_interfaces} - -| Sub-Interface SPAN Operational Data from Honeycomb should be empty -| | [Documentation] | Checks whether SPAN Operational Data from Honeycomb is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination super-interface. Type: string -| | ... | - index - Index of mirroring destination sub-interface. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Interface SPAN Operational Data from Honeycomb should be empty \ -| | ... | \| ${node} \| GigabitEthernetO/8/0 \| ${1} \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} | ${index} -| | ${data}= | Get sub interface oper data -| | ... | ${node} | ${dst_interface} | ${index} -| | Variable should not exist -| | ... | ${data['subinterface-span:span']['mirrored-interfaces']['mirrored-interface']} - -| Honeycomb removes sub-interface SPAN configuration -| | [Documentation] | Uses Honeycomb API to remove SPAN Operational Data\ -| | ... | from the specified sub-interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination super-interface. Type: string -| | ... | - index - Index of mirroring destination sub-interface. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes sub-interface SPAN configuration \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| -| | ... -| | [Arguments] | ${node} | ${dst_interface} | ${index} -| | Configure sub interface SPAN -| | ... | ${node} | ${dst_interface} | ${index} - -| Sub-Interface SPAN Operational Data from Honeycomb should not exist -| | [Documentation] | Retrieves sub-interface operational data and verifies -| | ... | that SPAN mirroring is not configured. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - dst_interface - Mirroring destination super-interface. Type: string -| | ... | - index - Index of mirroring destination sub-interface. Type: integer -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Sub-Interface SPAN Operational Data from Honeycomb should not exist \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| -| | .... -| | [Arguments] | ${node} | ${dst_interface} | ${index} -| | ${data}= | Get sub interface oper data -| | ... | ${node} | ${dst_interface} | ${index} -| | Run keyword and expect error | *KeyError* | Set Variable -| | ... | ${data['subinterface-span:span']['mirrored-interfaces']['mirrored-interface']}
\ No newline at end of file diff --git a/resources/libraries/robot/honeycomb/provider_backbone_bridge.robot b/resources/libraries/robot/honeycomb/provider_backbone_bridge.robot deleted file mode 100644 index 130e184d9c..0000000000 --- a/resources/libraries/robot/honeycomb/provider_backbone_bridge.robot +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords - -*** Keywords *** -| Honeycomb creates PBB sub-interface -| | [Documentation] | Uses Honeycomb API to set PBB sub-interface on an\ -| | ... | interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - sub_if_id - Sub-interface ID. Type: string -| | ... | - params - Parameters of the sub-interface to be created. -| | ... | Type - dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb creates PBB sub-interface \| ${node} \| ${super_if}\ -| | ... | \| ${cfg_pbb_sub_if_1} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${params} -| | ... -| | Set Interface Up | ${node} | ${super_if} -| | Create PBB Sub Interface -| | ... | ${node} | ${super_if} | ${params} - -| Honeycomb removes PBB sub-interface -| | [Documentation] | Uses Honeycomb API to remove PBB sub-interface from its\ -| | ... | super interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - sub_if_id - Sub-interface ID. Type: string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb removes PBB sub-interface\ -| | ... | \| ${node} \| ${super_if} \| -| | ... -| | [Arguments] | ${node} | ${super_if} -| | ... -| | Delete PBB Sub Interface | ${node} | ${super_if} - -| Honeycomb fails to create PBB sub-interface -| | [Documentation] | Uses Honeycomb API to set PBB sub-interface with wrong\ -| | ... | parameter(s) and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - sub_if_id - Sub-interface ID. Type: string -| | ... | - params - Parameters of the sub-interface to be created. -| | ... | Type - dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails to create PBB sub-interface\ -| | ... | \| ${node} \| ${super_if} \| ${cfg_pbb_sub_if_no_vlan_tag} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${params} -| | ... -| | Set Interface Up | ${node} | ${super_if} -| | Run keyword and expect error | *HoneycombError*not successful*. -| | ... | Create PBB Sub Interface -| | ... | ${node} | ${super_if} | ${params} diff --git a/resources/libraries/robot/honeycomb/proxyarp.robot b/resources/libraries/robot/honeycomb/proxyarp.robot deleted file mode 100644 index 2df1d3c13a..0000000000 --- a/resources/libraries/robot/honeycomb/proxyarp.robot +++ /dev/null @@ -1,193 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.ProxyARP.ProxyARPKeywords -| Library | resources.libraries.python.honeycomb.ProxyARP.IPv6NDProxyKeywords -| Documentation | Keywords used to test Honeycomb ARP proxy and IPv6ND proxy. - -*** Keywords *** -| Honeycomb configures proxyARP -| | [Documentation] | Uses Honeycomb API to configure proxyARP for a specific\ -| | ... | destination IP range. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - data - Configuration to use. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures proxyARP \| ${nodes['DUT1']} \| ${data} \| -| | [Arguments] | ${node} | ${data} -| | Configure proxyARP | ${node} | ${data} - -| Honeycomb removes proxyARP configuration -| | [Documentation] | Uses Honeycomb API to remove existing proxyARP\ -| | ... | IP range configuration. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes proxyARP configuration \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Remove proxyARP configuration | ${node} - -| Honeycomb enables proxyARP on interface -| | [Documentation] | Uses Honeycomb API to enable the proxyARP\ -| | ... | feature on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb enables proxyARP on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | Set proxyARP interface config | ${node} | ${interface} | enable - -| Honeycomb disables proxyARP on interface -| | [Documentation] | Uses Honeycomb API to disable the proxyARP\ -| | ... | feature on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb disables proxyARP on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | Set proxyARP interface config | ${node} | ${interface} | disable - -| Honeycomb configures IPv6 ND proxy on interface -| | [Documentation] | Uses Honeycomb API to enable the IPv6 ND proxy\ -| | ... | feature on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... | - addresses - one or more addresses to configure ND proxy with.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures IPv6 ND proxy on interface \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 10::10 \| 10::11 \| -| | ... -| | [Arguments] | ${node} | ${interface} | @{addresses} -| | Configure IPv6ND | ${node} | ${interface} | ${addresses} - -| Honeycomb disables IPv6 ND proxy on interface -| | [Documentation] | Uses Honeycomb API to disable the IPv6 ND proxy\ -| | ... | feature on an interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb disables IPv6 ND proxy on interface \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | [Arguments] | ${node} | ${interface} -| | Configure IPv6ND | ${node} | ${interface} - -| IPv6 ND proxy from Honeycomb should be -| | [Documentation] | Retrieves IPv6 ND proxy operational data and compares\ -| | ... | with expected values. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... | - addresses - one or more addresses to expect. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| IPv6 ND proxy from Honeycomb should be \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| 10::10 \| 10::11 \| -| | ... -| | [Arguments] | ${node} | ${interface} | @{addresses} -| | ${oper_data}= | Get interface oper data | ${node} | ${interface} -| | ${oper_data}= | Set Variable -| | ... | ${oper_data['ietf-ip:ipv6']['nd-proxy:nd-proxies']['nd-proxy']} -| | ${data}= | Evaluate | [{"address":x} for x in $addresses] -| | Sort List | ${oper_data} -| | Sort List | ${data} -| | Should be equal | ${oper_data} | ${data} - -| IPv6 ND proxy from Honeycomb should be empty -| | [Documentation] | Retrieves IPv6 ND proxy operational data and expects\ -| | ... | to fail due to no data present. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \|IPv6 ND proxy from Honeycomb should be empty \| ${nodes['DUT1']} \ -| | ... | \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ${oper_data}= | Get interface oper data | ${node} | ${interface} -| | Variable Should Not Exist -| | ... | ${oper_data['ietf-ip:ipv6']['nd-proxy:nd-proxies']['nd-proxy']} - -| Verify IPv6ND proxy -| | [Documentation] | Send and receive ICMPv6 messages between TG interfaces -| | ... | through Neighbor Discovery proxy. -| | ... -| | ... | *Arguments:* -| | ... | - tg_node - TG node. Type: dictionary -| | ... | - tg_interface1 - TG interface. Type: string -| | ... | - tg_interface2 - TG interface. Type: string -| | ... | - src_ip - Source IPv6 address to use. Type: string -| | ... | - dst_ip - Destination IPv6 address to use. Type: string -| | ... | - src_mac - MAC address of source interface. Type: string -| | ... | - dst_mac - MAC address of destination interface. Type: string -| | ... | - proxy_to_src_mac - MAC address of DUT interface on link to source\ -| | ... | TG interface. Type: string -| | ... | - proxy_to_dst_mac - MAC address of DUT interface on link to dest\ -| | ... | TG interface. Type: string -| | ... -| | ... | *Return:* -| | ... | - No value returned. -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Verify IPv6ND proxy \| ${nodes['TG']} \ -| | ... | \| eth3 \| eth4 \| 3ffe:62::1 \| 3ffe:63::2 \ -| | ... | \| 08:00:27:cc:4f:54 \| 08:00:27:64:18:d2 \ -| | ... | \| 08:00:27:c9:6a:d5 \| 08:00:27:c4:75:3a \| -| | ... -| | [Arguments] | ${tg_node} | ${tg_interface1} | ${tg_interface2} -| | ... | ${src_ip} | ${dst_ip} | ${src_mac} | ${dst_mac} -| | ... | ${proxy_to_src_mac} | ${proxy_to_dst_mac} -| | ${tg_interface_name1}= | Get interface name | ${tg_node} | ${tg_interface1} -| | ${tg_interface_name2}= | Get interface name | ${tg_node} | ${tg_interface2} -| | ${args}= | Catenate | --tx_if | ${tg_interface_name1} -| | ... | --rx_if | ${tg_interface_name2} -| | ... | --src_ip | ${src_ip} -| | ... | --dst_ip | ${dst_ip} -| | ... | --src_mac | ${src_mac} -| | ... | --dst_mac | ${dst_mac} -| | ... | --proxy_to_src_mac | ${proxy_to_src_mac} -| | ... | --proxy_to_dst_mac | ${proxy_to_dst_mac} -| | Run Traffic Script On Node | ipv6_nd_proxy_check.py -| | ... | ${tg_node} | ${args} diff --git a/resources/libraries/robot/honeycomb/routing.robot b/resources/libraries/robot/honeycomb/routing.robot deleted file mode 100644 index 752b4fe29e..0000000000 --- a/resources/libraries/robot/honeycomb/routing.robot +++ /dev/null @@ -1,203 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.Routing.RoutingKeywords -| Documentation | Keywords used to test Honeycomb routing. - -*** Keywords *** -| Honeycomb configures routing table -| | [Documentation] | Uses Honeycomb API to configure a routing table. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - name - name for the new routing table. Type: string -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type:string -| | ... | - data - Settings for the new routing table. Type: dictionary -| | ... | - vrf - vrf-id the new table will belong to. Type: integer -| | ... | - special - Does the table contain special rules. Type: boolean -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures routing table \| ${nodes['DUT1']} \ -| | ... | \| table1 \| ipv4 \| ${data} \| ${1} \| ${TRUE} \| -| | [Arguments] | ${node} | ${name} | ${ip_version} | ${data} | ${vrf}=${1} -| | ... | ${special}=${EMPTY} -| | Configure routing table | ${node} | ${name} | ${ip_version} | ${data} -| | ... | ${vrf} | ${special} - -| Routing data from Honeycomb should contain -| | [Documentation] | Uses Honeycomb API to retrieve operational data about\ -| | ... | a routing table, and compares with the data provided. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - name - name of the routing table. Type: string -| | ... | - ip_version - IP protocol version, ipv4 or ipv6. Type:string -| | ... | - expected_data - Data to compare against. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Routing data from Honeycomb should contain \| ${nodes['DUT1']} \ -| | ... | \| table1 \| ipv4 \| ${data} \| -| | [Arguments] | ${node} | ${name} | ${ip_version} | ${expected_data} -| | ${data}= | Get Routing Table Oper | ${node} | ${name} | ${ip_version} -| | Should Contain | ${data} | ${expected_data} - -| Log routing configuration from VAT -| | [Documentation] | Uses test API to read routing configuration from VPP\ -| | ... | and prints received response into robot log. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Log routing configuration from VAT \| ${nodes['DUT1']} \| -| | [Arguments] | ${node} -| | Log routing configuration | ${node} - -| Honeycomb removes routing configuration -| | [Documentation] | Uses Honeycomb API to remove Honeycomb-created\ -| | ... | routing configuration from the node. Entries configured automatically\ -| | ... | by VPP will not be removed. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - name - name of the routing table to remove. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes routing configuration \| ${nodes['DUT1']} \ -| | ... | \| table1 \| -| | [Arguments] | ${node} | ${name} -| | Delete routing table | ${node} | ${name} - -| Verify route IPv4 -| | [Documentation] | Send an ICMP packet from one TG interface and receive\ -| | ... | it on the other TG interface. -| | ... -| | ... | *Arguments:* -| | ... -| | ... | _NOTE:_ Arguments are based on topology: -| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) -| | ... -| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary -| | ... | - src_ip - IP of source interface (TG-if1). Type: integer -| | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer -| | ... | - tx_port - Source interface (TG-if1). Type: string -| | ... | - tx_mac - MAC address of source interface (TG-if1). Type: string -| | ... | - rx_port - Destionation interface (TG-if2). Type: string -| | ... | - rx_mac - MAC address of DUT interface (DUT-if1). Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Verify route IPv4 \| ${nodes['TG']} \ -| | ... | \| 16.0.0.1 \| 32.0.0.1 \| eth1 \| 08:00:27:cc:4f:54 \ -| | ... | \| eth2 \| 08:00:27:c9:6a:d5 \| -| | ... -| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} -| | ... | ${tx_mac} | ${rx_port} | ${rx_mac} -| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port} -| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} -| | ${args}= | Catenate | --src_mac | ${tx_mac} -| | ... | --dst_mac | ${rx_mac} -| | ... | --src_ip | ${src_ip} -| | ... | --dst_ip | ${dst_ip} -| | ... | --tx_if | ${tx_port_name} -| | ... | --rx_if | ${rx_port_name} -| | Run Traffic Script On Node | send_ip_icmp.py | ${tg_node} | ${args} - -| Verify route IPv6 -| | [Documentation] | Send an ICMPv6 packet from one TG interface and receive\ -| | ... | it on the other TG interface. -| | ... -| | ... | *Arguments:* -| | ... -| | ... | _NOTE:_ Arguments are based on topology: -| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) -| | ... -| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary -| | ... | - src_ip - IP of source interface (TG-if1). Type: integer -| | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer -| | ... | - tx_port - Source interface (TG-if1). Type: string -| | ... | - tx_mac - MAC address of source interface (TG-if1). Type: string -| | ... | - rx_port - Destionation interface (TG-if2). Type: string -| | ... | - rx_mac - MAC address of DUT interface (DUT-if1). Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Verify route IPv6 \| ${nodes['TG']} \ -| | ... | \| 10::1 \| 11::1 \| eth2 \| 08:00:27:cc:4f:54 \ -| | ... | \| eth4 \| 08:00:27:c9:6a:d5 \| -| | ... -| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} -| | ... | ${tx_mac} | ${rx_port} | ${rx_mac} -| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port} -| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} -| | ${args}= | Catenate | --src_mac | ${tx_mac} -| | ... | --dst_mac | ${rx_mac} -| | ... | --src_ip | ${src_ip} -| | ... | --dst_ip | ${dst_ip} -| | ... | --tx_if | ${tx_port_name} -| | ... | --rx_if | ${rx_port_name} -| | Run Traffic Script On Node | send_ip_icmp.py | ${tg_node} | ${args} - -| Verify multipath route -| | [Documentation] | Send 100 ICMP or ICMPv6 packets from one TG interface\ -| | ... | and receive them on the other TG interface. Verify destination MAC\ -| | ... | addresses of the packets so that exactly 50 of them use the first\ -| | ... | address and the other 50 use the second address. -| | ... -| | ... | *Arguments:* -| | ... -| | ... | _NOTE:_ Arguments are based on topology: -| | ... | TG(if1)->(if1)DUT(if2)->TG(if2) -| | ... -| | ... | - tg_node - Node to execute scripts on (TG). Type: dictionary -| | ... | - src_ip - IP of source interface (TG-if1). Type: integer -| | ... | - dst_ip - IP of destination interface (TG-if2). Type: integer -| | ... | - tx_port - Source interface (TG-if1). Type: string -| | ... | - tx_src_mac - MAC address of source interface (TG-if1). Type: string -| | ... | - rx_port - Destionation interface (TG-if2). Type: string -| | ... | - tx_dst_mac - MAC address of DUT ingress interface (DUT-if1).\ -| | ... | Type: string -| | ... | - rx_src_mac - MAC address of DUT egress interface (DUT-if2).\ -| | ... | Type: string -| | ... | - rx_dst_mac1 - MAC address of first next-hop option. Type: string -| | ... | - rx_dst_mac2 - MAC address of second next-hop option. Type: string -| | ... | -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Verify multipath route \| ${nodes['TG']} \ -| | ... | \| 16.0.0.1 \| 32.0.0.1 \| eth2 \| 08:00:27:cc:4f:54 \ -| | ... | \| eth4 \| 08:00:27:c9:6a:d5 \| -| | ... | \| 00:00:00:00:00:01 \| 00:00:00:00:00:02 \| -| | ... -| | [Arguments] | ${tg_node} | ${src_ip} | ${dst_ip} | ${tx_port} -| | ... | ${tx_src_mac} | ${rx_port} | ${tx_dst_mac} | ${rx_src_mac} -| | ... | ${rx_dst_mac1} | ${rx_dst_mac2} -| | ${tx_port_name}= | Get interface name | ${tg_node} | ${tx_port} -| | ${rx_port_name}= | Get interface name | ${tg_node} | ${rx_port} -| | ${args}= | Catenate | --tg_if1_mac | ${tx_src_mac} -| | ... | --dut_if1_mac | ${tx_dst_mac} -| | ... | --src_ip | ${src_ip} -| | ... | --dst_ip | ${dst_ip} -| | ... | --tx_if | ${tx_port_name} -| | ... | --rx_if | ${rx_port_name} -| | ... | --dut_if2_mac | ${rx_src_mac} -| | ... | --path_1_mac | ${rx_dst_mac_1} -| | ... | --path_2_mac | ${rx_dst_mac_2} -| | Run Traffic Script On Node | send_icmp_check_multipath.py | ${tg_node} -| | ... | ${args}
\ No newline at end of file diff --git a/resources/libraries/robot/honeycomb/slaac.robot b/resources/libraries/robot/honeycomb/slaac.robot deleted file mode 100644 index 036d4d06ce..0000000000 --- a/resources/libraries/robot/honeycomb/slaac.robot +++ /dev/null @@ -1,106 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.Routing.RoutingKeywords -| Library | resources.libraries.python.Trace -| Documentation | Keywords used to test SLAAC using Honeycomb. - -*** Keywords *** -| Honeycomb configures SLAAC -| | [Documentation] | Uses Honeycomb API to configure SLAAC on the specified\ -| | ... | interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... | - slaac_data - data needed to configure SLAAC. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb configures SLAAC \| ${node} \| ${interface} \ -| | ... | \| ${slaac_data} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${slaac_data} -| | Configure interface SLAAC -| | ... | ${node} | ${interface} | ${slaac_data} - -| SLAAC Operational Data From Honeycomb Should Be -| | [Documentation] | Retrieves SLAAC operational data and verifies that\ -| | ... | SLAAC is configured with the provided interfaces. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... | - slaac_data - data to compare configuration SLAAC with.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| SLAAC Operational Data From Honeycomb Should Be \ -| | ... | \| ${node} \| ${interface} \| ${slaac_data} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${slaac_data} -| | ${data}= | Get interface SLAAC oper data | ${node} | ${interface} -| | Dictionaries should be equal | ${data} | ${slaac_data} - -| SLAAC Operational Data From Honeycomb Should Be empty -| | [Documentation] | Checks whether SLAAC configuration from Honeycomb \ -| | ... | is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| SLAAC Operational Data From Honeycomb Should Be empty \ -| | ... | \| ${node} \| ${interface} \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | Run keyword and expect error | HoneycombError*40* -| | ... | Get interface SLAAC oper data | ${node} | ${interface} - -| Honeycomb removes SLAAC configuration -| | [Documentation] | Uses Honeycomb API to remove SLAAC confirugation\ -| | ... | from the specified interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes SLAAC configuration \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | Configure interface SLAAC | ${node} | ${interface} - -| SLAAC test teardown -| | [Documentation] | Uses Honeycomb API to remove SLAAC confirugation\ -| | ... | and reset interface state. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes SLAAC configuration \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | Honeycomb removes SLAAC configuration | ${node} | ${interface} -| | And Honeycomb configures interface state | ${node} | ${interface} | down -| | Honeycomb removes interface IPv6 addresses | ${node} | ${interface} diff --git a/resources/libraries/robot/honeycomb/sub_interface.robot b/resources/libraries/robot/honeycomb/sub_interface.robot deleted file mode 100644 index 8bb95f51b8..0000000000 --- a/resources/libraries/robot/honeycomb/sub_interface.robot +++ /dev/null @@ -1,670 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.L2Util -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Documentation | Keywords used to manipulate sub-interfaces. - -*** Keywords *** -| Honeycomb creates sub-interface -| | [Documentation] | Create a sub-interface using Honeycomb API. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super-interface where a sub-interface will be\ -| | ... | created. Type: string -| | ... | - match - Match type. Type: string -| | ... | - tags - List of tags to be set while creating the sub-interface.\ -| | ... | Type: list -| | ... | - sub_interface_settings - Sub-inteface parameters to be set while\ -| | ... | creating the sub-interface. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb creates sub-interface\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0\ -| | ... | \| vlan-tagged-exact-match \| ${sub_if_1_tags}\ -| | ... | \| ${sub_if_1_settings} \| -| | ... -| | [Arguments] | ${node} | ${super_interface} -| | ... | ${match} | ${tags} | ${sub_interface_settings} -| | ... -| | Honeycomb Create sub interface | ${node} | ${super_interface} -| | ... | ${match} | ${tags} | &{sub_interface_settings} - -| Sub-interface Operational Data From Honeycomb Should Be -| | [Documentation] | Retrieves sub-interface configuration through Honeycomb\ -| | ... | and compares it with settings supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - sub_if_settings - Operational data for sub-interface to be checked.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Sub-interface Operational Data From Honeycomb Should Be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\ -| | ... | \| ${sub_if_1_params} \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... | ${sub_if_settings} -| | ... -| | ${api_data}= | Get sub interface oper data -| | ... | ${node} | ${super_interface} | ${identifier} -| | Compare Data Structures | ${api_data} | ${sub_if_settings} - -| Sub-interface Operational Data From Honeycomb Should Be empty -| | [Documentation] | Retrieves sub-interface configuration through Honeycomb \ -| | ... | and expects no data. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| Sub-interface Operational Data From Honeycomb Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... -| | Run keyword and expect error | *KeyError: 'vpp-vlan:sub-interfaces'* -| | ... | Get sub interface oper data -| | ... | ${node} | ${super_interface} | ${identifier} - -| Sub-interface state from Honeycomb should be -| | [Documentation] | Retrieves sub-interface configuration through Honeycomb \ -| | ... | and checks the administrative and operational state. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - admin_state - Required administrative state - up or down. \ -| | ... | Type: string -| | ... | - oper_state - Required operational state - up or down. Type: string -| | ... -| | ... | *Example:* -| | ... | \| Sub-interface state from Honeycomb should be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| up \| up \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... | ${admin_state} | ${oper_state} -| | ... -| | ${api_data}= | Get sub interface oper data -| | ... | ${node} | ${super_interface} | ${identifier} -| | Should be equal | ${api_data['admin-status']} | ${admin_state} -| | Should be equal | ${api_data['oper-status']} | ${oper_state} - -| Sub-interface Operational Data From VAT Should Be -| | [Documentation] | Retrieves sub-interface configuration through VAT and\ -| | ... | compares it with settings supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - sub_interface - Name of an sub-interface on the specified node.\ -| | ... | Type: string -| | ... | - sub_interface_settings - Operational data specific for a\ -| | ... | sub-interface to be checked. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Sub-interface Operational Data From VAT Should Be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_if_1_params} \| -| | ... -| | [Arguments] | ${node} | ${sub_interface} | ${sub_interface_settings} -| | ... -| | ${vat_data}= | VPP get interface data -| | ... | ${node} | ${sub_interface} -| | Should be equal as strings | ${vat_data['sub_id']} -| | ... | ${sub_interface_settings['identifier']} -| | Should be equal as strings -| | ... | ${vat_data['interface_name']} | ${sub_interface} -| | Run keyword if | ${vat_data['link_up_down']} == 0 -| | ... | Should be equal as strings -| | ... | ${sub_interface_settings['oper-status']} | down -| | Run keyword if | ${vat_data['link_up_down']} == 1 -| | ... | Should be equal as strings -| | ... | ${sub_interface_settings['oper-status']} | up - -| Sub-interface state from VAT should be -| | [Documentation] | Retrieves sub-interface configuration through VAT and \ -| | ... | checks the administrative and operational state. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - sub_interface - Name of an sub-interface on the specified node. \ -| | ... | Type: string -| | ... | - admin_state - Required administrative state - up or down. \ -| | ... | Type: string -| | ... | - oper_state - Required operational state - up or down. Type: string -| | ... -| | ... | *Example:* -| | ... | \| Sub-interface state from VAT should be \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| up \| up \| -| | ... -| | [Arguments] | ${node} | ${sub_interface} | ${admin_state} | ${oper_state} -| | ... -| | ${vat_data}= | VPP get interface data -| | ... | ${node} | ${sub_interface} -| | Run keyword if | '${admin_state}' == 'down' -| | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 0 -| | Run keyword if | '${admin_state}' == 'up' -| | ... | Should be equal as strings | ${vat_data['admin_up_down']} | 1 -| | Run keyword if | '${oper_state}' == 'down' -| | ... | Should be equal as strings | ${vat_data['link_up_down']} | 0 -| | Run keyword if | '${oper_state}' == 'up' -| | ... | Should be equal as strings | ${vat_data['link_up_down']} | 1 - -| Sub-interface indices from Honeycomb and VAT should correspond -| | [Documentation] | Uses VAT and Honeycomb to get operational data about the\ -| | ... | given sub-interface and compares the interface indexes. The -| | ... | sub-interface index from Honeycomb should be greater than index from -| | ... | VAT by one. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Sub-interface indices from Honeycomb and VAT should correspond \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... -| | ${api_data}= | Get sub interface oper data -| | ... | ${node} | ${super_interface} | ${identifier} -| | ${vat_data}= | VPP get interface data -| | ... | ${node} | ${super_interface}.${identifier} -| | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1 -| | Should be equal as strings -| | ... | ${api_data['if-index']} | ${sw_if_index} - -| Honeycomb sets the sub-interface up -| | [Documentation] | Honeycomb sets the sub-interface up. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | Honeycomb sets the sub-interface up\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... -| | Set sub interface state -| | ... | ${node} | ${super_interface} | ${identifier} | up - -| Honeycomb sets the sub-interface down -| | [Documentation] | Honeycomb sets the sub-interface down. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | Honeycomb sets the sub-interface down\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... -| | Set sub interface state -| | ... | ${node} | ${super_interface} | ${identifier} | down - -| Honeycomb fails to set sub-interface up -| | [Documentation] | Honeycomb tries to set sub-interface up and expects error. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails to set sub-interface up\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... -| | Run keyword and expect error | *HoneycombError: * was not successful. * 500. -| | ... | Set sub interface state -| | ... | ${node} | ${super_interface} | ${identifier} | up - -| Honeycomb adds sub-interface to bridge domain -| | [Documentation] | Honeycomb adds the given sub-interface to bridge domain. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - sub_bd_setings - Bridge domain parameters to be set while adding\ -| | ... | the sub-interface to the bridge domain. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb adds sub-interface to bridge domain\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings} -| | ... -| | Add bridge domain to sub interface -| | ... | ${node} | ${super_if} | ${identifier} | ${sub_bd_setings} - -| Sub-interface bridge domain Operational Data From Honeycomb Should Be -| | [Documentation] | Uses Honeycomb API to verify sub-interface assignment to\ -| | ... | a bridge domain. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - settings - Bridge domain parameters to be checked. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Sub-interface bridge domain Operational Data From Honeycomb Should Be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| ${bd_settings} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings} -| | ... -| | ${if_data}= | Get BD data from sub interface -| | ... | ${node} | ${super_if} | ${identifier} -| | Should be equal | ${if_data['bridge-domain']} -| | ... | ${settings['bridge-domain']} - -| Sub-interface bridge domain Operational Data From PAPI Should Be -| | [Documentation] | Uses VAT to verify sub-interface assignment to a bridge\ -| | ... | domain. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - interface - Name of a sub-interface on the specified node. Type:\ -| | ... | string -| | ... | - setings - Parameters to be checked. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Sub-interface bridge domain Operational Data From PAPI Should Be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${sub_bd_setings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | ... -| | ${bd_data}= | VPP get bridge domain data | ${node} -| | ${bd_intf}= | Set Variable | ${bd_data[0]} -| | ${sw_if_data}= | Set Variable | ${bd_intf['sw_if_details'][0]} -| | Should be equal as integers | ${bd_intf['flood']} | ${bd_settings['flood']} -| | Should be equal as integers | ${bd_intf['forward']} -| | ... | ${bd_settings['forward']} -| | Should be equal as integers | ${bd_intf['learn']} | ${bd_settings['learn']} -# interface[1] = sw_if_index, interface[2] = shg -| | Should be equal as strings | ${sw_if_data[2]} -| | ... | ${settings['split-horizon-group']} - -| Honeycomb fails to remove all sub-interfaces -| | [Documentation] | Honeycomb tries to remove all sub-interfaces using\ -| | ... | Honeycomb API. This operation must fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails to remove all sub-interfaces\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| -| | ... -| | [Arguments] | ${node} | ${super_if} -| | ... -| | Run keyword and expect error | *HoneycombError:*not successful. * code: 500. -| | ... | Remove all sub interfaces -| | ... | ${node} | ${super_if} - -| Honeycomb configures tag rewrite -| | [Documentation] | Honeycomb configures tag-rewrite -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - settings - tag-rewrite parameters. Type: dictionary. -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb configures tag rewrite\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\ -| | ... | \| ${tag_rewrite_push} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings} -| | ... -| | Configure tag rewrite -| | ... | ${node} | ${super_if} | ${identifier} | ${settings} - -| Rewrite tag from Honeycomb should be empty -| | [Documentation] | Checks if the tag-rewrite is empty or does not exist. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| Rewrite tag from Honeycomb should be empty\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} -| | ... -| | Run keyword and expect error | *Hon*Error*oper*does not contain*tag-rewrite* -| | ... | Get tag rewrite oper data -| | ... | ${node} | ${super_if} | ${identifier} - -| Rewrite tag from Honeycomb should be -| | [Documentation] | Checks if the operational data retrieved from Honeycomb\ -| | ... | are as expected. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - settings - tag-rewrite operational parameters to be checked.\ -| | ... | Type: dictionary. -| | ... -| | ... | *Example:* -| | ... | \| Rewrite tag from Honeycomb should be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\ -| | ... | \| ${tag_rewrite_push_oper} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings} -| | ${api_data}= | Get tag rewrite oper data -| | ... | ${node} | ${super_if} | ${identifier} -| | Compare Data Structures -| | ... | ${api_data} | ${settings} - -| Rewrite tag from VAT should be -| | [Documentation] | Retrieves sub-interface configuration through VAT and\ -| | ... | compares values of rewrite tag parameters with settings supplied in\ -| | ... | argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of a sub-interface on the specified node.\ -| | ... | Type: string -| | ... | - rw_settings - Parameters to be set while setting the rewrite tag.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Rewrite tag from VAT should be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| ${rw_params} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${rw_settings} -| | ${vat_data}= | VPP get interface data | ${node} | ${interface} -| | Compare Data Structures | ${vat_data} | ${rw_settings} - -| Honeycomb fails to set wrong rewrite tag -| | [Documentation] | Honeycomb tries to set wrong rewrite tag and expects\ -| | ... | an error. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - settings - tag-rewrite parameters. Type: dictionary. -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails to set wrong rewrite tag\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1\ -| | ... | \| ${tag_rewrite_push_WRONG} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${settings} -| | Run keyword and expect error | *HoneycombError: * was not successful. *00. -| | ... | Configure tag rewrite -| | ... | ${node} | ${super_if} | ${identifier} | ${settings} - -| Honeycomb sets sub-interface ipv4 address -| | [Documentation] | Uses Honeycomb API to configure an ipv4 address on the\ -| | ... | spcified sub-interface. Replaces any existing ipv4 addresses. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - address - IPv4 address to set. Type: string -| | ... | - prefix - IPv4 network prefix length to set. Type: integer -| | ... -| | ... | *Example:* -| | ... | \| | Honeycomb sets sub-interface ipv4 address\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \ -| | ... | \| 192.168.0.2 \| ${24} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} -| | Add ip address to sub_interface -| | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv4 - -| Sub-interface ipv4 address from Honeycomb should be -| | [Documentation] | Uses Honeycomb API to verify ipv4 address configuration\ -| | ... | on the specified sub-interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - address - IPv4 address to expect. Type: string -| | ... | - prefix - IPv4 network prefix length to expect. Type: integer -| | ... -| | ... | *Example:* -| | ... | \| sub-interface ipv4 address from Honeycomb should be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \ -| | ... | \| 192.168.0.2 \| ${24} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} -| | ${if_data}= | Get sub interface oper data -| | ... | ${node} | ${super_if} | ${identifier} -| | Should be equal -| | ... | ${if_data['ipv4']['address'][0]['ip']} | ${address} -| | Should be equal -| | ... | ${if_data['ipv4']['address'][0]['prefix-length']} | ${prefix} - -| Sub-interface ipv4 address from VAT should be -| | [Documentation] | Uses VAT to verify ipv4 address configuration\ -| | ... | on the specified sub-interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - sub_interface - Name of an sub-interface on the specified node.\ -| | ... | Type: string -| | ... | - address - IPv4 address to expect. Type: string -| | ... | - prefix - IPv4 network prefix length to expect. Type: integer -| | ... -| | ... | *Example:* -| | ... | \| sub-interface ipv4 address from VAT should be\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| -| | ... -| | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix} -| | ${data}= | VPP get interface ip addresses -| | ... | ${node} | ${sub_interface} | ipv4 -| | Should be equal | ${data[0]['ip']} | ${address} -| | Should be equal | ${data[0]['prefix_length']} | ${prefix} - -| Honeycomb removes all sub-interface ipv4 addresses -| | [Documentation] | Uses Honeycomb API to remove all configured ipv4\ -| | ... | addresses from the sub-interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb removes all sub-interface ipv4 addresses\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} -| | Remove all ip addresses from sub_interface -| | ... | ${node} | ${super_if} | ${identifier} | ipv4 - -| Sub-interface ipv4 address from Honeycomb should be empty -| | [Documentation] | Uses Honeycomb API to verify that ipv4 address\ -| | ... | configuration on the specified sub-interface is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| sub-interface ipv4 address from Honeycomb should be empty\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} -| | ${if_data}= | Get sub interface oper data -| | ... | ${node} | ${super_if} | ${identifier} -| | Run keyword and expect error | *KeyError: 'ipv4'* -| | ... | Set Variable | ${if_data['ipv4']['address'][0]['ip']} - -| Sub-interface ipv4 address from VAT should be empty -| | [Documentation] | Uses VAT to verify that ipv4 address\ -| | ... | configuration on the specified sub-interface is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - sub_interface - Name of an sub-interface on the specified node.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... | \| sub-interface ipv4 address from VAT should be empty\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| -| | ... -| | [Arguments] | ${node} | ${sub_interface} -| | ${data}= | VPP get interface ip addresses -| | ... | ${node} | ${sub_interface} | ipv4 -| | Should be empty | ${data} - -| Honeycomb sets sub-interface ipv6 address -| | [Documentation] | Uses Honeycomb API to configure an ipv6 address on the\ -| | ... | spcified sub-interface. Replaces any existing ipv6 addresses. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - address - IPv6 address to set. Type: string -| | ... | - prefix - IPv6 network prefix length to set. Type: integer -| | ... -| | ... | *Example:* -| | ... | \| | Honeycomb sets sub-interface ipv6 address\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \ -| | ... | \| 10::10 \| ${64} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} -| | Add ip address to sub_interface -| | ... | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} | ipv6 - -| Sub-interface IPv6 address from Honeycomb should contain -| | [Documentation] | Uses Honeycomb API to verify ipv6 address configuration\ -| | ... | on the specified sub-interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... | - address - IPv6 address to expect. Type: string -| | ... | - prefix - IPv6 network prefix length to expect. Type: integer -| | ... -| | ... | *Example:* -| | ... | \| sub-interface IPv6 address from Honeycomb should contain\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \ -| | ... | \| 10::10 \| ${64} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} | ${address} | ${prefix} -| | ${if_data}= | Get sub interface oper data -| | ... | ${node} | ${super_if} | ${identifier} -| | ${settings}= | Create Dictionary -| | ... | ip=${address} | prefix-length=${prefix} -| | Should contain | ${if_data['ipv6']['address']} | ${settings} - -| Sub-interface IPv6 address from VAT should contain -| | [Documentation] | Uses VAT to verify ipv6 address configuration\ -| | ... | on the specified sub-interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - sub_interface - Name of an sub-interface on the specified node.\ -| | ... | Type: string -| | ... | - address - IPv6 address to expect. Type: string -| | ... | - prefix - IPv6 network prefix length to expect. Type: integer -| | ... -| | ... | *Example:* -| | ... | \| sub-interface IPv6 address from VAT should contain\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| -| | ... -| | [Arguments] | ${node} | ${sub_interface} | ${address} | ${prefix} -| | ${data}= | VPP get interface ip addresses -| | ... | ${node} | ${sub_interface} | ipv6 -| | Should be equal | ${data[0]['ip']} | ${address} -| | Should be equal | ${data[0]['prefix_length']} | ${prefix} - -| Honeycomb removes all sub-interface ipv6 addresses -| | [Documentation] | Uses Honeycomb API to remove all configured ipv6\ -| | ... | addresses from the sub-interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb removes all sub-interface ipv6 addresses\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} -| | Remove all ip addresses from sub_interface -| | ... | ${node} | ${super_if} | ${identifier} | ipv6 - -| Sub-interface ipv6 address from Honeycomb should be empty -| | [Documentation] | Uses Honeycomb API to verify that ipv6 address\ -| | ... | configuration on the specified sub-interface is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| sub-interface ipv6 address from Honeycomb should be empty\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| ${1} \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${identifier} -| | ${if_data}= | Get sub interface oper data -| | ... | ${node} | ${super_if} | ${identifier} -| | Run keyword and expect error | *KeyError: 'ipv6'* -| | ... | Set Variable | ${if_data['ipv6']['address'][0]['ip']} - -| Sub-interface ipv6 address from VAT should be empty -| | [Documentation] | Uses VAT to verify that ipv6 address\ -| | ... | configuration on the specified sub-interface is empty. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - sub_interface - Name of an sub-interface on the specified node.\ -| | ... | Type: string -| | ... -| | ... | *Example:* -| | ... | \| sub-interface ipv6 address from VAT should be empty\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0.1 \| -| | ... -| | [Arguments] | ${node} | ${sub_interface} -| | ${data}= | VPP get interface ip addresses -| | ... | ${node} | ${sub_interface} | ipv6 -| | Should be empty | ${data} diff --git a/resources/libraries/robot/honeycomb/tap.robot b/resources/libraries/robot/honeycomb/tap.robot deleted file mode 100644 index 37d6a02f52..0000000000 --- a/resources/libraries/robot/honeycomb/tap.robot +++ /dev/null @@ -1,144 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Documentation | Keywords used to manipulate TAP interfaces. - -*** Keywords *** -| Honeycomb creates TAP interface -| | [Documentation] | Uses Honeycomb API to configure a new TAP interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for TAP. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb creates TAP interface \ -| | ... | \| ${nodes['DUT1']} \| tap_int1 \| ${{'host-interface-name':'tap1',\ -| | ... | 'mac':'08:00:27:60:26:ab', 'id':3}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | Create TAP interface | ${node} | ${interface} -| | ... | &{settings} - -| Honeycomb configures TAP interface -| | [Documentation] | Uses Honeycomb API to configure an existing TAP interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for TAP. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb configures TAP interface \ -| | ... | \| ${nodes['DUT1']} \| tap_int1 \| ${{'host-interface-name':'tap1',\ -| | ... | 'mac':'08:00:27:60:26:ab', 'id':3}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | Configure interface TAP | ${node} | ${interface} -| | ... | &{settings} - -| Honeycomb removes TAP interface -| | [Documentation] | Uses Honeycomb API to remove a TAP interface. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes TAP interface \ -| | ... | \| ${nodes['DUT1']} \| tap_int1 \| -| | [Arguments] | ${node} | ${interface} -| | Delete interface | ${node} | ${interface} - -| TAP Operational Data From Honeycomb Should Be -| | [Documentation] | Retrieves interface TAP configuration through Honeycomb\ -| | ... | and compares with settings supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for TAP. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| TAP Operational Data From Honeycomb Should Be \ -| | ... | \| ${nodes['DUT1']} \| tap_int1 \| ${{'host-interface-name':'tap1',\ -| | ... | 'mac':'08:00:27:60:26:ab', 'id':3}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${api_tap}= | Set Variable | ${api_data['v3po:tap-v2']} -| | Should be equal | ${api_tap['device-name']} | ${settings['device-name']} -| | ${api_mac}= | Set Variable | ${api_data['phys-address']} -| | Should be equal | ${api_mac} | ${settings['mac']} - -| TAP Operational Data From VAT Should Be -| | [Documentation] | Retrieves interface TAP configuration through VAT and\ -| | ... | compares with settings supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - settings - Configuration data for TAP. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| TAP Operational Data From Honeycomb Should Be \ -| | ... | \| ${nodes['DUT1']} \| ${{'host-interface-name':'tap1',\ -| | ... | 'mac':'08:00:27:60:26:ab', 'id':3}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | ${vat_data}= | TAP Dump | ${node} | ${interface} -| | Should be equal | ${vat_data['dev_name']} | ${settings['dev_name']} -| | Should be equal | ${vat_data['rx_ring_sz']} | ${settings['rx_ring_sz']} -| | Should be equal | ${vat_data['tx_ring_sz']} | ${settings['tx_ring_sz']} -# other settings not accessible through VAT commands - -| TAP Operational Data From Honeycomb Should Be empty -| | [Documentation] | Attempts to retrieve interface TAP configuration\ -| | ... | through Honeycomb and expects to recieve an empty dictionary. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| TAP Operational Data From Honeycomb Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| tap_int1 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Run keyword and expect error | *KeyError: 'v3po:tap-v2' | Set Variable -| | ... | ${api_data['v3po:tap-v2']} - -| TAP Operational Data From VAT Should Be empty -| | [Documentation] | Attempts to retrieve interface TAP configuration\ -| | ... | through VAT and expects a "no data" error. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| TAP Operational Data From VAT Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| tap_int1 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ${data}= | TAP Dump | ${node} | ${interface} -| | Should be empty | ${data} diff --git a/resources/libraries/robot/honeycomb/vhost_user.robot b/resources/libraries/robot/honeycomb/vhost_user.robot deleted file mode 100644 index d60917703f..0000000000 --- a/resources/libraries/robot/honeycomb/vhost_user.robot +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| Documentation | Keywords used to manipulate vhost-user unterfaces. - -*** Keywords *** -| Honeycomb creates vhost-user interface -| | [Documentation] | Create a vhost-user interface using Honeycomb API. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for vhost-user interface.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb creates vhost-user interface\ -| | ... | \| ${nodes['DUT1']} \| vhost_test \| ${vhost_user_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | Create vhost user interface | ${node} | ${interface} -| | ... | &{settings} - -| Honeycomb removes vhost-user interface -| | [Documentation] | Remove a vhost-user interface using Honeycomb API. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb removes vhost-user interface\ -| | ... | \| ${nodes['DUT1']} \| vhost_test \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | Delete interface | ${node} | ${interface} - -| Honeycomb configures vhost-user interface -| | [Documentation] | Configure a vhost-user interface using Honeycomb API. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for vhost-user interface.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb configures vhost-user interface\ -| | ... | \| ${nodes['DUT1']} \| vhost_test \| ${new_vhost_user_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | Configure interface vhost user | ${node} | ${interface} -| | ... | &{settings} - -| Vhost-user Operational Data From Honeycomb Should Be -| | [Documentation] | Retrieves interface vhost-user configuration through\ -| | ... | Honeycomb and compares it with settings supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for vhost-user interface.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Vhost-user Operational Data From Honeycomb Should Be\ -| | ... | \| ${nodes['DUT1']} \| vhost_test \| ${vhost_user_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${api_vhost}= | Set Variable | ${api_data['v3po:vhost-user']} -| | :FOR | ${key} | IN | @{settings.keys()} -| | | Should be equal | ${api_vhost['${key}']} | ${settings['${key}']} - -| Vhost-user Operational Data From VAT Should Be -| | [Documentation] | Retrieves interface vhost-user configuration through VAT\ -| | ... | and compares it with settings supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - settings - Configuration data for vhost-user interface.\ -| | ... | Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Vhost-user Operational Data From VAT Should Be\ -| | ... | \| ${nodes['DUT1']} \| vhost_test \| -| | ... -| | ... | *Note:* -| | ... | Due to the difficulty of identifying newly created interfaces by name\ -| | ... | or by sw_index, this keyword assumes there is only one vhost-user\ -| | ... | interface present on the specified node. -| | ... -| | [Arguments] | ${node} | ${settings} -| | &{translate}= | Create dictionary | server=1 | client=0 -| | ${vat_data}= | vhost user Dump | ${node} -| | ${vat_data}= | Set Variable | ${vat_data[0]} -| | Should be equal | ${vat_data['sock_filename']} | ${settings['socket']} -| | should be equal as strings | ${vat_data['is_server']} -| | ... | ${translate['${settings['role']}']} - -| Vhost-user Operational Data From Honeycomb Should Be empty -| | [Documentation] | Attempts to retrieve interface vhost-user configuration\ -| | ... | through Honeycomb and expects to recieve an empty dictionary. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... | \| Vhost-user Operational Data From Honeycomb Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| vhost_test \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Run keyword and expect error | *KeyError: 'v3po:vhost-user' -| | ... | Should be empty | ${api_data['v3po:vhost-user']} - -| Vhost-user Operational Data From VAT Should Be empty -| | [Documentation] | Attempts to retrieve interface vhost-user configuration\ -| | ... | through VAT and expects a "no data" error. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Vhost-user Operational Data From VAT Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ${data}= | vhost user Dump | ${node} -| | Should be empty | ${data} - -| Honeycomb fails setting vhost-user on different interface type -| | [Documentation] | Attempts to set vhost-user settings on an ethernet\ -| | ... | type interface and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for vhost-user. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails setting vhost-user on different interface type\ -| | ... | \| ${nodes['DUT1']} \| ${interface} \| ${vhost_user_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | Run Keyword And Expect Error | HoneycombError: * Status code: 500. -| | ... | Configure interface vhost user | ${node} | ${interface} -| | ... | &{settings} - -| Honeycomb fails setting invalid vhost-user configuration -| | [Documentation] | Attempts to create a vhost-user interface with invalid\ -| | ... | configuration and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings_list - Bad configuration data for vhost-user. Type: list -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails setting invalid vhost-user configuration\ -| | ... | \| ${nodes['DUT1']} \| vhost_test \| ${vhost_user_settings} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | Run Keyword And Expect Error | HoneycombError: * Status code: 400. -| | ... | Configure interface vhost user | ${node} | ${interface} -| | ... | &{settings} diff --git a/resources/libraries/robot/honeycomb/vxlan.robot b/resources/libraries/robot/honeycomb/vxlan.robot deleted file mode 100644 index 951a0d109c..0000000000 --- a/resources/libraries/robot/honeycomb/vxlan.robot +++ /dev/null @@ -1,171 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords - -*** Keywords *** -| Honeycomb sets interface VxLAN configuration -| | [Documentation] | Uses Honeycomb API to configure a VxLAN tunnel. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for VxLAN. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb sets interface VxLAN configuration \ -| | ... | \|${nodes['DUT1']} \| vxlan_01 \| ${{'src':'192.168.0.2',\ -| | ... | 'dst':'192.168.0.3', 'vni':5, 'encap-vrf-id':0}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | Honeycomb Create VxLAN interface | ${node} | ${interface} -| | ... | &{settings} - -| Honeycomb removes VxLAN tunnel settings -| | [Documentation] | Uses Honeycomb API to disable a VxLAN tunnel and remove\ -| | ... | it from configuration data. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes VxLAN tunnel \| ${nodes['DUT1']} \| vxlan_01 \| -| | [Arguments] | ${node} | ${interface} -| | Delete interface | ${node} | ${interface} - -| VxLAN Operational Data From Honeycomb Should Be -| | [Documentation] | Retrieves interface VxLAN configuration through Honeycomb\ -| | ... | and compares with settings supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for VxLAN. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| VxLAN Operational Data From Honeycomb Should Be \ -| | ... | \|${nodes['DUT1']} \| vxlan_01 \| ${{'src':'192.168.0.2',\ -| | ... | 'dst':'192.168.0.3', 'vni':5, 'encap-vrf-id':0}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${api_vxlan}= | Set Variable | ${api_data['v3po:vxlan']} -| | :FOR | ${key} | IN | @{settings.keys()} -| | | Should be equal | ${api_vxlan['${key}']} | ${settings['${key}']} - -| VxLAN Operational Data From VAT Should Be -| | [Documentation] | Retrieves interface VxLAN configuration through VAT and\ -| | ... | compares with settings supplied in argument. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - settings - Configuration data for VxLAN. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| VxLAN Operational Data From Honeycomb Should Be \ -| | ... | \|${nodes['DUT1']} \| ${{'src':'192.168.0.2',\ -| | ... | 'dst':'192.168.0.3', 'vni':5, 'encap-vrf-id':0}} \| -| | ... -| | ... | *Note:* -| | ... | Due to the difficulty of identifying newly created interfaces by name\ -| | ... | or by sw_index, this keyword assumes there is only one VxLAN tunnel\ -| | ... | present on the specified node. -| | [Arguments] | ${node} | ${settings} -| | ${vat_data}= | VxLAN Dump | ${node} -| | ${vat_data}= | Set Variable | ${vat_data[0]} -| | Should be equal | ${vat_data['dst_address']} | ${settings['dst']} -| | Should be equal | ${vat_data['src_address']} | ${settings['src']} -| | Should be equal | ${vat_data['vni']} | ${settings['vni']} -| | Should be equal -| | ... | ${vat_data['encap_vrf_id']} | ${settings['encap-vrf-id']} - -| VxLAN Operational Data From Honeycomb Should Be empty -| | [Documentation] | Attempts to retrieve interface VxLAN configuration\ -| | ... | through Honeycomb and expects to recieve an empty dictionary. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| VxLAN Operational Data From Honeycomb Should Be empty\ -| | ... | \|${nodes['DUT1']} \| vxlan_01 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Run keyword and expect error | *KeyError: 'v3po:vxlan' | Set Variable -| | ... | ${api_data['v3po:vxlan']} - -| VxLAN Operational Data From VAT Should Be empty -| | [Documentation] | Attempts to retrieve interface VxLAN configuration\ -| | ... | through VAT and expects a "no data" error. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| VxLAN Operational Data From VAT Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ${data}= | VxLAN Dump | ${node} -| | Should be empty | ${data} - -| Honeycomb fails setting VxLan on different interface type -| | [Documentation] | Attempts to set VxLAN settings on an ethernet\ -| | ... | type interface and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings - Configuration data for VxLAN. Type: dictionary -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb fails setting VxLan on different interface type\ -| | ... | \|${nodes['DUT1']} \| GigabitEthernet0/9/0 \| ${{'src':'192.168.0.2',\ -| | ... | 'dst':'192.168.0.3', 'vni':5, 'encap-vrf-id':0}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings} -| | Run Keyword And Expect Error | HoneycombError: * Status code: 500. -| | ... | Honeycomb Configure interface vxlan -| | ... | ${node} | ${interface} | &{settings} - -| Honeycomb fails setting invalid VxLAN configuration -| | [Documentation] | Attempts to create a VxLAN interface with invalid\ -| | ... | configuration and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface on the specified node. Type: string -| | ... | - settings_list - Bad configuration data for VxLAN. Type: list -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb fails setting invalid VxLAN configuration\ -| | ... | \|${nodes['DUT1']} \| vxlan_01 \| ${{'src':'abcd', 'vni':-3}} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${settings_list} -| | :FOR | ${settings} | IN | @{settings_list} -| | | Run Keyword And Expect Error | HoneycombError: * Status code: 500. -| | | ... | Honeycomb Create VxLAN interface -| | | ... | ${node} | ${interface} | &{settings} diff --git a/resources/libraries/robot/honeycomb/vxlan_gpe.robot b/resources/libraries/robot/honeycomb/vxlan_gpe.robot deleted file mode 100644 index 20ca7f5f1a..0000000000 --- a/resources/libraries/robot/honeycomb/vxlan_gpe.robot +++ /dev/null @@ -1,208 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.InterfaceUtil -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords - -*** Variables *** -# Translation table used to convert values received from Honeycomb to values -# received from VAT. -| &{protocols}= -| ... | -=0 -| ... | ipv4=1 -| ... | ipv6=2 -| ... | ethernet=3 -| ... | nsh=4 - -*** Keywords *** -| Honeycomb creates VxLAN GPE interface -| | [Documentation] | Uses Honeycomb API to configure a VxLAN tunnel. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface to be created. Type: string -| | ... | - base_settings - configuration data common for all interfaces.\ -| | ... | Type: dictionary -| | ... | - vxlan_gpe_settings - VxLAN GPE specific parameters. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb creates VxLAN GPE interface \ -| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| ${base_params} \ -| | ... | \| ${vxlan_gpe_params} \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ... | ${base_settings} | ${vxlan_gpe_settings} -| | ... -| | Create VxLAN GPE interface -| | ... | ${node} | ${interface} | &{base_settings} | &{vxlan_gpe_settings} - -| Honeycomb removes VxLAN GPE interface -| | [Documentation] | Uses Honeycomb API to remove VxLAN GPE interface from\ -| | ... | node. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of the interface to be removed. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| Honeycomb removes VxLAN GPE interface \ -| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ... -| | Delete interface | ${node} | ${interface} - -| VxLAN GPE Operational Data From Honeycomb Should Be -| | [Documentation] | Uses Honeycomb API to get operational data about the\ -| | ... | given interface and compares them to the values provided as arguments. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface to be checked. Type: string -| | ... | - base_settings - configuration data common for all interfaces.\ -| | ... | Type: dictionary -| | ... | - vxlan_gpe_settings - VxLAN GPE specific parameters. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| VxLAN GPE Operational Data From Honeycomb Should Be \ -| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| ${base_params} \ -| | ... | \| ${vxlan_gpe_params} \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ... | ${base_settings} | ${vxlan_gpe_settings} -| | ... -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Should be equal as strings -| | ... | ${api_data['name']} | ${base_settings['name']} -| | Should be equal as strings -| | ... | ${api_data['type']} | v3po:vxlan-gpe-tunnel -| | Run keyword if | $base_settings['enabled'] == True -| | ... | Run keywords -| | ... | Should be equal as strings | ${api_data['admin-status']} | up -| | ... | AND -| | ... | Should be equal as strings | ${api_data['oper-status']} | up -| | ... | ELSE -| | ... | Run keywords -| | ... | Should be equal as strings | ${api_data['admin-status']} | down -| | ... | AND -| | ... | Should be equal as strings | ${api_data['oper-status']} | down - -| VxLAN GPE Operational Data From VAT Should Be -| | [Documentation] | Uses VAT to get operational data about the given\ -| | ... | interface and compares them to the values provided as arguments. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface to be checked. Type: string -| | ... | - vxlan_gpe_settings - VxLAN GPE specific parameters. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| VxLAN GPE Operational Data From VAT Should Be \ -| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| ${vxlan_gpe_params} \| -| | ... -| | [Arguments] | ${node} | ${interface} | ${vxlan_gpe_params} -| | ... -| | ${if1}= | Vpp Get Interface Sw Index | ${node} | ${interface} -| | ${vat_data}= | VxLAN GPE Dump | ${node} | ${if1} -| | Should be equal as strings -| | ... | ${vat_data['local']} | ${vxlan_gpe_params['local']} -| | Should be equal as strings -| | ... | ${vat_data['remote']} | ${vxlan_gpe_params['remote']} -| | Should be equal as strings -| | ... | ${vat_data['vni']} | ${vxlan_gpe_params['vni']} -| | Should be equal as strings -| | ... | ${vat_data['encap_vrf_id']} | ${vxlan_gpe_params['encap-vrf-id']} -| | Should be equal as strings -| | ... | ${vat_data['decap_vrf_id']} | ${vxlan_gpe_params['decap-vrf-id']} -| | Should be equal as strings | ${vat_data['protocol']} -| | ... | ${protocols['${vxlan_gpe_params['next-protocol']}']} - -| VxLAN GPE Interface indices from Honeycomb and VAT should correspond -| | [Documentation] | Uses VAT and Honeycomb to get operational data about the \ -| | ... | given VxLAN GPE interface and compares the interface indexes. The \ -| | ... | VxLAN GPE interface index from Honeycomb should be greater than \ -| | ... | index from VAT by one. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of the interface to be checked. Type: string -| | ... -| | ... | *Example:* -| | ... -| | ... | \| VxLAN GPE Interface indices from Honeycomb and VAT should \ -| | ... | correspond \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ... -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | ${if1}= | Vpp Get Interface Sw Index | ${node} | ${interface} -| | ${vat_data}= | VxLAN GPE Dump | ${node} | ${if1} -| | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1 -| | Should be equal as strings -| | ... | ${api_data['if-index']} | ${sw_if_index} - -| VxLAN GPE Operational Data From Honeycomb Should Be empty -| | [Documentation] | Uses Honeycomb API to get operational data about\ -| | ... | the given interface and expects to fail. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| VxLAN GPE Operational Data From Honeycomb Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ... -| | ${api_data}= | Get interface oper data | ${node} | ${interface} -| | Should be empty | ${api_data} - -| VxLAN GPE Operational Data From VAT Should Be empty -| | [Documentation] | Uses VAT to get operational data about the given\ -| | ... | interface and expects an empty dictionary. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| VxLAN GPE Operational Data From VAT Should Be empty\ -| | ... | \| ${nodes['DUT1']} \| -| | ... -| | [Arguments] | ${node} -| | ${data}= | VxLAN Dump | ${node} -| | Should be empty | ${data} - -| Honeycomb fails to create VxLAN GPE interface -| | [Documentation] | Uses Honeycomb API to configure a VxLAN tunnel with wrong\ -| | ... | configuration data. -| | ... -| | ... | *Arguments:* -| | ... | - node - information about a DUT node. Type: dictionary -| | ... | - interface - name of an interface to be created. Type: string -| | ... | - base_settings - Configuration data common for all interfaces.\ -| | ... | Type: dictionary -| | ... | - vxlan_gpe_settings - VxLAN GPE specific parameters. Type: dictionary -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb fails to create VxLAN GPE interface \ -| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| ${wrong_base_params} \ -| | ... | \| ${vxlan_gpe_params} \| -| | ... -| | [Arguments] | ${node} | ${interface} -| | ... | ${base_settings} | ${vxlan_gpe_settings} -| | ... -| | Run keyword and expect error | *HoneycombError*not successful. * code: *00. -| | ... | Create VxLAN GPE interface -| | ... | ${node} | ${interface} | &{base_settings} | &{vxlan_gpe_settings} diff --git a/resources/templates/honeycomb/config_bgp_peer.url b/resources/templates/honeycomb/config_bgp_peer.url deleted file mode 100644 index b5f0666f07..0000000000 --- a/resources/templates/honeycomb/config_bgp_peer.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/openconfig-network-instance:network-instances/network-instance/global-bgp/openconfig-network-instance:protocols/protocol/openconfig-policy-types:BGP/hc-bgp-instance/bgp/
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_bgp_route.url b/resources/templates/honeycomb/config_bgp_route.url deleted file mode 100644 index 71d7f0a250..0000000000 --- a/resources/templates/honeycomb/config_bgp_route.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/bgp-rib:application-rib/
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_bridge_domain.url b/resources/templates/honeycomb/config_bridge_domain.url deleted file mode 100644 index cd8b14498e..0000000000 --- a/resources/templates/honeycomb/config_bridge_domain.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/v3po:bridge-domains
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_classify_table.url b/resources/templates/honeycomb/config_classify_table.url deleted file mode 100644 index 042055f335..0000000000 --- a/resources/templates/honeycomb/config_classify_table.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/vpp-classifier:vpp-classifier
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_dhcp_relay.url b/resources/templates/honeycomb/config_dhcp_relay.url deleted file mode 100644 index 81ab02e46d..0000000000 --- a/resources/templates/honeycomb/config_dhcp_relay.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/dhcp:dhcp/relays
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_fib_table.url b/resources/templates/honeycomb/config_fib_table.url deleted file mode 100644 index 5b9175fda0..0000000000 --- a/resources/templates/honeycomb/config_fib_table.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/vpp-fib-table-management:fib-table-management/vpp-fib-table-management:fib-tables
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_lisp.url b/resources/templates/honeycomb/config_lisp.url deleted file mode 100644 index 16652af8c6..0000000000 --- a/resources/templates/honeycomb/config_lisp.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/lisp:lisp
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_lisp_gpe.url b/resources/templates/honeycomb/config_lisp_gpe.url deleted file mode 100644 index 41b1ce9d85..0000000000 --- a/resources/templates/honeycomb/config_lisp_gpe.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/gpe:gpe
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_nat.url b/resources/templates/honeycomb/config_nat.url deleted file mode 100644 index 6c29a8846b..0000000000 --- a/resources/templates/honeycomb/config_nat.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/ietf-nat:nat
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_network_topology.url b/resources/templates/honeycomb/config_network_topology.url deleted file mode 100644 index 4232361f54..0000000000 --- a/resources/templates/honeycomb/config_network_topology.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/network-topology:network-topology
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_nsh.url b/resources/templates/honeycomb/config_nsh.url deleted file mode 100644 index 647c46120b..0000000000 --- a/resources/templates/honeycomb/config_nsh.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/vpp-nsh:vpp-nsh
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_plugin_acl.url b/resources/templates/honeycomb/config_plugin_acl.url deleted file mode 100644 index 739faed2be..0000000000 --- a/resources/templates/honeycomb/config_plugin_acl.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/ietf-access-control-list:acls
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_policer.url b/resources/templates/honeycomb/config_policer.url deleted file mode 100644 index ed840e1d0b..0000000000 --- a/resources/templates/honeycomb/config_policer.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/policer:policers/policer
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_proxyarp_ranges.url b/resources/templates/honeycomb/config_proxyarp_ranges.url deleted file mode 100644 index 2ac0b6528c..0000000000 --- a/resources/templates/honeycomb/config_proxyarp_ranges.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/proxy-arp:proxy-ranges
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_routing_table.url b/resources/templates/honeycomb/config_routing_table.url deleted file mode 100644 index 2e484d9cfd..0000000000 --- a/resources/templates/honeycomb/config_routing_table.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/hc2vpp-ietf-routing:routing/control-plane-protocols
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_slaac.url b/resources/templates/honeycomb/config_slaac.url deleted file mode 100644 index d74c35ec3c..0000000000 --- a/resources/templates/honeycomb/config_slaac.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/ietf-interfaces:interfaces/
\ No newline at end of file diff --git a/resources/templates/honeycomb/config_vpp_interfaces.url b/resources/templates/honeycomb/config_vpp_interfaces.url deleted file mode 100644 index 03ddc4f88b..0000000000 --- a/resources/templates/honeycomb/config_vpp_interfaces.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config{odl_url_part}/ietf-interfaces:interfaces
\ No newline at end of file diff --git a/resources/templates/honeycomb/odl_client/mount_honeycomb.json b/resources/templates/honeycomb/odl_client/mount_honeycomb.json deleted file mode 100644 index 6041e53c20..0000000000 --- a/resources/templates/honeycomb/odl_client/mount_honeycomb.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "node": { - "node-id": "vpp", - "netconf-node-topology:host": "127.0.0.1", - "netconf-node-topology:port": "2831", - "netconf-node-topology:username": "admin", - "netconf-node-topology:password": "admin", - "netconf-node-topology:tcp-only": "false", - "netconf-node-topology:keepalive-delay": "0" - } -}
\ No newline at end of file diff --git a/resources/templates/honeycomb/odl_client/odl_netconf_connector.url b/resources/templates/honeycomb/odl_client/odl_netconf_connector.url deleted file mode 100644 index e76f47ce8c..0000000000 --- a/resources/templates/honeycomb/odl_client/odl_netconf_connector.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/config/network-topology:network-topology/topology/topology-netconf
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_bgp.url b/resources/templates/honeycomb/oper_bgp.url deleted file mode 100644 index c2f90863c4..0000000000 --- a/resources/templates/honeycomb/oper_bgp.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/bgp-rib:bgp-rib/rib/hc-bgp-instance/
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_bridge_domains.url b/resources/templates/honeycomb/oper_bridge_domains.url deleted file mode 100644 index d26d4a658c..0000000000 --- a/resources/templates/honeycomb/oper_bridge_domains.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/v3po:bridge-domains-state
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_classify_table.url b/resources/templates/honeycomb/oper_classify_table.url deleted file mode 100644 index a7a0c7e3fd..0000000000 --- a/resources/templates/honeycomb/oper_classify_table.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/vpp-classifier:vpp-classifier-state
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_disabled_interfaces.url b/resources/templates/honeycomb/oper_disabled_interfaces.url deleted file mode 100644 index 276830d7a7..0000000000 --- a/resources/templates/honeycomb/oper_disabled_interfaces.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/v3po-context:disabled-interfaces
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_fib_table.url b/resources/templates/honeycomb/oper_fib_table.url deleted file mode 100644 index 19760c9fc3..0000000000 --- a/resources/templates/honeycomb/oper_fib_table.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/vpp-fib-table-management:fib-table-management/vpp-fib-table-management:fib-tables
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_lisp.url b/resources/templates/honeycomb/oper_lisp.url deleted file mode 100644 index 95d19c05a8..0000000000 --- a/resources/templates/honeycomb/oper_lisp.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/lisp:lisp-state
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_lisp_gpe.url b/resources/templates/honeycomb/oper_lisp_gpe.url deleted file mode 100644 index 5af4dbabbd..0000000000 --- a/resources/templates/honeycomb/oper_lisp_gpe.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/gpe:gpe-state
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_nat.url b/resources/templates/honeycomb/oper_nat.url deleted file mode 100644 index 672fc739a3..0000000000 --- a/resources/templates/honeycomb/oper_nat.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/ietf-nat:nat
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_network_topology.url b/resources/templates/honeycomb/oper_network_topology.url deleted file mode 100644 index 14e74ee3c7..0000000000 --- a/resources/templates/honeycomb/oper_network_topology.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/network-topology:network-topology
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_nsh.url b/resources/templates/honeycomb/oper_nsh.url deleted file mode 100644 index 1b511b3a5a..0000000000 --- a/resources/templates/honeycomb/oper_nsh.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/vpp-nsh:vpp-nsh-state
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_policer.url b/resources/templates/honeycomb/oper_policer.url deleted file mode 100644 index fe42bc1966..0000000000 --- a/resources/templates/honeycomb/oper_policer.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/policer:policers-state/policer
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_routing_table.url b/resources/templates/honeycomb/oper_routing_table.url deleted file mode 100644 index 1206301186..0000000000 --- a/resources/templates/honeycomb/oper_routing_table.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/hc2vpp-ietf-routing:routing/control-plane-protocols
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_vpp_interfaces.url b/resources/templates/honeycomb/oper_vpp_interfaces.url deleted file mode 100644 index 7f1a3d6c85..0000000000 --- a/resources/templates/honeycomb/oper_vpp_interfaces.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/ietf-interfaces:interfaces
\ No newline at end of file diff --git a/resources/templates/honeycomb/oper_vpp_version.url b/resources/templates/honeycomb/oper_vpp_version.url deleted file mode 100644 index 9ae73913f3..0000000000 --- a/resources/templates/honeycomb/oper_vpp_version.url +++ /dev/null @@ -1 +0,0 @@ -/restconf/operational{odl_url_part}/vpp-management:vpp-state/version
\ No newline at end of file diff --git a/resources/test_data/honeycomb/acl.py b/resources/test_data/honeycomb/acl.py deleted file mode 100644 index 806e0143c6..0000000000 --- a/resources/test_data/honeycomb/acl.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for access control list test suite.""" - -# settings for acl tables -hc_acl_table = { - "name": "acl_table_test", - "nbuckets": 1, - "memory_size": 1048576, - "skip_n_vectors": 0, - "miss_next": "permit", - "mask": "00:00:00:00:00:00:ff:ff:ff:ff:ff:ff:00:00:00:00" -} - -hc_acl_table2 = { - "name": "acl_table_test2", - "nbuckets": 2, - "memory_size": 1048576, - "skip_n_vectors": 1, - "next_table": "acl_table_test", - "miss_next": "deny", - "mask": "ff:ff:ff:00:00:00:ff:ff:ff:ff:ff:ff:00:00:00:00" -} - -#TODO: remove once memory_size is visible in oper data(HC2VPP-10) -hc_acl_table_oper = { - "name": "acl_table_test", - "nbuckets": 1, - "skip_n_vectors": 0, - "miss_next": "permit", - "mask": "00:00:00:00:00:00:ff:ff:ff:ff:ff:ff:00:00:00:00" -} - -hc_acl_table2_oper = { - "name": "acl_table_test2", - "nbuckets": 2, - "skip_n_vectors": 1, - "next_table": "acl_table_test", - "miss_next": "deny", - "mask": "ff:ff:ff:00:00:00:ff:ff:ff:ff:ff:ff:00:00:00:00" -} - -# representation of table settings in VAT -table_index = 0 -vat_acl_table = { - "nbuckets": hc_acl_table['nbuckets'], - "skip": 0, - "match": 1, - "nextnode": -1, - "nexttbl": -1, - "mask": hc_acl_table['mask'].replace(":", ""), -} -table_index2 = 1 -vat_acl_table2 = { - "nbuckets": hc_acl_table2['nbuckets'], - "skip": 1, - "match": 1, - "nextnode": 0, - "nexttbl": table_index, - "mask": hc_acl_table2['mask'].replace(":", ""), -} -# setting for acl sessions -hc_acl_session = { - "match": "00:00:00:00:00:00:01:02:03:04:05:06:00:00:00:00", - "hit_next": "permit", - "opaque_index": 1, - "advance": 1 -} - -hc_acl_session2 = { - "match": "00:00:00:00:00:00:06:05:04:03:02:01:00:00:00:00", - "hit_next": "deny", - "opaque_index": 2, - "advance": 1 -} -# representation of session settings in VAT -session_index = 0 -vat_acl_session = { - "match": hc_acl_session['match'].replace(":", ""), - "advance": hc_acl_session['advance'], - "opaque": 1, - "next_index": -1 -} -session_index2 = 1 -vat_acl_session2 = { - "match": hc_acl_session2['match'].replace(":", ""), - "advance": hc_acl_session2['advance'], - "opaque": 2, - "next_index": session_index -} diff --git a/resources/test_data/honeycomb/bgp.py b/resources/test_data/honeycomb/bgp.py deleted file mode 100644 index f514d83289..0000000000 --- a/resources/test_data/honeycomb/bgp.py +++ /dev/null @@ -1,438 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -from copy import deepcopy - -"""Test variables for BGP test suite.""" - -# Internal BGP peers for CRUD tests -address_internal = "192.168.0.2" -address_internal2 = "192.168.0.3" -holdtime_internal = 60 -peer_internal = { - "bgp-openconfig-extensions:neighbor": [{ - "neighbor-address": address_internal, - "config": { - "peer-type": "INTERNAL" - }, - "timers": { - "config": { - "connect-retry": 3, - "hold-time": holdtime_internal - } - }, - "transport": { - "config": { - "remote-port": 179, - "passive-mode": False - } - }, - "afi-safis": { - "afi-safi": [{ - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" - }] - } - }] - } - -peer_internal_update = { - "bgp-openconfig-extensions:neighbor": [{ - "neighbor-address": address_internal, - "config": { - "peer-type": "INTERNAL" - }, - "timers": { - "config": { - "connect-retry": 5, - "hold-time": holdtime_internal*2 - } - }, - "transport": { - "config": { - "remote-port": 180, - "passive-mode": True - } - }, - "afi-safis": { - "afi-safi": [{ - "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST" - }] - } - }] - } - -peer_internal2 = deepcopy(peer_internal) -peer_internal2["bgp-openconfig-extensions:neighbor"][0]["neighbor-address"] = \ - address_internal2 - -# Application BGP peer for CRUD test -address_application = "192.168.0.4" -peer_application = { - "bgp-openconfig-extensions:neighbor": [{ - "neighbor-address": address_application, - "config": { - "peer-group": "application-peers" - }, - "afi-safis": { - "afi-safi": [ - { - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" - }, - { - "afi-safi-name": - "openconfig-bgp-types:IPV4-LABELLED-UNICAST" - }] - } - }] - } - -# IPv4 route for CRUD test -route_address_ipv4 = "192.168.0.5/32" -route_id_ipv4 = 0 -route_data_ipv4 = { - "bgp-inet:ipv4-route": [{ - "route-key": route_address_ipv4, - "path-id": route_id_ipv4, - "prefix": route_address_ipv4, - "attributes": { - "as-path": {}, - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv4-next-hop": { - "global": "192.168.1.1" - } - } - }] -} - -route_data_ipv4_oper = { - "bgp-inet:ipv4-route": [{ - "route-key": route_address_ipv4, - "path-id": route_id_ipv4, - "prefix": route_address_ipv4, - "attributes": { - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv4-next-hop": { - "global": "192.168.1.1" - } - } - }] -} - -# IPv4 route for testing Update operation -route_data_ipv4_update = { - "bgp-inet:ipv4-route": [{ - "route-key": route_address_ipv4, - "path-id": route_id_ipv4, - "prefix": route_address_ipv4, - "attributes": { - "as-path": {}, - "origin": { - "value": "egp" - }, - "local-pref": { - "pref": 200 - }, - "ipv4-next-hop": { - "global": "192.168.1.2" - } - } - }] -} -route_data_ipv4_update_oper = { - "bgp-inet:ipv4-route": [{ - "route-key": route_address_ipv4, - "path-id": route_id_ipv4, - "prefix": route_address_ipv4, - "attributes": { - "origin": { - "value": "egp" - }, - "local-pref": { - "pref": 200 - }, - "ipv4-next-hop": { - "global": "192.168.1.2" - } - } - }] -} - -# IPv4 route for testing multiple routes -route_address_ipv4_2 = "192.168.0.6/32" -route_id_ipv4_2 = 1 -route_data_ipv4_2 = { - "bgp-inet:ipv4-route": [{ - "route-key": route_address_ipv4_2, - "path-id": route_id_ipv4_2, - "prefix": route_address_ipv4_2, - "attributes": { - "as-path": {}, - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv4-next-hop": { - "global": "192.168.1.2" - } - } - }] -} - -route_data_ipv4_2_oper = { - "bgp-inet:ipv4-route": [{ - "route-key": route_address_ipv4_2, - "path-id": route_id_ipv4_2, - "prefix": route_address_ipv4_2, - "attributes": { - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv4-next-hop": { - "global": "192.168.1.2" - } - } - }] -} - -# IPv6 route for CRUD test -route_address_ipv6 = "3ffe:62::1/64" -route_id_ipv6 = 0 -route_data_ipv6 = { - "bgp-inet:ipv6-route": [{ - "route-key": route_address_ipv6, - "path-id": route_id_ipv6, - "prefix": route_address_ipv6, - "attributes": { - "as-path": {}, - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv6-next-hop": { - "global": "3ffe:63::1" - } - } - }] -} - -# IPv4 route operational data in routing table -table1_oper = { - "destination-prefix": route_address_ipv4, - "next-hop": "192.168.1.1", - "vpp-ipv4-unicast-routing:vpp-ipv4-route": {} -} - -# Peer configurations for traffic test -dut1_peer = { - "bgp-openconfig-extensions:neighbor": [{ - "neighbor-address": "192.168.1.1", - "config": { - "peer-type": "INTERNAL" - }, - "timers": { - "config": { - "connect-retry": 3, - "hold-time": 60 - } - }, - "transport": { - "config": { - "remote-port": 179, - "passive-mode": False - } - }, - "afi-safis": { - "afi-safi": [ - { - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" - }, - { - "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST" - }, - { - "afi-safi-name": "LINKSTATE" - } - ] - } - }] -} - -dut2_peer = { - "bgp-openconfig-extensions:neighbor": [{ - "neighbor-address": "192.168.1.2", - "config": { - "peer-type": "INTERNAL" - }, - "timers": { - "config": { - "connect-retry": 3, - "hold-time": 60 - } - }, - "transport": { - "config": { - "remote-port": 179, - "passive-mode": True - } - }, - "afi-safis": { - "afi-safi": [ - { - "afi-safi-name": "openconfig-bgp-types:IPV4-UNICAST" - }, - { - "afi-safi-name": "openconfig-bgp-types:IPV6-UNICAST" - }, - { - "afi-safi-name": "LINKSTATE" - } - ] - } - }] -} - -# IPv4 route for traffic test -dut1_route_address = "192.168.0.5/32" -dut1_route_id = 0 -dut1_route = { - "bgp-inet:ipv4-route": [{ - "route-key": dut1_route_address, - "path-id": dut1_route_id, - "prefix": dut1_route_address, - "attributes": { - "as-path": {}, - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv4-next-hop": { - "global": "192.168.1.3" - } - } - }] -} - -dut1_route_oper = { - "bgp-inet:ipv4-route": [{ - "route-key": dut1_route_address, - "path-id": dut1_route_id, - "prefix": dut1_route_address, - "attributes": { - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv4-next-hop": { - "global": "192.168.1.3" - } - } - }] -} - -# IPv4 route in peer operational data -rib_operational = { - "loc-rib": {"tables": [ - { - "afi": "bgp-types:ipv4-address-family", - "safi": "bgp-types:unicast-subsequent-address-family", - "bgp-inet:ipv4-routes": { - "ipv4-route": dut1_route_oper["bgp-inet:ipv4-route"] - } - } - ]} -} - -route_operational = { - "next-hop": {"next-hop-address": "192.168.1.3"}, - "destination-prefix": dut1_route_address -} - -# IPv6 route for traffic test -dut1_route_ip6_prefix = "3ffe:62::/64" -dut1_route_ip6_id = 0 -dut1_route_ip6 = { - "bgp-inet:ipv6-route": [{ - "route-key": dut1_route_ip6_prefix, - "path-id": dut1_route_ip6_id, - "prefix": dut1_route_ip6_prefix, - "attributes": { - "as-path": {}, - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv6-next-hop": { - "global": "3ffe:63::1" - } - } - }] -} -dut1_route_ip6_oper = { - "bgp-inet:ipv6-route": [{ - "route-key": dut1_route_ip6_prefix, - "path-id": dut1_route_ip6_id, - "prefix": dut1_route_ip6_prefix, - "attributes": { - "origin": { - "value": "igp" - }, - "local-pref": { - "pref": 100 - }, - "ipv6-next-hop": { - "global": "3ffe:63::1" - } - } - }] -} - -# IPv6 route in peer operational data -rib_ip6_operational = { - "loc-rib": {"tables": [ - { - "afi": "bgp-types:ipv6-address-family", - "safi": "bgp-types:unicast-subsequent-address-family", - "bgp-inet:ipv6-routes": { - "ipv6-route": dut1_route_ip6_oper["bgp-inet:ipv6-route"] - } - } - ]} -} - -route_ip6_operational = { - "next-hop": {"next-hop-address": "3ffe:63::1"}, - "destination-prefix": dut1_route_ip6_prefix -} diff --git a/resources/test_data/honeycomb/dhcp_relay.py b/resources/test_data/honeycomb/dhcp_relay.py deleted file mode 100644 index 0d2427f40c..0000000000 --- a/resources/test_data/honeycomb/dhcp_relay.py +++ /dev/null @@ -1,122 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for DHCP relay test suite.""" - -# IPv4 addresses used in traffic tests -dut_to_tg_if1_ip = "172.16.0.1" -dut_to_tg_if2_ip = "192.168.0.1" -dhcp_server1_ip = "192.168.0.100" -dhcp_server2_ip = "192.168.0.101" -client_ip = "172.16.0.2" -prefix_length = 24 - -# IPv6 addresses used in traffic tests -dut_to_tg_if1_ip6 = "3ffe:62::1" -dut_to_tg_if2_ip6 = "3ffe:63::1" -dhcp_server_ip6 = "3ffe:63::2" -client_ip6 = "3ffe:62::2" -prefix_length_v6 = 64 - -# DHCP relay configuration -relay1 = { - "relay": [ - { - "address-family": "vpp-fib-table-management:ipv4", - "rx-vrf-id": 0, - "gateway-address": dut_to_tg_if1_ip, - "server": [ - { - "vrf-id": 0, - "address": dhcp_server1_ip - }, - ] - } - ] -} - -relay1_oper = { - "address-family": "vpp-fib-table-management:ipv4", - "rx-vrf-id": 0, - "gateway-address": dut_to_tg_if1_ip, - "server": [ - { - "vrf-id": 0, - "address": dhcp_server1_ip - } - ] -} - -relay2 = { - "relay": [ - { - "address-family": "vpp-fib-table-management:ipv4", - "rx-vrf-id": 0, - "gateway-address": dut_to_tg_if1_ip, - "server": [ - { - "vrf-id": 0, - "address": dhcp_server1_ip - }, - { - "vrf-id": 0, - "address": dhcp_server2_ip - }, - ] - } - ] -} - -relay2_oper = { - "address-family": "vpp-fib-table-management:ipv4", - "rx-vrf-id": 0, - "gateway-address": dut_to_tg_if1_ip, - "server": [ - { - "vrf-id": 0, - "address": dhcp_server1_ip - }, - { - "vrf-id": 0, - "address": dhcp_server2_ip - } - ] -} - -relay_v6 = { - "relay": [ - { - "address-family": "vpp-fib-table-management:ipv6", - "rx-vrf-id": 0, - "gateway-address": dut_to_tg_if1_ip6, - "server": [ - { - "vrf-id": 0, - "address": dhcp_server_ip6 - }, - ] - } - ] -} - -relay_v6_oper = { - "address-family": "vpp-fib-table-management:ipv6", - "rx-vrf-id": 0, - "gateway-address": dut_to_tg_if1_ip6, - "server": [ - { - "vrf-id": 0, - "address": dhcp_server_ip6 - } - ] -} diff --git a/resources/test_data/honeycomb/interface_ip.py b/resources/test_data/honeycomb/interface_ip.py deleted file mode 100644 index cc600755f0..0000000000 --- a/resources/test_data/honeycomb/interface_ip.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for Basic interface management and IP addresses.""" - -# Configuration which will be set and verified during tests. -ipv4_address = "192.168.0.2" -ipv4_address2 = "192.168.1.2" -ipv4_prefix = 24 -ipv4_mask = "255.255.255.0" -ipv4_neighbor = "192.168.0.4" -ipv4_neighbor2 = "192.168.1.4" -ipv4_settings = {"mtu": 9000} -ipv6_address = "10::10" -ipv6_address2 = "11::10" -ipv6_prefix = 64 -ipv6_mask = "ffff:ffff:ffff:ffff::" -ipv6_neighbor = "10::11" -ipv6_neighbor2 = "11::11" -neighbor_mac = "08:00:27:c0:5d:37" -neighbor_mac2 = "08:00:27:c0:5d:37" -ipv6_settings = {"enabled": True, "forwarding": True, "mtu": 9000, - "dup-addr-detect-transmits": 5} -ethernet = {"mtu": 9000} -routing = {"vrf-id": 27} diff --git a/resources/test_data/honeycomb/l2_fib.py b/resources/test_data/honeycomb/l2_fib.py deleted file mode 100644 index 70b1e74e13..0000000000 --- a/resources/test_data/honeycomb/l2_fib.py +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for Honeycomb L2 FIB test suite.""" - -from resources.libraries.python.topology import Topology - - -def get_variables(node, interface, interface2): - """Creates and returns dictionary of test variables. - - :param node: A Honeycomb node. - :param interface: Name of an interface on the specified node. - :param interface: Name of another interface on the specified node. - :type node: dict - :type interface: str - :type interface2: str - :return: Dictionary of test variables. - :rtype: dict - """ - # Interface sw_if_index - sw_if_index = Topology.get_interface_sw_index_by_name(node, interface) - sw_if_index2 = Topology.get_interface_sw_index_by_name(node, interface2) - - # Bridge domain name. - bd_name = 'test-l2-bd' - - # L2 FIB MACs used in configuration. - notstatic = "aa:bb:cc:dd:ee:ff" - static = "22:22:33:44:55:66" - filtered = "00:01:02:03:04:05" - - variables = { - 'bd_name': bd_name, - # Bridge domain settings used while creating a test bridge domain. - 'bd_settings': { - 'flood': True, - 'forward': True, - 'learn': False, - 'unknown-unicast-flood': True, - 'arp-termination': True - }, - - # Index of created bridge domain. - 'bd_index': 1, - - # Bridge domain configuration used while adding the bridge domain to an - # interface. - 'if_bd_settings': { - 'bridge-domain': bd_name, - 'split-horizon-group': 1, - 'bridged-virtual-interface': False - }, - - # Add L2 FIB entry (forward). - # Configuration data: - 'l2_fib_forward_cfg': { - "phys-address": notstatic, - "outgoing-interface": interface, - "action": "l2-fib-forward" - }, - - # Expected operational data: - 'l2_fib_forward_oper': { - "phys-address": notstatic, - "outgoing-interface": interface, - "bridged-virtual-interface": False, - "action": "v3po:l2-fib-forward", - "static-config": False - }, - - # Expected VAT data: - 'l2_fib_forward_vat': { - "mac": notstatic, - "sw_if_index": sw_if_index, - "static_mac": 0, - "filter_mac": 0, - "bvi_mac": 0 - }, - - # Add L2 FIB entry (static, forward). - # Configuration data: - 'l2_fib_static_forward_cfg': { - "phys-address": static, - "outgoing-interface": interface, - "static-config": True, - "action": "l2-fib-forward" - }, - - # Expected operational data: - 'l2_fib_static_forward_oper': { - "phys-address": static, - "outgoing-interface": interface, - "bridged-virtual-interface": False, - "action": "v3po:l2-fib-forward", - "static-config": True - }, - - # Expected VAT data: - 'l2_fib_static_forward_vat': { - "mac": static, - "sw_if_index": sw_if_index, - "static_mac": 1, - "filter_mac": 0, - "bvi_mac": 0 - }, - - # Add L2 FIB entry (filter). - # Configuration data: - 'l2_fib_filter_cfg': { - "phys-address": filtered, - "static-config": True, - "action": "l2-fib-filter" - }, - - # Expected operational data: - 'l2_fib_filter_oper': { - "phys-address": filtered, - "bridged-virtual-interface": False, - "action": "v3po:l2-fib-filter", - "static-config": True - }, - - # Expected VAT data: - 'l2_fib_filter_vat': { - "mac": filtered, - "static_mac": 1, - "filter_mac": 1, - "bvi_mac": 0 - }, - - # WRONG configuration data - Add L2 FIB entry. - 'l2_fib_forward_cfg_wrong_mac': { - "phys-address": "WRONG-MAC", - "outgoing-interface": interface, - "action": "l2-fib-forward" - }, - - 'l2_fib_forward_cfg_wrong_if': { - "phys-address": notstatic, - "outgoing-interface": "WRONG-INTERFACE", - "action": "l2-fib-forward" - }, - - 'l2_fib_forward_cfg_wrong_action': { - "phys-address": notstatic, - "outgoing-interface": interface, - "action": "WRONG-ACTION" - }, - - # Modify L2 FIB entry (forward). - # Configuration data: - 'l2_fib_forward_modified_cfg': { - "phys-address": notstatic, - "outgoing-interface": sw_if_index2, - "action": "l2-fib-forward" - } - } - return variables diff --git a/resources/test_data/honeycomb/lisp/lisp.py b/resources/test_data/honeycomb/lisp/lisp.py deleted file mode 100644 index f5ebb16f39..0000000000 --- a/resources/test_data/honeycomb/lisp/lisp.py +++ /dev/null @@ -1,341 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -"""Test variables for LISP test suite.""" - -from copy import deepcopy - -locator_set = "loc01" - -remote_bd_subtable = { - "virtual-network-identifier": 3, - "bridge-domain-subtable": { - "bridge-domain-ref": "bd_lisp", - "remote-mappings": { - "remote-mapping": [{ - "id": "remote_map_l2", - "eid": { - "virtual-network-id": 3, - "address-type": "ietf-lisp-address-types:mac-afi", - "mac": "aa:aa:aa:aa:aa:ab", - }, - "rlocs": { - "locator": [{ - "address": "192.168.0.3", - "priority": 1, - "weight": 1 - }] - }, - }] - }, - } -} - -remote_vrf_subtable = { - "virtual-network-identifier": 4, - "vrf-subtable": { - "table-id": 1, - "remote-mappings": { - "remote-mapping": [{ - "id": "remote_map_vrf", - "eid": { - "virtual-network-id": 4, - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "192.168.0.2" - }, - "rlocs": { - "locator": [{ - "address": "192.168.0.3", - "priority": 1, - "weight": 1 - }] - }, - - }] - }, - } -} - -local_bd_subtable = { - "virtual-network-identifier": 5, - "bridge-domain-subtable": { - "bridge-domain-ref": "bd2_lisp", - "local-mappings": { - "local-mapping": [{ - "id": "local_map_l2", - "eid": { - "address-type": "ietf-lisp-address-types:mac-afi", - "virtual-network-id": 5, - "mac": "ba:aa:aa:aa:aa:aa" - }, - "locator-set": locator_set - }] - }, - } -} - -local_vrf_subtable = { - "virtual-network-identifier": 6, - "vrf-subtable": { - "table-id": 2, - "local-mappings": { - "local-mapping": [{ - "id": "local_map_vrf", - "eid": { - "virtual-network-id": 6, - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "192.168.1.1" - }, - "locator-set": locator_set - }] - }, - } -} - -lisp_settings_enable = { - "lisp": { - "enable": True - } -} - -prepare_vrf_adjacency = { - "virtual-network-identifier": 7, - "vrf-subtable": { - "table-id": 3, - "local-mappings": { - "local-mapping": [{ - "id": "local_map_vrf", - "eid": { - "virtual-network-id": 7, - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "192.168.1.1" - }, - "locator-set": locator_set - }] - }, - "remote-mappings": { - "remote-mapping": [{ - "id": "remote_map_vrf", - "eid": { - "virtual-network-id": 7, - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "192.168.0.2" - }, - "rlocs": { - "locator": [{ - "address": "192.168.0.3", - "priority": 1, - "weight": 1 - }] - }, - - }] - }, - } -} - -vrf_adjacency = { - "adjacency": [{ - "id": "adj01", - "local-eid": { - "virtual-network-id": 7, - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "192.168.1.1" - }, - "remote-eid": { - "virtual-network-id": 7, - "address-type": "ietf-lisp-address-types:ipv4-afi", - "ipv4": "192.168.0.2" - }, - }] - } - -adj_subtable = deepcopy(prepare_vrf_adjacency) -adj_subtable["vrf-subtable"]["remote-mappings"]\ - ["remote-mapping"][0]["adjacencies"] = deepcopy(vrf_adjacency) - - -def create_settings_dict(subtable): - settings = { - "eid-table": { - "vni-table": [subtable] - } - } - - return settings - -lisp_settings_remote_bd = create_settings_dict(remote_bd_subtable) -lisp_settings_remote_vrf = create_settings_dict(remote_vrf_subtable) -lisp_settings_local_bd = create_settings_dict(local_bd_subtable) -lisp_settings_local_vrf = create_settings_dict(local_vrf_subtable) -lisp_settings_both_vrf = create_settings_dict(prepare_vrf_adjacency) - -vat_remote_bd = { - "is_local": 0, - "vni": remote_bd_subtable["virtual-network-identifier"], - "eid": remote_bd_subtable["bridge-domain-subtable"]["remote-mappings"][ - "remote-mapping"][0]["eid"]["mac"], -} - -vat_remote_vrf = { - "is_local": 0, - "vni": remote_vrf_subtable["virtual-network-identifier"], - "eid": remote_vrf_subtable["vrf-subtable"]["remote-mappings"][ - "remote-mapping"][0]["eid"]["ipv4"]+"/32", -} - -vat_local_bd = { - "is_local": 1, - "vni": local_bd_subtable["virtual-network-identifier"], - "eid": local_bd_subtable["bridge-domain-subtable"]["local-mappings"][ - "local-mapping"][0]["eid"]["mac"] -} - -vat_local_vrf = { - "is_local": 1, - "vni": local_vrf_subtable["virtual-network-identifier"], - "eid": local_vrf_subtable["vrf-subtable"]["local-mappings"][ - "local-mapping"][0]["eid"]["ipv4"]+"/32" -} - -# variables for traffic test -dut_to_tg_if1_ip4 = "192.168.0.1" -dut_to_tg_if2_ip4 = "192.168.1.1" -tg_to_dut_if2_ip4 = "192.168.1.2" -src_ip4 = "192.168.0.2" -dst_ip4 = "192.168.2.2" -prefix_len4 = 24 - -local_eid4 = "192.168.0.0/24" -remote_eid4 = "192.168.2.0/24" -src_rloc4 = dut_to_tg_if2_ip4 -dst_rloc4 = tg_to_dut_if2_ip4 - -lisp_traffic_table_ip4 = { - "virtual-network-identifier": 0, - "vrf-subtable": { - "table-id": 1, - "local-mappings": { - "local-mapping": [{ - "id": "local_map_vrf", - "eid": { - "virtual-network-id": 0, - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": local_eid4 - }, - "locator-set": locator_set - }] - }, - "remote-mappings": { - "remote-mapping": [{ - "id": "remote_map_vrf", - "eid": { - "virtual-network-id": 0, - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": remote_eid4 - }, - "rlocs": { - "locator": [{ - "address": tg_to_dut_if2_ip4, - "priority": 1, - "weight": 1 - }] - }, - "adjacencies": { - "adjacency": [{ - "id": "adj01", - "local-eid": { - "virtual-network-id": 0, - "address-type": - "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": local_eid4 - }, - "remote-eid": { - "virtual-network-id": 0, - "address-type": - "ietf-lisp-address-types:ipv4-prefix-afi", - "ipv4-prefix": remote_eid4 - }, - }] - } - }] - }, - } -} - -dut_to_tg_if1_ip6 = "10::1" -dut_to_tg_if2_ip6 = "11::1" -tg_to_dut_if2_ip6 = "11::2" -src_ip6 = "10::2" -dst_ip6 = "12::2" -prefix_len6 = 64 - -local_eid6 = "10::/64" -remote_eid6 = "12::/64" -src_rloc6 = dut_to_tg_if2_ip6 -dst_rloc6 = tg_to_dut_if2_ip6 - -lisp_traffic_table_ip6 = { - "virtual-network-identifier": 0, - "vrf-subtable": { - "table-id": 1, - "local-mappings": { - "local-mapping": [{ - "id": "local_map_vrf", - "eid": { - "virtual-network-id": 0, - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": local_eid6 - }, - "locator-set": locator_set - }] - }, - "remote-mappings": { - "remote-mapping": [{ - "id": "remote_map_vrf", - "eid": { - "virtual-network-id": 0, - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": remote_eid6 - }, - "rlocs": { - "locator": [{ - "address": tg_to_dut_if2_ip6, - "priority": 1, - "weight": 1 - }] - }, - "adjacencies": { - "adjacency": [{ - "id": "adj01", - "local-eid": { - "virtual-network-id": 0, - "address-type": - "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": local_eid6 - }, - "remote-eid": { - "virtual-network-id": 0, - "address-type": - "ietf-lisp-address-types:ipv6-prefix-afi", - "ipv6-prefix": remote_eid6 - }, - }] - } - }] - }, - } -} - -lisp_traffic_ip4 = create_settings_dict(lisp_traffic_table_ip4) -lisp_traffic_ip6 = create_settings_dict(lisp_traffic_table_ip6) diff --git a/resources/test_data/honeycomb/lisp/lisp_gpe.py b/resources/test_data/honeycomb/lisp/lisp_gpe.py deleted file mode 100644 index f91cb86fe9..0000000000 --- a/resources/test_data/honeycomb/lisp/lisp_gpe.py +++ /dev/null @@ -1,213 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -"""Test variables for LISP GPE test suite.""" - -negative_mapping_ip4 = { - "id": "lispgpe_negative", - "dp-table": 1, - "vni": 0, - "local-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": "192.168.0.0/24" - }, - "remote-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": "192.168.1.0/24" - }, - "action": "send-map-request" -} - -# used for update operation -negative_mapping_ip4_edit = { - "id": "lispgpe_negative", - "dp-table": 1, - "vni": 0, - "local-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": "192.168.2.0/24" - }, - "remote-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": "192.168.3.0/24" - }, - "action": "send-map-request" -} - -# used for multiple entries -negative_mapping_ip4_2 = { - "id": "lispgpe_negative_2", - "dp-table": 1, - "vni": 0, - "local-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": "192.168.2.0/24" - }, - "remote-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": "192.168.3.0/24" - }, - "action": "send-map-request" -} - -positive_mapping_ip4 = { - "id": "lispgpe_positive", - "dp-table": 1, - "vni": 0, - "local-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": "192.168.4.0/24" - }, - "remote-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": "192.168.5.0/24" - }, - "locator-pair": [ - { - "local-locator": "192.168.6.2", - "remote-locator": "192.168.7.3", - "weight": 0 - - }, - { - "local-locator": "192.168.5.2", - "remote-locator": "192.168.5.3", - "weight": 1 - } - - ] -} - -negative_mapping_ip6 = { - "id": "lispgpe_negative6", - "dp-table": 1, - "vni": 0, - "local-eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "virtual-network-id": 0, - "ipv6-prefix": "10::/64" - }, - "remote-eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "virtual-network-id": 0, - "ipv6-prefix": "11::/64" - }, - "action": "send-map-request" -} - -positive_mapping_ip6 = { - "id": "lispgpe_positive6", - "dp-table": 1, - "vni": 0, - "local-eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "virtual-network-id": 0, - "ipv6-prefix": "12::/64" - }, - "remote-eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "virtual-network-id": 0, - "ipv6-prefix": "13::/64" - }, - "locator-pair": [ - { - "local-locator": "13::10", - "remote-locator": "13::11", - "weight": 0 - }, - { - "local-locator": "14::10", - "remote-locator": "14::11", - "weight": 1 - } - ] -} - -# variables for traffic test -dut_to_tg_if1_ip4 = "192.168.0.1" -dut_to_tg_if2_ip4 = "192.168.1.1" -tg_to_dut_if2_ip4 = "192.168.1.2" -src_ip4 = "192.168.0.2" -dst_ip4 = "192.168.2.2" -prefix_len4 = 24 - -local_eid4 = "192.168.0.0/24" -remote_eid4 = "192.168.2.0/24" -src_rloc4 = dut_to_tg_if2_ip4 -dst_rloc4 = tg_to_dut_if2_ip4 - -lisp_traffic_ip4 = { - "id": "lispgpe_traffic_ip4", - "dp-table": 0, - "vni": 0, - "local-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": local_eid4 - }, - "remote-eid": { - "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", - "virtual-network-id": 0, - "ipv4-prefix": remote_eid4 - }, - "locator-pair": [ - { - "local-locator": src_rloc4, - "remote-locator": dst_rloc4, - "weight": 0 - } - ] -} - -dut_to_tg_if1_ip6 = "10::1" -dut_to_tg_if2_ip6 = "11::1" -tg_to_dut_if2_ip6 = "11::2" -src_ip6 = "10::2" -dst_ip6 = "12::2" -prefix_len6 = 64 - -local_eid6 = "10::/64" -remote_eid6 = "12::/64" -src_rloc6 = dut_to_tg_if2_ip6 -dst_rloc6 = tg_to_dut_if2_ip6 - -lisp_traffic_ip6 = { - "id": "lispgpe_traffic_ip6", - "dp-table": 0, - "vni": 0, - "local-eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "virtual-network-id": 0, - "ipv6-prefix": local_eid6 - }, - "remote-eid": { - "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", - "virtual-network-id": 0, - "ipv6-prefix": remote_eid6 - }, - "locator-pair": [ - { - "local-locator": src_rloc6, - "remote-locator": dst_rloc6, - "weight": 0 - } - ] -} diff --git a/resources/test_data/honeycomb/nat.py b/resources/test_data/honeycomb/nat.py deleted file mode 100644 index e78e756dc3..0000000000 --- a/resources/test_data/honeycomb/nat.py +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for NAT test suite.""" - -from resources.libraries.python.topology import Topology - - -def get_variables(node, interface): - """Create and return a dictionary of test variables. - - :param node: Honeycomb node. - :param interface: Name, link name or sw_if_index of an interface. - :type node: dict - :type interface: str or int - - :returns: Dictionary of test variables - settings for Honeycomb's - NAT node and expected operational data. - :rtype: dict - """ - sw_if_index = Topology.convert_interface_reference( - node, interface, "sw_if_index") - - variables = { - "nat_empty": { - 'instances': { - 'instance': [{ - 'id': 0}] - } - }, - "entry1": { - "mapping-entry": [{ - "index": 1, - "type": "static", - "internal-src-address": "192.168.0.1/32", - "external-src-address": "192.168.1.1/32" - }] - }, - "entry2": { - "mapping-entry": [{ - "index": 2, - "type": "static", - "internal-src-address": "192.168.0.2/32", - "external-src-address": "192.168.1.2/32" - }] - }, - "entry1_2_oper": { - "mapping-entry": [ - { - "index": 1, - "type": "static", - "internal-src-address": "192.168.0.1/32", - "external-src-address": "192.168.1.1/32" - }, - { - "index": 2, - "type": "static", - "internal-src-address": "192.168.0.2/32", - "external-src-address": "192.168.1.2/32" - } - ] - }, - "entry1_vat": [{ - "local_address": "192.168.0.1", - "remote_address": "192.168.1.1", - "vrf": "0" - }], - "entry1_2_vat": [ - { - "local_address": "192.168.0.1", - "remote_address": "192.168.1.1", - "vrf": "0", - "protocol": "17" - }, { - "local_address": "192.168.0.2", - "remote_address": "192.168.1.2", - "vrf": "0", - "protocol": "17" - } - ], - "nat_interface_vat_in": [ - {"sw_if_index": str(sw_if_index), - "direction": "in"} - ], - "nat_interface_vat_out": [ - {"sw_if_index": str(sw_if_index), - "direction": "out"} - ] - } - - return variables diff --git a/resources/test_data/honeycomb/netconf/hello.py b/resources/test_data/honeycomb/netconf/hello.py deleted file mode 100644 index 2cc89b387c..0000000000 --- a/resources/test_data/honeycomb/netconf/hello.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Hello message with capabilities list for Netconf sessions.""" - -hello = u""" -<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<capabilities> -<capability>urn:ietf:params:netconf:base:1.0</capability> -</capabilities> -</hello> -]]>]]>"""
\ No newline at end of file diff --git a/resources/test_data/honeycomb/netconf/subscription.py b/resources/test_data/honeycomb/netconf/subscription.py deleted file mode 100644 index ccf8c47022..0000000000 --- a/resources/test_data/honeycomb/netconf/subscription.py +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""RPC call to add a subscription to Netconf notifications.""" - -subscription = u""" -<netconf:rpc netconf:message-id="101" -xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0"> -<create-subscription -xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0"> -<stream>honeycomb</stream> -</create-subscription> -</netconf:rpc> -]]>]]>""" diff --git a/resources/test_data/honeycomb/netconf/triggers.py b/resources/test_data/honeycomb/netconf/triggers.py deleted file mode 100644 index 7c5fade8dd..0000000000 --- a/resources/test_data/honeycomb/netconf/triggers.py +++ /dev/null @@ -1,529 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Contains RPC sequences to trigger specific issues through Netconf.""" - -# Test data for issue: https://jira.fd.io/browse/HONEYCOMB-105 -# Creating and removing interfaces may result in duplicated interface indices. -trigger_105 = u""" -<rpc message-id="m-1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<get-config> -<source> -<running/> -</source> -<filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree"> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface> -<name>4fe335c8-6fdc-4654-b12c-d256e9b39229</name> -</interface> -</interfaces> -</filter> -</get-config> -</rpc> -]]>]]> - -<rpc message-id="m-2" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<lock> -<target> -<candidate/> -</target> -</lock> -</rpc> -]]>]]> - -<rpc message-id="m-3" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<default-operation>none</default-operation> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" -a:operation="replace"> -<name>4fe335c8-6fdc-4654-b12c-d256e9b39229</name> -<description>neutron port</description> -<link-up-down-trap-enable>enabled</link-up-down-trap-enable> -<vhost-user xmlns="http://fd.io/hc2vpp/yang/v3po"> -<role>client</role> -<socket>/tmp/socket_4fe335c8-6fdc-4654-b12c-d256e9b39229</socket> -</vhost-user> -<type xmlns:x="http://fd.io/hc2vpp/yang/v3po">x:vhost-user</type> -<enabled>true</enabled> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="m-4" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<commit/> -</rpc> -]]>]]> - -<rpc message-id="m-5" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<unlock> -<target> -<candidate/> -</target> -</unlock> -</rpc> -]]>]]> - -<rpc message-id="m-6" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<lock> -<target> -<candidate/> -</target> -</lock> -</rpc> -]]>]]> - -<rpc message-id="m-7" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<default-operation>none</default-operation> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" -a:operation="delete"> -<name>4fe335c8-6fdc-4654-b12c-d256e9b39229</name> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="m-8" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<commit/> -</rpc> -]]>]]> - -<rpc message-id="m-9" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<unlock> -<target> -<candidate/> -</target> -</unlock> -</rpc> -]]>]]> - -<rpc message-id="m-10" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<lock> -<target> -<candidate/> -</target> -</lock> -</rpc> -]]>]]> - -<rpc message-id="m-11" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<default-operation>none</default-operation> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" -a:operation="replace"> -<name>4fe335c8-6fdc-4654-b12c-d256e9b39229</name> -<description>neutron port</description> -<link-up-down-trap-enable>enabled</link-up-down-trap-enable> -<vhost-user xmlns="http://fd.io/hc2vpp/yang/v3po"> -<role>client</role> -<socket>/tmp/socket_4fe335c8-6fdc-4654-b12c-d256e9b39229</socket> -</vhost-user> -<type xmlns:x="http://fd.io/hc2vpp/yang/v3po">x:vhost-user</type> -<enabled>true</enabled> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="m-12" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<commit/> -</rpc> -]]>]]> - -<rpc message-id="m-13" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<unlock> -<target> -<candidate/> -</target> -</unlock> -</rpc> -]]>]]> - -<rpc message-id="m-14" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<lock> -<target> -<candidate/> -</target> -</lock> -</rpc> -]]>]]> - -<rpc message-id="m-15" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<default-operation>none</default-operation> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" -a:operation="replace"> -<name>d7611278-88ff-40e1-81e2-602e94e96fc7</name> -<description>neutron port</description> -<link-up-down-trap-enable>enabled</link-up-down-trap-enable> -<vhost-user xmlns="http://fd.io/hc2vpp/yang/v3po"> -<role>client</role> -<socket>/tmp/socket_d7611278-88ff-40e1-81e2-602e94e96fc7</socket> -</vhost-user> -<type xmlns:x="http://fd.io/hc2vpp/yang/v3po">x:vhost-user</type> -<enabled>true</enabled> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="m-16" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<commit/> -</rpc> -]]>]]> - -<rpc message-id="m-17" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<unlock> -<target> -<candidate/> -</target> -</unlock> -</rpc> -]]>]]> - -<rpc message-id="m-18" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<lock> -<target> -<candidate/> -</target> -</lock> -</rpc> -]]>]]> - -<rpc message-id="m-19" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<default-operation>none</default-operation> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" -a:operation="replace"> -<name>1f96a665-4351-4984-b1a8-dc6f54683123</name> -<description>neutron port</description> -<link-up-down-trap-enable>enabled</link-up-down-trap-enable> -<vhost-user xmlns="http://fd.io/hc2vpp/yang/v3po"> -<role>client</role> -<socket>/tmp/socket_1f96a665-4351-4984-b1a8-dc6f54683123</socket> -</vhost-user> -<type xmlns:x="http://fd.io/hc2vpp/yang/v3po">x:vhost-user</type> -<enabled>true</enabled> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="m-20" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<commit/> -</rpc> -]]>]]> - -<rpc message-id="m-21" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<unlock> -<target> -<candidate/> -</target> -</unlock> -</rpc> -]]>]]> - -<rpc message-id="m-22" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<lock> -<target> -<candidate/> -</target> -</lock> -</rpc> -]]>]]> - -<rpc message-id="m-23" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<default-operation>none</default-operation> -<config> -<bridge-domains xmlns="http://fd.io/hc2vpp/yang/v3po" -xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace"> -<bridge-domain> -<name>e86740a2-042c-4e64-a43b-cc224e0d5240</name> -<unknown-unicast-flood>true</unknown-unicast-flood> -<forward>true</forward> -<learn>true</learn> -<flood>true</flood> -<arp-termination>false</arp-termination> -</bridge-domain> -</bridge-domains> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="m-24" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<commit/> -</rpc> -]]>]]> - -<rpc message-id="m-25" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<unlock> -<target> -<candidate/> -</target> -</unlock> -</rpc> -]]>]]> - -<rpc message-id="m-26" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<lock> -<target> -<candidate/> -</target> -</lock> -</rpc> -]]>]]> - -<rpc message-id="m-27" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<get> -<filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" ns0:type="subtree"> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"/> -</filter> -</get> -</rpc> -]]>]]>""" - -# Test data for issue: https://jira.fd.io/browse/HONEYCOMB-255 -# Reverting transaction fails with "missing writer" -trigger_revert1 = u""" -<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface> -<name>vxlan3</name> -<type xmlns:v3po="http://fd.io/hc2vpp/yang/v3po"> - v3po:vxlan-tunnel</type> -<enabled>true</enabled> -<vxlan xmlns="http://fd.io/hc2vpp/yang/v3po"> -<src>192.168.1.6</src> -<dst>192.168.1.7</dst> -<vni>9</vni> -<encap-vrf-id>0</encap-vrf-id> -</vxlan> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface> -<name>vxlan4</name> -<type xmlns:v3po="http://fd.io/hc2vpp/yang/v3po"> - v3po:vxlan-tunnel</type> -<enabled>true</enabled> -<vxlan xmlns="http://fd.io/hc2vpp/yang/v3po"> -<src>192.168.1.6</src> -<dst>192.168.1.7</dst> -<vni>9</vni> -<encap-vrf-id>0</encap-vrf-id> -</vxlan> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - - <rpc message-id="103" - xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> - <commit/> - </rpc> - ]]>]]>""" - -# Test data for issue: https://jira.fd.io/browse/HONEYCOMB-255, part 2 -# Reverting transaction fails with "transaction has been closed" -trigger_revert2 = u""" -<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface> -<name>tap</name> -<type xmlns:v3po="http://fd.io/hc2vpp/yang/v3po">v3po:tap-v2</type> -<enabled>true</enabled> -<tap xmlns="http://fd.io/hc2vpp/yang/v3po"> -<dev-name>tap</dev-name> -</tap> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface> -<name>tap2</name> -<type xmlns:v3po="http://fd.io/hc2vpp/yang/v3po">v3po:tap-v2</type> -<enabled>true</enabled> -<tap xmlns="http://fd.io/hc2vpp/yang/v3po"> -<dev-name>tap</dev-name> -</tap> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="103" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<commit/> -</rpc> -]]>]]>""" - - -# Test data for issue HC2VPP-60 -# Creating Vlan sub-interface over netconf fails due to ODL bug -trigger_vlan = u""" -<rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface> -<name>{interface}</name> -<sub-interfaces xmlns="http://fd.io/hc2vpp/yang/vpp-vlan"/> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="102" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface> -<name>{interface}</name> -<sub-interfaces xmlns="http://fd.io/hc2vpp/yang/vpp-vlan"> -<sub-interface> -<identifier>2420</identifier> -</sub-interface> -</sub-interfaces> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="103" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<edit-config> -<target> -<candidate/> -</target> -<default-operation>none</default-operation> -<config> -<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> -<interface> -<name>{interface}</name> -<sub-interfaces xmlns="http://fd.io/hc2vpp/yang/vpp-vlan"> -<sub-interface xmlns:a="urn:ietf:params:xml:ns:netconf:base:1.0" a:operation="replace"> -<identifier>2420</identifier> -<match> -<vlan-tagged> -<match-exact-tags>true</match-exact-tags> -</vlan-tagged> -</match> -<vlan-type>_802dot1q</vlan-type> -<enabled>false</enabled> -<tags> -<tag> -<index>0</index> -<dot1q-tag> -<tag-type xmlns:x="urn:ieee:params:xml:ns:yang:dot1q-types">x:s-vlan</tag-type> -<vlan-id>2420</vlan-id> -</dot1q-tag> -</tag> -</tags> -</sub-interface> -</sub-interfaces> -</interface> -</interfaces> -</config> -</edit-config> -</rpc> -]]>]]> - -<rpc message-id="104" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> -<commit/> -</rpc> -]]>]]> -"""
\ No newline at end of file diff --git a/resources/test_data/honeycomb/nsh.py b/resources/test_data/honeycomb/nsh.py deleted file mode 100644 index 11e9e4ba0c..0000000000 --- a/resources/test_data/honeycomb/nsh.py +++ /dev/null @@ -1,190 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for LISP test suite.""" - -nsh_entry1 = { - "nsh-entry": [{ - "name": "entry1", - "version": 0, - "length": 6, - "md-type": "md-type1", - "next-protocol": "ethernet", - "nsp": 184, - "nsi": 255, - "c1": 1, - "c2": 2, - "c3": 3, - "c4": 4 - }] -} - -nsh_entry1_oper = { - "nsh-entry": [{ - "name": "entry1", - "version": 0, - "length": 6, - "md-type": "vpp-nsh:md-type1", - "next-protocol": "vpp-nsh:ethernet", - "nsp": 184, - "nsi": 255, - "c1": 1, - "c2": 2, - "c3": 3, - "c4": 4 - }] -} - -nsh_entry2 = { - "nsh-entry": [{ - "name": "entry2", - "version": 0, - "length": 5, - "md-type": "md-type1", - "next-protocol": "ethernet", - "nsp": 183, - "nsi": 254, - "c1": 2, - "c2": 3, - "c3": 4, - "c4": 5 - }] -} - -nsh_entry2_oper = { - "nsh-entry": [{ - "name": "entry2", - "version": 0, - "length": 5, - "md-type": "vpp-nsh:md-type1", - "next-protocol": "vpp-nsh:ethernet", - "nsp": 183, - "nsi": 254, - "c1": 2, - "c2": 3, - "c3": 4, - "c4": 5 - }] -} - -# Settings for VxLAN GPE interfaces, needed to configure NSH maps -vxlan_gpe_if1 = 'vxlan_gpe_test1' -vxlan_gpe_base_settings1 = { - 'name': vxlan_gpe_if1, - 'description': 'for testing NSH', - 'enabled': True, - 'link-up-down-trap-enable': 'enabled' -} -vxlan_gpe_settings1 = { - 'local': '192.168.0.1', - 'remote': '192.168.0.2', - 'vni': 5, - 'next-protocol': 'ethernet', - 'encap-vrf-id': 0, - 'decap-vrf-id': 0 -} - -vxlan_gpe_if2 = 'vxlan_gpe_test2' -vxlan_gpe_base_settings2 = { - 'name': vxlan_gpe_if2, - 'description': 'for testing NSH', - 'enabled': True, - 'link-up-down-trap-enable': 'enabled' -} -vxlan_gpe_settings2 = { - 'local': '192.168.1.1', - 'remote': '192.168.1.2', - 'vni': 6, - 'next-protocol': 'ethernet', - 'encap-vrf-id': 0, - 'decap-vrf-id': 0 -} - - -nsh_map1 = { - "nsh-map": [{ - "name": "map1", - "nsp": 184, - "nsi": 255, - "mapped-nsp": 183, - "mapped-nsi": 254, - "nsh-action": "push", - "encap-type": "vxlan-gpe", - "encap-if-name": vxlan_gpe_if1 - }] -} - -nsh_map1_oper = { - "nsh-map": [{ - "name": "map1", - "nsp": 184, - "nsi": 255, - "mapped-nsp": 183, - "mapped-nsi": 254, - "nsh-action": "vpp-nsh:push", - "encap-type": "vpp-nsh:vxlan-gpe", - "encap-if-name": vxlan_gpe_if1 - }] -} - -nsh_map1_edit = { - "nsh-map": [{ - "name": "map1_edit", - "nsp": 184, - "nsi": 255, - "mapped-nsp": 184, - "mapped-nsi": 253, - "nsh-action": "push", - "encap-type": "vxlan-gpe", - "encap-if-name": vxlan_gpe_if1 - }] -} - -nsh_map1_edit_oper = { - "nsh-map": [{ - "name": "map1_edit", - "nsp": 184, - "nsi": 255, - "mapped-nsp": 184, - "mapped-nsi": 253, - "nsh-action": "vpp-nsh:push", - "encap-type": "vpp-nsh:vxlan-gpe", - "encap-if-name": vxlan_gpe_if1 - }] -} - -nsh_map2 = { - "nsh-map": [{ - "name": "map2", - "nsp": 183, - "nsi": 254, - "mapped-nsp": 182, - "mapped-nsi": 253, - "nsh-action": "vpp-nsh:push", - "encap-type": "vpp-nsh:vxlan-gpe", - "encap-if-name": vxlan_gpe_if2 - }] -} - -nsh_map2_oper = { - "nsh-map": [{ - "name": "map2", - "nsp": 183, - "nsi": 254, - "mapped-nsp": 182, - "mapped-nsi": 253, - "nsh-action": "vpp-nsh:push", - "encap-type": "vpp-nsh:vxlan-gpe", - "encap-if-name": vxlan_gpe_if2 - }] -} diff --git a/resources/test_data/honeycomb/pbb/pbb.py b/resources/test_data/honeycomb/pbb/pbb.py deleted file mode 100644 index f71c70ebaf..0000000000 --- a/resources/test_data/honeycomb/pbb/pbb.py +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for provider backbone bridge test suite.""" - -# pylint: disable=invalid-name - -# Add pbb sub interface -# Configuration data -cfg_pbb_sub_if_1 = { - "pbb-rewrite": { - "source-address": "aa:aa:aa:aa:aa:ab", - "destination-address": "bb:bb:bb:bb:bb:bc", - "b-vlan-tag-vlan-id": "2223", - "outer-tag": "16", - "i-tag-isid": "12", - "interface-operation": "translate-2-1" - } -} - -# Modify pbb sub interface -# Configuration data -cfg_pbb_sub_if_1_mod = { - "pbb-rewrite": { - "source-address": "aa:aa:aa:aa:aa:ac", - "destination-address": "bb:bb:bb:bb:bb:bd", - "b-vlan-tag-vlan-id": "2224", - "outer-tag": "17", - "i-tag-isid": "13", - "interface-operation": "push-2" - } -} - -# Wrong configuration data -# Wrong source-address -cfg_pbb_sub_if_ID = '5' -cfg_pbb_sub_if_wrong_src_addr = { - "pbb-rewrite": { - "source-address": "aa:aa:aa:aa:aa:ag", - "destination-address": "bb:bb:bb:bb:bb:ce", - "b-vlan-tag-vlan-id": "2226", - "outer-tag": "19", - "i-tag-isid": "15", - "interface-operation": "pop-2" - } -} - -# Wrong destination-address -cfg_pbb_sub_if_wrong_dst_addr = { - "pbb-rewrite": { - "source-address": "aa:aa:aa:aa:aa:ae", - "destination-address": "bb:bb:bb:bb:bb:cg", - "b-vlan-tag-vlan-id": "2226", - "outer-tag": "19", - "i-tag-isid": "15", - "interface-operation": "pop-2" - } -} - -# Wrong b-vlan-tag-vlan-id -cfg_pbb_sub_if_wrong_vlan_tag = { - "pbb-rewrite": { - "source-address": "aa:aa:aa:aa:aa:ae", - "destination-address": "bb:bb:bb:bb:bb:ce", - "b-vlan-tag-vlan-id": "123456789", - "outer-tag": "19", - "i-tag-isid": "15", - "interface-operation": "pop-2" - } -} - -# Wrong i-tag-isid -cfg_pbb_sub_if_wrong_i_tag = { - "pbb-rewrite": { - "source-address": "aa:aa:aa:aa:aa:ae", - "destination-address": "bb:bb:bb:bb:bb:ce", - "b-vlan-tag-vlan-id": "2226", - "outer-tag": "19", - "i-tag-isid": "167772152345", - "interface-operation": "pop-2" - } -} - -# b-vlan-tag-vlan-id is missing -cfg_pbb_sub_if_no_vlan_tag = { - "pbb-rewrite": { - "source-address": "aa:aa:aa:aa:aa:ae", - "destination-address": "bb:bb:bb:bb:bb:ce", - "outer-tag": "19", - "i-tag-isid": "15", - "interface-operation": "pop-2" - } -} diff --git a/resources/test_data/honeycomb/persistence.py b/resources/test_data/honeycomb/persistence.py deleted file mode 100644 index f4ebdd5f23..0000000000 --- a/resources/test_data/honeycomb/persistence.py +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for Honeycomb persistence test suite.""" - - -def get_variables(interface): - """Creates and returns dictionary of test variables. - - :param interface: name of super-interface for the tested sub-interface - :type interface: str - :return: dictionary of test variables - :rtype: dict - """ - # basic settings - bd_name = 'bd_persist' - sub_if_id = 1 - sub_if_name = interface + '.' + str(sub_if_id) - - variables = { - # VxLan settings - 'vx_interface': 'vx_tunnel_test', - 'vxlan_settings': {'src': '192.168.0.2', - 'dst': '192.168.0.3', - "vni": 88, - 'encap-vrf-id': 0}, - # bridge domain settings - 'bd_name': bd_name, - 'bd_settings': {'flood': True, - 'forward': True, - 'learn': True, - 'unknown-unicast-flood': True, - 'arp-termination': True - }, - # tap interface settings - 'tap_interface': 'tap_test', - 'tap_interface_vat': 'tap0', - 'tap_settings': {'host-interface-name': 'tap_test', - 'mac': '08:00:27:c0:5d:37', - 'id': 1 - }, - 'tap_settings_oper': {'host-interface-name': 'tap_test', - 'device-name': 'tap0', - 'tx-ring-size': 256, - 'rx-ring-size': 256, - 'mac': '08:00:27:c0:5d:37', - 'id': 1 - }, - 'tap_settings_vat': {'dev_name': 'tap0', - 'tx_ring_sz': 256, - 'rx_ring_sz': 256, - 'mac': '08:00:27:c0:5d:37', - 'id': 1 - }, - # vhost-user interface settings - 'vhost_interface': 'test_vhost', - 'vhost_user_client': {'socket': 'soc1', - 'role': 'client' - }, - # Vlan subinterface settings - 'sub_if_id': sub_if_id, - 'sub_if_name': sub_if_name, - 'sub_if_1_settings': { - "identifier": sub_if_id, - "vlan-type": "_802dot1q", - "enabled": "false" - }, - 'sub_if_1_tags': [ - { - "index": "0", - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": "100" - } - }, - { - "index": "1", - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": "any" - } - } - ], - 'sub_if_1_match': "vlan-tagged-exact-match", - 'sub_if_1_oper': { - "identifier": sub_if_id, - "oper-status": "up", - "admin-status": "up", - "tags": { - "tag": [ - { - "index": 1, - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": "any" - } - }, - { - "index": 0, - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": 100 - } - } - ] - }, - "match": { - "vlan-tagged": { - "match-exact-tags": True - } - } - }, - 'sub_bd_settings': { - 'bridge-domain': bd_name, - 'split-horizon-group': '1', - 'bridged-virtual-interface': 'False' - }, - 'tag_rewrite_pop_1': { - "pop-tags": "1" - }, - - 'tag_rewrite_pop_1_oper': { - "vlan-type": "vpp-vlan:_802dot1ad", - "pop-tags": 1 - }, - - 'tag_rewrite_pop_1_VAT': { - 'sub_default': 0, - 'sub_dot1ad': 0, - 'sub_exact_match': 1, - 'sub_inner_vlan_id': 0, - 'sub_inner_vlan_id_any': 1, - 'sub_number_of_tags': 2, - 'sub_outer_vlan_id': 100, - 'sub_outer_vlan_id_any': 0, - 'vtr_op': 3, - 'vtr_push_dot1q': 0, - 'vtr_tag1': 0, - 'vtr_tag2': 0 - } - } - return variables diff --git a/resources/test_data/honeycomb/plugin_acl.py b/resources/test_data/honeycomb/plugin_acl.py deleted file mode 100644 index b72a3391a0..0000000000 --- a/resources/test_data/honeycomb/plugin_acl.py +++ /dev/null @@ -1,556 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -"""Test variables for ACL-plugin test suite.""" - - -def get_variables(test_case, name): - """Create and return a dictionary of test variables for the specified - test case. - - :param test_case: Determines which test variables to return. - :param name: Name for the classify chain used in test. - :type test_case: str - :type name: str - - :returns: Dictionary of test variables - settings for Honeycomb's - ietf-acl node and packet fields to use in verification. - :rtype: dict - :raises KeyError: If the test_case parameter is incorrect. - """ - - test_case = test_case.lower() - variables = { - # Variables for control packet - "src_ip": "16.0.0.1", - "dst_ip": "16.0.1.1", - "src_net": "16.0.0.0", - "dst_net": "16.0.1.0", - "src_port": "1234", - "dst_port": "1234", - "src_mac": "01:02:03:04:05:06", - "dst_mac": "10:20:30:40:50:60"} - - test_vars = { - "macip": { - # MACs classified directly - "classify_src": "12:23:34:45:56:67", - "classify_dst": "89:9A:AB:BC:CD:DE", - # MACs classified through mask - "classify_src2": "01:02:03:04:56:67", - "classify_dst2": "89:9A:AB:BC:50:60", - "src_mask": "00:00:00:00:FF:FF", - "dst_mask": "FF:FF:FF:FF:00:00" - }, - "l3_ip4": { - # IPs for DUT interface setup - "dut_to_tg_if1_ip": "16.0.0.2", - "dut_to_tg_if2_ip": "192.168.0.2", - "prefix_length": 24, - "gateway": "192.168.0.1", - # classified networks - "classify_src_net": "16.0.2.0", - "classify_dst_net": "16.0.3.0", - # IPs in classified networks - "classify_src": "16.0.2.1", - "classify_dst": "16.0.3.1", - }, - "l3_ip6": { - # Override control packet addresses with IPv6 - "src_ip": "10::1", - "dst_ip": "11::1", - "dst_net": "11::", - # IPs for DUT interface setup - "dut_to_tg_if1_ip": "10::2", - "dut_to_tg_if2_ip": "20::2", - "prefix_length": 64, - "gateway": "20::1", - # classified networks - "classify_src_net": "12::", - "classify_dst_net": "13::", - # IPs in classified networks - "classify_src": "12::1", - "classify_dst": "13::1", - }, - "l4": { - # IPs for DUT interface and route setup - "dut_to_tg_if1_ip": "16.0.0.2", - "dut_to_tg_if2_ip": "192.168.0.2", - "prefix_length": 24, - "gateway": "192.168.0.1", - "classify_dst_net": "16.0.3.0", - # Ports in classified ranges - "classify_src": 60000, - "classify_dst": 61000, - }, - "mixed": { - # IPs for DUT interface and route setup - "dut_to_tg_if1_ip": "16.0.0.2", - "dut_to_tg_if2_ip": "192.168.0.2", - "prefix_length": 24, - "gateway": "192.168.0.1", - "classify_dst_net": "16.0.3.0", - # IPs in classified networks - "classify_src_ip": "16.0.2.1", - "classify_dst_ip": "16.0.3.1", - # Ports in classified ranges - "classify_src_port": 60000, - "classify_dst_port": 61000, - }, - "icmp": { - # ICMP code and type for control packet - "icmp_type": 0, - "icmp_code": 0, - # classified ICMP code and type - "classify_type": 3, - "classify_code": 3 - - }, - "icmpv6": { - # Override control packet addresses with IPv6 - "src_ip": "10::1", - "dst_ip": "11::1", - "dst_net": "11::", - # IPs for DUT interface setup - "dut_to_tg_if1_ip": "10::2", - "dut_to_tg_if2_ip": "20::2", - "prefix_length": 64, - "gateway": "20::1", - # classified networks - "classify_src_net": "12::", - "classify_dst_net": "13::", - # ICMP code and type for control packet - "icmp_type": 1, - "icmp_code": 0, - # classified ICMP code and type - "classify_type": 4, - "classify_code": 2 - - }, - "reflex": { - # IPs for DUT interface setup - "dut_to_tg_if1_ip": "16.0.0.2", - "dut_to_tg_if2_ip": "192.168.0.2", - "prefix_length": 24, - "gateway": "192.168.0.1", - "gateway2": "192.168.0.1", - # classified networks - "classify_src_net": "16.0.2.0", - "classify_dst_net": "16.0.3.0", - # IPs in classified networks - "classify_src": "16.0.2.1", - "classify_dst": "16.0.3.1", - }, - "block_all": {} - } - acl_data = { - # ACL configuration for L2 tests - - "macip": { - "acl": [{ - "name": name, - "type": "vpp-acl:vpp-macip-acl", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - - "eth": { - "source-mac-address": test_vars["macip"]["classify_src"], - "source-mac-address-mask": test_vars["macip"]["src_mask"] - }, - "ipv4": { - - "source-ipv4-network": "16.0.0.0/24" - } - }, - - "actions": { - "forwarding": "ietf-access-control-list:drop" - } - }, - { - "name": "rule_all", - "matches": { - - "eth": { - "source-mac-address": test_vars["macip"]["classify_src"], - "source-mac-address-mask": "00:00:00:00:00:00" - }, - - "ipv4": { - "source-ipv4-network": "0.0.0.0/0" - } - }, - "actions": { - "forwarding": "ietf-access-control-list:accept" - } - } - ]} - } - ] - }, - # ACL configuration for L3 IPv4 tests - "l3_ip4": { - "acl": [ - { - "name": name, - "type": "vpp-acl:vpp-acl", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - "ipv4": { - "destination-ipv4-network": "{0}/{1}".format( - test_vars["l3_ip4"]["classify_dst_net"], - test_vars["l3_ip4"]["prefix_length"]), - "source-ipv4-network": "{0}/{1}".format( - test_vars["l3_ip4"]["classify_src_net"], - test_vars["l3_ip4"]["prefix_length"]) - }, - "udp":{ - "source-port": { - "lower-port": "0", - "upper-port": "65535" - }, - "destination-port": { - "lower-port": "0", - "upper-port": "65535" - } - } - }, - "actions": { - "forwarding": "ietf-access-control-list:drop" - } - }, - { - "name": "rule_all", - "matches": { - "ipv4": { - "destination-ipv4-network": "0.0.0.0/0", - "source-ipv4-network": "0.0.0.0/0" - } - }, - "actions": { - "forwarding": "ietf-access-control-list:accept" - } - } - ] - } - } - ] - }, - # ACL settings for L3 IPv6 tests - "l3_ip6": { - "acl": [ - { - "name": name, - "type": "vpp-acl:vpp-acl", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - "ipv6": { - "destination-ipv6-network": "{0}/{1}".format( - test_vars["l3_ip6"]["classify_dst_net"], - test_vars["l3_ip6"]["prefix_length"]), - "source-ipv6-network": "{0}/{1}".format( - test_vars["l3_ip6"]["classify_src_net"], - test_vars["l3_ip6"]["prefix_length"]) - }, - "udp":{ - "source-port": { - "lower-port": "0", - "upper-port": "65535" - }, - "destination-port": { - "lower-port": "0", - "upper-port": "65535" - } - } - }, - "actions": { - "forwarding": "ietf-access-control-list:drop" - } - }, - { - "name": "rule_all", - "matches": { - "ipv6": { - "destination-ipv6-network": "0::0/0", - "source-ipv6-network": "0::0/0" - } - }, - "actions": { - "forwarding": "ietf-access-control-list:accept" - } - } - ] - } - } - ] - }, - # ACL configuration for L4 tests - "l4": { - "acl": [ - { - "name": name, - "type": "vpp-acl:vpp-acl", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - "ipv4": { - "source-ipv4-network": "0.0.0.0/0" - }, - "tcp": { - "source-port": { - "lower-port": test_vars["l4"]["classify_src"], - "upper-port": test_vars["l4"]["classify_src"] + 10 - }, - "destination-port":{ - "lower-port": test_vars["l4"]["classify_dst"], - "upper-port": test_vars["l4"]["classify_dst"] + 10 - } - } - }, - "actions":{ - "forwarding": "ietf-access-control-list:drop" - } - }, - { - "name": "rule_all", - "matches": { - "ipv4": { - "source-ipv4-network": "0.0.0.0/0", - "destination-ipv4-network": "0.0.0.0/0" - } - }, - "actions": { - "forwarding": "ietf-access-control-list:accept" - } - } - ] - } - } - ] - }, - "mixed": { - "acl": [ - { - "name": name, - "type": "vpp-acl:vpp-acl", - "aces": { - "ace": [ - { - "name": "ports", - "matches": { - "ipv4": { - "source-ipv4-network": "0.0.0.0/0" - }, - "tcp": { - "source-port": { - "lower-port": test_vars["l4"]["classify_src"], - "upper-port": test_vars["l4"]["classify_src"] + 10 - }, - "destination-port":{ - "lower-port": test_vars["l4"]["classify_dst"], - "upper-port": test_vars["l4"]["classify_dst"] + 10 - } - } - }, - "actions":{ - "forwarding": "ietf-access-control-list:drop" - } - }, - { - "name": "rule_all", - "matches": { - "ipv4": { - "destination-ipv4-network": "0.0.0.0/0", - "source-ipv4-network": "0.0.0.0/0" - } - }, - "actions": { - "forwarding": "ietf-access-control-list:accept" - } - } - ] - } - } - ] - }, - "icmp": { - "acl": [ - { - "name": name, - "type": "vpp-acl:vpp-acl", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - "ipv4": { - "source-ipv4-network": "0.0.0.0/0" - }, - "icmp": { - "vpp-acl:vpp-icmp-ace": { - "vpp-acl:icmp-type-range": { - "first": "1", - "last": "5" - }, - "vpp-acl:icmp-code-range": { - "first": "1", - "last": "5" - } - } - } - }, - "actions": { - "forwarding": "ietf-access-control-list:drop" - } - }, - { - "name": "rule_all", - "matches": { - "ipv4": { - "source-ipv4-network": "0.0.0.0/0", - "destination-ipv4-network": "0.0.0.0/0" - } - }, - "actions": { - "forwarding": "ietf-access-control-list:accept" - } - } - ] - } - } - ] - }, - "icmpv6": { - "acl": [ - { - "name": name, - "type": "vpp-acl:vpp-acl", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - "ipv6": { - "source-ipv6-network": "::/0", - }, - "icmp": { - "vpp-acl:vpp-icmp-ace": { - "vpp-acl:icmp-type-range": { - "first": "1", - "last": "5" - }, - "vpp-acl:icmp-code-range": { - "first": "1", - "last": "5" - } - } - } - }, - "actions": { - "forwarding": "ietf-access-control-list:drop" - } - }, - { - "name": "rule_all", - "matches": { - "ipv6": { - "destination-ipv6-network": "0::0/0", - "source-ipv6-network": "::/0", - } - }, - "actions": { - "forwarding": "ietf-access-control-list:accept" - } - } - ] - } - } - ] - }, - "reflex": { - "acl": [ - { - "name": name, - "type": "vpp-acl:vpp-acl", - "aces": { - "ace": [ - { - "name": "rule1", - "matches": { - "ipv4": { - "destination-ipv4-network": "{0}/{1}".format( - test_vars["reflex"]["classify_src_net"], - test_vars["reflex"]["prefix_length"]), - "source-ipv4-network": "{0}/{1}".format( - test_vars["reflex"]["classify_dst_net"], - test_vars["reflex"]["prefix_length"]) - } - }, - "actions": { - "forwarding": "vpp-acl:accept-and-reflect" - } - } - ] - } - } - ] - }, - "block_all": { - "acl": [ - { - "name": name, - "type": "vpp-acl:vpp-acl", - "aces": { - "ace": [ - { - "name": "rule_all", - "matches": { - "ipv4": { - "destination-ipv4-network": "0.0.0.0/0", - "source-ipv4-network": "0.0.0.0/0" - } - }, - "actions": { - "forwarding": "ietf-access-control-list:drop" - } - } - ] - } - } - ] - }, - } - - try: - ret_vars = {} - ret_vars.update(variables) - ret_vars.update(test_vars[test_case]) - ret_vars.update( - {"acl_settings": acl_data[test_case]} - ) - except KeyError: - raise KeyError( - "Unrecognized test case {0}. Valid options are: {1}".format( - test_case, acl_data.keys())) - return ret_vars diff --git a/resources/test_data/honeycomb/policer_variables.py b/resources/test_data/honeycomb/policer_variables.py deleted file mode 100644 index 6c6c9a575a..0000000000 --- a/resources/test_data/honeycomb/policer_variables.py +++ /dev/null @@ -1,146 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -"""Test variables for Policer test suite.""" - - -def get_variables(): - """Create and return a dictionary of test variables for the specified - test case. - - :returns: Dictionary of test variables - settings for Honeycomb's Policer. - :rtype: dict - """ - policer_data = { - "policer_data": { - "name": "policy1", - "cir": 450, - "cb": 50000, - "rate-type": "kbps", - "round-type": "closest", - "type": "1r2c", - "conform-action": { - "meter-action-type": "meter-action-transmit" - }, - "exceed-action": { - "meter-action-type": "meter-action-drop" - } - }, - "policer_data_oper": { - "name": "policy1", - "cir": 450, - "cb": 50000, - "rate-type": "kbps", - "round-type": "closest", - "type": "1r2c", - "conform-action": { - "meter-action-type": "policer:meter-action-transmit" - }, - "exceed-action": { - "meter-action-type": "policer:meter-action-drop" - } - }, - "policer_data_2": { - "name": "policy1", - "cir": 900, - "cb": 50000, - "rate-type": "kbps", - "round-type": "closest", - "type": "1r2c", - "conform-action": { - "meter-action-type": "meter-action-transmit" - }, - "exceed-action": { - "meter-action-type": "meter-action-drop" - } - }, - "policer_data_oper_2": { - "name": "policy1", - "cir": 900, - "cb": 50000, - "rate-type": "kbps", - "round-type": "closest", - "type": "1r2c", - "conform-action": { - "meter-action-type": "policer:meter-action-transmit" - }, - "exceed-action": { - "meter-action-type": "policer:meter-action-drop" - } - }, - "policer_data_3": { - "name": "policy1", - "cir": 100, - "eir": 150, - "cb": 200, - "eb": 300, - "rate-type": "pps", - "round-type": "closest", - "type": "2r3c-2698", - "conform-action": { - "meter-action-type": "meter-action-transmit" - }, - "exceed-action": { - "meter-action-type": "meter-action-mark-dscp", - "dscp": "AF22" - }, - "violate-action": { - "meter-action-type": "meter-action-drop" - }, - "color-aware": True - }, - "policer_data_oper_3": { - "name": "policy1", - "cir": 100, - "eir": 150, - "cb": 200, - "eb": 300, - "rate-type": "pps", - "round-type": "closest", - "type": "2r3c-2698", - "conform-action": { - "meter-action-type": "policer:meter-action-transmit" - }, - "exceed-action": { - "meter-action-type": "policer:meter-action-mark-dscp", - }, - "violate-action": { - "meter-action-type": "policer:meter-action-drop" - }, - "color-aware": True - }, - - "acl_tables": { - # settings for policer tables - "hc_acl_table": { - "name": "table0", - "nbuckets": 2, - "memory_size": 1048576, - "skip_n_vectors": 12, - "miss_next": "permit", - "mask": "00:00:00:00:00:00:00:00:00:00:00:00:ff:ff:ff:ff" - }, - # setting for acl sessions - "hc_acl_session": { - "match": "00:00:00:00:00:00:00:00:00:00:00:00:C0:A8:7A:01", - "policer_hit_next": "policy1", - "color_classfier": "exceed-color", - }, - "hc_acl_session2": { - "match": "00:00:00:00:00:00:00:00:00:00:00:00:C0:A8:7A:02", - "policer_hit_next": "policy1", - "color_classfier": "exceed-color", - }, - }, - } - return policer_data diff --git a/resources/test_data/honeycomb/routing.py b/resources/test_data/honeycomb/routing.py deleted file mode 100644 index 2016ca54b5..0000000000 --- a/resources/test_data/honeycomb/routing.py +++ /dev/null @@ -1,236 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -"""Test data for Honeycomb routing test.""" - -from resources.libraries.python.topology import Topology - - -def get_variables(node, ip_version, out_interface): - - out_interface = Topology.convert_interface_reference( - node, out_interface, "name") - - ip_version = ip_version.lower() - variables = {} - - # base network settings - ipv4_base = { - "dut_to_tg_if1_ip": "16.0.0.1", - "dut_to_tg_if2_ip": "16.0.1.1", - "src_ip": "16.0.0.2", - "dst_ip": "16.0.2.1", - "dst_net": "16.0.2.0", - "prefix_len": 24, - "next_hop": "16.0.1.2", - "next_hop1": "16.0.1.3", - "next_hop2": "16.0.1.4", - "next_hop_mac1": "00:11:22:33:44:55", - "next_hop_mac2": "11:22:33:44:55:66" - } - - ipv6_base = { - "dut_to_tg_if1_ip": "10::1", - "dut_to_tg_if2_ip": "11::1", - "src_ip": "10::2", - "dst_ip": "12::1", - "dst_net": "12::", - "prefix_len": 64, - "next_hop": "11::2", - "next_hop1": "11::3", - "next_hop2": "11::4", - "next_hop_mac1": "00:11:22:33:44:55", - "next_hop_mac2": "11:22:33:44:55:66" - } - - if ip_version == "ipv4": - variables.update(ipv4_base) - elif ip_version == "ipv6": - variables.update(ipv6_base) - else: - raise ValueError("IP version must be either IPv4 or IPv6.") - - # route configuration used in tests - tables_cfg = { - "table1": { - "description": "single hop ipv4", - "destination-prefix": - "{0}/{1}".format(ipv4_base["dst_net"], ipv4_base["prefix_len"]), - "next-hop": { - "next-hop-address": ipv4_base["next_hop"], - "outgoing-interface": out_interface - }, - "vpp-ipv4-unicast-routing:vpp-ipv4-route": {} - }, - "table2": { - "description": "multi hop ipv4", - "destination-prefix": - "{0}/{1}".format(ipv4_base["dst_net"], ipv4_base["prefix_len"]), - "next-hop":{ - "next-hop-list": { - "next-hop": [ - { - "index": "1", - "next-hop-address": ipv4_base["next_hop1"], - "outgoing-interface": out_interface, - "weight": "1" - }, - { - "index": "2", - "next-hop-address": ipv4_base["next_hop2"], - "outgoing-interface": out_interface, - "weight": "1" - } - ] - } - } - }, - "table3": { - "description": "blackhole ipv4", - "destination-prefix": - "{0}/{1}".format(ipv4_base["dst_net"], ipv4_base["prefix_len"]), - "next-hop": { - "special-next-hop-enum": "blackhole" - } - }, - "table4": { - "description": "single hop ipv6", - "destination-prefix": - "{0}/{1}".format(ipv6_base["dst_net"], ipv6_base["prefix_len"]), - "next-hop": { - "next-hop-address": ipv6_base["next_hop"], - "outgoing-interface": out_interface - }, - "vpp-ipv6-unicast-routing:vpp-ipv6-route": {} - }, - "table5": { - "description": "multi hop ipv6", - "destination-prefix": - "{0}/{1}".format(ipv6_base["dst_net"], ipv6_base["prefix_len"]), - "next-hop":{ - "next-hop-list": { - "next-hop": [ - { - "index": "1", - "next-hop-address": ipv6_base["next_hop1"], - "outgoing-interface": out_interface, - "weight": "1" - }, - { - "index": "2", - "next-hop-address": ipv6_base["next_hop2"], - "outgoing-interface": out_interface, - "weight": "1" - } - ] - } - } - }, - "table6": { - "description": "blackhole ipv6", - "destination-prefix": - "{0}/{1}".format(ipv6_base["dst_net"], ipv6_base["prefix_len"]), - "next-hop":{ - "special-next-hop-enum": "blackhole" - } - } - } - - # expected route operational data - tables_oper = { - "table1_oper": { - "destination-prefix": - "{0}/{1}".format(ipv4_base["dst_net"], ipv4_base["prefix_len"]), - "next-hop": { - "next-hop-address": ipv4_base["next_hop"], - "outgoing-interface": out_interface - } - }, - "table2_oper": { - "destination-prefix": - "{0}/{1}".format(ipv4_base["dst_net"], ipv4_base["prefix_len"]), - "next-hop": { - "next-hop-list": { - "next-hop": [ - { - "index": "2", - "next-hop-address": ipv4_base["next_hop2"], - "outgoing-interface": out_interface, - "vpp-ipv4-unicast-routing:weight": 1 - }, - { - "index": "1", - "next-hop-address": ipv4_base["next_hop1"], - "outgoing-interface": out_interface, - "vpp-ipv4-unicast-routing:weight": 1 - } - ] - } - } - }, - "table3_oper": { - "destination-prefix": - "{0}/{1}".format(ipv4_base["dst_net"], ipv4_base["prefix_len"]), - "next-hop": { - "special-next-hop-enum": "blackhole" - } - }, - "table4_oper": { - "destination-prefix": - "{0}/{1}".format(ipv6_base["dst_net"], - ipv6_base["prefix_len"]), - "next-hop": { - "next-hop-address": ipv6_base["next_hop"], - "outgoing-interface": out_interface - } - }, - "table5_oper": { - "destination-prefix": - "{0}/{1}".format(ipv6_base["dst_net"], - ipv6_base["prefix_len"]), - "next-hop": { - "next-hop-list": { - "next-hop": [ - { - "index": "2", - "next-hop-address": ipv6_base["next_hop2"], - "outgoing-interface": out_interface, - "vpp-ipv6-unicast-routing:weight": 1 - }, - { - "index": "1", - "next-hop-address": ipv6_base["next_hop1"], - "outgoing-interface": out_interface, - "vpp-ipv6-unicast-routing:weight": 1 - } - ] - } - } - }, - "table6_oper": { - "destination-prefix": - "{0}/{1}".format(ipv6_base["dst_net"], - ipv6_base["prefix_len"]), - "next-hop": { - "special-next-hop-enum": "blackhole" - } - } - } - - for item in tables_oper.values(): - if "next-hop-list" in item.keys(): - item["next-hop-list"]["next-hop"].sort() - - variables.update(tables_cfg) - variables.update(tables_oper) - return variables diff --git a/resources/test_data/honeycomb/slaac_variables.py b/resources/test_data/honeycomb/slaac_variables.py deleted file mode 100644 index c260eae0ff..0000000000 --- a/resources/test_data/honeycomb/slaac_variables.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -"""Test variables for SLAAC test suite.""" - - -def get_variables(): - """Create and return a dictionary of test variables for the specified - test case. - - :returns: Dictionary of test variables - settings for Honeycomb's SLAAC. - :rtype: dict - """ - slaac_data = { - "address": "10::10", - "prefix": 64, - "slaac_data": { - "send-advertisements": "True", - "min-rtr-adv-interval": "15", - "max-rtr-adv-interval": "100", - "default-lifetime": "601", - "vpp-routing-ra:suppress-link-layer": "False", - "vpp-routing-ra:initial-count": "3", - "vpp-routing-ra:initial-interval": "5" - }, - "slaac_data_01": { - "send-advertisements": "True", - "min-rtr-adv-interval": "3", - "max-rtr-adv-interval": "4", - "default-lifetime": "8", - "vpp-routing-ra:suppress-link-layer": "True", - "vpp-routing-ra:initial-count": "1", - "vpp-routing-ra:initial-interval": "1" - }, - "slaac_data_02": { - "send-advertisements": "False", - "min-rtr-adv-interval": "3", - "max-rtr-adv-interval": "4", - "default-lifetime": "5", - "vpp-routing-ra:suppress-link-layer": "False", - "vpp-routing-ra:initial-count": "1", - "vpp-routing-ra:initial-interval": "1" - }, - "slaac_data_03": { - "send-advertisements": "False", - "min-rtr-adv-interval": "1350", - "max-rtr-adv-interval": "1800", - "default-lifetime": "9000", - "vpp-routing-ra:suppress-link-layer": "True", - "vpp-routing-ra:initial-count": "3", - "vpp-routing-ra:initial-interval": "16" - }, - } - return slaac_data diff --git a/resources/test_data/honeycomb/span.py b/resources/test_data/honeycomb/span.py deleted file mode 100644 index 9e1004d8ed..0000000000 --- a/resources/test_data/honeycomb/span.py +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for SPAN port mirroring test suite.""" - - -def get_variables(interface1, interface2, interface3): - """Create and return a dictionary of test variables. - - :param interface1: Name of an interface. - :param interface2: Name of an interface. - :param interface3: Name of an interface. - :type interface1: string - :type interface2: string - :type interface3: string - - :returns: Dictionary of test variables - settings for Honeycomb's - SPAN port mirroring suite. - :rtype: dict - """ - variables = { - "interface1": interface1, - "interface2": interface2, - "interface3": interface3, - - # Interface 2 - ingress - "settings_receive": { - "state": "receive", - "iface-ref": interface2, - }, - - # Interface 2 - egress - "settings_transmit": { - "state": "transmit", - "iface-ref": interface2, - }, - - # Interface 2 - ingress/egress - "settings_both": { - "state": "both", - "iface-ref": interface2, - }, - - # Interface 3 - ingress/egress - "settings_if2": { - "state": "both", - "iface-ref": interface3, - }, - - # IP addresses for traffic test - "tg_to_dut_if1_ip": "192.168.1.1", - "dut_to_tg_if1_ip": "192.168.1.2", - "tg_to_dut_if2_ip": "192.168.2.1", - "dut_to_tg_if2_ip": "192.168.2.2", - "prefix": 24, - } - return variables diff --git a/resources/test_data/honeycomb/sub_interfaces.py b/resources/test_data/honeycomb/sub_interfaces.py deleted file mode 100644 index 1ab270b33c..0000000000 --- a/resources/test_data/honeycomb/sub_interfaces.py +++ /dev/null @@ -1,302 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for Honeycomb sub-interface test suite.""" - -from copy import deepcopy - -# Sub-interface 1 and its settings: -sub_if_1_settings = { - "identifier": "1", - "vlan-type": "_802dot1q", - "enabled": "false" -} - -sub_if_1_tags = [ - { - "index": "0", - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": "100" - } - }, - { - "index": "1", - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": "any" - } - } -] - -sub_if_1_match = "vlan-tagged" - -# Expected operational data: sub-interface. -sub_if_1_oper = { - "identifier": 1, - "oper-status": "down", - "admin-status": "down", - "tags": { - "tag": [ - { - "index": 0, - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": 100 - } - }, - { - "index": 1, - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": "any" - } - }, - ] - }, - "match": { - "vlan-tagged": { - "match-exact-tags": False - } - } -} - -# Bridge domain name. -bd_name = 'test-sub-bd' - -# Bridge domain settings used while creating a test bridge domain. -bd_settings = { - 'flood': True, - 'forward': True, - 'learn': True, - 'unknown-unicast-flood': True, - 'arp-termination': True -} - -# Bridge domain configuration used while adding the sub-interface to the bridge -# domain. -sub_bd_settings = { - 'bridge-domain': bd_name, - 'split-horizon-group': 1, - 'bridged-virtual-interface': False -} - -# Configuration data: Enable tag-rewrite push. -tag_rewrite_push = { - "vlan-type": "vpp-vlan:_802dot1q", - "push-tags": [ - { - "index": 0, - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": 123 - } - }, - { - "index": 1, - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": 456 - } - } - ] -} - -# Expected operational data: tag-rewrite push. -tag_rewrite_push_oper = { - "vlan-type": "vpp-vlan:_802dot1q", - "push-tags": [ - { - "index": 0, - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": 123 - } - }, - { - "index": 1, - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": 456 - } - } - ] -} - -# Expected VAT data: tag-rewrite push. -tag_rewrite_push_VAT = { - 'sub_default': 0, - 'sub_dot1ad': 0, - 'sub_exact_match': 0, - 'sub_inner_vlan_id': 0, - 'sub_inner_vlan_id_any': 1, - 'sub_number_of_tags': 2, - 'sub_outer_vlan_id': 100, - 'sub_outer_vlan_id_any': 0, - 'vtr_op': 2, - 'vtr_push_dot1q': 1, - 'vtr_tag1': 123, - 'vtr_tag2': 456 -} - -# Configuration data: Enable tag-rewrite pop 1. -tag_rewrite_pop_1 = { - "pop-tags": "1" -} - -# Expected operational data: tag-rewrite pop 1. -tag_rewrite_pop_1_oper = { - "vlan-type": "vpp-vlan:_802dot1ad", - "pop-tags": 1 -} - -# Expected VAT data: tag-rewrite pop 1. -tag_rewrite_pop_1_VAT = { - 'sub_default': 0, - 'sub_dot1ad': 0, - 'sub_exact_match': 0, - 'sub_inner_vlan_id': 0, - 'sub_inner_vlan_id_any': 1, - 'sub_number_of_tags': 2, - 'sub_outer_vlan_id': 100, - 'sub_outer_vlan_id_any': 0, - 'vtr_op': 3, - 'vtr_push_dot1q': 0, - 'vtr_tag1': 0, - 'vtr_tag2': 0 -} - -# Configuration data: Enable tag-rewrite translate 1-2. -tag_rewrite_translate_1_2 = { - "vlan-type": "vpp-vlan:_802dot1q", - "pop-tags": "1", - "push-tags": [ - { - "index": 0, - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": 111 - } - }, - { - "index": 1, - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": 222 - } - } - ] -} - -# Expected operational data: tag-rewrite translate 1-2. -tag_rewrite_translate_1_2_oper = { - "vlan-type": "vpp-vlan:_802dot1q", - "pop-tags": 1, - "push-tags": [ - { - "index": 0, - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": 111 - } - }, - { - "index": 1, - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": 222 - } - }, - ] -} - -# Expected VAT data: tag-rewrite translate 1-2. -tag_rewrite_translate_1_2_VAT = { - 'sub_default': 0, - 'sub_dot1ad': 0, - 'sub_exact_match': 0, - 'sub_inner_vlan_id': 0, - 'sub_inner_vlan_id_any': 1, - 'sub_number_of_tags': 2, - 'sub_outer_vlan_id': 100, - 'sub_outer_vlan_id_any': 0, - 'vtr_op': 6, - 'vtr_push_dot1q': 1, - 'vtr_tag1': 111, - 'vtr_tag2': 222 -} - -# Configuration data: Disable tag-rewrite. -tag_rewrite_disabled = {} - -# Expected VAT data: Disable tag-rewrite. -tag_rewrite_disabled_VAT = { - 'sub_default': 0, - 'sub_dot1ad': 0, - 'sub_exact_match': 0, - 'sub_inner_vlan_id': 0, - 'sub_inner_vlan_id_any': 1, - 'sub_number_of_tags': 2, - 'sub_outer_vlan_id': 100, - 'sub_outer_vlan_id_any': 0, - 'vtr_op': 0, - 'vtr_push_dot1q': 0, - 'vtr_tag1': 0, - 'vtr_tag2': 0 -} - -# Configuration data: -# Wrong vlan-type for enable tag-rewrite translate 1-2. -tag_rewrite_translate_1_2_wrong = { - "vlan-type": "vpp-vlan:WRONG", - "pop-tags": "1", - "push-tags": [ - { - "index": 0, - "dot1q-tag": { - "tag-type": "dot1q-types:s-vlan", - "vlan-id": 111 - } - }, - { - "index": 1, - "dot1q-tag": { - "tag-type": "dot1q-types:c-vlan", - "vlan-id": 222 - } - } - ] -} - -# IP addresses configured on sub-interface during tests -ipv4 = { - "address": "192.168.0.4", - "netmask": "255.255.255.0", - "prefix-length": 24} -ipv4_2 = { - "address": "192.168.0.5", - "netmask": "255.255.0.0", - "prefix-length": 16} - -sub_if_2_settings = sub_if_1_settings -sub_if_2_tags = sub_if_1_tags -sub_if_2_match = "vlan-tagged-exact-match" -sub_if_2_oper = deepcopy(sub_if_1_oper) -sub_if_2_oper["match"]["vlan-tagged"]["match-exact-tags"] = True - -ipv6 = { - "address": "10::10", - "prefix-length": 24} -ipv6_2 = { - "address": "10::11", - "prefix-length": 16} diff --git a/resources/test_data/honeycomb/vxlan.py b/resources/test_data/honeycomb/vxlan.py deleted file mode 100644 index 43307aa61a..0000000000 --- a/resources/test_data/honeycomb/vxlan.py +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for Honeycomb VxLAN management test suite.""" - -# invalid VxLAN settings -vxlan_invalid = [ - # same source and destination IPs - {'src': '192.168.0.2', 'dst': '192.168.0.2', 'vni': 88, 'encap-vrf-id': 0}, - # missing source - {'dst': '192.168.0.2', 'vni': 88, 'encap-vrf-id': 0}, - # missing destination - {'src': '192.168.0.2', 'vni': 88, 'encap-vrf-id': 0}, - # missing vni - {'src': '192.168.0.2', 'dst': '192.168.0.3', 'encap-vrf-id': 0}, - # missing encap id - {'src': '192.168.0.2', 'dst': '192.168.0.3', 'vni': 88} -] diff --git a/resources/test_data/honeycomb/vxlan_gpe.py b/resources/test_data/honeycomb/vxlan_gpe.py deleted file mode 100644 index 308cd0a316..0000000000 --- a/resources/test_data/honeycomb/vxlan_gpe.py +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Test variables for Honeycomb VxLAN GPE management test suite.""" - -# The first VxLAN GPE Interface used in tests. -vxlan_gpe_if1 = 'vxlan_gpe_tunnel0' -vxlan_gpe_base_settings = { - 'name': vxlan_gpe_if1, - 'description': 'for testing purposes', - 'enabled': True, - 'link-up-down-trap-enable': 'enabled' -} -vxlan_gpe_settings = { - 'local': '192.168.50.76', - 'remote': '192.168.50.71', - 'vni': 9, - 'next-protocol': 'ipv4', - 'encap-vrf-id': 0, - 'decap-vrf-id': 0 -} - -# The values of parameters of disabled VxLAN GPE interface. -vxlan_gpe_disabled_base_settings = { - 'name': vxlan_gpe_if1, - 'description': 'for testing purposes', - 'enabled': 'false' -} - -# Wrong interface type. -vxlan_gpe_if2 = 'vxlan_gpe_tunnel1' -vxlan_gpe_wrong_type_base_settings = { - 'name': vxlan_gpe_if2, - 'type': 'iana-if-type:ethernetCsmacd', - 'description': 'for testing purposes', - 'enabled': True, - 'link-up-down-trap-enable': 'enabled' -} - -# Wrong next-protocol value. -vxlan_gpe_if3 = 'vxlan_gpe_tunnel1' -vxlan_gpe_wrong_protocol_base_settings = { - 'name': vxlan_gpe_if3, - 'description': 'for testing purposes', - 'enabled': 'true', - 'link-up-down-trap-enable': 'enabled' -} -vxlan_gpe_wrong_protocol_settings = { - 'local': '192.168.50.77', - 'remote': '192.168.50.72', - 'vni': 9, - 'next-protocol': 'wrong_ipv4', - 'encap-vrf-id': 0, - 'decap-vrf-id': 0 -} - -# The first IPv6 VxLAN GPE interface. -vxlan_gpe_if5 = 'vxlan_gpe_tunnel0' -vxlan_gpe_base_ipv6_settings = { - 'name': vxlan_gpe_if5, - 'description': 'for testing purposes', - 'enabled': True, - 'link-up-down-trap-enable': 'enabled' -} -vxlan_gpe_ipv6_settings = { - 'local': '10:10:10:10:10:10:10:10', - 'remote': '10:10:10:10:10:10:10:11', - 'vni': 9, - 'next-protocol':'ipv4', - 'encap-vrf-id': 0, - 'decap-vrf-id': 0 -} - -# The second IPv6 VxLAN GPE interface. -vxlan_gpe_if6 = 'vxlan_gpe_tunnel1' -vxlan_gpe_base_ipv6_settings2 = { - 'name': vxlan_gpe_if6, - 'description': 'for testing purposes', - 'enabled': True, - 'link-up-down-trap-enable': 'enabled' -} -vxlan_gpe_ipv6_settings2 = { - 'local': '10:10:10:10:10:10:10:20', - 'remote': '10:10:10:10:10:10:10:21', - 'vni': 9, - 'next-protocol': 'ipv4', - 'encap-vrf-id': 0, - 'decap-vrf-id': 0 -} diff --git a/resources/tools/doc_gen/gen_rst.py b/resources/tools/doc_gen/gen_rst.py index 3d04568de2..c6d82817ee 100755 --- a/resources/tools/doc_gen/gen_rst.py +++ b/resources/tools/doc_gen/gen_rst.py @@ -95,7 +95,6 @@ def create_file_name(path, start): """Create the name of rst file. Example: - resources.libraries.python.honeycomb.rst tests.perf.rst :param path: Path to a module to be documented. diff --git a/resources/tools/doc_gen/src/index.rst b/resources/tools/doc_gen/src/index.rst index aa44809174..6ba9a2671b 100644 --- a/resources/tools/doc_gen/src/index.rst +++ b/resources/tools/doc_gen/src/index.rst @@ -13,7 +13,6 @@ Contents tests.dpdk.perf tests.nsh_sfc.func tests.tldk.func - tests.vpp.func tests.vpp.device tests.vpp.perf indices diff --git a/resources/tools/doc_gen/src/overview.rst b/resources/tools/doc_gen/src/overview.rst index f9cc4e4ed4..4b7ab20d87 100644 --- a/resources/tools/doc_gen/src/overview.rst +++ b/resources/tools/doc_gen/src/overview.rst @@ -15,7 +15,6 @@ CSIT Description #. Identified existing FD.io project dependencies and interactions: - vpp - Vector Packet Processing. - - honeycomb - Honeycomb Agent for management plane testing. - ci-management - Management repo for Jenkins Job Builder, script and management related to the Jenkins CI configuration. diff --git a/resources/tools/doc_gen/src/tests.vpp.func.ip4_tunnels.rst b/resources/tools/doc_gen/src/tests.vpp.func.ip4_tunnels.rst deleted file mode 100644 index 1c296e308f..0000000000 --- a/resources/tools/doc_gen/src/tests.vpp.func.ip4_tunnels.rst +++ /dev/null @@ -1,3 +0,0 @@ -IPv4 Tunnels -============ - diff --git a/resources/tools/doc_gen/src/tests.vpp.func.ip6_tunnels.rst b/resources/tools/doc_gen/src/tests.vpp.func.ip6_tunnels.rst deleted file mode 100644 index 40dbbc569b..0000000000 --- a/resources/tools/doc_gen/src/tests.vpp.func.ip6_tunnels.rst +++ /dev/null @@ -1,3 +0,0 @@ -IPv6 Tunnels -============ - diff --git a/resources/tools/doc_gen/src/tests.vpp.func.rst b/resources/tools/doc_gen/src/tests.vpp.func.rst deleted file mode 100644 index c0e02ee2d0..0000000000 --- a/resources/tools/doc_gen/src/tests.vpp.func.rst +++ /dev/null @@ -1,3 +0,0 @@ -VPP Functional Tests -==================== - diff --git a/resources/tools/doc_gen/src/tests.vpp.func.vm_vhost.rst b/resources/tools/doc_gen/src/tests.vpp.func.vm_vhost.rst deleted file mode 100644 index c669b232ea..0000000000 --- a/resources/tools/doc_gen/src/tests.vpp.func.vm_vhost.rst +++ /dev/null @@ -1,3 +0,0 @@ -VM VHOST -======== - diff --git a/resources/tools/presentation/conf.py b/resources/tools/presentation/conf.py index 49cd975d8e..9b1a8ef33d 100644 --- a/resources/tools/presentation/conf.py +++ b/resources/tools/presentation/conf.py @@ -79,8 +79,6 @@ rst_epilog = """ .. _VIRL ubuntu images lists: https://git.fd.io/csit/tree/resources/tools/disk-image-builder/ubuntu/lists/?h={release} .. _VIRL centos images lists: https://git.fd.io/csit/tree/resources/tools/disk-image-builder/centos/lists/?h={release} .. _VIRL nested: https://git.fd.io/csit/tree/resources/tools/disk-image-builder/nested/?h={release} -.. _CSIT Honeycomb Functional Tests Documentation: https://docs.fd.io/csit/{release}/doc/tests.vpp.func.honeycomb.html -.. _CSIT Honeycomb Performance Tests Documentation: https://docs.fd.io/csit/{release}/doc/tests.vpp.perf.honeycomb.html .. _CSIT DPDK Performance Tests Documentation: https://docs.fd.io/csit/{release}/doc/tests.dpdk.perf.html .. _CSIT VPP Functional Tests Documentation: https://docs.fd.io/csit/{release}/doc/tests.vpp.func.html .. _CSIT VPP Performance Tests Documentation: https://docs.fd.io/csit/{release}/doc/tests.vpp.perf.html diff --git a/resources/tools/presentation/doc/pal_lld.rst b/resources/tools/presentation/doc/pal_lld.rst index 28cb892067..e3589ae748 100644 --- a/resources/tools/presentation/doc/pal_lld.rst +++ b/resources/tools/presentation/doc/pal_lld.rst @@ -169,9 +169,7 @@ The structure of the section "Environment" is as follows (example): DIR[DTR]: "{DIR[WORKING,SRC]}/detailed_test_results" DIR[DTR,PERF,DPDK]: "{DIR[DTR]}/dpdk_performance_results" DIR[DTR,PERF,VPP]: "{DIR[DTR]}/vpp_performance_results" - DIR[DTR,PERF,HC]: "{DIR[DTR]}/honeycomb_performance_results" DIR[DTR,FUNC,VPP]: "{DIR[DTR]}/vpp_functional_results" - DIR[DTR,FUNC,HC]: "{DIR[DTR]}/honeycomb_functional_results" DIR[DTR,FUNC,NSHSFC]: "{DIR[DTR]}/nshsfc_functional_results" DIR[DTR,PERF,VPP,IMPRV]: "{DIR[WORKING,SRC]}/vpp_performance_tests/performance_improvements" diff --git a/resources/tools/presentation/specification.yaml b/resources/tools/presentation/specification.yaml index 837dfee1e6..127768d680 100644 --- a/resources/tools/presentation/specification.yaml +++ b/resources/tools/presentation/specification.yaml @@ -45,7 +45,6 @@ DIR[DTR,FUNC,VPP,UBUNTU]: "{DIR[DTR]}/vpp_functional_results_ubuntu" DIR[DTR,FUNC,VPP,CENTOS]: "{DIR[DTR]}/vpp_functional_results_centos" DIR[DTR,FUNC,VPP,DEVICE,UBUNTU]: "{DIR[DTR]}/vpp_device_results_ubuntu" - DIR[DTR,FUNC,HC]: "{DIR[DTR]}/honeycomb_functional_results" DIR[DTR,FUNC,NSHSFC]: "{DIR[DTR]}/nshsfc_functional_results" DIR[DTR,FUNC,DMM]: "{DIR[DTR]}/dmm_functional_results" DIR[DTR,PERF,VPP,IMPRV]: "{DIR[WORKING,SRC]}/vpp_performance_tests/performance_improvements" diff --git a/resources/tools/scripts/download_hc_build_pkgs.sh b/resources/tools/scripts/download_hc_build_pkgs.sh deleted file mode 100755 index 6b595a4752..0000000000 --- a/resources/tools/scripts/download_hc_build_pkgs.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -set -ex - -STREAM=$1 -OS=$2 -jvpp_commit_id=$3 - -# Figure out what system we are running on -if [[ -f /etc/os-release ]];then - source /etc/os-release -else - echo "Cannot determine OS version" - exit 1 -fi -echo "----- OS INFO -----" -echo DISTRIB_ID: ${ID} -echo DISTRIB_RELEASE: ${VERSION_ID} -echo DISTRIB_CODENAME: ${VERSION_CODENAME} -echo DISTRIB_DESCRIPTION: ${PRETTY_NAME} - -VERSION=`../vpp-version` -JVPP_VERSION=`../jvpp-version` - -if [[ -n "${jvpp_commit_id}" ]]; then - # Skipping download of JVPP because it was built from source - VPP_DEB_NEW_ARTIFACTS="vpp libvppinfra vpp-plugin-core vpp-plugin-dpdk vpp-dev libvppinfra-dev vpp-api-python" - VPP_DEB_ARTIFACTS="vpp vpp-lib vpp-plugins vpp-dev vpp-api-python" - VPP_RPM_ARTIFACTS="vpp vpp-lib vpp-plugins vpp-devel vpp-api-python" -else - VPP_DEB_NEW_ARTIFACTS="vpp libvppinfra vpp-plugin-core vpp-plugin-dpdk vpp-api-java vpp-api-python" - VPP_DEB_ARTIFACTS="vpp vpp-lib vpp-plugins vpp-api-java vpp-api-python" - VPP_RPM_ARTIFACTS="vpp vpp-lib vpp-plugins vpp-api-java vpp-api-python" -fi - -IGNORE_DEPS="" -# Check OS and stream to set correct packages -if [[ "$ID" == "centos" ]]; then - VPP_ARTIFACTS=${VPP_RPM_ARTIFACTS} -elif [[ "$ID" == "ubuntu" ]]; then - if [[ "1807 1810 1901" =~ .*$STREAM.* ]]; then - VPP_ARTIFACTS=${VPP_DEB_ARTIFACTS} - IGNORE_DEPS="vpp,vpp-lib,vpp-plugins" - else - VPP_ARTIFACTS=${VPP_DEB_NEW_ARTIFACTS} - IGNORE_DEPS="vpp,libvppinfra,vpp-plugin-core" - fi -fi -VPP_DEB_PACKAGES="" -VPP_RPM_PACKAGES="" -for ART in ${VPP_ARTIFACTS}; do - if [[ "${VERSION}" != 'RELEASE' ]]; then - if [[ "$ART" == "vpp-api-java" ]]; then - VPP_DEB_PACKAGES="$VPP_DEB_PACKAGES $ART=$JVPP_VERSION" - VPP_RPM_PACKAGES="$VPP_RPM_PACKAGES $ART-$JVPP_VERSION" - else - VPP_DEB_PACKAGES="$VPP_DEB_PACKAGES $ART=$VERSION" - VPP_RPM_PACKAGES="$VPP_RPM_PACKAGES $ART-$VERSION" - fi - else - VPP_DEB_PACKAGES="$VPP_DEB_PACKAGES $ART" - VPP_RPM_PACKAGES="$VPP_RPM_PACKAGES $ART" - fi -done - -echo "----- DOWNLOADING PACKAGES -----" -REPO_URL="https://packagecloud.io/fdio/${STREAM}" -echo "REPO_URL: ${REPO_URL}" -if [[ "$ID" == "ubuntu" ]]; then - if [[ -f /etc/apt/sources.list.d/99fd.io.list ]];then - echo "Deleting: /etc/apt/sources.list.d/99fd.io.list" - sudo rm /etc/apt/sources.list.d/99fd.io.list - fi - curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.deb.sh | sudo bash - apt-get download ${VPP_DEB_PACKAGES} || true -elif [[ "$ID" == "centos" ]]; then - if [[ -f /etc/yum.repos.d/fdio-master.repo ]]; then - echo "Deleting: /etc/yum.repos.d/fdio-master.repo" - sudo rm /etc/yum.repos.d/fdio-master.repo - fi - curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.rpm.sh | sudo bash - sudo yum -y install --downloadonly --downloaddir=./ ${VPP_RPM_PACKAGES} || true -fi -# TODO(CSIT-994): reenable NSH -# NSH_GROUP="io.fd.nsh_sfc" -# NSH_ARTIFACTS="vpp-nsh-plugin" - -# If JVPP variable is set, clone and build JVPP from the specified commit -# Otherwise skip this step, hc2vpp will use JVPP snapshots from Nexus -if [[ -n "${jvpp_commit_id}" ]]; then - # first we need to install vpp and deps to be able to build jvpp - if [[ "$ID" == "centos" ]]; then - sudo rpm -i vpp-*.rpm - else - if [[ "$VERSION_CODENAME" == "xenial" ]]; then - sudo dpkg --ignore-depends=libmbedcrypto0,libmbedtls10,libmbedx509-0 -i vpp_*.deb vpp-dev_*.deb vpp-plugin-core_*.deb libvppinfra_*.deb libvppinfra-dev_*.deb - elif [[ "$VERSION_CODENAME" == "bionic" ]]; then - sudo dpkg --ignore-depends=libmbedcrypto1,libmbedtls10,libmbedx509-0 -i vpp_*.deb vpp-dev_*.deb vpp-plugin-core_*.deb libvppinfra_*.deb libvppinfra-dev_*.deb - else - echo "Error: Unsupported UBUNTU version." - exit 1 - fi - fi - # create new dir for custom jvpp build (jvpp directory already exists in hc2vpp, therefore using jvpp_src) - mkdir jvpp_src - cd jvpp_src - git clone https://gerrit.fd.io/r/jvpp - cd jvpp - ref=`git ls-remote -q | grep ${jvpp_commit_id} | awk '{print $2}'` - git fetch origin ${ref} && git checkout FETCH_HEAD - ./clean.sh - if [[ "$ID" == "centos" ]]; then - cmake3 . - else - cmake . - fi - make package - if [[ $? != 0 ]]; then - echo "JVPP build failed." - exit 1 - fi - cp build-root/packages/vpp-api-java* ${WORKSPACE}/csit - cd ${WORKSPACE}/csit - # Clean up when done. - if [[ "$ID" == "centos" ]]; then - sudo yum remove "*vpp*" - else - sudo apt -y remove "*vpp*" - fi - rm -rf jvpp_src -fi - -# install vpp-api-java, this extracts jvpp .jar files into usr/share/java -if [[ "${OS}" == "centos7" ]]; then - sudo rpm --nodeps --install vpp-api-java* -else - sudo dpkg --ignore-depends=${IGNORE_DEPS} --install vpp-api-java* -fi - -# install jvpp jars into maven repo, so that maven picks them up when building hc2vpp -version=`../jvpp/version` - -current_dir=`pwd` -cd /usr/share/java - -for item in jvpp*.jar; do - # Example filename: jvpp-registry-19.04.jar - # ArtifactId = jvpp-registry - # Version = 19.04 or 19.04-SNAPSHOT - basefile=$(basename -s .jar "$item") - artifactId=$(echo "$basefile" | cut -d '-' -f 1-2) - mvn install:install-file -Dfile=${item} -DgroupId=io.fd.jvpp -DartifactId=${artifactId} -Dversion=${version} -Dpackaging=jar -Dmaven.repo.local=/tmp/r -Dorg.ops4j.pax.url.mvn.localRepository=/tmp/r -done - -# vpp-api-package is no longer necessary, breaks the installation of other packages that follow in next steps -if [[ "${OS}" == "centos7" ]]; then - sudo yum remove "*vpp-api-java*" -else - sudo apt -y remove "*vpp-api-java*" -fi - -cd ${current_dir} diff --git a/resources/tools/scripts/download_hc_pkgs.sh b/resources/tools/scripts/download_hc_pkgs.sh deleted file mode 100755 index 2f6cdd1451..0000000000 --- a/resources/tools/scripts/download_hc_pkgs.sh +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash - -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -set -x - -STREAM=$1 -OS=$2 - -# TODO(CSIT-994): reenable NSH -# NSH_GROUP="io.fd.nsh_sfc" -# NSH_ARTIFACTS="vpp-nsh-plugin" -# Figure out what system we are running on -if [[ -f /etc/os-release ]];then - source /etc/os-release -else - echo "Cannot determine OS version" - exit 1 -fi -echo "----- OS INFO -----" -echo DISTRIB_ID: ${ID} -echo DISTRIB_RELEASE: ${VERSION_ID} -echo DISTRIB_CODENAME: ${VERSION_CODENAME} -echo DISTRIB_DESCRIPTION: ${PRETTY_NAME} - -VERSION="RELEASE" -echo "----- DOWNLOADING HONEYCOMB AND JVPP PACKAGES -----" -REPO_URL="https://packagecloud.io/fdio/${STREAM}" -echo "REPO_URL: ${REPO_URL}" -if [[ "$ID" == "ubuntu" ]]; then - if [[ -f /etc/apt/sources.list.d/99fd.io.list ]];then - echo "Deleting: /etc/apt/sources.list.d/99fd.io.list" - sudo rm /etc/apt/sources.list.d/99fd.io.list - fi - curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.deb.sh | sudo bash - apt-get download honeycomb vpp-api-java || true -elif [[ "$ID" == "centos" ]]; then - if [[ -f /etc/yum.repos.d/fdio-master.repo ]]; then - echo "Deleting: /etc/yum.repos.d/fdio-master.repo" - sudo rm /etc/yum.repos.d/fdio-master.repo - fi - curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.rpm.sh | sudo bash - sudo yum -y install --downloadonly --downloaddir=./ honeycomb vpp-api-java || true -fi - -# TODO(CSIT-994): reenable NSH -# for ART in ${NSH_ARTIFACTS}; do -# for PAC in ${PACKAGE}; do -# curl "${URL}?r=${REPO}&g=${NSH_GROUP}&a=${ART}&p=${PAC}&v=${VER}&c=${CLASS}" -O -J || exit -# done -# done - -# determine VPP dependency -# use latest if honeycomb package does not depend on single VPP version, e.g. stable branches since HC2VPP-285 -VERSION="RELEASE" -if [[ "${OS}" == "centos7" ]]; then - HC_VPP_VER=`rpm -qpR honeycomb*.rpm | grep -oP 'vpp = \K.+'` - if [[ "${HC_VPP_VER}" != "" ]]; then - VERSION=${HC_VPP_VER}.x86_64 - fi -else - HC_VPP_VER=`dpkg -I honeycomb*.deb | grep -oP 'vpp \(= \K[^\)]+'` - if [[ "${HC_VPP_VER}" != "" ]]; then - VERSION=${HC_VPP_VER} - fi -fi - -VPP_DEB_NEW_ARTIFACTS="vpp libvppinfra vpp-plugin-core vpp-plugin-dpdk vpp-api-python" -VPP_DEB_ARTIFACTS="vpp vpp-lib vpp-plugins vpp-api-python" -VPP_RPM_ARTIFACTS="vpp vpp-lib vpp-plugins vpp-api-python" -# Check OS and stream to set correct packages -if [[ "$ID" == "centos" ]]; then - VPP_ARTIFACTS=${VPP_RPM_ARTIFACTS} -elif [[ "$ID" == "ubuntu" ]]; then - if [[ "1807 1810 1901" =~ .*$STREAM.* ]]; then - VPP_ARTIFACTS=${VPP_DEB_ARTIFACTS} - else - VPP_ARTIFACTS=${VPP_DEB_NEW_ARTIFACTS} - fi -fi -VPP_DEB_PACKAGES="" -VPP_RPM_PACKAGES="" -INSTALL_PACKAGES="" -for ART in ${VPP_ARTIFACTS}; do - INSTALL_PACKAGES="$INSTALL_PACKAGES $ART*" - if [[ "${VERSION}" != 'RELEASE' ]]; then - VPP_DEB_PACKAGES="$VPP_DEB_PACKAGES $ART=$VERSION" - VPP_RPM_PACKAGES="$VPP_RPM_PACKAGES $ART-$VERSION" - else - VPP_DEB_PACKAGES="$VPP_DEB_PACKAGES $ART" - VPP_RPM_PACKAGES="$VPP_RPM_PACKAGES $ART" - fi -done - -echo "----- DOWNLOADING VPP PACKAGES -----" -REPO_URL="https://packagecloud.io/fdio/${STREAM}" -echo "REPO_URL: ${REPO_URL}" -if [[ "$ID" == "ubuntu" ]]; then - apt-get download ${VPP_DEB_PACKAGES} || true -elif [[ "$ID" == "centos" ]]; then - sudo yum -y install --downloadonly --downloaddir=./ ${VPP_RPM_PACKAGES} || true -fi diff --git a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml index 5083a96a29..45183e3490 100644 --- a/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml +++ b/resources/tools/testbed-setup/ansible/roles/cleanup/tasks/sut.yaml @@ -19,12 +19,6 @@ process: "testpmd" tags: kill-process -- name: Remove file or dir - HoneyComb logs - file: - state: absent - path: "/var/log/honeycomb" - tags: remove-file-dir - - name: Remove file or dir - Core zip file file: state: absent diff --git a/resources/tools/virl/topologies/double-ring-nested.trusty.virl b/resources/tools/virl/topologies/double-ring-nested.trusty.virl deleted file mode 100644 index 4dd5885281..0000000000 --- a/resources/tools/virl/topologies/double-ring-nested.trusty.virl +++ /dev/null @@ -1,327 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<topology xmlns="http://www.cisco.com/VIRL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="0.9" xsi:schemaLocation="http://www.cisco.com/VIRL https://raw.github.com/CiscoVIRL/schema/v0.9/virl.xsd"> - <extensions> - <entry key="management_network" type="String">flat</entry> - </extensions> - <node name="tg1" type="SIMPLE" subtype="server" location="570,238" vmImage="$$VM_IMAGE$$"> - <extensions> - <entry key="config" type="String">#cloud-config
 -bootcmd:
 -- ln -s -t /etc/rc.d /etc/rc.local
 -hostname: tg1
 -manage_etc_hosts: true
 -nfs_server_scratch: $$NFS_SERVER_SCRATCH$$ -nfs_server_common: $$NFS_SERVER_COMMON$$ -runcmd:
 -- start ttyS0
 -- systemctl start getty@ttyS0.service
 -- systemctl start rc-local
 -- touch /tmp/before-sed
 -- sed -i 's/^\s*PasswordAuthentication\s\+no/PasswordAuthentication yes/' /etc/ssh/sshd_config
 -- echo "UseDNS no" >> /etc/ssh/sshd_config
 -- service ssh restart
 -- service sshd restart
 -users:
 -- default
 -- gecos: User configured by VIRL Configuration Engine 0.21.4
 - lock-passwd: false
 - name: cisco
 - plain-text-passwd: cisco
 - shell: /bin/bash
 - ssh-authorized-keys:
 - - VIRL-USER-SSH-PUBLIC-KEY
 - - VIRL-USER-SSH-PUBLIC-KEY
 - sudo: ALL=(ALL) NOPASSWD:ALL
 -write_files:
 -- path: /etc/init/ttyS0.conf
 - owner: root:root
 - content: |
 - # ttyS0 - getty
 - # This service maintains a getty on ttyS0 from the point the system is
 - # started until it is shut down again.
 - start on stopped rc or RUNLEVEL=[12345]
 - stop on runlevel [!12345]
 - respawn
 - exec /sbin/getty -L 115200 ttyS0 vt102
 - permissions: '0644'
 -- path: /etc/systemd/system/dhclient@.service
 - content: |
 - [Unit]
 - Description=Run dhclient on %i interface
 - After=network.target
 - [Service]
 - Type=oneshot
 - ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease
 - RemainAfterExit=yes
 - owner: root:root
 - permissions: '0644'
 -- path: /usr/local/sbin/cloud-instance-name - content: | - #!/usr/bin/python - import pickle - print pickle.loads(open('/var/lib/cloud/instance/obj.pkl').read()).metadata['name'] - owner: root:root - permissions: '0755' -- path: /etc/rc.local
 - owner: root:root
 - permissions: '0755'
 - content: |-
 - #!/bin/sh
 - grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1 - grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1 - nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }') - nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }') - instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>') - echo My instance name is $instance_name - - MAXCOUNT=12 - RETRY=5 - - mkdir -p /scratch - mkdir -p /mnt/common - - echo "Mounting NFS directories" - count=0 - while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch - do - sleep 5 - count=$[$count+1] - done - - mount -t nfs "${nfs_server_common}" /mnt/common - - mkdir /scratch/$(hostname) - cp /VERSION /scratch/$(hostname)/ - - exit 0
 -</entry> - <entry key="Auto-generate config" type="Boolean">false</entry> - </extensions> - <interface id="0" name="eth1"/> - <interface id="1" name="eth2"/> - <interface id="2" name="eth3"/> - <interface id="3" name="eth4"/> - <interface id="4" name="eth5"/> - <interface id="5" name="eth6"/> - </node> - <node name="sut1" type="SIMPLE" subtype="vPP" location="425,26" vmImage="$$VM_IMAGE$$"> - <extensions> - <entry key="config" type="string">#cloud-config -bootcmd: -- ln -s -t /etc/rc.d /etc/rc.local -hostname: sut1 -manage_etc_hosts: true -nfs_server_scratch: $$NFS_SERVER_SCRATCH$$ -nfs_server_common: $$NFS_SERVER_COMMON$$ -runcmd: -- start ttyS0 -- systemctl start getty@ttyS0.service -- systemctl start rc-local -- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config -- echo "UseDNS no" >> /etc/ssh/sshd_config -- service ssh restart -- service sshd restart -- sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf -- sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf -users: -- default -- gecos: User configured by VIRL Configuration Engine 0.21.4 - lock-passwd: false - name: cisco - plain-text-passwd: cisco - shell: /bin/bash - ssh-authorized-keys: - - VIRL-USER-SSH-PUBLIC-KEY - - VIRL-USER-SSH-PUBLIC-KEY - sudo: ALL=(ALL) NOPASSWD:ALL -write_files: -- path: /etc/init/ttyS0.conf - owner: root:root - content: | - # ttyS0 - getty - # This service maintains a getty on ttyS0 from the point the system is - # started until it is shut down again. - start on stopped rc or RUNLEVEL=[12345] - stop on runlevel [!12345] - respawn - exec /sbin/getty -L 115200 ttyS0 vt102 - permissions: '0644' -- path: /etc/systemd/system/dhclient@.service - content: | - [Unit] - Description=Run dhclient on %i interface - After=network.target - [Service] - Type=oneshot - ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease - RemainAfterExit=yes - owner: root:root - permissions: '0644' -- path: /usr/local/sbin/cloud-instance-name - content: | - #!/usr/bin/python - import pickle - print pickle.loads(open('/var/lib/cloud/instance/obj.pkl').read()).metadata['name'] - owner: root:root - permissions: '0755' -- path: /etc/rc.local
 - owner: root:root
 - permissions: '0755'
 - content: |-
 - #!/bin/sh
 - grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1 - grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1 - nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }') - nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }') - instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>') - echo My instance name is $instance_name - - MAXCOUNT=12 - RETRY=5 - - mkdir -p /scratch - mkdir -p /mnt/common - - echo "Mounting NFS directories" - count=0 - while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch - do - sleep 5 - count=$[$count+1] - done - - mount -t nfs "${nfs_server_common}" /mnt/common - - # Overwrite nested VM image with latest as per NFS - if [ -f /mnt/common/nested-vm-current.img ] - then - rm -f /var/lib/vm/vhost-nested.img - cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img - fi - - mkdir /scratch/$(hostname) - cp /VERSION /scratch/$(hostname)/ - cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION - - exit 0
 -</entry> - </extensions> - <interface id="0" name="GigabitEthernet0/4/0"/> - <interface id="1" name="GigabitEthernet0/5/0"/> - <interface id="2" name="GigabitEthernet0/6/0"/> - <interface id="3" name="GigabitEthernet0/7/0"/> - </node> - <node name="sut2" type="SIMPLE" subtype="vPP" location="748,26" vmImage="$$VM_IMAGE$$"> - <extensions> - <entry key="config" type="string">#cloud-config -bootcmd: -- ln -s -t /etc/rc.d /etc/rc.local -hostname: sut2 -manage_etc_hosts: true -nfs_server_scratch: $$NFS_SERVER_SCRATCH$$ -nfs_server_common: $$NFS_SERVER_COMMON$$ -runcmd: -- start ttyS0 -- systemctl start getty@ttyS0.service -- systemctl start rc-local -- sed -i '/^\s*PasswordAuthentication\s\+no/d' /etc/ssh/sshd_config -- echo "UseDNS no" >> /etc/ssh/sshd_config -- service ssh restart -- service sshd restart -- sed -i 's/no-pci//' /opt/cisco/vpe/etc/qn.conf -- sed -i 's/1024/1024 decimal-interface-names/g' /opt/cisco/vpe/etc/qn.conf -users: -- default -- gecos: User configured by VIRL Configuration Engine 0.21.4 - lock-passwd: false - name: cisco - plain-text-passwd: cisco - shell: /bin/bash - ssh-authorized-keys: - - VIRL-USER-SSH-PUBLIC-KEY - - VIRL-USER-SSH-PUBLIC-KEY - sudo: ALL=(ALL) NOPASSWD:ALL -write_files: -- path: /etc/init/ttyS0.conf - owner: root:root - content: | - # ttyS0 - getty - # This service maintains a getty on ttyS0 from the point the system is - # started until it is shut down again. - start on stopped rc or RUNLEVEL=[12345] - stop on runlevel [!12345] - respawn - exec /sbin/getty -L 115200 ttyS0 vt102 - permissions: '0644' -- path: /etc/systemd/system/dhclient@.service - content: | - [Unit] - Description=Run dhclient on %i interface - After=network.target - [Service] - Type=oneshot - ExecStart=/sbin/dhclient %i -pf /var/run/dhclient.%i.pid -lf /var/lib/dhclient/dhclient.%i.lease - RemainAfterExit=yes - owner: root:root - permissions: '0644' -- path: /usr/local/sbin/cloud-instance-name - content: | - #!/usr/bin/python - import pickle - print pickle.loads(open('/var/lib/cloud/instance/obj.pkl').read()).metadata['name'] - owner: root:root - permissions: '0755' -- path: /etc/rc.local
 - owner: root:root
 - permissions: '0755'
 - content: |-
 - #!/bin/sh
 - grep -q nfs_server_scratch /var/lib/cloud/instance/user-data.txt || exit 1 - grep -q nfs_server_common /var/lib/cloud/instance/user-data.txt || exit 1 - nfs_server_scratch=$(grep -E '^nfs_server_scratch:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }') - nfs_server_common=$(grep -E '^nfs_server_common:' /var/lib/cloud/instance/user-data.txt | awk '{ print $2 }') - instance_name=$(/usr/local/sbin/cloud-instance-name | cut -f 3 -d '<' | cut -f 1 -d '>') - echo My instance name is $instance_name - - MAXCOUNT=12 - RETRY=5 - - mkdir -p /scratch - mkdir -p /mnt/common - - echo "Mounting NFS directories" - count=0 - while [ $count -lt $MAXCOUNT ] && ! mount -t nfs "${nfs_server_scratch}/${instance_name}" /scratch - do - sleep 5 - count=$[$count+1] - done - - mount -t nfs "${nfs_server_common}" /mnt/common - - # Overwrite nested VM image with latest as per NFS - if [ -f /mnt/common/nested-vm-current.img ] - then - rm -f /var/lib/vm/vhost-nested.img - cp /mnt/common/nested-vm-current.img /var/lib/vm/vhost-nested.img - fi - - mkdir /scratch/$(hostname) - cp /VERSION /scratch/$(hostname)/ - cat /var/lib/vm/vhost-nested.img | strings | grep NESTED_VERSION= > /scratch/$(hostname)/NESTED_VERSION - - exit 0
 -</entry> - </extensions> - <interface id="0" name="GigabitEthernet0/4/0"/> - <interface id="1" name="GigabitEthernet0/5/0"/> - <interface id="2" name="GigabitEthernet0/6/0"/> - <interface id="3" name="GigabitEthernet0/7/0"/> - </node> - <connection dst="/virl:topology/virl:node[1]/virl:interface[3]" src="/virl:topology/virl:node[2]/virl:interface[1]"/> - <connection dst="/virl:topology/virl:node[1]/virl:interface[4]" src="/virl:topology/virl:node[2]/virl:interface[2]"/> - <connection dst="/virl:topology/virl:node[2]/virl:interface[3]" src="/virl:topology/virl:node[3]/virl:interface[3]"/> - <connection dst="/virl:topology/virl:node[2]/virl:interface[4]" src="/virl:topology/virl:node[3]/virl:interface[4]"/> - <connection dst="/virl:topology/virl:node[1]/virl:interface[5]" src="/virl:topology/virl:node[3]/virl:interface[1]"/> - <connection dst="/virl:topology/virl:node[1]/virl:interface[6]" src="/virl:topology/virl:node[3]/virl:interface[2]"/> -</topology> diff --git a/resources/tools/virl/topologies/double-ring-nested.trusty.yaml b/resources/tools/virl/topologies/double-ring-nested.trusty.yaml deleted file mode 100644 index d35e24b777..0000000000 --- a/resources/tools/virl/topologies/double-ring-nested.trusty.yaml +++ /dev/null @@ -1,98 +0,0 @@ ---- -metadata: - version: 0.1 - schema: - - resources/topology_schemas/3_node_topology.sch.yaml - - resources/topology_schemas/topology.sch.yaml - tags: [hw, 3-node] - -nodes: - TG: - type: TG - host: "{topology[tg1][nic-management][ip-addr]}" - arch: x86_64 - port: 22 - username: cisco - priv_key: | -{priv_key} - interfaces: - port3: - mac_address: "{topology[tg1][nic-2][hw-addr]}" - pci_address: "0000:00:06.0" - link: link1 - driver: virtio-pci - port4: - mac_address: "{topology[tg1][nic-3][hw-addr]}" - pci_address: "0000:00:07.0" - link: link4 - driver: virtio-pci - port5: - mac_address: "{topology[tg1][nic-4][hw-addr]}" - pci_address: "0000:00:08.0" - link: link2 - driver: virtio-pci - port6: - mac_address: "{topology[tg1][nic-5][hw-addr]}" - pci_address: "0000:00:09.0" - link: link5 - driver: virtio-pci - DUT1: - type: DUT - host: "{topology[sut1][nic-management][ip-addr]}" - arch: x86_64 - port: 22 - username: cisco - honeycomb: - user: admin - passwd: admin - port: 8183 - netconf_port: 2831 - priv_key: | -{priv_key} - interfaces: - port1: - mac_address: "{topology[sut1][nic-0][hw-addr]}" - pci_address: "0000:00:04.0" - link: link1 - port2: - mac_address: "{topology[sut1][nic-1][hw-addr]}" - pci_address: "0000:00:05.0" - link: link4 - port3: - mac_address: "{topology[sut1][nic-2][hw-addr]}" - pci_address: "0000:00:06.0" - link: link3 - port4: - mac_address: "{topology[sut1][nic-3][hw-addr]}" - pci_address: "0000:00:07.0" - link: link6 - DUT2: - type: DUT - host: "{topology[sut2][nic-management][ip-addr]}" - arch: x86_64 - port: 22 - username: cisco - honeycomb: - user: admin - passwd: admin - port: 8183 - netconf_port: 2831 - priv_key: | -{priv_key} - interfaces: - port1: - mac_address: "{topology[sut2][nic-0][hw-addr]}" - pci_address: "0000:00:04.0" - link: link2 - port2: - mac_address: "{topology[sut2][nic-1][hw-addr]}" - pci_address: "0000:00:05.0" - link: link5 - port3: - mac_address: "{topology[sut2][nic-2][hw-addr]}" - pci_address: "0000:00:06.0" - link: link3 - port4: - mac_address: "{topology[sut2][nic-3][hw-addr]}" - pci_address: "0000:00:07.0" - link: link6 diff --git a/resources/traffic_scripts/honeycomb/bgp_open.py b/resources/traffic_scripts/honeycomb/bgp_open.py deleted file mode 100755 index e7bb7d841a..0000000000 --- a/resources/traffic_scripts/honeycomb/bgp_open.py +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env python -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -"""Traffic script that listens for incoming BGP connections and verifies -received GBP Open message.""" - -import sys -import socket - -from scapy.main import load_contrib -from scapy.layers.inet import Raw -from scapy.contrib.bgp import BGPHeader, BGPOpen - -from resources.libraries.python.TrafficScriptArg import TrafficScriptArg - - -def main(): - """Open a TCP listener socket on the default BGP port. Accept an incoming - connection, receive data and verify if data is a valid BGP Open message.""" - args = TrafficScriptArg(['rx_ip', 'src_ip', 'rx_port', 'as_number', - 'holdtime']) - - rx_ip = args.get_arg('rx_ip') - src_ip = args.get_arg('src_ip') - rx_port = int(args.get_arg('rx_port')) - as_number = int(args.get_arg('as_number')) - holdtime = int(args.get_arg('holdtime')) - - load_contrib("bgp") - - soc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - soc.bind((rx_ip, rx_port)) - soc.listen(1) - - print "Listener active, awaiting connection..." - soc.settimeout(8) - conn, addr = soc.accept() - print 'Connection established with peer:', addr - - data = conn.recv(256) - conn.close() - soc.close() - - bgp_layer = (BGPHeader(Raw(data).load)) - bgp_layer.show() - - if not bgp_layer.haslayer(BGPOpen): - raise RuntimeError("Received data is not a BGP OPEN message.") - bgp_open = bgp_layer.getlayer(BGPOpen) - if bgp_open.bgp_id != src_ip: - raise RuntimeError( - "BGP ID mismatch. Received {0} but should be {1}". - format(bgp_open.bgp_id, src_ip)) - else: - print "BGP ID matched." - - if bgp_open.AS != as_number: - raise RuntimeError( - "BGP AS number mismatch. Received {0} but should be {1}". - format(bgp_open.AS, as_number)) - else: - print "BGP AS number matched." - - if bgp_open.hold_time != holdtime: - raise RuntimeError( - "Hold Time parameter mismatch. Received {0} but should be {1}.". - format(bgp_layer.getlayer(BGPOpen).holdtime, holdtime)) - else: - print "BGP Hold Time parameter matched." - - sys.exit(0) - -if __name__ == "__main__": - main() diff --git a/resources/traffic_scripts/honeycomb/read_vpp_version.py b/resources/traffic_scripts/honeycomb/read_vpp_version.py deleted file mode 100755 index 6a275e7c0f..0000000000 --- a/resources/traffic_scripts/honeycomb/read_vpp_version.py +++ /dev/null @@ -1,359 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -import socket -import multiprocessing -import argparse -from time import time - - -class Counter(object): - """Counter used for stats collection.""" - def __init__(self, start=0): - """Initializer.""" - self.lock = multiprocessing.Lock() - self.value = start - - def increment(self, value=1): - """Increment counter and return the new value.""" - self.lock.acquire() - val = self.value - try: - self.value += value - finally: - self.lock.release() - return val - - -class timer(object): - """Timer used used during test execution.""" - def __init__(self, verbose=False): - self.verbose = verbose - - def __enter__(self): - """Start the timer.""" - self.start = time() - return self - - def __exit__(self, *args): - """Stop the timer and save current value.""" - self.end = time() - self.secs = self.end - self.start - self.msecs = self.secs * 1000 # millisecs - if self.verbose: - print("elapsed time: {0} ms".format(self.msecs)) - - -class ConfigBlaster(object): - """Generates Netconf requests, receives replies and collects statistics.""" - - TIMEOUT = 10 - - # Hello message with capabilities list for Netconf sessions. - hello = u"""<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" - message-id="m-0"> - <capabilities> - <capability>urn:ietf:params:netconf:base:1.0</capability> - </capabilities> - </hello> - ]]>]]>""" - - # RPC to retrieve VPP version (minimal processing in VPP) - request_template = u"""<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" - message-id="m-1"> - <get> - <filter xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0" - ns0:type="subtree"> - <vpp-state xmlns="http://fd.io/hc2vpp/yang/vpp-management"> - <version/> - </vpp-state> - </filter> - </get> - </rpc> - ]]>]]>""" - - class Stats(object): - """Stores and further processes statistics collected by worker - threads during their execution. - """ - - def __init__(self): - """Initializer.""" - self.ok_rqst_rate = Counter(0) - self.total_rqst_rate = Counter(0) - self.ok_rqsts = Counter(0) - self.total_rqsts = Counter(0) - - def process_stats(self, rqst_stats, elapsed_time): - """Calculates the stats for request/reply throughput, and aggregates - statistics across all threads. - - :param rqst_stats: Request statistics dictionary. - :param elapsed_time: Elapsed time for the test. - :type rqst_stats: dict - :type elapsed_time: int - :returns: Rates (requests/sec) for successfully finished requests - and the total number of requests. - :rtype: tuple - """ - ok_rqsts = rqst_stats["OK"] - total_rqsts = sum(rqst_stats.values()) - - ok_rqst_rate = ok_rqsts / elapsed_time - total_rqst_rate = total_rqsts / elapsed_time - - self.ok_rqsts.increment(ok_rqsts) - self.total_rqsts.increment(total_rqsts) - - self.ok_rqst_rate.increment(ok_rqst_rate) - self.total_rqst_rate.increment(total_rqst_rate) - - return ok_rqst_rate, total_rqst_rate - - @property - def get_ok_rqst_rate(self): - return self.ok_rqst_rate.value - - @property - def get_total_rqst_rate(self): - return self.total_rqst_rate.value - - @property - def get_ok_rqsts(self): - return self.ok_rqsts.value - - @property - def get_total_rqsts(self): - return self.total_rqsts.value - - def __init__(self, host, port, ncycles, nthreads, nrequests): - """Initializer. - - :param host: Target IP address. - :param port: Target port. - :param ncycles: Number of test cycles. - :param nthreads: Number of threads for packet generation. - :param nrequests: Number of requests to send per thread. - :type host: str - :type port: int - :type ncycles: int - :type nthreads: int - :type nrequests: int - """ - - self.host = host - self.port = port - self.ncycles = ncycles - self.nthreads = nthreads - self.nrequests = nrequests - - self.stats = self.Stats() - self.total_ok_rqsts = 0 - - self.print_lock = multiprocessing.Lock() - self.cond = multiprocessing.Condition() - self.threads_done = 0 - - self.recv_buf = 8192 - - def send_request(self, sock): - """Send Netconf request and receive the reply. - - :param sock: Socket object to use for transfer. - :type sock: socket object - :returns: Response to request or error message. - :rtype: str - """ - - sock.send(self.request_template) - try: - return sock.recv(self.recv_buf) - except socket.timeout: - return "timeout" - except socket.error: - return "error" - - def send_requests(self, tid, stats): - """Read entries from the Honeycomb operational data store. This function - is executed by a worker thread. - - :param tid: Thread ID - used to id the Blaster thread when - statistics for the thread are printed out. - :param stats: Synchronized queue object for returning execution stats. - :type tid: int - :type stats: multiprocessing.Queue - """ - - rqst_stats = {"OK": 0, "Error": 0, "Timeout": 0} - - sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - sock.settimeout(5) - # Initiate connection - sock.connect((self.host, self.port)) - # Send hello message - sock.send(self.hello) - # Receive hello message - sock.recv(self.recv_buf) - # Determine length of expected responses - self.recv_buf = len(self.send_request(sock)) - - with self.print_lock: - print("\n Thread {0}:\n" - " Sending {1} requests".format(tid, - self.nrequests)) - - replies = [None]*self.nrequests - with timer() as t: - for x in range(self.nrequests): - sts = self.send_request(sock) - replies[x] = sts - - for reply in replies: - if reply == "timeout": - rqst_stats["Timeout"] += 1 - elif "error" in reply: - rqst_stats["Error"] += 1 - else: - rqst_stats["OK"] += 1 - - ok_rps, total_rps = self.stats.process_stats( - rqst_stats, t.secs) - - with self.print_lock: - print("\n Thread {0} results (READ): ".format(tid)) - print(" Elapsed time: {0:.2f}s,".format(t.secs)) - print(" Requests/s: {0:.2f} OK, {1:.2f} Total".format( - ok_rps, total_rps)) - print(" Stats ({Requests}, {entries}): "), - print(rqst_stats) - self.threads_done += 1 - - sock.close() - - stats.put({"stats": rqst_stats, "time": t.secs}) - - with self.cond: - self.cond.notify_all() - - def run_cycle(self, function): - """Runs a test cycle. Each test consists of <cycles> test cycles, where - <threads> worker threads are started in each test cycle. Each thread - reads <requests> entries using Netconf RPCs. - - :param function: Function to be executed in each thread. - :type function: function - """ - - self.total_ok_rqsts = 0 - stats_queue = multiprocessing.Queue() - - for c in range(self.ncycles): - self.stats = self.Stats() - with self.print_lock: - print "\nCycle {0}:".format(c) - - threads = [] - thread_stats = [] - for i in range(self.nthreads): - t = multiprocessing.Process(target=function, - args=(i, stats_queue)) - threads.append(t) - t.start() - - # Wait for all threads to finish and measure the execution time - with timer() as t: - for _ in threads: - thread_stats.append(stats_queue.get()) - for thread in threads: - thread.join() - - for item in thread_stats: - self.stats.process_stats(item["stats"], item["time"]) - - with self.print_lock: - print("\n*** Test summary:") - print(" Elapsed time: {0:.2f}s".format(t.secs)) - print( - " Peak requests/s: {0:.2f} OK, {1:.2f} Total".format( - self.stats.get_ok_rqst_rate, - self.stats.get_total_rqst_rate)) - print( - " Avg. requests/s: {0:.2f} OK, {1:.2f} Total ({2:.2f} " - "of peak total)".format( - self.stats.get_ok_rqsts / t.secs, - self.stats.get_total_rqsts / t.secs, - (self.stats.get_total_rqsts / t.secs * 100) / - self.stats.get_total_rqst_rate)) - - self.total_ok_rqsts += self.stats.get_ok_rqsts - - self.threads_done = 0 - - def add_blaster(self): - """Run the test.""" - self.run_cycle(self.send_requests) - - @property - def get_ok_rqsts(self): - return self.total_ok_rqsts - - -def create_arguments_parser(): - """Creates argument parser for test script. - Shorthand to arg parser on library level in order to access and - eventually enhance in ancestors. - - :returns: argument parser supporting arguments and parameters - :rtype: argparse.ArgumentParser - """ - my_parser = argparse.ArgumentParser( - description="entry reading performance test: Reads entries from " - "the config tree, as specified by optional parameters.") - - my_parser.add_argument( - "--host", default="127.0.0.1", - help="Host where odl controller is running (default is 127.0.0.1).") - my_parser.add_argument( - "--port", default=7777, - help="Port on which Honeycomb's Netconf is listening" - " (default is 7777 for TCP)") - my_parser.add_argument( - "--cycles", type=int, default=1, - help="Number of entry read cycles; default 1. <THREADS> worker threads " - "are started in each cycle and the cycle ends when all threads " - "finish. Another cycle is started when the previous cycle " - "is finished.") - my_parser.add_argument( - "--threads", type=int, default=1, - help="Number of request worker threads to start in each cycle; " - "default=1. Each thread will read <entries> entries.") - my_parser.add_argument( - "--requests", type=int, default=10, - help="Number of requests that will be made by each worker thread " - "in each cycle; default 10") - - return my_parser - -if __name__ == "__main__": - - parser = create_arguments_parser() - in_args = parser.parse_args() - - fct = ConfigBlaster(in_args.host, in_args.port, in_args.cycles, - in_args.threads, in_args.requests) - - # Run through <cycles>, where <threads> are started in each cycle and - # <entries> are added from each thread - fct.add_blaster() - - print " Successful reads: {0}\n".format(fct.get_ok_rqsts) diff --git a/tests/honeycomb/func/__init__.robot b/tests/honeycomb/func/__init__.robot deleted file mode 100644 index edb354cfe6..0000000000 --- a/tests/honeycomb/func/__init__.robot +++ /dev/null @@ -1,37 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables*** -# Honeycomb node to run tests on. -| ${node}= | ${nodes['DUT1']} - -*** Settings *** -| Library | resources.libraries.python.SetupFramework -| Library | resources.libraries.python.SetupFramework.CleanupFramework -| Library | resources/libraries/python/honeycomb/HcPersistence.py -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/interfaces.robot -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| ... -| Suite Setup | Run Keywords | Setup Framework | ${nodes} | AND -| ... | Restart Vpp Service On All Duts | ${nodes} | AND -| ... | Verify Vpp On All Duts | ${nodes} | AND -| ... | VPP Enable Traces On All Duts | ${nodes} | AND -| ... | Update All Interface Data On All Nodes | ${nodes} | AND -| ... | Set Global Variable | ${node} | AND -| ... | Stop Honeycomb service on DUTs | ${node} | AND -| ... | Clear Honeycomb Log | ${node} -| ... -| Suite Teardown | Run Keywords | Archive Honeycomb logs | ${node} | AND -| ... | Cleanup Framework | ${nodes} diff --git a/tests/honeycomb/func/mgmt-cfg-acl-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-acl-apihc-apivat-func.robot deleted file mode 100644 index 86e8788044..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-acl-apihc-apivat-func.robot +++ /dev/null @@ -1,169 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interface to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/access_control_lists.robot -| Variables | resources/test_data/honeycomb/acl.py -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Documentation | *Honeycomb access control lists test suite.* -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -| TC01: Honeycomb can create ACL classify table -| | [Documentation] | Check if Honeycomb API can create an ACL table. -| | ... -| | Given ACL table from Honeycomb should not exist -| | ... | ${node} | ${hc_acl_table['name']} -| | And ACL table from VAT should not exist -| | ... | ${node} | ${table_index} -| | When Honeycomb creates ACL table -| | ... | ${node} | ${hc_acl_table} -| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index} | ${vat_acl_table} - -| TC02: Honeycomb can remove ACL table -| | [Documentation] | Check if Honeycomb API can delete an ACL table. -| | ... -| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index} | ${vat_acl_table} -| | When Honeycomb removes ACL table | ${node} | ${hc_acl_table['name']} -| | Then ACL table from Honeycomb should not exist -| | ... | ${node} | ${hc_acl_table['name']} -| | And ACL table from VAT should not exist -| | ... | ${node} | ${table_index} - -| TC03: Honeycomb manages more than one ACL table -| | [Documentation] | Check if Honeycomb API can create another ACL table. -| | ... -| | Given ACL table from Honeycomb should not exist -| | ... | ${node} | ${hc_acl_table['name']} -| | And ACL table from VAT should not exist -| | ... | ${node} | ${table_index} -| | When Honeycomb creates ACL table | ${node} | ${hc_acl_table} -| | And Honeycomb creates ACL table | ${node} | ${hc_acl_table2} -| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index} | ${vat_acl_table} -| | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index2} | ${vat_acl_table2} - -| TC04: Honeycomb can add ACL session to table -| | [Documentation] | Check if Honeycomb API can add an ACL session to a table. -| | ... -| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index} | ${vat_acl_table} -| | When Honeycomb adds ACL session -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} -| | Then ACL session from Honeycomb should be -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} -| | And ACL session from PAPI should be -| | ... | ${node} | ${table_index} | ${vat_acl_session} - -| TC05: Honeycomb can remove ACL session -| | [Documentation] | Check if Honeycomb API can remove an ACL session. -| | ... -| | Given ACL session from Honeycomb should be -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} -| | And ACL session from PAPI should be -| | ... | ${node} | ${table_index} | ${vat_acl_session} -| | When Honeycomb removes ACL session -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']} -| | Then ACL session from Honeycomb should not exist -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']} -| | And ACL session from PAPI should not exist -| | ... | ${node} | ${table_index} - -| TC06: Honeycomb manages more than one ACL session on one table -| | [Documentation] | Check if Honeycomb API can add another ACL session\ -| | ... | to a table. -| | ... -| | Given ACL session from Honeycomb should not exist -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session['match']} -| | And ACL session from PAPI should not exist -| | ... | ${node} | ${table_index} -| | When Honeycomb adds ACL session -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} -| | And Honeycomb adds ACL session -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2} -| | Then ACL session from Honeycomb should be -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} -| | And ACL session from PAPI should be -| | ... | ${node} | ${table_index} | ${vat_acl_session} -| | And ACL session from Honeycomb should be -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session2} -| | And ACL session from PAPI should be -| | ... | ${node} | ${table_index} | ${vat_acl_session2} - -| TC07: Honeycomb enables ACL on interface -| | [Documentation] | Check if Honeycomb API can enable ACL on an interface. -| | ... -| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index} | ${vat_acl_table} -| | And ACL session from Honeycomb should be -| | ... | ${node} | ${hc_acl_table['name']} | ${hc_acl_session} -| | And ACL session from PAPI should be -| | ... | ${node} | ${table_index} | ${vat_acl_session} -| | When Honeycomb enables ACL on interface -| | ... | ${node} | ${interface} | ${hc_acl_table['name']} -| | Then Interface ACL configuration from Honeycomb should be -| | ... | ${node} | ${interface} | ${hc_acl_table['name']} -| | And Interface ACL configuration from VAT should be -| | ... | ${node} | ${interface} | ${table_index} - -| TC08: Honeycomb disables ACL on interface -| | [Documentation] | Check if Honeycomb API can disable ACL on an interface. -| | ... -| | Given Interface ACL configuration from Honeycomb should be -| | ... | ${node} | ${interface} | ${hc_acl_table['name']} -| | And Interface ACL configuration from VAT should be -| | ... | ${node} | ${interface} | ${table_index} -| | When Honeycomb disables ACL on interface | ${node} | ${interface} -| | Then Interface ACL configuration from Honeycomb should be empty -| | ... | ${node} | ${interface} -| | And Interface ACL configuration from VAT should be empty -| | ... | ${node} | ${interface} - -| TC09: Honeycomb can remove one out of multiple ACL tables -| | [Documentation] | Check if Honeycomb API can delete an ACL table if more\ -| | ... | than one table exists. -| | ... -| | Given ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index} | ${vat_acl_table} -| | And ACL table from Honeycomb should be | ${node} | ${hc_acl_table2_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index2} | ${vat_acl_table2} -| | When Honeycomb removes ACL table | ${node} | ${hc_acl_table2['name']} -| | Then ACL table from Honeycomb should be | ${node} | ${hc_acl_table_oper} -| | And ACL table from VAT should be -| | ... | ${node} | ${table_index} | ${vat_acl_table} -| | And ACL table from Honeycomb should not exist -| | ... | ${node} | ${hc_acl_table2['name']} -| | And ACL table from VAT should not exist -| | ... | ${node} | ${table_index2} diff --git a/tests/honeycomb/func/mgmt-cfg-apihcv6-func.robot b/tests/honeycomb/func/mgmt-cfg-apihcv6-func.robot deleted file mode 100644 index ceefd3ce1e..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-apihcv6-func.robot +++ /dev/null @@ -1,180 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# IP addresses for IPv6 link -| ${tg_to_dut_if2_ip}= | fd00:1234::1 -| ${dut_to_tg_if2_ip}= | fd00:1234::2 -| ${ipv6_prefix}= | ${64} -# Configuration which will be set and verified during tests. -| ${bd1_name}= | bd-01 -| ${bd2_name}= | bd-02 -| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} -| ... | unknown-unicast-flood=${True} | arp-termination=${True} -| &{if_settings}= | split_horizon_group=${1} | bvi=${False} -| &{if_settings2}= | split_horizon_group=${2} | bvi=${True} -| ${vhost_interface}= | test_vhost -| &{vhost_user_server}= | socket=/tmp/soc1 | role=server -| &{vhost_user_server_edit_1}= | socket=/tmp/soc12 | role=server -| &{vhost_user_server_edit_2}= | socket=/tmp/soc12 | role=client - -*** Settings *** -| Library | resources.libraries.python.honeycomb.IPv6Management -| Library | resources.libraries.python.VPPUtil -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Resource | resources/libraries/robot/honeycomb/ipv6_control.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/honeycomb/netconf.robot -| Resource | resources/libraries/robot/honeycomb/vhost_user.robot -| Variables | resources/test_data/honeycomb/netconf/triggers.py -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Run Keywords -| ... | Unconfigure IPv6 Management Interface | AND -| ... | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC | HC_REST_ONLY -| ... -| Documentation | *Honeycomb IPv6 control interface test suite.* - -*** Test Cases *** -| TC01: Honeycomb sets up l2 bridge domain -| | [Documentation] | Check if Honeycomb can create bridge domains on VPP node. -| | ... -| | [Setup] | Configure IPv6 Management Interface -| | When Honeycomb creates first l2 bridge domain -| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings} -| | Then Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings} - -| TC02: Honeycomb removes bridge domains -| | [Documentation] | Check if Honeycomb can remove bridge domains from a VPP\ -| | ... | node. -| | ... -| | Given Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings} -| | When Honeycomb removes all bridge domains | ${tunneled_node} -| | Then Honeycomb should show no bridge domains | ${tunneled_node} - -| TC03: Honeycomb creates vhost-user interface - server -| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\ -| | ... | server. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${tunneled_node} | ${vhost_interface} -| | When Honeycomb creates vhost-user interface -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} - -| TC04: Honeycomb modifies vhost-user interface - server -| | [Documentation] | Check if Honeycomb can modify properties of existing\ -| | ... | vhost-user interface, role: server. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} -| | When Honeycomb configures vhost-user interface -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_1} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_1} -| | When Honeycomb configures vhost-user interface -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_2} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_2} -| | When Honeycomb configures vhost-user interface -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} - -| TC05: Honeycomb deletes vhost-user interface - server -| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\ -| | ... | interface, role: server. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be -| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server} -| | When Honeycomb removes vhost-user interface -| | ... | ${tunneled_node} | ${vhost_interface} -| | Then vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${tunneled_node} | ${vhost_interface} - -| TC06: Honeycomb can create and delete interfaces -| | [Documentation] | Repeatedly create and delete an interface through Netconf\ -| | ... | and check the reply for any errors. -| | ... -| | Given Netconf session should be established | ${tunneled_node} -| | And Honeycomb creates first L2 bridge domain -| | ... | ${tunneled_node} | bd_netconf | ${bd_settings} -| | :FOR | ${index} | IN RANGE | 20 -| | | When Error trigger is sent | ${trigger_105} -| | | Then Replies should not contain RPC errors - -| TC07: Honeycomb can create vlan subinterface -| | [Documentation] | Configure a Vlan sub-interface under a physical interface. -| | ... -| | Given Netconf session should be established | ${tunneled_node} -| | When Error Trigger Is Sent -| | ... | ${trigger_vlan} | interface=${interface} -| | Then Replies should not contain RPC errors - -*** Keywords *** -| Configure IPv6 Management Interface -| | [Documentation] | Change one of VPP's data-plane interfaces on DUT into\ -| | ... | a control-plane interface that Honeycomb can listen on. Setup IPv6\ -| | ... | addresses on the link. Create an IPv4 to IPv6 tunnel on TG and create\ -| | ... | suite variables. -| | ... -| | Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Stop VPP service on DUT | ${dut_node} -| | Stop Honeycomb Service on DUTs | ${dut_node} -| | Convert data-plane interface to control-plane -| | ... | ${dut_node} | ${dut_to_tg_if2} -| | Sleep | 5sec | Wait until Linux reclaims the interface. -| | ${tg_to_dut_if2_name}= | Get Interface Name by MAC -| | ... | ${tg_node} | ${tg_to_dut_if2_mac} -| | ${dut_to_tg_if2_name}= | Get Interface Name by MAC -| | ... | ${dut_node} | ${dut_to_tg_if2_mac} -| | ${tunneled_node}= | Copy Dictionary | ${dut_node} -| | Set To Dictionary | ${tunneled_node} | host | ${tg_node['host']} -| | ${interface}= | Get Interface Name | ${dut_node} | ${dut_to_tg_if1} -| | Set Suite Variable | ${interface} -| | Set Suite Variable | ${tunneled_node} -| | Set Suite Variable | ${tg_node} -| | Set Suite Variable | ${dut_node} -| | Set Suite Variable | ${dut_to_tg_if2} -| | Set Suite Variable | ${dut_to_tg_if2_name} -| | Set Suite Variable | ${tg_to_dut_if2_name} -| | Set management interface address -| | ... | ${tg_node} | ${tg_to_dut_if2_name} -| | ... | ${tg_to_dut_if2_ip} | ${ipv6_prefix} -| | Set management interface address -| | ... | ${dut_node} | ${dut_to_tg_if2_name} -| | ... | ${dut_to_tg_if2_ip} | ${ipv6_prefix} -| | Configure Control Interface Tunnel -| | ... | ${tg_node} | ${dut_node['honeycomb']['port']} -| | ... | ${dut_to_tg_if2_ip} | ${dut_node['honeycomb']['port']} -| | Configure Control Interface Tunnel -| | ... | ${tg_node} | ${dut_node['honeycomb']['netconf_port']} -| | ... | ${dut_to_tg_if2_ip} | ${dut_node['honeycomb']['netconf_port']} -| | Restart VPP service | ${dut_node} -| | Configure Honeycomb service on DUTs | ${dut_node} - -| Unconfigure IPv6 Management Interface -| | [Documentation] | Remove all IP addresses from interfaces in the IPv6 link. -| | ... -| | Clear Interface Configuration | ${tg_node} | ${tg_to_dut_if2_name} -| | Clear Interface Configuration | ${dut_node} | ${dut_to_tg_if2_name} diff --git a/tests/honeycomb/func/mgmt-cfg-bgp-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-bgp-apihc-func.robot deleted file mode 100644 index 26a9de6f5a..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-bgp-apihc-func.robot +++ /dev/null @@ -1,364 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interface to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${dut1_to_tg_ip}= | 192.168.0.1 -| ${tg_to_dut1_ip}= | 192.168.0.2 -| ${dut1_to_dut2_ip}= | 192.168.1.1 -| ${dut2_to_dut1_ip}= | 192.168.1.2 -| ${bgp_port}= | ${179} -| ${bgp_as_number}= | ${37} -| ${prefix}= | ${24} - -*** Settings *** -| Library | resources.libraries.python.honeycomb.IPv6Management -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/bgp.robot -| Resource | resources/libraries/robot/honeycomb/routing.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/honeycomb/ipv6_control.robot -| Variables | resources/test_data/honeycomb/bgp.py -| ... -| Suite Setup | Run Keywords -| ... | Enable Honeycomb Feature | ${node} | BGP | AND -| ... | Configure BGP Module | ${node} | ${dut1_to_tg_ip} -| ... | ${bgp_port} | ${bgp_as_number} | AND -| ... | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Run Keywords -| ... | Tear Down Honeycomb Functional Test Suite | ${nodes['DUT1']} | AND -| ... | Stop Honeycomb service on DUTs | ${nodes['DUT2']} | AND -| ... | Unconfigure IPv4 Management Interfaces | AND -| ... | Disable Honeycomb Feature | ${node} | BGP | AND -| ... | Disable Honeycomb Feature | ${nodes['DUT2']} | BGP -| ... -# HONEYCOMB-409: BGP configuration via ODL is currently not fully supported -| Force Tags | HC_FUNC | HC_REST_ONLY -| ... -| Documentation | *Honeycomb BGP management test suite.* - -*** Test Cases *** -| TC01: Honeycomb configures BGP peer - Internal -| | [Documentation] | Check if Honeycomb can configure an internal BGP peer. -| | ... -| | When Honeycomb adds BGP peer -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | Then BGP peer from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${peer_internal} - -| TC02: Honeycomb removes peer configuration -| | [Documentation] | Check if Honeycomb can remove a configured BGP peer. -| | ... -| | Given BGP peer from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | When Honeycomb removes BGP peer | ${node} | ${address_internal} -| | Then No BGP peers should be configured | ${node} - -| TC03: Honeycomb updates existing BGP peer - Internal -| | [Documentation] | Check if Honeycomb can update an existing BGP peer. -| | ... -| | [Teardown] | Honeycomb removes BGP peer | ${node} | ${address_internal} -| | ... -| | Given No BGP peers should be configured | ${node} -| | When Honeycomb adds BGP peer -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | And Honeycomb adds BGP peer -| | ... | ${node} | ${address_internal} | ${peer_internal_update} -| | Then BGP peer from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${peer_internal_update} - -| TC04: Honeycomb configures BGP peer - Application -| | [Documentation] | Check if Honeycomb can configure an application BGP peer. -| | ... -| | [Teardown] | Honeycomb removes BGP peer | ${node} | ${address_application} -| | ... -| | Given No BGP peers should be configured | ${node} -| | When Honeycomb adds BGP peer -| | ... | ${node} | ${address_application} | ${peer_application} -| | Then BGP peer from Honeycomb should be -| | ... | ${node} | ${address_application} | ${peer_application} - -| TC05: Honeycomb configures a second BGP peer -| | [Documentation] | Check if Honeycomb can configure more than one BGP peer. -| | ... -| | [Teardown] | Run Keywords -| | ... | Honeycomb removes BGP peer | ${node} | ${address_internal} | AND -| | ... | Honeycomb removes BGP peer | ${node} | ${address_internal2} -| | ... -| | Given No BGP peers should be configured | ${node} -| | When Honeycomb adds BGP peer -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | And Honeycomb adds BGP peer -| | ... | ${node} | ${address_internal2} | ${peer_internal2} -| | Then BGP peer from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | And BGP peer from Honeycomb should be -| | ... | ${node} | ${address_internal2} | ${peer_internal2} - -| TC06: Honeycomb configures IPv4 route using BGP -| | [Documentation] | Check if Honeycomb can configure a BGP route under a peer. -| | ... -| | Given Honeycomb adds BGP peer -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | When Honeycomb configures BGP route -| | ... | ${node} | ${address_internal} | ${route_data_ipv4} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 -| | Then BGP Route from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${route_data_ipv4_oper} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 - -| TC07: Honeycomb removes IPv4 route configuration -| | [Documentation] | Check if Honeycomb can remove a configured BGP route. -| | ... -| | Given BGP peer from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | And BGP Route from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${route_data_ipv4_oper} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 -| | When Honeycomb removes BGP route | ${node} | ${address_internal} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 -| | Then No BGP Routes Should exist -| | ... | ${node} | ${address_internal} | ipv4 - -| TC08: Honeycomb updates existing IPv4 route using BGP -| | [Documentation] | Check if Honeycomb can update an existing BGP route. -| | ... -| | [Teardown] | Honeycomb removes BGP route | ${node} | ${address_internal} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 -| | ... -| | Given BGP peer from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | And No BGP Routes Should exist -| | ... | ${node} | ${address_internal} | ipv4 -| | When Honeycomb configures BGP route -| | ... | ${node} | ${address_internal} | ${route_data_ipv4} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 -| | And Honeycomb configures BGP route -| | ... | ${node} | ${address_internal} | ${route_data_ipv4_update} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 -| | Then BGP Route from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${route_data_ipv4_update_oper} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 - -| TC09: Honeycomb configures a second IPv4 route -| | [Documentation] | Check if Honeycomb can configure more than one BGP route. -| | ... -| | [Teardown] | Run Keywords -| | ... | Honeycomb removes BGP route | ${node} | ${address_internal} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 | AND -| | ... | Honeycomb removes BGP route | ${node} | ${address_internal} -| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4 | AND -| | ... | Honeycomb removes BGP peer | ${node} | ${address_internal} -| | ... -| | Given BGP peer from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${peer_internal} -| | When Honeycomb configures BGP route -| | ... | ${node} | ${address_internal} | ${route_data_ipv4} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 -| | And Honeycomb configures BGP route -| | ... | ${node} | ${address_internal} | ${route_data_ipv4_2} -| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4 -| | Then BGP Route from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${route_data_ipv4_oper} -| | ... | ${route_address_ipv4} | ${route_id_ipv4} | ipv4 -| | And BGP Route from Honeycomb should be -| | ... | ${node} | ${address_internal} | ${route_data_ipv4_2_oper} -| | ... | ${route_address_ipv4_2} | ${route_id_ipv4_2} | ipv4 - -| TC10: Honeycomb sends BGP OPEN messages to configured peer -| | [Documentation] -| | ... | [top] TG-DUT1-TG. -| | ... | [enc] Eth-IPv4-TCP-BGP. -| | ... | [cfg] On DUT1 give Honeycomb control over the data-plane interface -| | ... | connected to TG. Configure a BGP peer with the address of TG. -| | ... | [ver] Open a TCP listener on TG on the BGP port and listen for BGP -| | ... | OPEN message. On receive, verify message fields. -| | ... -| | [Setup] | Run Keywords -| | ... | Configure BGP Module | ${node} | ${dut1_to_dut2_ip} -| | ... | ${bgp_port} | ${bgp_as_number} | AND -| | ... | Configure IPv4 Management Interface -| | [Teardown] | Honeycomb removes BGP peer | ${dut1_node} | ${address_internal} -| | When Honeycomb adds BGP peer -| | ... | ${dut1_node} | ${address_internal} | ${peer_internal} -| | Then Receive BGP OPEN message -| | ... | ${tg_node} | ${tg_to_dut1_ip} | ${dut1_to_dut2_ip} -| | ... | ${bgp_port} | ${bgp_as_number} | ${holdtime_internal} - -| TC11: Honeycomb shows connected peer in operational data -| | [Documentation] -| | ... | [top] TG-DUT1-DUT2-TG. -| | ... | [enc] Eth-IPv4-TCP-BGP. -| | ... | [cfg] On DUT1 and DUT2 give Honeycomb control over the data-plane -| | ... | interfaces connecting DUT1 ad DUT2. Configure BGP peers on DUT1 -| | ... | and DUT2 with each other's IP address. -| | ... | [ver] Using Restconf, verify that Honeycomb on each DUT has the -| | ... | other DUT's entry in operational data. -| | ... -| | When Honeycomb adds BGP peer -| | ... | ${dut1_node} | ${dut2_to_dut1_ip} | ${dut2_peer} -| | And Honeycomb adds BGP peer -| | ... | ${dut2_node} | ${dut1_to_dut2_ip} | ${dut1_peer} -| | Sleep | 5s | Wait for BGP connection. Retry timer is 5 seconds. -| | Then Peer operational data from Honeycomb should be -| | ... | ${dut1_node} | ${dut2_to_dut1_ip} -| | And Peer operational data from Honeycomb should be -| | ... | ${dut2_node} | ${dut1_to_dut2_ip} - -| TC12: Honeycomb sends IPv4 BGP route to connected peer -| | [Documentation] -| | ... | [top] TG-DUT1-DUT2-TG. -| | ... | [enc] Eth-IPv4-TCP-BGP. -| | ... | [cfg] On DUT1 and DUT2 give Honeycomb control over the data-plane -| | ... | interfaces connecting DUT1 ad DUT2. Configure BGP peers on DUT1 -| | ... | and DUT2 with each other's IP address. On DUT2 configure a static -| | ... | IPv4 route using Honeycomb's BGP module. -| | ... | [ver] Verify that the route is present in BGP -| | ... | local RIB and VPP's routing table on each DUT. -| | ... -| | Given Peer operational data from Honeycomb should be -| | ... | ${dut1_node} | ${dut2_to_dut1_ip} -| | And Peer operational data from Honeycomb should be -| | ... | ${dut2_node} | ${dut1_to_dut2_ip} -| | When Honeycomb adds BGP peer -| | ... | ${dut2_node} | ${address_application} | ${peer_application} -| | And Honeycomb configures BGP route -| | ... | ${dut2_node} | ${address_application} | ${dut1_route} -| | ... | ${dut1_route_address} | ${dut1_route_id} | ipv4 -| | And Sleep | 5s | Wait for route advertisement. Retry timer is 5 seconds. -| | Then Routing data from Honeycomb should contain -| | ... | ${dut1_node} | learned-protocol-0 | ipv4 | ${route_operational} -| | And Routing data from Honeycomb should contain -| | ... | ${dut2_node} | learned-protocol-0 | ipv4 | ${route_operational} -| | And BGP Loc-RIB table should include | ${dut1_node} | ${rib_operational} -| | And BGP Loc-RIB table should include | ${dut2_node} | ${rib_operational} - -| TC13: Honeycomb sends IPv6 BGP route to connected peer -| | [Documentation] -| | ... | [top] TG-DUT1-DUT2-TG. -| | ... | [enc] Eth-IPv4-TCP-BGP. -| | ... | [cfg] On DUT1 and DUT2 give Honeycomb control over the data-plane -| | ... | interfaces connecting DUT1 ad DUT2. Configure BGP peers on DUT1 -| | ... | and DUT2 with each other's IP address. On DUT2 configure a static -| | ... | IPv6 route using Honeycomb's BGP module. -| | ... | [ver] Verify that the route is present in BGP -| | ... | local RIB and VPP's routing table on each DUT. -| | ... -| | Given Peer operational data from Honeycomb should be -| | ... | ${dut1_node} | ${dut2_to_dut1_ip} -| | And Peer operational data from Honeycomb should be -| | ... | ${dut2_node} | ${dut1_to_dut2_ip} -| | And Honeycomb adds BGP peer -| | ... | ${dut2_node} | ${address_application} | ${peer_application} -| | And Honeycomb configures BGP route -| | ... | ${dut2_node} | ${address_application} | ${dut1_route_ip6} -| | ... | ${dut1_route_ip6_prefix} | ${dut1_route_ip6_id} | ipv6 -| | And Sleep | 5s | Wait for route advertisement. Retry timer is 5 seconds. -| | Then Routing data from Honeycomb should contain -| | ... | ${dut1_node} | learned-protocol-0 | ipv6 | ${route_ip6_operational} -| | And Routing data from Honeycomb should contain -| | ... | ${dut2_node} | learned-protocol-0 | ipv6 | ${route_ip6_operational} -| | And BGP Loc-RIB table should include | ${dut1_node} | ${rib_ip6_operational} -| | And BGP Loc-RIB table should include | ${dut2_node} | ${rib_ip6_operational} - -#TODO: Add tests once implemented in HC: -# IPv6 neighbor, L2VPN, L3VPN, linkstate, route reflector, and more - -*** Keywords *** -| Configure IPv4 Management Interface -| | [Documentation] | Change one of VPP's data-plane interfaces on DUT into\ -| | ... | a control-plane interface that Honeycomb can listen on. Setup IP\ -| | ... | addresses on the link, create suite variables for traffic trests, set -| | ... | static ARP entries, then restart VPP and Honeycomb to apply changes. -| | ... -| | Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | ${interface}= | Get Interface Name | ${dut1_node} | ${dut1_to_tg} -| | Set Suite Variable | ${interface} -| | Set Suite Variable | ${tg_node} -| | Set Suite Variable | ${dut1_node} -| | Set Suite Variable | ${dut2_node} -| | Set Suite Variable | ${dut1_to_tg} -| | Stop VPP service on DUT | ${dut1_node} -| | Stop VPP service on DUT | ${dut2_node} -| | Stop Honeycomb Service on DUTs | ${dut1_node} -| | Stop Honeycomb Service on DUTs | ${dut2_node} -| | Convert data-plane interface to control-plane -| | ... | ${dut1_node} | ${dut1_to_tg} -| | Convert data-plane interface to control-plane -| | ... | ${dut1_node} | ${dut1_to_dut2} -| | Convert data-plane interface to control-plane -| | ... | ${dut2_node} | ${dut2_to_dut1} -| | Sleep | 5sec | Wait until OS reclaims the interfaces. -| | ${tg_to_dut1_name}= | Get Interface Name by MAC -| | ... | ${tg_node} | ${tg_to_dut1_mac} -| | ${dut1_to_tg_name}= | Get Interface Name by MAC -| | ... | ${dut1_node} | ${dut1_to_tg_mac} -| | ${dut1_to_dut2_name}= | Get Interface Name by MAC -| | ... | ${dut1_node} | ${dut1_to_dut2_mac} -| | ${dut2_to_dut1_name}= | Get Interface Name by MAC -| | ... | ${dut2_node} | ${dut2_to_dut1_mac} -| | Set Suite Variable | ${dut1_to_tg_name} -| | Set Suite Variable | ${tg_to_dut1_name} -| | Set Suite Variable | ${dut1_to_dut2_name} -| | Set Suite Variable | ${dut2_to_dut1_name} -| | Set management interface address -| | ... | ${tg_node} | ${tg_to_dut1_name} -| | ... | ${tg_to_dut1_ip} | ${prefix} -| | Set management interface address -| | ... | ${dut1_node} | ${dut1_to_tg_name} -| | ... | ${dut1_to_tg_ip} | ${prefix} -| | Set management interface address -| | ... | ${dut1_node} | ${dut1_to_dut2_name} -| | ... | ${dut1_to_dut2_ip} | ${prefix} -| | Set management interface address -| | ... | ${dut2_node} | ${dut2_to_dut1_name} -| | ... | ${dut2_to_dut1_ip} | ${prefix} -| | Set Static ARP | ${tg_node} | ${dut1_to_tg_ip} | ${dut1_to_tg_mac} -| | Set Static ARP | ${dut1_node} | ${tg_to_dut1_ip} | ${tg_to_dut1_mac} -| | Set Static ARP | ${dut1_node} | ${dut2_to_dut1_ip} | ${dut2_to_dut1_mac} -| | Set Static ARP | ${dut2_node} | ${dut1_to_dut2_ip} | ${dut1_to_dut2_mac} -| | Enable Honeycomb Feature | ${dut2_node} | BGP -| | Configure BGP Module | ${dut1_node} | ${dut1_to_dut2_ip} -| | ... | ${bgp_port} | ${bgp_as_number} -| | Configure BGP Module | ${dut2_node} | ${dut2_to_dut1_ip} -| | ... | ${bgp_port} | ${bgp_as_number} -| | Restart VPP service | ${dut1_node} -| | Restart VPP service | ${dut2_node} -| | Configure Honeycomb service on DUTs | ${dut1_node} -| | Set Up Honeycomb Functional Test Suite | ${dut2_node} - -| Unconfigure IPv4 Management Interfaces -| | [Documentation] | Remove all IP addresses from the interface. -| | ... -| | Clear Interface Configuration | ${tg_node} | ${tg_to_dut1_name} -| | Clear Interface Configuration | ${dut1_node} | ${dut1_to_tg_name} -| | Clear Interface Configuration | ${dut1_node} | ${dut1_to_dut2_name} -| | Clear Interface Configuration | ${dut2_node} | ${dut2_to_dut1_name} - -| Set BGP Suite Variables -| | Configure path in 3-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']} | ${nodes['TG']} -| | Set Suite Variable | ${interface} -| | Set Suite Variable | ${tg_node} -| | Set Suite Variable | ${dut1_node} -| | Set Suite Variable | ${dut2_node} -| | Set Suite Variable | ${dut1_to_tg} -| | Set Suite Variable | ${dut1_to_tg_name} -| | Set Suite Variable | ${tg_to_dut1_name} -| | Set Suite Variable | ${dut1_to_dut2_name} -| | Set Suite Variable | ${dut2_to_dut1_name} diff --git a/tests/honeycomb/func/mgmt-cfg-dhcp-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-dhcp-apihc-apivat-func.robot deleted file mode 100644 index 50055f7d96..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-dhcp-apihc-apivat-func.robot +++ /dev/null @@ -1,127 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/features/dhcp_proxy.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/dhcp.robot -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.IPv6Util -| Variables | resources/test_data/honeycomb/dhcp_relay.py -| ... -| ... -| Documentation | *Honeycomb DHCP relay test suite.* -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -| TC01: Honeycomb can configure DHCP relay entry -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-DHCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 configure IP addresses\ -| | ... | neighbors and configure DHCP relay. -| | ... | [Ver] Send DHCP packets from TG interface to DUT. Receive all packets\ -| | ... | on the second TG interface and verify required fields. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Log DHCP relay configuration from VAT | ${node} | ipv4 -| | ... -| | Given DHCP relay Operational Data From Honeycomb Should Be empty | ${node} -| | When Honeycomb configures DHCP relay | ${node} | ${relay1} | ipv4 | ${0} -| | Then DHCP relay configuration from Honeycomb should contain -| | ... | ${node} | ${relay1_oper} -| | When DHCP relay test setup -| | Then Send DHCP messages and check answer | ${tg_node} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${dhcp_server1_ip} | ${tg_to_dut_if2_mac} -| | ... | ${client_ip} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_ip} - -| TC02: Honeycomb can remove DHCP relay entry -| | [Documentation] | Remove DHCP relay configuration, and verify that\ -| | ... | it was removed. -| | ... -| | Given DHCP relay configuration from Honeycomb should contain -| | ... | ${node} | ${relay1_oper} -| | When Honeycomb clears DHCP relay configuration | ${node} -| | Then DHCP relay Operational Data From Honeycomb Should Be empty | ${node} - -| TC03: Honeycomb can configure multiple DHCP relay servers. -| | [Documentation] | Configure multiple DHCP relay servers and verify\ -| | ... | their configuration using operational data. -| | ... -| | [Teardown] | Honeycomb clears DHCP relay configuration | ${node} -| | ... -| | Given DHCP relay Operational Data From Honeycomb Should Be empty | ${node} -| | And Honeycomb configures DHCP relay | ${node} | ${relay2} | ipv4 | ${0} -| | Then DHCP relay configuration from Honeycomb should contain -| | ... | ${node} | ${relay2_oper} - -| TC04: Honeycomb can configure DHCP relay entry with ipv6 -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv6-DHCPv6. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 configure IP addresses\ -| | ... | neighbors and configure DHCP relay. -| | ... | [Ver] Send DHCPv6 packets from TG interface to DUT. Receive all\ -| | ... | packets on the second TG interface and verify required fields. -| | ... -| | [Teardown] | Run Keywords | Show Packet Trace on All DUTs | ${nodes} -| | ... | AND | Log DHCP relay configuration from VAT | ${node} | ipv6 -| | ... | AND | Honeycomb clears DHCP relay configuration | ${node} -| | ... -| | Given DHCP relay Operational Data From Honeycomb Should Be empty | ${node} -| | When Honeycomb configures DHCP relay | ${node} | ${relay_v6} | ipv6 | ${0} -| | Then DHCP relay configuration from Honeycomb should contain -| | ... | ${node} | ${relay_v6_oper} -| | When DHCP relay test setup IPv6 -| | Then Send DHCPv6 Messages | ${tg_node} | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${dut_to_tg_if1_ip6} | ${dut_to_tg_if1_mac} | ${dhcp_server_ip6} -| | ... | ${tg_to_dut_if2_mac} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if2_mac} - -*** Keywords *** -| DHCP relay test setup -| | Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up -| | Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | VPP Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server1_ip} -| | ... | ${tg_to_dut_if2_mac} -| | VPP Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} | ${dhcp_server2_ip} -| | ... | ${tg_to_dut_if2_mac} -| | And VPP Route Add | ${dut_node} | 255.255.255.255 | 32 | local=${True} - -| DHCP relay test setup IPv6 -| | Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip6} | ${prefix_length_v6} -| | Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_length_v6} -| | And VPP Add IP Neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${dhcp_server_ip6} | ${tg_to_dut_if2_mac} -| | And VPP Route Add | ${dut_node} | ff02::1:2 | 128 | local=${True} diff --git a/tests/honeycomb/func/mgmt-cfg-int-apihcnc-func.robot b/tests/honeycomb/func/mgmt-cfg-int-apihcnc-func.robot deleted file mode 100644 index 2ba904449a..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-int-apihcnc-func.robot +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/netconf.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| ... | WITH NAME | InterfaceAPI -| Variables | resources/test_data/honeycomb/netconf/triggers.py -| ... -| Documentation | *Netconf test suite. Contains test cases that need to bypass\ -| ... | REST API.* -| ... -| Force Tags | HC_FUNC | HC_REST_ONLY -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... - -*** Variables *** -| ${interface}= | ${node['interfaces']['port1']['name']} -| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} -| ... | unknown-unicast-flood=${True} | arp-termination=${True} - -*** Test Cases *** -| TC01: Honeycomb can create and delete interfaces -| | [Documentation] | Repeatedly create and delete an interface through Netconf\ -| | ... | and check the reply for any errors. -| | ... -| | Given Netconf session should be established | ${node} -| | And Honeycomb creates first L2 bridge domain -| | ... | ${node} | bd_netconf | ${bd_settings} -| | :FOR | ${index} | IN RANGE | 20 -| | | When Error trigger is sent | ${trigger_105} -| | | Then Replies should not contain RPC errors - -| TC02: Transaction revert test case 1 -| | [Documentation] | Configure two conflicting VxLAN tunnels, then verify\ -| | ... | that neither tunnel exists. -| | ... -| | Given Netconf session should be established | ${node} -| | ${if_data}= | And InterfaceAPI.Get all interfaces oper data | ${node} -| | When Error trigger is sent | ${trigger_revert1} -| | ${if_data_new}= | And InterfaceAPI.Get all interfaces oper data | ${node} -| | Then Should be equal | ${if_data} | ${if_data_new} - -| TC03: Transaction revert test case 2 -| | [Documentation] | Configure two conflicting TAP interfaces, then verify\ -| | ... | that neither interface exists. -| | ... -| | Given Netconf session should be established | ${node} -| | ${if_data}= | And InterfaceAPI.Get all interfaces oper data | ${node} -| | When Error trigger is sent | ${trigger_revert1} -| | ${if_data_new}= | And InterfaceAPI.Get all interfaces oper data | ${node} -| | Then Should be equal | ${if_data} | ${if_data_new} - -| TC04: Vlan subinterface creation -| | [Documentation] | Configure a Vlan sub-interface under a physical interface. -| | ... -| | Given Netconf session should be established | ${node} -| | When Error Trigger Is Sent -| | ... | ${trigger_vlan} | interface=${interface} -| | Then Replies should not contain RPC errors diff --git a/tests/honeycomb/func/mgmt-cfg-int-subint-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-int-subint-apihc-apivat-func.robot deleted file mode 100644 index 12483ad864..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-int-subint-apihc-apivat-func.robot +++ /dev/null @@ -1,618 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/sub_interface.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Library | resources.libraries.python.InterfaceUtil -| Variables | resources/test_data/honeycomb/sub_interfaces.py -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC -| ... -| Documentation | *Honeycomb sub-interface management test suite.* - -*** Variables *** -# Test interfaces and their sub-interface parameters: -| ${super_if}= | ${node['interfaces']['port1']['name']} -| ${super_if2}= | ${node['interfaces']['port3']['name']} -| ${sub_if_id}= | ${sub_if_1_settings['identifier']} -| ${sub_if_name}= | ${super_if}.${sub_if_id} -| ${sub_if2_name}= | ${super_if2}.${sub_if_id} - -*** Test Cases *** -| TC01: Honeycomb creates sub-interface -| | [Documentation] | Check if Honeycomb creates a sub-interface. -| | ... -| | Given Honeycomb configures interface state | ${node} | ${super_if} | down -| | And sub-interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And interface Operational Data From VAT Should Be empty -| | ... | ${node} | ${sub_if_name} -| | When Honeycomb creates sub-interface | ${node} | ${super_if} -| | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings} -| | Then Sub-interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} -| | And Sub-interface Operational Data From VAT Should Be -| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} -| | And sub-interface indices from Honeycomb and VAT should correspond -| | ... | ${node} | ${super_if} | ${sub_if_id} - -| TC02: Honeycomb sets interface and sub-interface up -| | [Documentation] | Honeycomb changes the state of interface\ -| | ... | and of its sub-interface to up. -| | ... -| | Given interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | down -| | And interface state from VAT should be -| | ... | ${node} | ${super_if} | down -| | Sub-interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down -| | Sub-interface state from VAT should be -| | ... | ${node} | ${sub_if_name} | down | down -| | When Honeycomb configures interface state -| | ... | ${node} | ${super_if} | up -| | Then interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | up -| | And interface state from VAT should be -| | ... | ${node} | ${super_if} | up -| | When Honeycomb sets the sub-interface up -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | Vpp Node Interfaces Ready Wait | ${node} -| | Then Sub-interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | up | up -| | And sub-interface state from VAT should be -| | ... | ${node} | ${sub_if_name} | up | up - -| TC03: Honeycomb sets sub-interface down while its super-interface is up -| | [Documentation] | Honeycomb sets the sub-interface down while its \ -| | ... | super-interface is up. It must be possible. -| | ... -| | [Teardown] | Set super and sub interfaces up -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given sub-interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | up | up -| | And sub-interface state from VAT should be -| | ... | ${node} | ${sub_if_name} | up | up -| | And interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | up -| | And interface state from VAT should be -| | ... | ${node} | ${super_if} | up -| | When Honeycomb sets the sub-interface down -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | Then interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | up -| | And interface state from VAT should be -| | ... | ${node} | ${super_if} | up -| | And sub-interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | down | up -| | And sub-interface state from VAT should be -| | ... | ${node} | ${sub_if_name} | down | up - -| TC04: Honeycomb sets interface and sub-interface down -| | [Documentation] | Honeycomb changes the state of interface down and then \ -| | ... | changes the state of its sub-interface down, in this order. -| | ... -| | [Teardown] | Set super and sub interfaces down -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | up -| | And interface state from VAT should be -| | ... | ${node} | ${super_if} | up -| | When Honeycomb configures interface state -| | ... | ${node} | ${super_if} | down -| | Then interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | down -| | And interface state from VAT should be -| | ... | ${node} | ${super_if} | down -| | Given sub-interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | up | down -| | And sub-interface state from VAT should be -| | ... | ${node} | ${sub_if_name} | up | down -| | When Honeycomb sets the sub-interface down -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | Then sub-interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down -| | And sub-interface state from VAT should be -| | ... | ${node} | ${sub_if_name} | down | down - -| TC05: Honeycomb fails to set sub-interface up while its super-interface is down -| | [Documentation] | Honeycomb tries to set the sub-interface up while its \ -| | ... | super-interface is down. It must not be possible. -| | ... -| | Given interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | down -| | And interface state from VAT should be -| | ... | ${node} | ${super_if} | down -| | And sub-interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down -| | And sub-interface state from VAT should be -| | ... | ${node} | ${sub_if_name} | down | down -| | When Honeycomb fails to set sub-interface up -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | Then interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | down -| | And interface state from VAT should be -| | ... | ${node} | ${super_if} | down -| | And sub-interface state from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | down | down -| | And sub-interface state from VAT should be -| | ... | ${node} | ${sub_if_name} | down | down - -| TC06: Honeycomb fails to delete sub-interface -| | [Documentation] | Check if Honeycomb can delete an existing sub-interface. -| | ... -| | [Setup] | Set super and sub interfaces down -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given sub-interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} -| | And sub-interface Operational Data From VAT Should Be -| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} -| | When Honeycomb fails to remove all sub-interfaces -| | ... | ${node} | ${super_if} -| | Then sub-interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} -| | And sub-interface Operational Data From VAT Should Be -| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} - -| TC07: Honeycomb adds sub-interface to new bridge domain -| | [Documentation] | Check if Honeycomb adds a sub-interface to bridge domain. -| | ... -| | [Setup] | Set super and sub interfaces down -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given sub-interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_if_1_oper} -| | And sub-interface Operational Data From VAT Should Be -| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} -| | When Honeycomb creates first L2 bridge domain -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | Then bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | When Honeycomb adds sub-interface to bridge domain -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings} -| | Then sub-interface bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${sub_bd_settings} -| | And Sub-interface bridge domain Operational Data From PAPI Should Be -| | ... | ${node} | ${sub_if_name} | ${sub_bd_settings} -| | And sub-interface Operational Data From VAT Should Be -| | ... | ${node} | ${sub_if_name} | ${sub_if_1_oper} - -| TC08: Honeycomb enables tag-rewrite pop 1 -| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \ -| | ... | parameters correctly. Case: pop 1. -| | ... -| | [Teardown] | Honeycomb disables tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} - -| TC09: Honeycomb enables tag-rewrite push -| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \ -| | ... | parameters correctly. Case: push. -| | ... -| | [Teardown] | Honeycomb disables tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT} - -| TC10: Honeycomb enables tag-rewrite translate 1-2 -| | [Documentation] | Check if Honeycomb enables tag-rewrite and sets its \ -| | ... | parameters correctly. Case: translate 1-2. -| | ... -| | [Teardown] | Honeycomb disables tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${tag_rewrite_translate_1_2_oper} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT} - -| TC11: Honeycomb disables tag-rewrite -| | [Documentation] | Check if Honeycomb disables the tag-rewrite. -| | ... -| | [Teardown] | Honeycomb disables tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled} -| | Then rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} - -| TC12: Honeycomb enables tag-rewrite pop 1 again -| | [Documentation] | Check if Honeycomb can enable tag-rewrite again, once it \ -| | ... | was disabled by Honeycomb. -| | ... -| | [Teardown] | Honeycomb disables tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} - -| TC13: Honeycomb modifies the tag-rewrite -| | [Documentation] | Honeycomb sets the tag-rewrite: -| | ... | 1. pop 1, then -| | ... | 2. push, then -| | ... | 3. translate 1 - 2 -| | ... | Then Honeycomb disables the tag-rewrite. -| | ... -| | [Teardown] | Honeycomb disables tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_pop_1_oper} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_pop_1_VAT} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_push_oper} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_push_VAT} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_translate_1_2} -| | Then rewrite tag from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${tag_rewrite_translate_1_2_oper} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_translate_1_2_VAT} -| | When Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled} -| | Then rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} - -| TC14: Honeycomb fails to set wrong vlan-type in tag-rewrite -| | [Documentation] | Check that Honeycomb does not accept wrong values of \ -| | ... | vlan-type in tag-rewrite. -| | ... -| | Given rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | When Honeycomb fails to set wrong rewrite tag -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${tag_rewrite_translate_1_2_wrong} -| | Then rewrite tag from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And rewrite tag from VAT should be -| | ... | ${node} | ${sub_if_name} | ${tag_rewrite_disabled_VAT} - -| TC15: Honeycomb configures sub-interface ipv4 address -| | [Documentation] | Check if Honeycomb can configure an ipv4 address on the\ -| | ... | sub-interface. -| | ... -| | Given sub-interface ipv4 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv4 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} -| | When Honeycomb sets sub-interface ipv4 address -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | Then sub-interface ipv4 address from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And sub-interface ipv4 address from VAT should be -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} - -| TC16: Honeycomb removes sub-interface ipv4 address -| | [Documentation] | Check if Honeycomb can remove configured ipv4 addresses\ -| | ... | from the sub-interface. -| | ... -| | Given sub-interface ipv4 address from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | Run Keyword And Continue On Failure -| | ... | And sub-interface ipv4 address from VAT should be -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | When Honeycomb removes all sub-interface ipv4 addresses -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | Then sub-interface ipv4 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv4 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} - -| TC17: Honeycomb modifies existing sub-interface ipv4 address -| | [Documentation] | Check if Honeycomb can modify an ipv4 address already\ -| | ... | configured on the sub-interface. -| | ... -| | [Teardown] | Honeycomb removes all sub-interface ipv4 addresses -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given sub-interface ipv4 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv4 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} -| | When Honeycomb sets sub-interface ipv4 address -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And Honeycomb sets sub-interface ipv4 address -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']} -| | Then sub-interface ipv4 address from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']} -| | And sub-interface ipv4 address from VAT should be -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv4_2['address']} | ${ipv4_2['prefix-length']} - -| TC18: Honeycomb modifies sub-interface exact tag match -| | [Documentation] | Check if Honeycomb can modify a sub-interface with exact\ -| | ... | tag match. -| | ... -| | Given Honeycomb configures interface state | ${node} | ${super_if2} | down -| | And sub-interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${super_if2} | ${sub_if_id} -| | And interface Operational Data From VAT Should Be empty -| | ... | ${node} | ${sub_if2_name} -| | When Honeycomb creates sub-interface | ${node} | ${super_if2} -| | ... | ${sub_if_2_match} | ${sub_if_2_tags} | ${sub_if_2_settings} -| | Then Sub-interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${super_if2} | ${sub_if_id} | ${sub_if_2_oper} -| | And Sub-interface Operational Data From VAT Should Be -| | ... | ${node} | ${sub_if2_name} | ${sub_if_2_oper} -| | And sub-interface indices from Honeycomb and VAT should correspond -| | ... | ${node} | ${super_if2} | ${sub_if_id} - -| TC19: Honeycomb configures sub-interface ipv6 address -| | [Documentation] | Check if Honeycomb can configure an ipv6 address on the\ -| | ... | sub-interface. -| | ... -| | Given sub-interface ipv6 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv6 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} -| | When Honeycomb sets sub-interface ipv6 address -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} -| | Then sub-interface IPv6 address from Honeycomb should contain -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} -| | And sub-interface IPv6 address from VAT should contain -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} - -| TC20: Honeycomb removes sub-interface ipv6 address -| | [Documentation] | Check if Honeycomb can remove configured ipv6 addresses\ -| | ... | from the sub-interface. -| | ... -| | Given sub-interface IPv6 address from Honeycomb should contain -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} -| | Run Keyword And Continue On Failure -| | ... | And sub-interface IPv6 address from VAT should contain -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} -| | When Honeycomb removes all sub-interface ipv6 addresses -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | Then sub-interface ipv6 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv6 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} - -| TC21: Honeycomb modifies existing sub-interface ipv6 address -| | [Documentation] | Check if Honeycomb can modify an ipv6 address already\ -| | ... | configured on the sub-interface. -| | ... -| | [Teardown] | Honeycomb removes all sub-interface ipv6 addresses -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Given sub-interface ipv6 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv6 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} -| | When Honeycomb sets sub-interface ipv6 address -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv6['address']} | ${ipv6['prefix-length']} -| | And Honeycomb sets sub-interface ipv6 address -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']} -| | Then sub-interface IPv6 address from Honeycomb should contain -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']} -| | And sub-interface IPv6 address from VAT should contain -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv6_2['address']} | ${ipv6_2['prefix-length']} - -| TC22: Honeycomb can configure unnumbered sub-interface -| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\ -| | ... | on a sub-interface, borrowing the IP address of a physical interface. -| | ... -# CSIT-1210: Adapt HC unnumbered interface tests to VPP 18.07 api changes -| | [Tags] | EXPECTED_FAILING -| | ... -| | Given sub-interface ipv4 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv4 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} -| | And Honeycomb sets interface IPv4 address | ${node} -| | ... | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} -| | When Honeycomb adds unnumbered configuration to interface -| | ... | ${node} | ${super_if}.${sub_if_id} | ${super_if2} -| | Then IPv4 address from Honeycomb should be -| | ... | ${node} | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${super_if2} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']} -| | And sub-interface ipv4 address from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And sub-interface ipv4 address from VAT should be -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} - -| TC23: Honeycomb removes sub-interface unnumbered configuration -| | [Documentation] | Check if Honeycomb can remove unnumbered configuration\ -| | ... | from a sub-interface. -| | ... -| | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node} -| | ... | ${super_if2} -| | ... -# CSIT-1210: Adapt HC unnumbered interface tests to VPP 18.07 api changes -| | [Tags] | EXPECTED_FAILING -| | ... -| | Given IPv4 address from Honeycomb should be -| | ... | ${node} | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${super_if2} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']} -| | And sub-interface ipv4 address from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And sub-interface ipv4 address from VAT should be -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | When Honeycomb removes unnumbered configuration from interface -| | ... | ${node} | ${super_if}.${sub_if_id} -| | Then IPv4 address from Honeycomb should be -| | ... | ${node} | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${super_if2} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']} -| | And sub-interface ipv4 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv4 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} - -| TC24: Honeycomb can configure unnumbered interface using a sub-interface -| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\ -| | ... | on an interface, borrowing the IP address of a sub-interface. -| | ... -# CSIT-1210: Adapt HC unnumbered interface tests to VPP 18.07 api changes -| | [Tags] | EXPECTED_FAILING -| | ... -| | Given IPv4 address from Honeycomb should be empty | ${node} | ${super_if2} -| | And ipv4 address from VAT should be empty | ${node} | ${super_if2} -| | And sub-interface ipv4 address from Honeycomb should be empty -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | And sub-interface ipv4 address from VAT should be empty -| | ... | ${node} | ${sub_if_name} -| | And Honeycomb sets sub-interface ipv4 address -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | When Honeycomb adds unnumbered configuration to interface -| | ... | ${node} | ${super_if2} | ${super_if}.${sub_if_id} -| | Then IPv4 address from Honeycomb should be -| | ... | ${node} | ${super_if2} | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${super_if2} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} | ${ipv4['netmask']} -| | And sub-interface ipv4 address from Honeycomb should be -| | ... | ${node} | ${super_if} | ${sub_if_id} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} -| | And sub-interface ipv4 address from VAT should be -| | ... | ${node} | ${sub_if_name} -| | ... | ${ipv4['address']} | ${ipv4['prefix-length']} - -*** Keywords *** -| Set super and sub interfaces up -| | [Documentation] | Honeycomb sets super-interface and sub-interface up, in \ -| | ... | this order. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super interface. Type: string -| | ... | - identifier - Sub-interface identifier. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| Set super and sub interfaces up\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... -| | Honeycomb configures interface state -| | ... | ${node} | ${super_interface} | up -| | Honeycomb sets the sub-interface up -| | ... | ${node} | ${super_interface} | ${identifier} - -| Set super and sub interfaces down -| | [Documentation] | Honeycomb sets super-interface and sub-interface down, in\ -| | ... | this order. -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_interface - Super interface. Type: string -| | ... | - identifier - Sub-interface identifier. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| Set super and sub interfaces down\ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_interface} | ${identifier} -| | ... -| | Honeycomb configures interface state -| | ... | ${node} | ${super_interface} | down -| | Honeycomb sets the sub-interface down -| | ... | ${node} | ${super_interface} | ${identifier} - -| Honeycomb disables tag rewrite -| | [Documentation] | -| | ... -| | ... | *Arguments:* -| | ... | - node - Information about a DUT node. Type: dictionary -| | ... | - super_if - Super-interface. Type: string -| | ... | - identifier - Sub-interface ID. Type: integer or string -| | ... -| | ... | *Example:* -| | ... | \| Honeycomb disables tag rewrite \ -| | ... | \| ${nodes['DUT1']} \| GigabitEthernet0/8/0 \| 1 \| -| | ... -| | [Arguments] | ${node} | ${super_if} | ${sub_if_id} -| | ... -| | Honeycomb configures tag rewrite -| | ... | ${node} | ${super_if} | ${sub_if_id} | ${tag_rewrite_disabled} diff --git a/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot deleted file mode 100644 index 36899ff6b4..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-intip4-intip6-apihc-apivat-func.robot +++ /dev/null @@ -1,317 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interface to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${interface2}= | ${node['interfaces']['port2']['name']} -| ${interface3}= | ${node['interfaces']['port3']['name']} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/fib.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/ip/ip6.robot -| Variables | resources/test_data/honeycomb/interface_ip.py -| ... -| Force Tags | HC_FUNC -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Documentation | *Honeycomb interface management test suite.* - -*** Test Cases *** -| TC01: Honeycomb configures and reads interface state -| | [Documentation] | Check if Honeycomb API can modify the admin state of\ -| | ... | VPP interfaces. -| | ... -| | Given Interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down -| | And Interface state from VAT should be | ${node} | ${interface} | down -| | When Honeycomb configures interface state | ${node} | ${interface} | up -| | Then Interface state from Honeycomb should be -| | ... | ${node} | ${interface} | up -| | And Interface state from VAT should be | ${node} | ${interface} | up -| | When Honeycomb configures interface state | ${node} | ${interface} | down -| | Then Interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down -| | And Interface state from VAT should be | ${node} | ${interface} | down - -| TC02: Honeycomb modifies interface IPv4 address with netmask -| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\ -| | ... | with address and netmask provided. -| | ... -| | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface} -| | And ipv4 address from VAT should be empty | ${node} | ${interface} -| | When Honeycomb sets interface IPv4 address | ${node} | ${interface} -| | ... | ${ipv4_address} | ${ipv4_mask} -| | Then IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${interface} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} - -| TC03: Honeycomb removes IPv4 address from interface -| | [Documentation] | Check if Honeycomb API can remove configured ipv4\ -| | ... | addresses from interface. -| | ... -| | Given IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${interface} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} -| | When Honeycomb removes interface IPv4 addresses | ${node} | ${interface} -| | Then IPv4 address from Honeycomb should be empty | ${node} | ${interface} -| | And ipv4 address from VAT should be empty | ${node} | ${interface} - -| TC04: Honeycomb modifies interface IPv4 address with prefix -| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv4\ -| | ... | with address and prefix provided. -| | ... -| | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node} -| | ... | ${interface} -| | ... -| | Given IPv4 address from Honeycomb should be empty | ${node} | ${interface} -| | And ipv4 address from VAT should be empty | ${node} | ${interface} -| | When Honeycomb sets interface IPv4 address with prefix -| | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix} -| | Then IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv4_address2} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${interface} | ${ipv4_address2} -| | ... | ${ipv4_prefix} | ${ipv4_mask} - -| TC05: Honeycomb modifies IPv4 neighbor table -| | [Documentation] | Check if Honeycomb API can add and remove ARP entries. -| | ... -| | [Teardown] | Honeycomb clears all interface IPv4 neighbors -| | ... | ${node} | ${interface} -| | ... -| | Given IPv4 neighbor from Honeycomb should be empty -| | ... | ${node} | ${interface} -| | When Honeycomb adds interface IPv4 neighbor -| | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac} -| | Then IPv4 neighbor from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv4_neighbor} | ${neighbor_mac} - -| TC06: Honeycomb modifies interface configuration - IPv6 -| | [Documentation] | Check if Honeycomb API can configure interfaces for ipv6. -| | ... -| | [Teardown] | Honeycomb removes interface IPv6 addresses | ${node} -| | ... | ${interface} -| | ... -| | Given IPv6 address from Honeycomb should be empty -| | ... | ${node} | ${interface} -| | And IPv6 address from VAT should be empty -| | ... | ${node} | ${interface} -| | When Honeycomb sets interface IPv6 address -| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix} -| | Then IPv6 address from Honeycomb should contain -| | ... | ${node} | ${interface} | ${ipv6_address} | ${ipv6_prefix} -| | And IPv6 address from VAT should contain -| | ... | ${node} | ${interface} | ${ipv6_address} -| | ... | ${ipv6_prefix} | ${ipv6_mask} - -| TC07: Honeycomb modifies IPv6 neighbor table -| | [Documentation] | Check if Honeycomb API can add and remove ARP entries. -| | ... -| | [Teardown] | Honeycomb clears all interface IPv6 neighbors -| | ... | ${node} | ${interface} -| | ... -| | Given IPv6 neighbor from Honeycomb should be empty -| | ... | ${node} | ${interface} -| | When Honeycomb adds interface IPv6 neighbor -| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac} -| | Then IPv6 neighbor from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv6_neighbor} | ${neighbor_mac} - -| TC08: Honeycomb modifies interface configuration - MTU -| | [Documentation] | Check if Honeycomb API can configure interface\ -| | ... | MTU value. -| | ... -| | When Honeycomb sets interface ethernet configuration -| | ... | ${node} | ${interface} | ${ethernet} -| | Then Interface ethernet Operational Data From Honeycomb Should Be -| | ... | ${node} | ${interface} | ${ethernet} -| | ${mtu}= | Create List | ${ethernet['mtu']} | ${0} | ${0} | ${0} -| | And Interface ethernet Operational Data From VAT Should Be -| | ... | ${node} | ${interface} | ${mtu} - -| TC09: Honeycomb modifies interface configuration - vrf -| | [Documentation] | Check if Honeycomb API can configure interface\ -| | ... | vrf ID. -| | ... -| | [Teardown] | Honeycomb interface VRF Test Teardown | ${node} | ${interface} -| | ... -| | Honeycomb configures FIB table | ${node} | ipv4 | ${1} -| | When Honeycomb sets interface VRF ID -| | ... | ${node} | ${interface} | ${1} | ipv4 -| | Then Interface VRF ID from Honeycomb should be -| | ... | ${node} | ${interface} | ${1} | ipv4 -| | And Interface VRF ID from VAT should be -| | ... | ${node} | ${interface} | ${1} - -| TC10: Honeycomb can configure multiple IP addresses on one interface -| | [Documentation] | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-ICMP; Eth-IPv6-ICMPv6 -| | ... | [Cfg] (Using Honeycomb API) On DUT1 set two IPv4 addresses\ -| | ... | and two IPv6 addresses on first interfaces to TG and add ARP entries\ -| | ... | for each address. -| | ... | [Ver] Send ICMP packets from TG to DUT, using different sets\ -| | ... | of source and destination IP addresses. Receive an ICMP reply\ -| | ... | for every packet sent. -| | ... -| | [Teardown] | Multiple IP Address Test Teardown | ${node} | ${dut_to_tg_if1} -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | When Honeycomb sets interface IPv4 address with prefix -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address} | ${ipv4_prefix} -| | And Honeycomb adds interface IPv4 address -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address2} | ${ipv4_prefix} -| | And Honeycomb sets interface IPv6 address -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix} -| | And Honeycomb adds interface IPv6 address -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address2} | ${ipv6_prefix} -| | Then IPv4 address from Honeycomb should be -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv4_address} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${dut_node} | ${interface2} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} -| | And IPv6 address from Honeycomb should contain -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${ipv6_address} | ${ipv6_prefix} -| | And IPv6 address from VAT should contain -| | ... | ${dut_node} | ${interface2} | ${ipv6_address} -| | ... | ${ipv6_prefix} | ${ipv6_mask} -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if1} | up -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${ipv4_neighbor} | ${neighbor_mac} -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${ipv4_neighbor2} | ${neighbor_mac2} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${ipv6_neighbor} | ${neighbor_mac} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${ipv6_neighbor2} | ${neighbor_mac2} -| | And Vpp All Ra Suppress Link Layer | ${nodes} -| | Then Ping and Verify IP address | ${nodes['TG']} -| | ... | ${ipv4_neighbor} | ${ipv4_address} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} -| | And Ping and Verify IP address | ${nodes['TG']} -| | ... | ${ipv4_neighbor2} | ${ipv4_address2} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} -| | And Ping and Verify IP address | ${nodes['TG']} -| | ... | ${ipv6_neighbor} | ${ipv6_address} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} -| | And Ping and Verify IP address | ${nodes['TG']} -| | ... | ${ipv6_neighbor2} | ${ipv6_address2} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} - -| TC11: Honeycomb fails to configure two IPv4 addresses from the same subnet -| | [Documentation] | Check if Honeycomb can configure two IPv4 addresses in\ -| | ... | the same subnet onto a single interface. It should not be possible. -| | ... -| | [Teardown] | Honeycomb removes interface IPv4 addresses | ${node} -| | ... | ${interface} -| | ... -| | When Honeycomb sets interface IPv4 address with prefix -| | ... | ${node} | ${interface} | 192.168.0.1 | ${9} -| | Then Honeycomb fails to add interface IPv4 address -| | ... | ${node} | ${interface} | 192.168.0.2 | ${9} -| | And Honeycomb fails to add interface IPv4 address -| | ... | ${node} | ${interface} | 192.232.0.2 | ${9} - -| TC12: Honeycomb fails to configure two IPv6 addresses from the same subnet -| | [Documentation] | Check if Honeycomb can configure two IPv6 addresses in\ -| | ... | the same subnet onto a single interface. It should not be possible. -| | ... -| | [Teardown] | Honeycomb removes interface IPv6 addresses | ${node} -| | ... | ${interface} -| | When Honeycomb sets interface IPv6 address -| | ... | ${node} | ${interface} | 10::FF10 | ${64} -| | Then Honeycomb fails to add interface IPv6 address -| | ... | ${node} | ${interface} | 10::FF11 | ${64} -| | And Honeycomb fails to add interface IPv6 address -| | ... | ${node} | ${interface} | 10::FFFF | ${64} - -| TC13: Honeycomb can configure unnumbered interface -| | [Documentation] | Check if Honeycomb can configure an unnumbered interface\ -| | ... | on a physical interface, borrowing the IP address of another physical\ -| | ... | interface. -| | ... -# CSIT-1210: Adapt HC unnumbered interface tests to VPP 18.07 api changes -| | [Tags] | EXPECTED_FAILING -| | ... -| | Given Honeycomb sets interface IPv4 address | ${node} -| | ... | ${interface3} | ${ipv4_address} | ${ipv4_prefix} -| | When Honeycomb adds unnumbered configuration to interface -| | ... | ${node} | ${interface} | ${interface3} -| | Then Wait until Keyword succeeds | 10s | 2s -| | ... | IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${interface3} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} -| | And IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${interface} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} - -| TC14: Honeycomb removes interface unnumbered configuration -| | [Documentation] | Check if Honeycomb can remove unnumbered configuration\ -| | ... | from an interface. -| | ... -# CSIT-1210: Adapt HC unnumbered interface tests to VPP 18.07 api changes -| | [Tags] | EXPECTED_FAILING -| | ... -| | Given IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${interface3} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} -| | And IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface} | ${ipv4_address} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${interface} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} -| | When Honeycomb removes unnumbered configuration from interface -| | ... | ${node} | ${interface} -| | Then Wait until Keyword succeeds | 10s | 2s -| | ... | IPv4 address from Honeycomb should be -| | ... | ${node} | ${interface3} | ${ipv4_address} | ${ipv4_prefix} -| | And IPv4 address from VAT should be -| | ... | ${node} | ${interface3} | ${ipv4_address} -| | ... | ${ipv4_prefix} | ${ipv4_mask} -| | And IPv4 address from Honeycomb should be empty | ${node} | ${interface} -| | And ipv4 address from VAT should be empty | ${node} | ${interface} - -*** Keywords *** -| Multiple IP Address Test Teardown -| | [Arguments] | ${node} | ${interface} -| | Honeycomb removes interface IPv4 addresses | ${node} | ${interface} -| | Honeycomb removes interface IPv6 addresses | ${node} | ${interface} -| | Honeycomb clears all interface IPv4 neighbors | ${node} | ${interface} -| | Honeycomb clears all interface IPv6 neighbors | ${node} | ${interface} - -| Honeycomb interface VRF Test Teardown -| | [Arguments] | ${node} | ${interface} -| | Honeycomb sets interface VRF ID | ${node} | ${interface} | ${0} | ipv4 -| | Honeycomb removes FIB configuration | ${node} | ipv4 | ${1} diff --git a/tests/honeycomb/func/mgmt-cfg-inttap-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-inttap-apihc-apivat-func.robot deleted file mode 100644 index 4b0b1d37ff..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-inttap-apihc-apivat-func.robot +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interfaces to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${tap_interface}= | tap_test -| ${tap_device_name}= | tap0 -# Configuration which will be set and verified during tests. -| &{tap_settings}= | host-interface-name=tap_test | mac=08:00:27:c0:5d:37 -| ... | id=${1} -| &{tap_settings_oper}= | device-name=tap0 | tx-ring-size=${256} -| ... | rx-ring-size=${256} | host-interface-name=tap_test -| ... | mac=08:00:27:c0:5d:37 | id=${1} -| &{tap_settings_vat}= | dev_name=tap0 | mac=08:00:27:c0:5d:37 -| ... | rx_ring_sz=${256} | tx_ring_sz=${256} | id=${1} -| &{tap_settings2}= | host-interface-name=tap_test | mac=08:00:27:60:26:ab -| ... | id=${2} -| &{tap_settings2_oper}= | device-name=tap0 | tx-ring-size=${256} -| ... | rx-ring-size=${256} | host-interface-name=tap_test -| ... | mac=08:00:27:60:26:ab | id=${1} -| &{tap_settings2_vat}= | dev_name=tap0 | mac=08:00:27:60:26:ab -| ... | rx_ring_sz=${256} | tx_ring_sz=${256} | id=${1} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/tap.robot -| ... -| Force Tags | HC_FUNC -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Documentation | *Honeycomb TAP management test suite.* - -*** Test Cases *** -| TC01: Honeycomb configures TAP interface -| | [Documentation] | Check if Honeycomb API can configure a TAP interface. -| | ... -| | Given TAP Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${tap_interface} -| | And TAP Operational Data From VAT Should Be empty -| | ... | ${node} | ${tap_interface} -| | When Honeycomb creates TAP interface -| | ... | ${node} | ${tap_interface} | ${tap_settings} -| | Then TAP Operational Data From Honeycomb Should Be -| | ... | ${node} | ${tap_interface} | ${tap_settings_oper} -| | And TAP Operational Data From VAT Should Be -| | ... | ${node} | ${tap_device_name} | ${tap_settings_vat} - -| TC02: Honeycomb modifies existing TAP interface configuration -| | [Documentation] | Check if Honeycomb API can re-configure an existing TAP\ -| | ... | interface with new settings. -| | ... -| | Given TAP Operational Data From Honeycomb Should Be -| | ... | ${node} | ${tap_interface} | ${tap_settings_oper} -| | And TAP Operational Data From VAT Should Be -| | ... | ${node} | ${tap_device_name} | ${tap_settings_vat} -| | When Honeycomb configures TAP interface -| | ... | ${node} | ${tap_interface} | ${tap_settings2} -| | Then TAP Operational Data From Honeycomb Should Be -| | ... | ${node} | ${tap_interface} | ${tap_settings2_oper} -| | And TAP Operational Data From VAT Should Be -| | ... | ${node} | ${tap_device_name} | ${tap_settings2_vat} - -| TC03: Honeycomb removes TAP interface -| | [Documentation] | Check if Honeycomb API can remove TAP interface. -| | ... -| | Given TAP Operational Data From Honeycomb Should Be -| | ... | ${node} | ${tap_interface} | ${tap_settings2_oper} -| | And TAP Operational Data From VAT Should Be -| | ... | ${node} | ${tap_device_name} | ${tap_settings2_vat} -| | When Honeycomb removes TAP interface | ${node} | ${tap_interface} -| | Then TAP Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${tap_interface} -| | And TAP Operational Data From VAT Should Be empty -| | ... | ${node} | ${tap_device_name} diff --git a/tests/honeycomb/func/mgmt-cfg-intvhost-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-intvhost-apihc-apivat-func.robot deleted file mode 100644 index c5cbe6ea4a..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-intvhost-apihc-apivat-func.robot +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables *** -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${vhost_interface}= | test_vhost -| &{vhost_user_server}= | socket=/tmp/soc1 | role=server -| &{vhost_user_server_edit_1}= | socket=/tmp/soc12 | role=server -| &{vhost_user_server_edit_2}= | socket=/tmp/soc12 | role=client -| &{vhost_user_client}= | socket=/tmp/soc2 | role=client -| &{vhost_user_client_edit_1}= | socket=/tmp/soc22 | role=client -| &{vhost_user_client_edit_2}= | socket=/tmp/soc22 | role=server -| &{vhost_user_wrong}= | socket=/tmp/soc2 | role=wrong - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/vhost_user.robot -| ... -| Force Tags | HC_FUNC -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Documentation | *Honeycomb vhost-user interface management test suite.* - -*** Test Cases *** -| TC01: Honeycomb creates vhost-user interface - server -| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\ -| | ... | server. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vhost_interface} -| | When Honeycomb creates vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} -| | And vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_server} - -| TC02: Honeycomb modifies vhost-user interface - server -| | [Documentation] | Check if Honeycomb can modify properties of existing\ -| | ... | vhost-user interface, role: server. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} -| | When Honeycomb configures vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_1} -| | And vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_server_edit_1} -| | When Honeycomb configures vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server_edit_2} -| | And vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_server_edit_2} -| | When Honeycomb configures vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} -| | And vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_server} - -| TC03: Honeycomb deletes vhost-user interface - server -| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\ -| | ... | interface, role: server. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_server} -| | When Honeycomb removes vhost-user interface -| | ... | ${node} | ${vhost_interface} -| | Then vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vhost_interface} -| | And vhost-user Operational Data From VAT Should Be empty -| | ... | ${node} - -| TC04: Honeycomb creates vhost-user interface - client -| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\ -| | ... | client. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vhost_interface} -| | When Honeycomb creates vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} -| | And vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_client} - -| TC05: Honeycomb modifies vhost-user interface - client -| | [Documentation] | Check if Honeycomb can modify properties of existing\ -| | ... | vhost-user interface, role: client. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} -| | When Honeycomb configures vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_1} -| | And vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_client_edit_1} -| | When Honeycomb configures vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client_edit_2} -| | And vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_client_edit_2} -| | When Honeycomb configures vhost-user interface -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} -| | Then vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} -| | And vhost-user Operational Data From VAT Should Be -| | ... | ${node} | ${vhost_user_client} - -| TC06: Honeycomb deletes vhost-user interface - client -| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\ -| | ... | interface, role: client. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vhost_interface} | ${vhost_user_client} -| | When Honeycomb removes vhost-user interface -| | ... | ${node} | ${vhost_interface} -| | Then vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vhost_interface} -| | And vhost-user Operational Data From VAT Should Be empty -| | ... | ${node} - -| TC07: Honeycomb does not set vhost-user configuration on another interface type -| | [Documentation] | Check if Honeycomb refuses to set vhost-user\ -| | ... | configuration for interface which is not v3po:vhost-user type. -| | ... -| | When Honeycomb fails setting vhost-user on different interface type -| | ... | ${node} | ${interface} | ${vhost_user_server} -| | Then vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} -| | And vhost-user Operational Data From VAT Should Be empty -| | ... | ${node} - -| TC08: Honeycomb does not set invalid vhost-user configuration -| | [Documentation] | Check if Honeycomb refuses to set invalid parameters to\ -| | ... | vhost-user interface. -| | ... -| | Given vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vhost_interface} -| | When Honeycomb fails setting invalid vhost-user configuration -| | ... | ${node} | ${vhost_interface} | ${vhost_user_wrong} -| | Then vhost-user Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vhost_interface} -| | And vhost-user Operational Data From VAT Should Be empty -| | ... | ${node} diff --git a/tests/honeycomb/func/mgmt-cfg-l2bd-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-l2bd-apihc-apivat-func.robot deleted file mode 100644 index 5f20c6c927..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-l2bd-apihc-apivat-func.robot +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interfaces to run tests on. -| @{interfaces}= | ${node['interfaces']['port1']['name']} -| ... | ${node['interfaces']['port3']['name']} -# Configuration which will be set and verified during tests. -| ${bd1_name}= | bd-01 -| ${bd2_name}= | bd-02 -| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} -| ... | unknown-unicast-flood=${True} | arp-termination=${True} -| &{if_settings}= | split_horizon_group=${1} | bvi=${False} -| &{if_settings2}= | split_horizon_group=${2} | bvi=${True} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC -| ... -| Documentation | *Honeycomb bridge domain management test suite.* - -*** Test Cases *** -| TC01: Honeycomb sets up l2 bridge domain -| | [Documentation] | Check if Honeycomb can create bridge domains on VPP node. -| | ... -| | When Honeycomb creates first l2 bridge domain -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | Then Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | And Bridge domain Operational Data From VAT Should Be -| | ... | ${node} | ${0} | ${bd_settings} - -| TC02: Honeycomb manages multiple bridge domains on node -| | [Documentation] | Check if Honeycomb can manage multiple bridge domains on\ -| | ... | a single node. -| | ... -| | Given Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | When Honeycomb creates l2 bridge domain -| | ... | ${node} | ${bd2_name} | ${bd_settings} -| | Then Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | And Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd2_name} | ${bd_settings} -| | And Bridge domain Operational Data From VAT Should Be -| | ... | ${node} | ${0} | ${bd_settings} -| | And Bridge domain Operational Data From VAT Should Be -| | ... | ${node} | ${1} | ${bd_settings} - -| TC03: Honeycomb removes bridge domains -| | [Documentation] | Check if Honeycomb can remove bridge domains from a VPP\ -| | ... | node. -| | ... -| | Given Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | When Honeycomb removes all bridge domains | ${node} -| | Then Honeycomb should show no bridge domains | ${node} -| | And PAPI should show no bridge domains | ${node} - -| TC04: Honeycomb assigns interfaces to bridge domain -| | [Documentation] | Check if Honeycomb can assign VPP interfaces to an\ -| | ... | existing bridge domain. -| | ... -| | Given Honeycomb creates first l2 bridge domain -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | When Honeycomb adds interfaces to bridge domain -| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} -| | Then Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | And Bridge domain Operational Data From VAT Should Be -| | ... | ${node} | ${0} | ${bd_settings} -| | And Honeycomb should show interfaces assigned to bridge domain -| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} -| | And PAPI should show interfaces assigned to bridge domain -| | ... | ${node} | ${0} | @{interfaces} | ${if_settings} - -| TC05: Honeycomb cannot remove bridge domain with an interface assigned -| | [Documentation] | Check if Honeycomb can remove a bridge domain that has an\ -| | ... | interface assigned to it. Expect to fail with code 500. -| | ... -| | Given Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | And Bridge domain Operational Data From VAT Should Be -| | ... | ${node} | ${0} | ${bd_settings} -| | And Honeycomb should show interfaces assigned to bridge domain -| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} -| | And PAPI should show interfaces assigned to bridge domain -| | ... | ${node} | ${0} | @{interfaces} | ${if_settings} -| | When Run keyword and expect error | HoneycombError* Status code: 500. -| | ... | Honeycomb removes all bridge domains | ${node} -| | Then Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd1_name} | ${bd_settings} -| | And Bridge domain Operational Data From VAT Should Be -| | ... | ${node} | ${0} | ${bd_settings} -| | And Honeycomb should show interfaces assigned to bridge domain -| | ... | ${node} | @{interfaces} | ${bd1_name} | ${if_settings} -| | And PAPI should show interfaces assigned to bridge domain -| | ... | ${node} | ${0} | @{interfaces} | ${if_settings} diff --git a/tests/honeycomb/func/mgmt-cfg-l2fib-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-l2fib-apihc-apivat-func.robot deleted file mode 100644 index d13bb6354f..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-l2fib-apihc-apivat-func.robot +++ /dev/null @@ -1,232 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Resource | resources/libraries/robot/honeycomb/l2_fib.robot -| Variables | resources/test_data/honeycomb/l2_fib.py | ${node} | ${interface} -| ... | ${interface2} -| ... -| Documentation | *Honeycomb L2 FIB management test suite.* -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC - -*** Variables *** -# Interface to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${interface2}= | ${node['interfaces']['port3']['name']} - -*** Test Cases *** -| TC01: Honeycomb adds L2 FIB entry (forward) -| | [Documentation] | Honeycomb creates a bridge domain and assignes an \ -| | ... | interface to it. Then adds an L2 FIB entry (forward) to the bridge \ -| | ... | domain. -| | ... -| | [Teardown] | Honeycomb removes L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']} -| | ... -| | Given Interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down -| | When Honeycomb configures interface state -| | ... | ${node} | ${interface} | up -| | Then Interface state from Honeycomb should be -| | ... | ${node} | ${interface} | up -| | When Honeycomb creates first l2 bridge domain -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | Then Bridge domain Operational Data From Honeycomb Should Be -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | Given Bridge domain Operational Interface Assignment should be empty -| | ... | ${node} | ${interface} -| | When Honeycomb adds interface to bridge domain -| | ... | ${node} | ${interface} | ${bd_name} | ${if_bd_settings} -| | Then Bridge domain Operational Interface Assignment should be -| | ... | ${node} | ${interface} | ${if_bd_settings} -| | Given L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} -| | Then L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} -| | And L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat} - -| TC02: Honeycomb adds L2 FIB entry (static, forward) -| | [Documentation] | Honeycomb adds an L2 FIB entry (static, forward) to the \ -| | ... | bridge domain. -| | ... -| | [Teardown] | Honeycomb removes L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper['phys-address']} -| | ... -| | Given Bridge domain Operational Interface Assignment should be -| | ... | ${node} | ${interface} | ${if_bd_settings} -| | And L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg} -| | Then L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper} -| | And L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat} - -| TC03: Honeycomb adds L2 FIB entry (static, filter) -| | [Documentation] | Honeycomb adds an L2 FIB entry (static, filter) to the \ -| | ... | bridge domain. -| | ... -| | [Teardown] | Honeycomb removes L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper['phys-address']} -| | ... -| | Given Bridge domain Operational Interface Assignment should be -| | ... | ${node} | ${interface} | ${if_bd_settings} -| | And L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg} -| | Then L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper} -| | And L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat} - -| TC04: Honeycomb adds and removes L2 FIB entry (forward) -| | [Documentation] | Honeycomb adds an L2 FIB entry (forward) to the bridge \ -| | ... | domain and then Honeycomb removes it from the bridge domain. -| | ... -| | [Teardown] | Honeycomb removes L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']} -| | ... -| | Given Bridge domain Operational Interface Assignment should be -| | ... | ${node} | ${interface} | ${if_bd_settings} -| | And L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} -| | Then L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} -| | And L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat} -| | When Honeycomb removes L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']} -| | Then L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} - -| TC05: Honeycomb adds more than one L2 FIB entry -| | [Documentation] | Honeycomb adds three L2 FIB entries to the bridge domain. -| | ... -| | [Teardown] | Honeycomb removes all L2 FIB entries -| | ... | ${node} | ${bd_name} -| | ... -| | Given Bridge domain Operational Interface Assignment should be -| | ... | ${node} | ${interface} | ${if_bd_settings} -| | And L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} -| | And Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_cfg} -| | And Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_filter_cfg} -| | Then L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} -| | And L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_static_forward_oper} -| | And L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_filter_oper} -| | And L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat} -| | And L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_static_forward_vat} -| | And L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_filter_vat} - -| TC06: Honeycomb fails to set wrong L2 FIB entry -| | [Documentation] | Honeycomb tries to add an L2 FIB entry with wrong \ -| | ... | parameters to the bridge domain. It must fail. -| | ... -| | [Teardown] | Honeycomb removes all L2 FIB entries -| | ... | ${node} | ${bd_name} -| | ... -| | Given Bridge domain Operational Interface Assignment should be -| | ... | ${node} | ${interface} | ${if_bd_settings} -| | And L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb fails to add wrong L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_mac} -| | Then L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb fails to add wrong L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_if} -| | Then L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb fails to add wrong L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg_wrong_action} -| | Then L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} - -| TC07: Honeycomb fails to modify existing L2 FIB entry -| | [Documentation] | Honeycomb tries to modify an existing L2 FIB entry. It \ -| | ... | must fail. -| | ... -| | [Teardown] | Honeycomb removes all L2 FIB entries -| | ... | ${node} | ${bd_name} -| | ... -| | Given Bridge domain Operational Interface Assignment should be -| | ... | ${node} | ${interface} | ${if_bd_settings} -| | And L2 FIB Table from Honeycomb should be empty -| | ... | ${node} | ${bd_name} -| | And L2 FIB Table from PAPI should be empty -| | ... | ${node} | ${bd_index} -| | When Honeycomb adds L2 FIB entry to bridge domain -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_cfg} -| | Then L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} -| | When Honeycomb fails to modify L2 FIB entry -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper['phys-address']} -| | ... | outgoing-interface -| | ... | ${l2_fib_forward_modified_cfg['outgoing-interface']} -| | Then L2 FIB Entry from Honeycomb should be -| | ... | ${node} | ${bd_name} | ${l2_fib_forward_oper} -| | And L2 FIB entry from PAPI should be -| | ... | ${node} | ${bd_index} | ${l2_fib_forward_vat} - -*** Keywords *** -| Set test interface down -| | [Documentation] | Set the interface used in tests down. -| | ... -| | Honeycomb configures interface state -| | ... | ${node} | ${interface} | down diff --git a/tests/honeycomb/func/mgmt-cfg-lisp-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-lisp-apihc-apivat-func.robot deleted file mode 100644 index 0198e8205c..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-lisp-apihc-apivat-func.robot +++ /dev/null @@ -1,310 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables*** -| ${ip_address}= | 192.168.0.4 -| @{ip_addresses}= | 192.168.0.5 | 192.168.0.6 | 192.168.0.7 | 192.168.0.8 -| ${state}= | enabled -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${bd_name}= | bd_lisp -| ${bd2_name}= | bd2_lisp -| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} -| ... | unknown-unicast-flood=${True} | arp-termination=${True} - -*** Settings *** -| Library | resources.libraries.python.Trace -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/lisp.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Variables | resources/test_data/honeycomb/lisp/lisp.py -| ... -| Documentation | *Honeycomb Lisp test suite.* -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -| TC01: Honeycomb enables LISP feature -| | [Documentation] | Check if Honeycomb can enable the LISP feature. -| | ... -| | Given LISP Should Not Be Configured | ${node} -| | When Honeycomb enables LISP | ${node} -| | Then LISP state from Honeycomb should be | ${node} | ${state} -| | And LISP state from VAT should be | ${node} | ${state} - -| TC02: Honeycomb adds locator set and locator -| | [Documentation] | Check if Honeycomb can configure a locator set. -| | ... -| | Given LISP state from Honeycomb should be | ${node} | ${state} -| | When Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} -| | Then Locator Set From Honeycomb Should Be -| | ... | ${node} | ${interface} | ${locator_set} - -| TC15: Honeycomb can remove configuration of LISP features -| | [Documentation] | Check if Honeycomb can disable all LISP features. -| | ... -| | Given Locator Set From Honeycomb Should Be -| | ... | ${node} | ${interface} | ${locator_set} -| | When Honeycomb disables all LISP features | ${node} -| | Then LISP Should Not Be Configured | ${node} - -| TC03: Honeycomb configures LISP - remote mapping - Bridge Domain -| | [Documentation] | Check if Honeycomb can configure a remote LISP mapping\ -| | ... | with a bridge domain. -| | ... -| | Given Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} -| | And Honeycomb creates first l2 bridge domain -| | ... | ${node} | ${bd_name} | ${bd_settings} -| | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_remote_bd} -| | Then LISP mapping from Honeycomb should be -| | ... | ${node} | ${remote_bd_subtable} -| | And LISP mapping from VAT should be -| | ... | ${node} | ${vat_remote_bd} - -| TC04: Honeycomb can remove LISP mapping -| | [Documentation] | Check if Honeycomb can remove a configured LISP mapping. -| | ... -| | Given LISP mapping from Honeycomb should be -| | ... | ${node} | ${remote_bd_subtable} -| | And LISP mapping from VAT should be -| | ... | ${node} | ${vat_remote_bd} -| | When Honeycomb removes all LISP mappings | ${node} -| | Then LISP mappings from Honeycomb should not exist -| | ... | ${node} -| | And LISP mappings from VAT should not exist -| | ... | ${node} - -| TC05: Honeycomb configures LISP - remote mapping - VRF -| | [Documentation] | Check if Honeycomb can configure a remote LISP mapping\ -| | ... | with VRF. -| | ... -| | [Teardown] | Honeycomb removes all LISP mappings | ${node} -| | ... -| | Given LISP mappings from Honeycomb should not exist -| | ... | ${node} -| | And LISP mappings from VAT should not exist -| | ... | ${node} -| | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_remote_vrf} -| | Then LISP mapping from Honeycomb should be -| | ... | ${node} | ${remote_vrf_subtable} -| | And LISP mapping from VAT should be | ${node} | ${vat_remote_vrf} - -| TC06: Honeycomb configures LISP - local mapping - Bridge Domain -| | [Documentation] | Check if Honeycomb can configure a local LISP mapping\ -| | ... | with a bridge domain. -| | ... -| | [Teardown] | Honeycomb removes all LISP mappings | ${node} -| | ... -| | Given Locator Set From Honeycomb Should Be -| | ... | ${node} | ${interface} | ${locator_set} -| | And LISP mappings from Honeycomb should not exist -| | ... | ${node} -| | And LISP mappings from VAT should not exist -| | ... | ${node} -| | And Honeycomb creates first l2 bridge domain -| | ... | ${node} | ${bd2_name} | ${bd_settings} -| | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_local_bd} -| | Then LISP mapping from Honeycomb should be | ${node} | ${local_bd_subtable} -| | And LISP mapping from VAT should be | ${node} | ${vat_local_bd} - -| TC07: Honeycomb configures LISP - local mapping - VRF -| | [Documentation] | Check if Honeycomb can configure a local LISP mapping\ -| | ... | with VRF. -| | ... -| | [Teardown] | Honeycomb removes all LISP mappings | ${node} -| | ... -| | Given Locator Set From Honeycomb Should Be -| | ... | ${node} | ${interface} | ${locator_set} -| | And LISP mappings from Honeycomb should not exist -| | ... | ${node} -| | And LISP mappings from VAT should not exist -| | ... | ${node} -| | When Honeycomb adds LISP mapping | ${node} | ${lisp_settings_local_vrf} -| | Then LISP mapping from Honeycomb should be | ${node} | ${local_vrf_subtable} -| | And LISP mapping from VAT should be | ${node} | ${vat_local_vrf} - -| TC08: Honeycomb configures LISP mapping with adjacency -| | [Documentation] | Check if Honeycomb can configure local and remote LISP\ -| | ... | mappings with VRF, and configure adjacency. -| | ... -| | [Teardown] | Honeycomb disables all LISP features | ${node} -| | ... -| | Given Locator Set From Honeycomb Should Be -| | ... | ${node} | ${interface} | ${locator_set} -| | And LISP mappings from Honeycomb should not exist -| | ... | ${node} -| | And LISP mappings from VAT should not exist -| | ... | ${node} -| | And Honeycomb adds LISP mapping | ${node} | ${lisp_settings_both_vrf} -| | When Honeycomb adds LISP adjacency | ${node} | ${7} | remote_map_vrf -| | ... | adj01 | ${vrf_adjacency} -| | Then LISP mapping from Honeycomb should be -| | ... | ${node} | ${adj_subtable} - -| TC09: Honeycomb configures LISP Map Resolver -| | [Documentation] | Check if Honeycomb can configure a LISP Map Resolver. -| | ... -| | [Teardown] | Honeycomb disables all LISP features | ${node} -| | Given Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} -| | And LISP state from VAT should be | ${node} | ${state} -| | When Honeycomb adds LISP Map Resolver | ${node} | ${ip_address} -| | Then Map Resolver from Honeycomb should be | ${node} | ${ip_address} -| | And Map Resolver from VAT should be | ${node} | ${ip_address} - -| TC10: Honeycomb configures LISP Map Server -| | [Documentation] | Check if Honeycomb can configure a LISP Map Server. -| | ... -| | [Teardown] | Honeycomb disables all LISP features | ${node} -| | Given Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} -| | Given LISP state from Honeycomb should be | ${node} | ${state} -| | And LISP state from VAT should be | ${node} | ${state} -| | When Honeycomb adds LISP Map Server | ${node} | @{ip_addresses} -| | Then Map Server from Honeycomb should be | ${node} | @{ip_addresses} -| | And Map Server from VAT should be | ${node} | @{ip_addresses} - -| TC11: Honeycomb configures LISP PETR configuration -| | [Documentation] | Check if Honeycomb can configure LISP -| | ... | PETR configuration. -| | ... -| | [Teardown] | Honeycomb disables all LISP features | ${node} -| | Given Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} -| | Given LISP state from Honeycomb should be | ${node} | ${state} -| | And LISP state from VAT should be | ${node} | ${state} -| | When Honeycomb enables LISP PETR feature | ${node} | ${ip_address} -| | Then PETR configuration from Honeycomb should be | ${node} | ${ip_address} -| | And PETR configuration from VAT should be | ${node} | enabled - -| TC12: Honeycomb configures LISP RLOC Probing -| | [Documentation] | Check if Honeycomb can configure LISP RLOC Probing. -| | ... -| | [Teardown] | Honeycomb disables all LISP features | ${node} -| | Given Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} -| | Given LISP state from Honeycomb should be | ${node} | ${state} -| | And LISP state from VAT should be | ${node} | ${state} -| | When Honeycomb enables LISP RLOC feature | ${node} -| | Then RLOC Probing from Honeycomb should be | ${node} | ${True} -| | And RLOC Probing from VAT should be | ${node} | enabled - -| TC13: Honeycomb configures LISP Map Register -| | [Documentation] | Check if Honeycomb can configure a LISP Map Register. -| | ... -| | [Teardown] | Honeycomb disables all LISP features | ${node} -| | Given Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} -| | Given LISP state from Honeycomb should be | ${node} | ${state} -| | And LISP state from VAT should be | ${node} | ${state} -| | When Honeycomb adds LISP Map Register | ${node} | ${True} -| | Then Map Register from Honeycomb should be | ${node} | ${True} -| | And Map Register from VAT should be | ${node} | enabled - -| TC14: Honeycomb enabled LISP PITR feature -| | [Documentation] | Check if Honeycomb can configure the LISP PITR feature. -| | ... -# HC2VPP-263 Locator set reference in operational data is incorrect -| | [Tags] | EXPECTED_FAILING -| | [Teardown] | Honeycomb disables all LISP features | ${node} -| | Given Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${interface} | ${locator_set} -| | When Honeycomb enables LISP PITR feature | ${node} | ${locator_set} -| | Then PITR config from Honeycomb should be | ${node} | ${locator_set} -| | And PITR config from VAT should be | ${node} | ${locator_set} - -| TC16: Honeycomb can configure LISP for traffic test - IPv4 -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv4-LISP. -| | ... | [Cfg] On DUT1 configure IPv4 LISP static adjacencies with TG. -| | ... | [Ver] Make TG send ICMPv4 Echo Req between its interfaces through\ -| | ... | DUT1 and verify LISP encapsulation of received packet. -| | ... | [Ref] RFC6830. -| | ... -| | [Teardown] | LISP Functional Traffic Test Teardown -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if1} | up -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if2} | up -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip4} | ${prefix_len4} -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip4} | ${prefix_len4} -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${src_ip4} | ${tg_to_dut_if1_mac} -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${tg_to_dut_if2_ip4} | ${tg_to_dut_if2_mac} -| | When Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${dut_to_tg_if2} | ${locator_set} -| | And Honeycomb adds LISP mapping | ${node} | ${lisp_traffic_ip4} -| | Then send packet and verify LISP encap -| | ... | ${tg_node} | ${src_ip4} | ${dst_ip4} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} -| | ... | ${src_rloc4} | ${dst_rloc4} - -| TC17: Honeycomb can configure LISP for traffic test - IPv6 -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv6-LISP. -| | ... | [Cfg] On DUT1 configure IPv6 LISP static adjacencies with TG. -| | ... | [Ver] Make TG send ICMPv6 Echo Req between its interfaces through\ -| | ... | DUT1 and verify LISP encapsulation of received packet. -| | ... | [Ref] RFC6830. -| | ... -| | [Teardown] | LISP Functional Traffic Test Teardown -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if1} | up -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if2} | up -| | And Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip6} | ${prefix_len6} -| | And Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_len6} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${src_ip6} | ${tg_to_dut_if1_mac} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${tg_to_dut_if2_ip6} | ${tg_to_dut_if2_mac} -| | When Honeycomb enables LISP | ${node} -| | And Honeycomb adds locator set | ${node} | ${dut_to_tg_if2} | ${locator_set} -| | And Honeycomb adds LISP mapping | ${node} | ${lisp_traffic_ip6} -| | Then send packet and verify LISP encap -| | ... | ${tg_node} | ${src_ip6} | ${dst_ip6} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} -| | ... | ${src_rloc6} | ${dst_rloc6} - -| TC18: Honeycomb configures LISP Map Request Mode -| | [Documentation] | Check if Honeycomb can configure LISP Map Request mode. -| | ... | Note: Map Request Mode cannot be removed once configured. -| | ... -| | [Teardown] | Honeycomb disables LISP | ${node} -| | ... -| | Given Honeycomb Enables LISP | ${node} -| | When Honeycomb sets LISP Map Request Mode | ${node} | ${True} -| | Then Map Request Mode from Honeycomb should be -| | ... | ${node} | source-destination -| | And Map Request Mode from VAT should be | ${node} | src-dst diff --git a/tests/honeycomb/func/mgmt-cfg-lispgpe-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-lispgpe-apihc-apivat-func.robot deleted file mode 100644 index a4d66b5581..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-lispgpe-apihc-apivat-func.robot +++ /dev/null @@ -1,226 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables*** -| ${interface}= | ${node['interfaces']['port1']['name']} - -*** Settings *** -| Library | resources.libraries.python.Trace -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/lisp_gpe.robot -| Variables | resources/test_data/honeycomb/lisp/lisp_gpe.py -| ... -| Documentation | *Honeycomb LISP GPE test suite.* -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -| TC01: Honeycomb enables LISP GPE feature -| | [Documentation] | Check if Honeycomb can enable the LISP GPE feature. -| | ... -| | Given LISP GPE Should Not Be Configured | ${node} -| | When Honeycomb enables LISP GPE | ${node} -| | Then LISP GPE state from Honeycomb should be | ${node} | enabled -| | And LISP GPE state from VAT should be | ${node} | enabled - -| TC02: Honeycomb disable LISP GPE feature -| | [Documentation] | Check if Honeycomb can enable the LISP GPE feature. -| | ... -| | [Teardown] | Honeycomb enables LISP GPE | ${node} -| | Given LISP GPE state from Honeycomb should be | ${node} | enabled -| | And LISP GPE state from VAT should be | ${node} | enabled -| | When Honeycomb disables LISP GPE | ${node} -| | Then LISP GPE state from Honeycomb should be | ${node} | disabled -| | And LISP GPE state from VAT should be | ${node} | disabled - -| TC03: Honeycomb configures LISP GPE mapping - negative, IPv4 -| | [Documentation] | Check if Honeycomb can configure a LISP mapping\ -| | ... | with VRF. -| | ... -| | Given LISP GPE mappings from Honeycomb should not exist -| | ... | ${node} -| | When Honeycomb adds first LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip4} -| | Then LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${negative_mapping_ip4} - -| TC04: Honeycomb can remove LISP GPE mapping -| | [Documentation] | Check if Honeycomb can remove a configured LISP GPE\ -| | ... | mapping. -| | ... -| | Given LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${negative_mapping_ip4} -| | When Honeycomb removes LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip4['id']} -| | Then LISP GPE mappings from Honeycomb should not exist -| | ... | ${node} - -| TC05: Honeycomb configures LISP GPE mapping - positive, IPv4 -| | [Documentation] | Check if Honeycomb can configure a LISP mapping\ -| | ... | with VRF. -| | ... -| | [Teardown] | Honeycomb removes LISP GPE mapping -| | ... | ${node} | ${positive_mapping_ip4['id']} -| | Given LISP GPE mappings from Honeycomb should not exist -| | ... | ${node} -| | When Honeycomb adds first LISP GPE mapping -| | ... | ${node} | ${positive_mapping_ip4} -| | Then LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${positive_mapping_ip4} - -| TC06: Honeycomb configures LISP GPE mapping - negative, IPv6 -| | [Documentation] | Check if Honeycomb can configure a LISP mapping\ -| | ... | with VRF. -| | ... -| | [Teardown] | Honeycomb removes LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip6['id']} -| | Given LISP GPE mappings from Honeycomb should not exist -| | ... | ${node} -| | When Honeycomb adds first LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip6} -| | Then LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${negative_mapping_ip6} - -| TC07: Honeycomb configures LISP GPE mapping - positive, IPv6 -| | [Documentation] | Check if Honeycomb can configure a LISP mapping\ -| | ... | with VRF. -| | ... -| | [Teardown] | Honeycomb removes LISP GPE mapping -| | ... | ${node} | ${positive_mapping_ip6['id']} -| | Given LISP GPE mappings from Honeycomb should not exist -| | ... | ${node} -| | When Honeycomb adds first LISP GPE mapping -| | ... | ${node} | ${positive_mapping_ip6} -| | Then LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${positive_mapping_ip6} - -| TC08: Honeycomb can modify existing LISP GPE mappping -| | [Documentation] | Check if Honeycomb can modify and existing LISP GPE\ -| | ... | mapping. -| | ... -| | [Teardown] | Honeycomb removes LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip4_edit['id']} -| | Given LISP GPE mappings from Honeycomb should not exist -| | ... | ${node} -| | When Honeycomb adds first LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip4} -| | Then LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${negative_mapping_ip4} -| | When Honeycomb adds first LISP GPE mapping | ${node} -| | ... | ${negative_mapping_ip4_edit} -| | Then LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${negative_mapping_ip4_edit} - -| TC09: Honeycomb can configure multiple LISP GPE mapppings -| | [Documentation] | Check if Honeycomb can configure multiple LISP GPE\ -| | ... | mappings at the same time. -| | ... -| | [Teardown] | Run Keywords -| | ... | Honeycomb removes LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip4['id']} -| | ... | AND | Honeycomb removes LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip4_2['id']} -| | Given LISP GPE mappings from Honeycomb should not exist -| | ... | ${node} -| | When Honeycomb adds first LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip4} -| | And Honeycomb adds LISP GPE mapping | ${node} | ${negative_mapping_ip4_2} -| | Then LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${negative_mapping_ip4} -| | And LISP GPE mapping from Honeycomb should be -| | ... | ${node} | ${negative_mapping_ip4_2} - -| TC10: Honeycomb can disable all LISP GPE features -| | [Documentation] | Check if Honeycomb can disable all LISP GPE features. -| | ... -| | Given Honeycomb adds first LISP GPE mapping -| | ... | ${node} | ${negative_mapping_ip4} -| | When Honeycomb disables all LISP GPE features | ${node} -| | Then LISP GPE mappings from Honeycomb should not exist -| | ... | ${node} -| | And LISP GPE state from Honeycomb should be | ${node} | disabled -| | And LISP GPE state from VAT should be | ${node} | disabled - -| TC11: Honeycomb can configure LISP GPE for traffic test - IPv4 -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv4-LISPGPE-IPv4-ICMPv4 -| | ... | [Cfg] Configure IPv4 LISP static adjacencies on DUT1. -| | ... | [Ver] Case: ip4-lispgpe-ip4 - phy2lisp -| | ... | Make TG send ICMPv4 Echo Req between its interfaces through DUT1\ -| | ... | LISP GPE tunnel verify LISP encapsulation of received packet. -| | ... | [Ref] RFC6830. -| | ... -| | [Teardown] | LISPGPE functional traffic test teardown -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if1} | up -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if2} | up -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip4} | ${prefix_len4} -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip4} | ${prefix_len4} -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${src_ip4} | ${tg_to_dut_if1_mac} -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${tg_to_dut_if2_ip4} | ${tg_to_dut_if2_mac} -| | When Honeycomb enables LISP GPE | ${node} -| | And Honeycomb adds LISP GPE mapping | ${node} | ${lisp_traffic_ip4} -| | Then send packet and verify LISP GPE encap -| | ... | ${tg_node} | ${src_ip4} | ${dst_ip4} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} -| | ... | ${src_rloc4} | ${dst_rloc4} - -| TC12: Honeycomb can configure LISP GPE for traffic test - IPv6 -| | [Documentation] -| | ... | [Top] TG-DUT1-TG. -| | ... | [Enc] Eth-IPv6-LISPGPE-IPv6-ICMPv6 -| | ... | [Cfg] Configure IPv6 LISP static adjacencies on DUT1. -| | ... | [Ver] Case: ip6-lispgpe-ip6 - phy2lisp -| | ... | Make TG send ICMPv6 Echo Req between its interfaces through DUT1\ -| | ... | LISP GPE tunnel verify LISP encapsulation of received packet. -| | ... | [Ref] RFC6830. -| | ... -| | [Teardown] | LISPGPE functional traffic test teardown -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if1} | up -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if2} | up -| | And Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip6} | ${prefix_len6} -| | And Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip6} | ${prefix_len6} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${src_ip6} | ${tg_to_dut_if1_mac} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${tg_to_dut_if2_ip6} | ${tg_to_dut_if2_mac} -| | When Honeycomb enables LISP GPE | ${node} -| | And Honeycomb adds LISP GPE mapping | ${node} | ${lisp_traffic_ip6} -| | Then send packet and verify LISP GPE encap -| | ... | ${tg_node} | ${src_ip6} | ${dst_ip6} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if2_mac} | ${tg_to_dut_if2_mac} -| | ... | ${src_rloc6} | ${dst_rloc6} diff --git a/tests/honeycomb/func/mgmt-cfg-nsh-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-nsh-apihc-apivat-func.robot deleted file mode 100644 index 46deef1692..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-nsh-apihc-apivat-func.robot +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables*** -| ${super_if}= | ${node['interfaces']['port1']['name']} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/nsh.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/vxlan_gpe.robot -| Variables | resources/test_data/honeycomb/nsh.py -| Variables | resources/test_data/honeycomb/vxlan_gpe.py -| ... -| Documentation | *Honeycomb NSH test suite.* -| ... -| Suite Setup | Run Keywords -| ... | Enable Honeycomb Feature | ${node} | NSH | AND -| ... | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Run Keywords -| ... | Tear Down Honeycomb Functional Test Suite | ${node} | AND -| ... | Disable Honeycomb Feature | ${node} | NSH -| ... -# NSH packages are not yet available in fd.io.stable.1710.* repos -| Force Tags | HC_FUNC | HC_NSH | EXPECTED_FAILING - -*** Test Cases *** -| TC01: Honeycomb can configure NSH entry -| | [Documentation] | Check if Honeycomb can configure an NSH entry. -| | ... -| | Given NSH Operational Data From Honeycomb Should Be empty | ${node} -| | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1} -| | Then NSH entry from Honeycomb should be -| | ... | ${node} | entry1 | ${nsh_entry1_oper} - -| TC02: Honeycomb can remove NSH entry -| | [Documentation] | Check if Honeycomb can remove an existing NSH entry. -| | ... -| | Given NSH entry from Honeycomb should be -| | ... | ${node} | entry1 | ${nsh_entry1_oper} -| | When Honeycomb removes NSH entry | ${node} | entry1 -| | Then NSH Operational Data From Honeycomb Should Be empty | ${node} - -| TC03: Honeycomb can configure new NSH entry -| | [Documentation] | Check if Honeycomb can configure an NSH antry after one\ -| | ... | has been deleted. -| | ... -| | [Teardown] | Honeycomb removes NSH entry | ${node} | entry2 -| | ... -| | Given NSH Operational Data From Honeycomb Should Be empty | ${node} -| | When Honeycomb adds NSH entry | ${node} | entry2 | ${nsh_entry2} -| | Then NSH entry from Honeycomb should be -| | ... | ${node} | entry2 | ${nsh_entry2_oper} - -| TC04: Honeycomb can configure multiple NSH entries at the same time -| | [Documentation] | Check if Honeycomb can configure an NSH entry when one\ -| | ... | already exists. -| | ... -| | [Teardown] | Honeycomb clears NSH configuration | ${node} -| | ... -| | Given NSH Operational Data From Honeycomb Should Be empty | ${node} -| | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1} -| | And Honeycomb adds NSH entry | ${node} | entry2 | ${nsh_entry2} -| | Then NSH entry from Honeycomb should be -| | ... | ${node} | entry1 | ${nsh_entry1_oper} -| | And NSH entry from Honeycomb should be -| | ... | ${node} | entry2 | ${nsh_entry2_oper} - -| TC05: Honeycomb can configure NSH map -| | [Documentation] | Check if Honeycomb can configure an NSH map. -| | ... -| | Given NSH Operational Data From Honeycomb Should Be empty | ${node} -| | And Honeycomb creates VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if1} -| | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1} -| | When Honeycomb adds NSH entry | ${node} | entry1 | ${nsh_entry1} -| | And Honeycomb adds NSH map | ${node} | map1 | ${nsh_map1} -| | Then NSH map from Honeycomb should be | ${node} | map1 | ${nsh_map1_oper} - -| TC06: Honeycomb can remove NSH map -| | [Documentation] | Check if Honeycomb can remove an existing NSH map. -| | ... -| | Given NSH entry from Honeycomb should be -| | ... | ${node} | entry1 | ${nsh_entry1_oper} -| | And VxLAN GPE Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vxlan_gpe_if1} -| | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1} -| | And NSH map from Honeycomb should be | ${node} | map1 | ${nsh_map1_oper} -| | When Honeycomb removes NSH map | ${node} | map1 -| | Then NSH map from Honeycomb should not exist | ${node} | map1 -| | And NSH entry from Honeycomb should be -| | ... | ${node} | entry1 | ${nsh_entry1_oper} - -| TC07: Honeycomb can modify existing NSH map -| | [Documentation] | Check if Honeycomb can configure an NSH map after one\ -| | ... | has been deleted. -| | ... -| | [Teardown] | Honeycomb removes NSH map | ${node} | map1_edit -| | ... -| | Given NSH map from Honeycomb should not exist | ${node} | map1_edit -| | And NSH entry from Honeycomb should be -| | ... | ${node} | entry1 | ${nsh_entry1_oper} -| | And VxLAN GPE Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vxlan_gpe_if1} -| | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1} -| | When Honeycomb adds NSH map | ${node} | map1_edit | ${nsh_map1_edit} -| | Then NSH map from Honeycomb should be -| | ... | ${node} | map1_edit | ${nsh_map1_edit_oper} -| | And NSH entry from Honeycomb should be -| | ... | ${node} | entry1 | ${nsh_entry1_oper} - -| TC08: Honeycomb can configure multiple NSH maps at the same time -| | [Documentation] | Check if Honeycomb can configure and NSH map when one\ -| | ... | already exists. -| | ... -| | [Teardown] | Run Keywords -| | ... | Honeycomb clears NSH configuration | ${node} | AND -| | ... | Honeycomb removes VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if1} | AND -| | ... | Honeycomb removes VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if2} -| | ... -| | Given NSH map from Honeycomb should not exist | ${node} | map2 -| | And NSH entry from Honeycomb should be -| | ... | ${node} | entry1 | ${nsh_entry1_oper} -| | And VxLAN GPE Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vxlan_gpe_if1} -| | ... | ${vxlan_gpe_base_settings1} | ${vxlan_gpe_settings1} -| | And Honeycomb creates VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if2} -| | ... | ${vxlan_gpe_base_settings2} | ${vxlan_gpe_settings2} -| | When Honeycomb adds NSH map | ${node} | map1 | ${nsh_map1} -| | And Honeycomb adds NSH map | ${node} | map2 | ${nsh_map2} -| | Then NSH map from Honeycomb should be -| | ... | ${node} | map1 | ${nsh_map1_oper} -| | And NSH map from Honeycomb should be -| | ... | ${node} | map2 | ${nsh_map2_oper} diff --git a/tests/honeycomb/func/mgmt-cfg-pbb-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-pbb-apihc-apivat-func.robot deleted file mode 100644 index 4547c0c4bf..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-pbb-apihc-apivat-func.robot +++ /dev/null @@ -1,86 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables*** -| ${super_if}= | ${node['interfaces']['port1']['name']} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/provider_backbone_bridge.robot -| Variables | resources/test_data/honeycomb/pbb/pbb.py -| ... -| Documentation | *Honeycomb provider backbone bridge test suite.* -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -# TODO: add verifications once operational data or VPP dump is available. -| TC01: Honeycomb sets PBB sub-interface -| | [Documentation] | Honeycomb creates a new PBB sub-interface. -| | ... -| | Honeycomb creates PBB sub-interface | ${node} | ${super_if} -| | ... | ${cfg_pbb_sub_if_1} - -| TC02: Honeycomb modifies existing PBB sub-interface -| | [Documentation] | Honeycomb modifies an existing PBB sub-interface. -| | ... -| | Honeycomb creates PBB sub-interface | ${node} | ${super_if} -| | ... | ${cfg_pbb_sub_if_1_mod} - -| TC03: Honeycomb deletes existing PBB sub-interface -| | [Documentation] | Honeycomb deletes an existing PBB sub-interface. -| | ... -| | Honeycomb removes PBB sub-interface -| | ... | ${node} | ${super_if} - -| TC04: Honeycomb fails to set wrong destination-address for new PBB sub-interface -| | [Documentation] | Honeycomb fails to create a new PBB sub-interface with\ -| | ... | wrong value of parameter destination-address, type yang:mac-address. -| | ... -| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} -| | ... | ${cfg_pbb_sub_if_wrong_dst_addr} - -| TC05: Honeycomb fails to set wrong source-address for new PBB sub-interface -| | [Documentation] | Honeycomb fails to create a new PBB sub-interface with\ -| | ... | wrong value of parameter source-address, type yang:mac-address. -| | ... -| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} -| | ... | ${cfg_pbb_sub_if_wrong_src_addr} - -| TC06: Honeycomb fails to set wrong b-vlan-tag-vlan-id for new PBB sub-interface -| | [Documentation] | Honeycomb fails to create a new PBB sub-interface with\ -| | ... | wrong value of parameter b-vlan-tag-vlan-id, type uint16, 12 bit\ -| | ... | range, range 1..4095. -| | ... -| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} -| | ... | ${cfg_pbb_sub_if_wrong_vlan_tag} - -| TC07: Honeycomb fails to set wrong i-tag-isid for new PBB sub-interface -| | [Documentation] | Honeycomb fails to create a new PBB sub-interface with\ -| | ... | wrong value of parameter i-tag-isid, type uint32, 24 bit range,\ -| | ... | range 1..16777215. -| | ... -| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} -| | ... | ${cfg_pbb_sub_if_wrong_i_tag} - -| TC08: Honeycomb fails to create new PBB sub-interface without vlan tag -| | [Documentation] | Honeycomb fails to create a new PBB sub-interface without\ -| | ... | parameter b-vlan-tag-vlan-id. -| | ... -| | Honeycomb fails to create PBB sub-interface | ${node} | ${super_if} -| | ... | ${cfg_pbb_sub_if_no_vlan_tag} diff --git a/tests/honeycomb/func/mgmt-cfg-pluginacl-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-pluginacl-apihc-apivat-func.robot deleted file mode 100644 index ca717ae42f..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-pluginacl-apihc-apivat-func.robot +++ /dev/null @@ -1,781 +0,0 @@ -# Copyright (c) 2019 Cisco and/or its affiliates. -# 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. - -*** Variables *** -| &{if_settings}= | enabled=True -# Bridge domain settings -| ${bd_name}= | bd1 -| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True} -| ... | unknown-unicast-flood=${True} | arp-termination=${False} -| &{bd_if_settings}= | split_horizon_group=${0} | bvi=${False} -# Names for AC lists -| ${acl_name_macip}= | macip -| ${acl_name_l3_ip4}= | acl_l3_ip4 -| ${acl_name_l3_ip6}= | acl_l3_ip6 -| ${acl_name_l4}= | acl_l4 -| ${acl_name_mixed}= | acl_mixed -| ${acl_name_icmp}= | acl_icmp -| ${acl_name_icmpv6}= | acl_icmpv6 -| ${acl_name_reflex}= | acl_reflex - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Resource | resources/libraries/robot/honeycomb/access_control_lists.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| Library | resources.libraries.python.honeycomb.HcAPIKwACL.ACLKeywords -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.IPUtil -| Library | resources.libraries.python.IPv6Util -| ... -| Test Setup | Clear Packet Trace on All DUTs | ${nodes} -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Documentation | *Honeycomb access control lists test suite for ACL plugin.* -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -| TC01: ACL MAC filtering through plugin-acl node - bridged -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\ -| | ... | and configure L2 MAC ACL on ingress interface. -| | ... | [Ver] Send simple TCP packets from one TG interface to the other,\ -| | ... | using different MACs. Receive all packets except those with\ -| | ... | MACs in the filtered ranges. -| | ... -| | [Teardown] | Bridged ACL test teardown -| | ... -| | Given Setup Interfaces And Bridge Domain For plugin-acl Test -| | ... | macip | ${acl_name_macip} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_macip} | ${acl_settings} | macip=${True} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_macip} -| | ... | ingress | macip=${True} -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${classify_src} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${classify_src2} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} - -| TC02: ACL IPv4 filtering through plugin-acl node - bridged -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\ -| | ... | and configure L3 IPv4 ACL on ingress interface with src/dst IP -| | ... | and protocol number. -| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\ -| | ... | to the other, using different IPv4 IPs. Receive all packets except\ -| | ... | those with IPs in the filtered ranges and UDP protocol payload. -| | ... -# HC2VPP-337: enable after ACL test failures in ODL tests are fixed -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Bridged ACL test teardown -| | ... -| | Given Setup Interfaces And Bridge Domain For plugin-acl Test -| | ... | l3_ip4 | ${acl_name_l3_ip4} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_l3_ip4} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip4} | ingress -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | UDP | ${src_port} | ${dst_port} -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | UDP | ${src_port} | ${dst_port} - -| TC03: ACL IPv6 filtering through plugin-acl node - bridged -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv6-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\ -| | ... | and configure L3 IPv6 ACL on ingress interface with src/dst IP -| | ... | and protocol number. -| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\ -| | ... | to the other, using different IPv6 IPs. Receive all packets except\ -| | ... | those with IPs in the filtered ranges and UDP protocol payload. -| | ... -# HC2VPP-337: enable after ACL test failures in ODL tests are fixed -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Bridged ACL test teardown -| | ... -| | Given Setup interfaces and bridge domain for plugin-acl test -| | ... | l3_ip6 | ${acl_name_l3_ip6} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_l3_ip6} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip6} | ingress -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | UDP | ${src_port} | ${dst_port} -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | UDP | ${src_port} | ${dst_port} - -| TC04: ACL port filtering through plugin-acl node - bridged -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\ -| | ... | and and configure L4 port ACL on ingress interface -| | ... | with src/dst port ranges. -| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\ -| | ... | to the other, using different ports. Receive all packets except\ -| | ... | those with ports in the filtered ranges. -| | ... -# HC2VPP-337: enable after ACL test failures in ODL tests are fixed -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Bridged ACL test teardown -| | ... -| | Given Setup interfaces and bridge domain for plugin-acl test -| | ... | L4 | ${acl_name_l4} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_l4} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l4} | ingress -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${classify_src} | ${classify_dst} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${classify_src+5} | ${classify_dst+5} - -| TC05: ACL filtering with IPv4 address and TCP port in one rule - bridged -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\ -| | ... | and configure a mixed rule with src/dst IP, TCP protocol -| | ... | and port ranges. -| | ... | [Ver] Send simple TCP packets from one TG interface to the other,\ -| | ... | using IPs and ports. Receive all packets except those with\ -| | ... | both IPs and ports in the filtered ranges. -| | ... -# HC2VPP-337: enable after ACL test failures in ODL tests are fixed -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Bridged ACL test teardown -| | ... -| | Given Setup Interfaces And Bridge Domain For plugin-acl Test -| | ... | mixed | ${acl_name_mixed} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_mixed} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src_ip} | ${classify_dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src_ip} | ${classify_dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${classify_src_port} | ${classify_dst_port} - -| TC06: ACL ICMP packet filtering - bridged -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-ICMP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\ -| | ... | and configure a ICMP protocol filtering by ICMP type and code. -| | ... | [Ver] Send ICMP packets from one TG interface\ -| | ... | to the other, using different codes and types. Receive all packets\ -| | ... | except those with types and codes in the filtered ranges. -| | ... -# HC2VPP-337: enable after ACL test failures in ODL tests are fixed -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Bridged ACL test teardown -| | ... -| | Given Setup interfaces and bridge domain for plugin-acl test -| | ... | icmp | ${acl_name_icmp} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress -| | Then Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${icmp_type} | ${icmp_code} -| | Then Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${classify_type} | ${icmp_code} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${classify_type} | ${classify_code} - -| TC07: ACL ICMPv6 packet filtering - bridged -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv6-ICMP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG\ -| | ... | and configure a ICMPv6 protocol filtering by ICMPv6 type and code. -| | ... | [Ver] Send ICMPv6 packets from one TG interface\ -| | ... | to the other, using different codes and types. Receive all packets\ -| | ... | except those with the filtered type and code. -| | ... -# HC2VPP-337: enable after ACL test failures in ODL tests are fixed -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Bridged ACL test teardown -| | ... -| | Given Setup interfaces and bridge domain for plugin-acl test -| | ... | icmpv6 | ${acl_name_icmpv6} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_icmpv6} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmpv6} | ingress -| | Then Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${icmp_type} | ${icmp_code} -| | Then Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${classify_type} | ${icmp_code} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${classify_type} | ${classify_code} - -| TC08: ACL reflexive IPv4 filtering through plugin-acl node - bridged -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 bridge both interfaces to TG,\ -| | ... | configure a "drop all" ACL on ingress and reflexive ACL on egress. -| | ... | [Ver] Send a simple TCP packet to VPP interface 1 and do not receive\ -| | ... | it back. Then send the packet with reversed src/dst IP address\ -| | ... | to VPP interface 2 and receive it from interface 1(this should create\ -| | ... | a reflexive "permit" rule) Finally, send the original packet again\ -| | ... | and receive it from interface 2. -| | ... -# CSIT-863: running ODL and HC on single node may cause out of memory errors -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Bridged ACL test teardown -| | ... -| | Given Setup Interfaces And Bridge Domain For plugin-acl Test -| | ... | reflex | ${acl_name_reflex} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_reflex} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_reflex} | egress -| | And Import Variables | resources/test_data/honeycomb/plugin_acl.py -| | ... | block_all | block_all -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | block_all | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | block_all | ingress -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_dst} | ${classify_src} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if2_mac} -| | ... | TCP | ${dst_port} | ${src_port} -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} - -# Routing section -# =============== - -| TC09: ACL IPv4 filtering through plugin-acl node - routed -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\ -| | ... | interfaces to TG, add ARP entry and routes, and configure L3 IPv4 ACL\ -| | ... | on ingress interface with src/dst IP and protocol. -| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\ -| | ... | to the other, using different IPv4 IPs. Receive all packets except\ -| | ... | those with IPs in the filtered ranges and UDP protocol payload. -| | ... -# CSIT-863: running ODL and HC on single node may cause out of memory errors -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Routed ACL test teardown - ipv4 -| | ... -| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test -| | ... | l3_ip4 | ${acl_name_l3_ip4} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_l3_ip4} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip4} | ingress -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | UDP | ${src_port} | ${dst_port} -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | UDP | ${src_port} | ${dst_port} - -| TC10: ACL IPv6 filtering through plugin-acl node - routed -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv6-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv6 addresses on both\ -| | ... | interfaces to TG, add IP neighbor entry and routes, and configure\ -| | ... | L3 IPv6 ACL on ingress interface with src/dst IP and next-header. -| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\ -| | ... | to the other, using different IPv6 IPs. Receive all packets except\ -| | ... | those with IPs in the filtered ranges and UDP protocol payload. -| | ... -# CSIT-863: running ODL and HC on single node may cause out of memory errors -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Routed ACL test teardown - ipv6 -| | ... -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Import Variables | resources/test_data/honeycomb/plugin_acl.py -| | ... | L3_IP6 | ${acl_name_l3_ip6} -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if1} | up -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if2} | up -| | And Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | And Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | And VPP RA suppress link layer | ${dut_node} | ${dut_to_tg_if2} -| | And Honeycomb adds interface IPv6 neighbor -| | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac} -| | And VPP Route Add | ${node} | ${dst_net} | ${prefix_length} -| | ... | gateway=${gateway} | interface=${dut_to_tg_if2} -| | And VPP Route Add | ${node} | ${classify_dst_net} | ${prefix_length} -| | ... | gateway=${gateway} | interface=${dut_to_tg_if2} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_l3_ip6} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l3_ip6} | ingress -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | UDP | ${src_port} | ${dst_port} -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | UDP | ${src_port} | ${dst_port} - -| TC11: ACL port filtering through plugin-acl node - routed -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\ -| | ... | interfaces to TG, add ARP entry and routes, and configure L4 port ACL\ -| | ... | on ingress interface with src/dst port ranges. -| | ... | [Ver] Send simple TCP and UDP packets from one TG interface\ -| | ... | to the other, using different ports. Receive all packets except\ -| | ... | those with ports in the filtered ranges. -| | ... -| | [Teardown] | Routed ACL test teardown - ipv4 -| | ... -# CSIT-863: running ODL and HC on single node may cause out of memory errors -| | [Tags] | HC_REST_ONLY -| | ... -| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test -| | ... | L4 | ${acl_name_l4} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_l4} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_l4} | ingress -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${classify_src} | ${classify_dst} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${classify_src+5} | ${classify_dst+5} - -| TC12: ACL filtering with IPv4 address and TCP port in one rule - routed -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\ -| | ... | interfaces to TG, add ARP entry and routes and configure a mixed -| | ... | rule with src/dst IP, TCP protocol and port ranges. -| | ... | [Ver] Send simple TCP packets from one TG interface to the other,\ -| | ... | using IPs and ports. Receive all packets except those with\ -| | ... | both IPs and ports in the filtered ranges. -| | ... -| | [Teardown] | Routed ACL test teardown - ipv4 -| | ... -# CSIT-863: running ODL and HC on single node may cause out of memory errors -| | [Tags] | HC_REST_ONLY -| | ... -| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test -| | ... | mixed | ${acl_name_mixed} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_mixed} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_mixed} | ingress -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | Then Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src_ip} | ${classify_dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src_ip} | ${classify_dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dst_mac} -| | ... | TCP | ${classify_src_port} | ${classify_dst_port} - -| TC13: ACL ICMP packet filtering - routed -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\ -| | ... | interfaces to TG, add ARP entry and routes, and configure ICMP ACL\ -| | ... | on ingress interface with ICMP type and code. -| | ... | [Ver] Send ICMP packets from one TG interface\ -| | ... | to the other, using different codes and types. Receive all packets\ -| | ... | except those with the filtered type and code. -| | ... -| | [Teardown] | Routed ACL test teardown - ipv4 -| | ... -# CSIT-863: running ODL and HC on single node may cause out of memory errors -| | [Tags] | HC_REST_ONLY -| | ... -| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test -| | ... | icmp | ${acl_name_icmp} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_icmp} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmp} | ingress -| | Then Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${icmp_type} | ${icmp_code} -| | Then Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${classify_type} | ${icmp_code} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${classify_type} | ${classify_code} - -| TC14: ACL ICMPv6 packet filtering - routed -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv6 addresses on both\ -| | ... | interfaces to TG, add ARP entry and routes, and configure ICMP ACL\ -| | ... | on ingress interface with ICMPv6 type and code. -| | ... | [Ver] Send ICMPv6 packets from one TG interface\ -| | ... | to the other, using different codes and types. Receive all packets\ -| | ... | except those with the filtered type and code. -| | ... -# CSIT-863: running ODL and HC on single node may cause out of memory errors -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Routed ACL test teardown - ipv6 -| | ... -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Import Variables | resources/test_data/honeycomb/plugin_acl.py -| | ... | icmpv6 | ${acl_name_icmpv6} -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if1} | up -| | And Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if2} | up -| | And Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | And Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | And Honeycomb adds interface IPv6 neighbor -| | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac} -| | And VPP RA suppress link layer | ${dut_node} | ${dut_to_tg_if2} -| | And VPP Route Add | ${node} | ${dst_net} | ${prefix_length} -| | ... | gateway=${gateway} | interface=${dut_to_tg_if2} -| | And VPP Route Add | ${node} | ${classify_dst_net} | ${prefix_length} -| | ... | gateway=${gateway} | interface=${dut_to_tg_if2} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_icmpv6} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_icmpv6} | ingress -| | Then Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${icmp_type} | ${icmp_code} -| | Then Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${classify_type} | ${icmp_code} -| | And Run Keyword And Expect Error | ICMP echo Rx timeout -| | ... | Send ICMP packet with type and code and verify received packet -| | ... | ${tg_node} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${classify_type} | ${classify_code} - -| TC15: ACL reflexive IPv4 filtering through plugin-acl node - routed -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-TCP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 set IPv4 addresses on both\ -| | ... | interfaces to TG, add ARP entries and routes,\ -| | ... | configure a "drop all" ACL on ingress and reflexive ACL on egress. -| | ... | [Ver] Send a simple TCP packet to VPP interface 1 and do not receive\ -| | ... | it back. Then send the packet with reversed src/dst IP address\ -| | ... | to VPP interface 2 and receive it from interface 1(this should create\ -| | ... | a reflexive "permit" rule) Finally, send the original packet again\ -| | ... | and receive it from interface 2. -| | ... -# CSIT-863: running ODL and HC on single node may cause out of memory errors -| | [Tags] | HC_REST_ONLY -| | ... -| | [Teardown] | Routed ACL test teardown - ipv4 -| | ... -| | Given Setup Interface IPs And Routes For IPv4 plugin-acl Test -| | ... | reflex | ${acl_name_reflex} -| | And VPP Add IP Neighbor -| | ... | ${node} | ${dut_to_tg_if1} | ${gateway2} | ${tg_to_dut_if1_mac} -| | And VPP Route Add -| | ... | ${node} | ${src_net} | ${prefix_length} | gateway=${gateway2} -| | ... | interface=${dut_to_tg_if1} -| | And VPP Route Add -| | ... | ${node} | ${classify_src_net} | ${prefix_length} -| | ... | gateway=${gateway2} | interface=${dut_to_tg_if1} -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | ${acl_name_reflex} | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_name_reflex} | egress -| | And Import Variables | resources/test_data/honeycomb/plugin_acl.py -| | ... | block_all | block_all -| | When Honeycomb Creates ACL Chain Through ACL plugin -| | ... | ${dut_node} | block_all | ${acl_settings} -| | And Honeycomb Assigns plugin-acl Chain To Interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | block_all | ingress -| | And Run Keyword And Expect Error | TCP/UDP Rx timeout -| | ... | Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_dst} | ${classify_src} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac} -| | ... | ${tg_to_dut_if1} | ${dut_to_tg_if2_mac} -| | ... | TCP | ${dst_port} | ${src_port} -| | And Send TCP or UDP packet and verify received packet | ${tg_node} -| | ... | ${classify_src} | ${classify_dst} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | TCP | ${src_port} | ${dst_port} - -*** Keywords *** -| Setup interface IPs and routes for IPv4 plugin-acl test -| | [Documentation] | Import test variables, set interfaces up, -| | ... | configure IPv4 addresses, add neighbor entry and routes. -| | ... -| | [Arguments] | ${test_data_id} | ${acl_name} -| | ... -| | Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Import Variables | resources/test_data/honeycomb/plugin_acl.py -| | ... | ${test_data_id} | ${acl_name} -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up -| | Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | And Honeycomb adds interface IPv4 neighbor -| | ... | ${node} | ${dut_to_tg_if2} | ${gateway} | ${tg_to_dut_if2_mac} -| | VPP Route Add -| | ... | ${node} | ${dst_net} | ${prefix_length} | gateway=${gateway} -| | ... | interface=${dut_to_tg_if2} -| | VPP Route Add -| | ... | ${node} | ${classify_dst_net} | ${prefix_length} | gateway=${gateway} -| | ... | interface=${dut_to_tg_if2} - -| Setup interfaces and bridge domain for plugin-acl test -| | [Documentation] | Import test variables, set interfaces up and bridge them. -| | ... -| | [Arguments] | ${test_data_id} | ${acl_name} -| | ... -| | Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Import Variables | resources/test_data/honeycomb/plugin_acl.py -| | ... | ${test_data_id} | ${acl_name} -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up -| | Honeycomb Creates first L2 Bridge Domain -| | ... | ${dut_node} | ${bd_name} | ${bd_settings} -| | Honeycomb Adds Interfaces To Bridge Domain -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${dut_to_tg_if2} -| | ... | ${bd_name} | ${bd_if_settings} - -| Bridged ACL test teardown -| | [Documentation] | Log packet trace and ACL settings, -| | ... | then clean up bridge domains. -| | ... -| | Show Packet Trace on All DUTs | ${nodes} -| | Read plugin-ACL configuration from VAT | ${node} -| | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1} -| | Honeycomb Removes All Bridge Domains -| | ... | ${node} | ${dut_to_tg_if1} | ${dut_to_tg_if2} - -| Routed ACL test teardown - ipv4 -| | [Documentation] | Log packet trace and ACL settings, -| | ... | then clean up IPv4 addresses and neighbors. -| | ... -| | Show Packet Trace on All DUTs | ${nodes} -| | Read plugin-ACL configuration from VAT | ${node} -| | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1} -| | Honeycomb removes interface IPv4 addresses | ${node} | ${dut_to_tg_if1} -| | Honeycomb clears all interface IPv4 neighbors | ${node} | ${dut_to_tg_if1} - -| Routed ACL test teardown - ipv6 -| | [Documentation] | Log packet trace and ACL settings, -| | ... | then clean up IPv6 addresses and neighbors. -| | ... -| | Show Packet Trace on All DUTs | ${nodes} -| | Clear plugin-ACL configuration | ${node} | ${dut_to_tg_if1} -| | Read plugin-ACL configuration from VAT | ${node} -| | Honeycomb removes interface IPv6 addresses | ${node} | ${dut_to_tg_if1} -| | Honeycomb clears all interface IPv6 neighbors | ${node} | ${dut_to_tg_if1} diff --git a/tests/honeycomb/func/mgmt-cfg-policer-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-policer-apihc-func.robot deleted file mode 100644 index 1f4d2a9021..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-policer-apihc-func.robot +++ /dev/null @@ -1,142 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables *** -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${tg_to_dut_if1_ip}= | 192.168.122.1 -| ${dut_to_tg_if1_ip}= | 192.168.122.2 -| ${dut_to_tg_if2_ip}= | 192.168.123.1 -| ${tg_to_dut_if2_ip}= | 192.168.123.2 -| ${prefix_length}= | ${24} -| ${dscp_number}= | ${20} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/policer.robot -| Resource | resources/libraries/robot/honeycomb/access_control_lists.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Library | resources.libraries.python.Trace -| Variables | resources/test_data/honeycomb/policer_variables.py -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC -| ... -| Documentation | *Honeycomb Policer management test suite.* - -*** Test Cases *** -| TC01: Honeycomb can configure Policer -| | [Documentation] | Checks if Honeycomb can configure Policer. -| | ... -| | Given Policer Operational Data From Honeycomb Should Be empty | ${node} -| | When Honeycomb configures Policer | ${node} | ${policer_data} -| | Then Policer Operational Data From Honeycomb Should Be | ${node} -| | ... | ${policer_data_oper} - -| TC02: Honeycomb can disable Policer -| | [Documentation] | Checks if Honeycomb can disable Policer. -| | ... -| | Given Policer Operational Data From Honeycomb Should Be | ${node} -| | ... | ${policer_data_oper} -| | When Honeycomb removes Policer configuration | ${node} -| | Then Policer Operational Data From Honeycomb Should Be empty | ${node} - -| TC03: Honeycomb can configure Policer with increased values of CIR (900kbps) -| | [Documentation] | Checks if Honeycomb can configure Policer\ -| | ... | with increased values of CIR. -| | ... -| | [Teardown] | Tear down policer test | ${node} -| | ... -| | Given Policer Operational Data From Honeycomb Should Be empty | ${node} -| | When Honeycomb configures Policer | ${node} | ${policer_data_2} -| | Then Policer Operational Data From Honeycomb Should Be | ${node} -| | ... | ${policer_data_oper_2} - -| TC04: Honeycomb can configure Packets-Per-Second Based Policer -| | [Documentation] | Checks if Honeycomb can configure Policer\ -| | ... | based on rate-type measured in pps. -| | ... -| | [Teardown] | Tear down policer test | ${node} -| | ... -| | Given Policer Operational Data From Honeycomb Should Be empty | ${node} -| | When Honeycomb configures Policer | ${node} | ${policer_data_3} -| | Then Policer Operational Data From Honeycomb Should Be | ${node} -| | ... | ${policer_data_oper_3} - -| TC05: Configure Policer on Interface -| | [Documentation] | Honeycomb can configure Policer on a given interface. -| | ... -| | [Teardown] | Run Keywords -| | ... | Honeycomb disables Policer on interface | ${node} | ${interface} | AND -| | ... | Honeycomb removes ACL session | ${node} -| | ... | ${acl_tables['hc_acl_table']['name']} -| | ... | ${acl_tables['hc_acl_session']['match']} | AND -| | ... | Honeycomb removes ACL table | ${node} -| | ... | ${acl_tables['hc_acl_table']['name']} | AND -| | ... | Tear down policer test | ${node} -| | ... -| | Given Honeycomb configures Policer | ${node} | ${policer_data} -| | And ACL table from Honeycomb should not exist -| | ... | ${node} | ${acl_tables['hc_acl_table']['name']} -| | When Honeycomb creates ACL table -| | ... | ${node} | ${acl_tables['hc_acl_table']} -| | And Honeycomb adds ACL session -| | ... | ${node} | ${acl_tables['hc_acl_table']['name']} -| | ... | ${acl_tables['hc_acl_session']} -| | Then Honeycomb enables policer on interface -| | ... | ${node} | ${interface} | ${acl_tables['hc_acl_table']['name']} - -| TC06: VPP policer 2R3C Color-aware marks packet -| | [Documentation] -| | ... | [Top] TG=DUT1. -| | ... | [Ref] RFC2474, RFC2698. -| | ... | [Cfg] Configure 2R3C color-aware policer on DUT1 on the first\ -| | ... | interface. -| | ... | [Ver] TG sends IPv4 TCP packet on the first link to DUT1.\ -| | ... | Packet on DUT1 is marked with DSCP tag. Verifies if DUT1 sends\ -| | ... | correct IPv4 TCP packet with correct DSCP on the second link to TG. -| | ... -| | [Teardown] | Show Packet Trace on All DUTs | ${nodes} -| | ... -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Honeycomb configures Policer | ${dut_node} | ${policer_data_3} -| | And ACL table from Honeycomb should not exist -| | ... | ${dut_node} | ${acl_tables['hc_acl_table']['name']} -| | When Honeycomb creates ACL table -| | ... | ${dut_node} | ${acl_tables['hc_acl_table']} -| | And Honeycomb adds ACL session -| | ... | ${dut_node} | ${acl_tables['hc_acl_table']['name']} -| | ... | ${acl_tables['hc_acl_session']} -| | And Honeycomb enables policer on interface -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${acl_tables['hc_acl_table']['name']} -| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} -| | ... | up -| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} -| | ... | up -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | And Honeycomb adds interface IPv4 neighbor -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${tg_to_dut_if2_ip} -| | ... | ${tg_to_dut_if2_mac} -| | And VPP Node Interfaces Ready Wait | ${dut_node} -| | Then Honeycomb Send packet and verify marking | ${tg_node} -| | ... | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if2_ip} | ${dscp_number} diff --git a/tests/honeycomb/func/mgmt-cfg-proxyarp-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-proxyarp-apihc-func.robot deleted file mode 100644 index 1404633acd..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-proxyarp-apihc-func.robot +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interface to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} -| &{proxyarp_settings_ipv4}= | vrf-id=${0} -| ... | low-addr=192.168.1.2 | high-addr=192.168.1.10 -| ${tg_to_dut_ip}= | 10.0.0.100 -| ${dut_to_tg_ip}= | 10.0.0.1 -| ${prefix_length}= | ${24} -| ${test_ip}= | 192.168.1.5 - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/proxyarp.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| Library | resources.libraries.python.Trace -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC -| ... -| Documentation | *Honeycomb proxyARP management test suite.* - -*** Test Cases *** -# TODO: Add operational data and VAT dump verification if/when avaliable -| TC01: Honeycomb can configure ipv4 proxyARP -| | [Documentation] | Check if Honeycomb can configure the proxyARP feature. -| | ... -| | [Teardown] | Honeycomb removes proxyARP configuration | ${node} -| | ... -| | Honeycomb configures proxyARP | ${node} | ${proxyarp_settings_ipv4} - -| TC02: Honeycomb can enable proxyarp on an interface -| | [Documentation] | Check if Honeycomb can enable the proxyARP feature\ -| | ... | on an interface. -| | ... -| | [Teardown] | Honeycomb disables proxyARP on interface -| | ... | ${node} | ${interface} -| | ... -| | Honeycomb enables proxyARP on interface | ${node} | ${interface} - -| TC03: DUT sends ARP reply on behalf of another machine from the IP range -| | [Documentation] -| | ... | [Top] TG-DUT1. -| | ... | [Ref] RFC1027. -| | ... | [Cfg] On DUT1 configure interface IPv4 address and proxy ARP -| | ... | for IP range, using Honeycomb API. -| | ... | [Ver] Make TG send ARP request to DUT1 interface, -| | ... | verify if DUT1 sends correct ARP reply on behalf of machine whose -| | ... | IP is in the configured range. -| | ... -| | [Teardown] | Run Keywords -| | ... | Show Packet Trace on all DUTs | ${nodes} -| | ... | AND | Honeycomb removes proxyARP configuration | ${node} -| | ... | AND | Honeycomb configures interface state -| | ... | ${dut_node} | ${dut_to_tg_if1} | down -| | ... | AND | Honeycomb removes interface IPv4 addresses -| | ... | ${node} | ${interface} -| | ... -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | ${dut_to_tg_name}= | Get interface name | ${dut_node} | ${dut_to_tg_if1} -| | ${tg_to_dut_name}= | Get interface name | ${tg_node} | ${tg_to_dut_if1} -| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_ip} | ${prefix_length} -| | When Honeycomb configures proxyARP | ${dut_node} | ${proxyarp_settings_ipv4} -| | And Honeycomb enables proxyARP on interface | ${node} | ${dut_to_tg_name} -| | Then Send ARP Request | ${tg_node} | ${tg_to_dut_name} -| | ... | ${tg_to_dut_if1_mac} | ${dut_to_tg_if1_mac} -| | ... | ${tg_to_dut_ip} | ${test_ip} diff --git a/tests/honeycomb/func/mgmt-cfg-proxynd6-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-proxynd6-apihc-func.robot deleted file mode 100644 index 4425750add..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-proxynd6-apihc-func.robot +++ /dev/null @@ -1,117 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interface to run configuration tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} -# IPv6 addresses to configure on DUT. -| ${dut_to_tg_if1_ip}= | 10::1 -| ${dut_to_tg_if2_ip}= | 11::1 -# IPv6 addresses used for TG interfaces. -| ${test_src_ip}= | 10::2 -| ${test_dst_ip}= | 11::2 -| ${test_dst_ip2}= | 11::3 -# IPv6 subnet prefix length -| ${prefix_length}= | 64 - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/proxyarp.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/ip/ip6.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| Resource | resources/libraries/robot/features/dhcp_proxy.robot -| Library | resources.libraries.python.Trace -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC -| ... -| Documentation | *Honeycomb IPv6 neighbor discovery proxy test suite.* - -*** Test Cases *** -| TC01: Honeycomb can configure IPv6 ND proxy on an interface -| | [Documentation] | Check if Honeycomb can configure the IPv6 ND proxy\ -| | ... | feature on an interface. -| | ... -| | Given IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface} -| | And Honeycomb configures interface state | ${node} | ${interface} | up -| | When Honeycomb configures IPv6 ND proxy on interface -| | ... | ${node} | ${interface} | ${test_dst_ip} -| | Then IPv6 ND proxy from Honeycomb should be -| | ... | ${node} | ${interface} | ${test_dst_ip} - -| TC02: Honeycomb can disable IPv6 ND proxy on an interface -| | [Documentation] | Check if Honeycomb can remove IPv6 ND proxy feature\ -| | ... | configuration from an interface. -| | ... -| | Given IPv6 ND proxy from Honeycomb should be -| | ... | ${node} | ${interface} | ${test_dst_ip} -| | When Honeycomb disables IPv6 ND proxy on interface | ${node} | ${interface} -| | Then IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface} - -| TC03: Honeycomb can configure multiple IPv6 ND proxies on an interface -| | [Documentation] | Check if Honeycomb can configure two ND proxies\ -| | ... | on one interface. -| | ... -| | [Teardown] | Honeycomb disables IPv6 ND proxy on interface -| | ... | ${node} | ${interface} -| | ... -| | Given IPv6 ND proxy from Honeycomb should be empty | ${node} | ${interface} -| | And Honeycomb configures interface state | ${node} | ${interface} | up -| | When Honeycomb configures IPv6 ND proxy on interface -| | ... | ${node} | ${interface} | ${test_dst_ip} | ${test_dst_ip2} -| | Then IPv6 ND proxy from Honeycomb should be -| | ... | ${node} | ${interface} | ${test_dst_ip} | ${test_dst_ip2} - -| TC04: VPP proxies valid ICMPv6 Neighbor Discovery request -| | [Documentation] | -| | ... | [Top] TG=DUT -| | ... | [Cfg] On DUT configure IPv6 addresses and neighbors, supress router\ -| | ... | advertisement and configure IPv6 Neighbor Discovery proxy. -| | ... | [Ver] Make TG send a neighbor solicitation packet to it's other\ -| | ... | interface through DUT, verify DUT responds to the packet instead\ -| | ... | of forwarding it. Then exchange ICMPv6 Echo request/reply to verify\ -| | ... | connectivity between interfaces. -| | ... | [Ref] RFC 4389 -| | ... -| | [Teardown] | Run Keywords -| | ... | Show Packet Trace on All DUTs | ${nodes} | AND -| | ... | Honeycomb disables IPv6 ND proxy on interface -| | ... | ${dut_node} | ${dut_to_tg_if2} -| | ... -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up -| | Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_length} -| | Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_length} -| | And Vpp Ra Suppress Link Layer | ${dut_node} | ${dut_to_tg_if1} -| | And Vpp Ra Suppress Link Layer | ${dut_node} | ${dut_to_tg_if2} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${test_src_ip} | ${tg_to_dut_if1_mac} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${test_dst_ip} | ${tg_to_dut_if2_mac} -| | When Honeycomb configures IPv6 ND proxy on interface -| | ... | ${dut_node} | ${dut_to_tg_if2} | ${test_dst_ip} -| | Then Verify IPv6ND proxy | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if2} -| | ... | ${test_src_ip} | ${test_dst_ip} -| | ... | ${tg_to_dut_if1_mac} | ${tg_to_dut_if2_mac} -| | ... | ${dut_to_tg_if1_mac} | ${dut_to_tg_if2_mac} diff --git a/tests/honeycomb/func/mgmt-cfg-routing-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-routing-apihc-apivat-func.robot deleted file mode 100644 index b690c04e9e..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-routing-apihc-apivat-func.robot +++ /dev/null @@ -1,251 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Library | resources.libraries.python.honeycomb.Routing.RoutingKeywords -| Library | resources.libraries.python.Trace -| Library | resources.libraries.python.InterfaceUtil -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/ip/ip4.robot -| Resource | resources/libraries/robot/ip/ip6.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/routing.robot -| Resource | resources/libraries/robot/honeycomb/fib.robot -| ... -| Test Setup | Clear Packet Trace on All DUTs | ${nodes} -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Test Teardown | Honeycomb routing test teardown | ${node} | ${table} -| ... -| Documentation | *Honeycomb routing test suite.* -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -| TC01: Single hop IPv4 route -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-ICMP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ -| | ... | interfaces and configure route with TG-if2 as next-hop. -| | ... | [Ver] Send ICMP packet from first TG interface to configured route -| | ... | destination. Receive packet on the second TG interface. -| | ... -| | ${table}= | Set Variable | table1 -| | Given Setup interfaces and neighbors for IPv4 routing test -| | When Honeycomb configures routing table -| | ... | ${node} | table1 | ipv4 | ${table1} | ${1} -| | Then Routing data from Honeycomb should contain -| | ... | ${node} | table1 | ipv4 | ${table1_oper} -| | And Verify route IPv4 | ${nodes['TG']} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} - -| TC02: Multi hop IPv4 route -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-ICMP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ -| | ... | interfaces and configure two routes through the second DUT interface. -| | ... | [Ver] Send 100 ICMP packets from first TG interface to configured -| | ... | route destination. Receive all packets on the second TG interface and\ -| | ... | verify that each destination MAC was used by exactly 50 packets. -| | ... | Receive packet on the second TG interface. -| | ... -| | ${table}= | Set Variable | table2 -| | Given Setup interfaces and neighbors for IPv4 routing test -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${next_hop1} | ${next_hop_mac1} -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${next_hop2} | ${next_hop_mac2} -| | ... -| | When Honeycomb configures routing table -| | ... | ${node} | table2 | ipv4 | ${table2} | ${1} -| | Then Routing data from Honeycomb should contain -| | ... | ${node} | table2 | ipv4 | ${table2_oper} -| | And Verify multipath Route | ${nodes['TG']} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${dut_to_tg_if2_mac} | ${next_hop_mac1} | ${next_hop_mac2} - -| TC03: Special hop - blackhole IPv4 route -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv4-ICMP. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ -| | ... | interfaces and configure route with special rule blackhole. -| | ... | [Ver] Send ICMP packet from first TG interface to configured route -| | ... | destination. Make sure no packet is received on the second TG\ -| | ... | interface. -| | ... -| | ${table}= | Set Variable | table3 -| | Given Setup interfaces and neighbors for IPv4 routing test -| | When Honeycomb configures routing table -| | ... | ${node} | table3 | ipv4 | ${table3} | ${1} | special=${TRUE} -| | Then Routing data from Honeycomb should contain -| | ... | ${node} | table3 | ipv4 | ${table3_oper} -| | And Run keyword and Expect Error | ICMP echo Rx timeout -| | ... | Verify route IPv4 | ${nodes['TG']} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} - -| TC04: Single hop IPv6 route -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ -| | ... | interfaces and configure route with TG-if2 as next-hop. -| | ... | [Ver] Send ICMP packet from first TG interface to configured route -| | ... | destination. Receive packet on the second TG interface. -| | ... -| | ${table}= | Set Variable | table4 -| | Given Setup interfaces and neighbors for IPv6 routing test -| | When Honeycomb configures routing table -| | ... | ${node} | table4 | ipv6 | ${table4} | ${1} -| | Then Routing data from Honeycomb should contain -| | ... | ${node} | table4 | ipv6 | ${table4_oper} -| | And Verify route IPv6 | ${nodes['TG']} -| | ... | ${src_ip} | ${next_hop} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} - -| TC05: Multi hop IPv6 route -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ -| | ... | interfaces and configure two routes through the second DUT interface. -| | ... | [Ver] Send 100 ICMP packets from first TG interface to configured -| | ... | route destination. Receive all packets on the second TG interface and\ -| | ... | verify that each destination MAC was used by exactly 50 packets. -| | ... | Receive packet on the second TG interface. -| | ... -| | ${table}= | Set Variable | table5 -| | Given Setup interfaces and neighbors for IPv6 routing test -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${next_hop1} | ${next_hop_mac1} -| | And Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${next_hop2} | ${next_hop_mac2} -| | When Honeycomb configures routing table -| | ... | ${node} | table5 | ipv6 | ${table5} | ${1} -| | Then Routing data from Honeycomb should contain -| | ... | ${node} | table5 | ipv6 | ${table5_oper} -| | And Verify multipath Route | ${nodes['TG']} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} -| | ... | ${dut_to_tg_if2_mac} | ${next_hop_mac1} | ${next_hop_mac2} - -| TC06: Special hop - blackhole IPv6 route -| | [Documentation] -| | ... | [Top] TG=DUT1=TG. -| | ... | [Enc] Eth-IPv6-ICMPv6. -| | ... | [Cfg] (Using Honeycomb API) On DUT1 add ARP entries to both TG\ -| | ... | interfaces and configure route with special rule blackhole. -| | ... | [Ver] Send ICMP packet from first TG interface to configured route -| | ... | destination. Make sure no packet is received on the second TG\ -| | ... | interface. -| | ... -| | ${table}= | Set Variable | table6 -| | Given Setup interfaces and neighbors for IPv6 routing test -| | When Honeycomb configures routing table -| | ... | ${node} | table6 | ipv6 | ${table6} | ${1} | special=${TRUE} -| | Then Routing data from Honeycomb should contain -| | ... | ${node} | table6 | ipv6 | ${table6_oper} -| | And Run keyword and Expect Error | ICMP echo Rx timeout -| | ... | Verify route IPv6 | ${nodes['TG']} -| | ... | ${src_ip} | ${dst_ip} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${tg_to_dut_if2} | ${dut_to_tg_if1_mac} - -*** Keywords *** -| Setup interfaces and neighbors for IPv4 routing test -| | Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Import Variables | resources/test_data/honeycomb/routing.py -| | ... | ${nodes['DUT1']} | ipv4 | ${dut_to_tg_if2} -| | Setup vrf FIBs | ${dut_node} | ${1} -| | Setup vrf IDs | ${dut_node} | ${dut_to_tg_if1} | ${1} -| | Setup vrf IDs | ${dut_node} | ${dut_to_tg_if2} | ${1} -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up -| | Vpp Node Interfaces Ready Wait | ${dut_node} -| | Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_len} -| | Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_len} -| | Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${src_ip} | ${tg_to_dut_if1_mac} -| | Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${next_hop} | ${tg_to_dut_if2_mac} - -| Setup interfaces and neighbors for IPv6 routing test -| | Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | Import Variables | resources/test_data/honeycomb/routing.py -| | ... | ${nodes['DUT1']} | ipv6 | ${dut_to_tg_if2} -| | Setup vrf FIBs | ${dut_node} | ${1} -| | Setup vrf IDs | ${dut_node} | ${dut_to_tg_if1} | ${1} -| | Setup vrf IDs | ${dut_node} | ${dut_to_tg_if2} | ${1} -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} | up -| | Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} | up -| | Vpp Node Interfaces Ready Wait | ${dut_node} -| | Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix_len} -| | Honeycomb sets interface IPv6 address | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix_len} -| | Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${src_ip} | ${tg_to_dut_if1_mac} -| | Honeycomb adds interface IPv6 neighbor | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${next_hop} | ${tg_to_dut_if2_mac} -| | Vpp all ra suppress link layer | ${nodes} - -| Honeycomb routing test teardown -| | ... -| | [arguments] | ${node} | ${routing_table} -| | ... -| | Show Packet Trace on All DUTs | ${nodes} -| | Log routing configuration from VAT | ${node} -| | Honeycomb removes routing configuration | ${node} | ${routing_table} -| | Remove vrf FIBs | ${node} | ${1} - -| Setup vrf IDs -| | ... -| | [Arguments] | ${node} | ${interface} | ${vrf} -| | ... -| | Honeycomb sets interface VRF ID -| | ... | ${node} | ${interface} | ${vrf} | ipv4 -| | Honeycomb sets interface VRF ID -| | ... | ${node} | ${interface} | ${vrf} | ipv6 - -| Setup vrf FIBs -| | ... -| | [Arguments] | ${node} | ${vrf} -| | ... -| | Honeycomb configures FIB table | ${node} | ipv4 | ${vrf} -| | Honeycomb configures FIB table | ${node} | ipv6 | ${vrf} - -| Remove vrf FIBs -| | ... -| | [Arguments] | ${node} | ${vrf} -| | ... -| | Honeycomb removes FIB configuration | ${node} | ipv4 | ${vrf} -| | Honeycomb removes FIB configuration | ${node} | ipv6 | ${vrf} diff --git a/tests/honeycomb/func/mgmt-cfg-slaac-apihc-func.robot b/tests/honeycomb/func/mgmt-cfg-slaac-apihc-func.robot deleted file mode 100644 index 8a54918032..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-slaac-apihc-func.robot +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interface to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/slaac.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/shared/traffic.robot -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC -| ... -| Documentation | *Honeycomb SLAAC management test suite.* -| ... -| Variables | resources/test_data/honeycomb/slaac_variables.py - -*** Test Cases *** -| TC01: Honeycomb can configure SLAAC -| | [Documentation] | Checks if Honeycomb can configure SLAAC. -| | ... -| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} -| | ... | ${interface} -| | And Honeycomb Configures Interface State | ${node} | ${interface} | up -| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} -| | ... | ${address} | ${prefix} -| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data} -| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} -| | ... | ${interface} | ${slaac_data} - -| TC02: Honeycomb can disable SLAAC -| | [Documentation] | Checks if Honeycomb can disable SLAAC. -| | ... -| | Given SLAAC Operational Data From Honeycomb Should Be | ${node} -| | ... | ${interface} | ${slaac_data} -| | When Honeycomb removes SLAAC configuration | ${node} | ${interface} -| | Then SLAAC Operational Data From Honeycomb Should Be empty | ${node} -| | ... | ${interface} - -| TC03: Honeycomb can configure SLAAC with suppress link layer disabled -| | [Documentation] | Checks if Honeycomb can configure SLAAC. -| | ... -| | [Teardown] | SLAAC test teardown | ${node} | ${interface} -| | ... -| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} -| | ... | ${interface} -| | And Honeycomb Configures Interface State | ${node} | ${interface} | up -| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} -| | ... | ${address} | ${prefix} -| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data} -| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} -| | ... | ${interface} | ${slaac_data} - -| TC04: Honeycomb can configure SLAAC with sending RA packets disabled -| | [Documentation] | Checks if Honeycomb can configure SLAAC\ -| | ... | with given settings. -| | ... -| | [Teardown] | SLAAC test teardown | ${node} | ${interface} -| | ... -| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} -| | ... | ${interface} -| | And Honeycomb Configures Interface State | ${node} | ${interface} | up -| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} -| | ... | ${address} | ${prefix} -| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_01} -| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} -| | ... | ${interface} | ${slaac_data_01} - -| TC05: Honeycomb can configure SLAAC with min interval values -| | [Documentation] | Checks if Honeycomb can configure SLAAC\ -| | ... | with given settings. -| | ... -| | [Teardown] | SLAAC test teardown | ${node} | ${interface} -| | ... -| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} -| | ... | ${interface} -| | And Honeycomb Configures Interface State | ${node} | ${interface} | up -| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} -| | ... | ${address} | ${prefix} -| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_02} -| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} -| | ... | ${interface} | ${slaac_data_02} - -| TC06: Honeycomb can configure SLAAC with max interval values -| | [Documentation] | Checks if Honeycomb can configure SLAAC\ -| | ... | with given settings. -| | ... -| | [Teardown] | SLAAC test teardown | ${node} | ${interface} -| | ... -| | Given SLAAC Operational Data From Honeycomb Should Be empty | ${node} -| | ... | ${interface} -| | And Honeycomb Configures Interface State | ${node} | ${interface} | up -| | And Honeycomb sets interface IPv6 address | ${node} | ${interface} -| | ... | ${address} | ${prefix} -| | When Honeycomb configures SLAAC | ${node} | ${interface} | ${slaac_data_03} -| | Then SLAAC Operational Data From Honeycomb Should Be | ${node} -| | ... | ${interface} | ${slaac_data_03} - -| TC07: DUT retransmits RA on IPv6 enabled interface after a set interval -| | [Documentation] -| | ... | [Top] TG-DUT1-DUT2-TG. -| | ... | [Cfg] On DUT1 configure IPv6 interface on the link to TG. -| | ... | [Ver] Make TG wait for two IPv6 Router Advertisement packets\ -| | ... | to be sent by DUT1 and verify the received RA packets are correct. -| | ... -| | [Teardown] | SLAAC test teardown | ${dut_node} | ${dut_to_tg_if1} -| | ... -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Honeycomb sets interface IPv6 address -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${address} | ${prefix} -| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} -| | ... | up -| | When Honeycomb configures SLAAC | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${slaac_data} -| | :FOR | ${n} | IN RANGE | ${2} -| | | Then Receive and verify router advertisement packet -| | | ... | ${tg_node} | ${tg_to_dut_if1} | ${dut_to_tg_if1_mac} | ${20} diff --git a/tests/honeycomb/func/mgmt-cfg-snat44-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-snat44-apihc-apivat-func.robot deleted file mode 100644 index 2ce02c6aa1..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-snat44-apihc-apivat-func.robot +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables*** -| ${interface}= | ${node['interfaces']['port1']['name']} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/nat.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Variables | resources/test_data/honeycomb/nat.py | ${node} | ${interface} -| ... -| Documentation | *Honeycomb NAT test suite.* -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -| TC01: Honeycomb configures NAT entry -| | [Documentation] | Honeycomb configures a static NAT entry. -| | ... -| | Given NAT Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${nat_empty} -| | When Honeycomb Configures NAT Entry | ${node} | ${entry1} -| | Then NAT Entries From Honeycomb Should Be | ${node} | ${entry1} - -| TC02: Honeycomb removes NAT entry -| | [Documentation] | Honeycomb removes a configured static NAT entry. -| | ... -| | Given NAT Entries From Honeycomb Should Be | ${node} | ${entry1} -| | When Honeycomb Configures NAT Entry | ${node} | ${NONE} -| | Then NAT Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${nat_empty} - -| TC03: Honeycomb configures multiple NAT entries -| | [Documentation] | Honeycomb configures two static NAT entries. -| | ... -| | [Teardown] | Honeycomb Configures NAT Entry | ${node} | ${NONE} -| | ... -| | Given NAT Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${nat_empty} -| | When Honeycomb Configures NAT Entry | ${node} | ${entry1} | ${0} | ${1} -| | And Honeycomb Configures NAT Entry | ${node} | ${entry2} | ${0} | ${2} -| | Then NAT Entries From Honeycomb Should Be -| | ... | ${node} | ${entry1_2_oper} | ${0} - -| TC04: Honeycomb enables NAT on interface - inbound -| | [Documentation] | Honeycomb configures NAT on an interface\ -| | ... | in inbound direction. -| | ... -| | Given NAT Interface Operational Data From Honeycomb Should Be Empty -| | ... | ${node} | ${interface} | inbound -| | And NAT Interface Operational Data From Honeycomb Should Be Empty -| | ... | ${node} | ${interface} | outbound -| | When Honeycomb Configures NAT On Interface -| | ... | ${node} | ${interface} | inbound -| | Then NAT Interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${interface} | inbound -| | And NAT Interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} | outbound - -| TC05: Honeycomb removes NAT interface configuration -| | [Documentation] | Honeycomb removes NAT configuration from an interface. -| | ... -| | Given NAT Interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${interface} | inbound -| | And NAT Interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} | outbound -| | When Honeycomb removes NAT interface configuration -| | ... | ${node} | ${interface} | inbound -| | Then NAT Interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} | inbound -| | And NAT Interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} | outbound - -| TC06: Honeycomb enables NAT on interface - outbound -| | [Documentation] | Honeycomb configures NAT on an interface\ -| | ... | in outbound direction. -| | ... -| | [Teardown] | Honeycomb removes NAT interface configuration -| | ... | ${node} | ${interface} | outbound -| | ... -| | Given NAT Interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} | inbound -| | And NAT Interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} | outbound -| | When Honeycomb Configures NAT on Interface -| | ... | ${node} | ${interface} | outbound -| | Then NAT Interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} | inbound -| | And NAT Interface Operational Data From Honeycomb Should Be -| | ... | ${node} | ${interface} | outbound diff --git a/tests/honeycomb/func/mgmt-cfg-spanrx-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-spanrx-apihc-apivat-func.robot deleted file mode 100644 index ccb674fbd7..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-spanrx-apihc-apivat-func.robot +++ /dev/null @@ -1,256 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/port_mirroring.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/sub_interface.robot -| Resource | resources/libraries/robot/shared/testing_path.robot -| Resource | resources/libraries/robot/telemetry/span.robot -| Variables | resources/test_data/honeycomb/span.py -| ... | ${node['interfaces']['port1']['name']} -| ... | ${node['interfaces']['port3']['name']} -| ... | local0 -| Variables | resources/test_data/honeycomb/sub_interfaces.py -| ... -| Force Tags | HC_FUNC -| ... -| Suite Setup | Run Keywords -| ... | Set Up Honeycomb Functional Test Suite | ${node} | AND -| ... | Add Interface local0 To Topology | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Documentation | *Honeycomb port mirroring test suite.* - -*** Test Cases *** -| TC01: Honeycomb can configure SPAN on an interface - receive -| | [Documentation] | Honeycomb configures SPAN on interface and verifies -| | ... | against VPP SPAN dump in state receive. -| | ... -| | When Honeycomb configures SPAN on interface -| | ... | ${node} | ${interface1} | ${settings_receive} -| | Then Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${settings_receive} - -| TC02: Honeycomb can configure SPAN on an interface - transmit -| | [Documentation] | Honeycomb configures SPAN on interface and verifies -| | ... | against VPP SPAN dump in state transmit. -| | ... -| | When Honeycomb configures SPAN on interface -| | ... | ${node} | ${interface1} | ${settings_transmit} -| | Then Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${settings_transmit} - -| TC03: Honeycomb can configure SPAN on an interface - both -| | [Documentation] | Honeycomb configures SPAN on interface and verifies -| | ... | against VPP SPAN dump in state both. -| | ... -| | When Honeycomb configures SPAN on interface -| | ... | ${node} | ${interface1} | ${settings_both} -| | Then Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${settings_both} - -| TC04: Honeycomb can configure SPAN on an interface with two source interfaces -| | [Documentation] | Honeycomb configures SPAN on interface and verifies -| | ... | against VPP SPAN dump in state both. -| | ... -| | When Honeycomb configures SPAN on interface -| | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2} -| | Then Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2} - -| TC05: Honeycomb can disable SPAN on interface -| | [Documentation] | Honeycomb removes existing SPAN configuration -| | ... | from interface. -| | ... -| | Given Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${settings_both} | ${settings_if2} -| | When Honeycomb removes interface SPAN configuration -| | ... | ${node} | ${interface1} -| | Then Interface SPAN Operational Data from Honeycomb should be empty -|Â | ... | ${node} | ${interface1} - -| TC06: Honeycomb can configure SPAN with two destination interfaces from the same source -| | [Documentation] | Honeycomb configures SPAN on two interfaces and verifies -| | ... | against VPP SPAN dump. -| | ... -| | [Teardown] | Run Keywords -| | ... | Honeycomb removes interface SPAN configuration -| | ... | ${node} | ${interface1} | AND -| | ... | Honeycomb removes interface SPAN configuration -| | ... | ${node} | ${interface2} -| | ... -| | When Honeycomb configures SPAN on interface -| | ... | ${node} | ${interface1} | ${settings_if2} -| | And Honeycomb configures SPAN on interface -| | ... | ${node} | ${interface2} | ${settings_if2} -| | Then Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${settings_if2} -| | Then Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface2} | ${settings_if2} - -| TC07: DUT mirrors IPv4 packets from one interface to another -| | [Documentation] -| | ... | [Top] TG=DUT1 -| | ... | [Cfg] (using Honeycomb) On DUT1 configure IPv4 address and set SPAN\ -| | ... | mirroring from one DUT interface to the other. -| | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\ -| | ... | then receive a copy of sent packet and of DUT's ARP reply\ -| | ... | on the second interface. -| | ... -| | [Teardown] | Run Keywords -| | ... | Show Packet Trace on All DUTs | ${nodes} | AND -| | ... | Honeycomb clears all interface IPv4 neighbors -| | ... | ${dut_node} | ${dut_to_tg_if1} | AND -| | ... | Honeycomb removes interface IPv4 addresses -| | ... | ${dut_node} | ${dut_to_tg_if1} | AND -| | ... | Honeycomb removes interface SPAN configuration -| | ... | ${node} | ${dut_to_tg_if2} -| | ... -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} -| | ... | up -| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} -| | ... | up -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if1} | ${dut_to_tg_if1_ip} | ${prefix} -| | And Honeycomb adds interface IPv4 neighbor | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${tg_to_dut_if1_ip} | ${tg_to_dut_if1_mac} -| | ${settings_5}= | create dictionary | state=both -| | ... | iface-ref=${dut_to_tg_if1} -| | And All Vpp Interfaces Ready Wait | ${nodes} -| | When Honeycomb configures SPAN on interface -| | ... | ${node} | ${dut_to_tg_if2} | ${settings_5} -| | Then Send Packet And Check Received Copies | ${tg_node} -| | ... | ${tg_to_dut_if1} | ${tg_to_dut_if1_mac} -| | ... | ${dut_to_tg_if1_mac} | ${tg_to_dut_if2} -| | ... | ${tg_to_dut_if1_ip} | ${dut_to_tg_if1_ip} | ICMP - -| TC08: Honeycomb can configure SPAN on a sub-interface - receive -| | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies -| | ... | against VPP SPAN dump in state receive. -| | ... -| | Given Honeycomb creates sub-interface | ${node} | ${interface1} -| | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings} -| | When Honeycomb Configures SPAN on sub-interface -| | ... | ${node} | ${interface1} | ${1} | ${settings_receive} -| | Then sub-Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | ${settings_receive} - -| TC09: Honeycomb can configure SPAN on a sub-interface - transmit -| | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies -| | ... | against VPP SPAN dump in state transmit. -| | ... -| | Given Sub-interface state from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | down | up -| | When Honeycomb Configures SPAN on sub-interface -| | ... | ${node} | ${interface1} | ${1} | ${settings_transmit} -| | Then sub-Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | ${settings_transmit} - -| TC10: Honeycomb can configure SPAN on a sub-interface - both -| | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies -| | ... | against VPP SPAN dump in state both. -| | ... -| | Given Sub-interface state from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | down | up -| | When Honeycomb Configures SPAN on sub-interface -| | ... | ${node} | ${interface1} | ${1} | ${settings_both} -| | Then sub-Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | ${settings_both} - -| TC11: Honeycomb can configure SPAN on a sub-interface with two source interfaces -| | [Documentation] | Honeycomb configures SPAN on sub-interface and verifies -| | ... | against VPP SPAN dump in state both. -| | ... -| | Given Sub-interface state from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | down | up -| | When Honeycomb Configures SPAN on sub-interface -| | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2} -| | Then sub-Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2} - -| TC12: Honeycomb can disable SPAN on interface -| | [Documentation] | Honeycomb removes existing SPAN configuration -| | ... | from sub-interface. -| | ... -| | Given Sub-interface state from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | down | up -| | Given sub-Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | ${settings_both} | ${settings_if2} -| | When Honeycomb removes sub-interface SPAN configuration -| | ... | ${node} | ${interface1} | ${1} -| | Then sub-Interface SPAN Operational Data from Honeycomb should be empty -|Â | ... | ${node} | ${interface1} | ${1} - -| TC13: Honeycomb can configure SPAN with two destination sub-interfaces from the same source -| | [Documentation] | Honeycomb configures SPAN on two sub-interfaces -| | ... | and verifies against VPP SPAN dump. -| | ... -| | [Teardown] | Run Keywords -| | ... | Honeycomb removes sub-interface SPAN configuration -| | ... | ${node} | ${interface1} | ${1} | AND -| | ... | Honeycomb removes sub-interface SPAN configuration -| | ... | ${node} | ${interface2} | ${1} -| | ... -| | Given Honeycomb creates sub-interface | ${node} | ${interface2} -| | ... | ${sub_if_2_match} | ${sub_if_2_tags} | ${sub_if_2_settings} -| | When Honeycomb Configures SPAN on sub-interface -| | ... | ${node} | ${interface1} | ${1} | ${settings_if2} -| | And Honeycomb Configures SPAN on sub-interface -| | ... | ${node} | ${interface2} | ${1} | ${settings_if2} -| | Then Sub-Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface1} | ${1} | ${settings_if2} -| | Then Sub-Interface SPAN Operational Data from Honeycomb should be -| | ... | ${node} | ${interface2} | ${1} | ${settings_if2} - -| TC14: DUT mirrors IPv4 packets from an interface to a sub-interface -| | [Documentation] -| | ... | [Top] TG=DUT1 -| | ... | [Cfg] (using Honeycomb) On DUT1 configure IPv4 address and set SPAN\ -| | ... | mirroring from one DUT interface to a sub-interface on the other\ -| | ... | interface. -| | ... | [Ver] Make TG send an ARP packet to DUT through one interface,\ -| | ... | then receive a copy of sent packet and of DUT's ARP reply\ -| | ... | on the sub-interface. -| | ... -| | [Teardown] | Show Packet Trace on All DUTs | ${nodes} -| | ... -| | Given Configure path in 2-node circular topology -| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']} -| | And Honeycomb creates sub-interface | ${dut_node} | ${dut_to_tg_if1} -| | ... | ${sub_if_1_match} | ${sub_if_1_tags} | ${sub_if_1_settings} -| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if1} -| | ... | up -| | And Honeycomb configures interface state | ${dut_node} | ${dut_to_tg_if2} -| | ... | up -| | And Honeycomb sets the sub-interface up -| | ... | ${dut_node} | ${dut_to_tg_if1} | ${1} -| | And Honeycomb sets interface IPv4 address with prefix | ${dut_node} -| | ... | ${dut_to_tg_if2} | ${dut_to_tg_if2_ip} | ${prefix} -| | And And Honeycomb adds interface IPv4 neighbor -| | ... | ${dut_node} | ${dut_to_tg_if2} -| | ... | ${tg_to_dut_if2_ip} | ${tg_to_dut_if2_mac} -| | ${settings_5}= | create dictionary | state=both -| | ... | iface-ref=${dut_to_tg_if2} -| | And All Vpp Interfaces Ready Wait | ${nodes} -| | When Honeycomb Configures SPAN on sub-interface -| | ... | ${node} | ${dut_to_tg_if1} | ${1} | ${settings_5} -| | Then Send Packet And Check Received Copies | ${tg_node} -| | ... | ${tg_to_dut_if2} | ${tg_to_dut_if2_mac} -| | ... | ${dut_to_tg_if2_mac} | ${tg_to_dut_if1} -| | ... | ${tg_to_dut_if2_ip} | ${dut_to_tg_if2_ip} | ICMP diff --git a/tests/honeycomb/func/mgmt-cfg-vxlan-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-vxlan-apihc-apivat-func.robot deleted file mode 100644 index 76615264c5..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-vxlan-apihc-apivat-func.robot +++ /dev/null @@ -1,137 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interfaces to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${vx_interface}= | vx_tunnel_test -# Configuration which will be set and verified during tests. -| &{vxlan_settings}= | src=192.168.0.2 | dst=192.168.0.3 | vni=${88} -| ... | encap-vrf-id=${0} -| &{vxlan_settings2}= | src=192.168.0.4 | dst=192.168.0.5 | vni=${47} -| ... | encap-vrf-id=${0} -| &{vxlan_settings_ipv6}= | src=10::10 | dst=10::11 | vni=${88} -| ... | encap-vrf-id=${0} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/vxlan.robot -# import additional VxLAN settings from resource file -| Variables | resources/test_data/honeycomb/vxlan.py -| ... -| Force Tags | HC_FUNC -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Documentation | *Honeycomb VxLAN management test suite.* - -*** Test Cases *** -| TC01: Honeycomb configures VxLAN tunnel -| | [Documentation] | Check if Honeycomb API can configure VxLAN settings. -| | ... -| | Given VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vx_interface} -| | And VxLAN Operational Data From VAT Should Be empty | ${node} -| | When Honeycomb sets interface VxLAN configuration -| | ... | ${node} | ${vx_interface} | ${vxlan_settings} -| | Then VxLAN Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vx_interface} | ${vxlan_settings} -| | And VxLAN Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_settings} -| | ${vxlan_index}= | Get interface index from oper data -| | ... | ${node} | ${vx_interface} -| | Set Suite Variable | ${vxlan_index} - -| TC02: Honeycomb disables VxLAN tunnel -| | [Documentation] | Check if Honeycomb API can reset VxLAN configuration. -| | ... -| | Given VxLAN Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vx_interface} | ${vxlan_settings} -| | And Honeycomb should not show disabled interface in oper data -| | ... | ${node} | ${vxlan_index} -| | And VxLAN Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_settings} -| | When Honeycomb removes VxLAN tunnel settings | ${node} | ${vx_interface} -| | Then VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vx_interface} -| | And Honeycomb should show disabled interface in oper data -| | ... | ${node} | ${vxlan_index} -| | And VxLAN Operational Data From VAT Should Be empty | ${node} - -| TC03: Honeycomb can configure VXLAN tunnel after one has been disabled -| | [Documentation] | Check if Honeycomb API can configure VxLAN settings again\ -| | ... | after previous settings have been removed. -| | ... -| | [Teardown] | Honeycomb removes VxLAN tunnel settings -| | ... | ${node} | ${vx_interface} -| | ... -| | Given VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vx_interface} -| | And Honeycomb should show disabled interface in oper data -| | ... | ${node} | ${vxlan_index} -| | And VxLAN Operational Data From VAT Should Be empty | ${node} -| | When Honeycomb sets interface VxLAN configuration -| | ... | ${node} | ${vx_interface} | ${vxlan_settings2} -| | Then VxLAN Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vx_interface} | ${vxlan_settings2} -| | And Honeycomb should not show disabled interface in oper data -| | ... | ${node} | ${vxlan_index} -| | And VxLAN Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_settings2} - -| TC04: Honeycomb does not set VxLAN configuration on another interface type -| | [Documentation] | Check if Honeycomb API prevents setting VxLAN\ -| | ... | on incorrect interface. -| | ... -| | Given VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} -| | And VxLAN Operational Data From VAT Should Be empty | ${node} -| | When Honeycomb fails setting VxLan on different interface type -| | ... | ${node} | ${interface} | ${vxlan_settings2} -| | Then VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${interface} -| | And VxLAN Operational Data From VAT Should Be empty -| | ... | ${node} - -| TC05: Honeycomb does not set invalid VxLAN configuration -| | [Documentation] | Check if Honeycomb API prevents setting incorrect VxLAN\ -| | ... | settings. -| | ... -| | Given VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vx_interface} -| | And VxLAN Operational Data From VAT Should Be empty | ${node} -| | When Honeycomb fails setting invalid VxLAN configuration -| | ... | ${node} | ${vx_interface} | ${vxlan_invalid} -| | Then VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vx_interface} - -| TC06: Honeycomb configures VxLAN tunnel with ipv6 -| | [Documentation] | Check if Honeycomb API can configure VxLAN with\ -| | ... | ipv6 settings. -| | ... -| | [Teardown] | Honeycomb removes VxLAN tunnel settings -| | ... | ${node} | ${vx_interface} -| | ... -| | Given VxLAN Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vx_interface} -| | And VxLAN Operational Data From VAT Should Be empty | ${node} -| | When Honeycomb sets interface VxLAN configuration -| | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6} -| | Then VxLAN Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vx_interface} | ${vxlan_settings_ipv6} -| | And VxLAN Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_settings_ipv6} diff --git a/tests/honeycomb/func/mgmt-cfg-vxlangpe-apihc-apivat-func.robot b/tests/honeycomb/func/mgmt-cfg-vxlangpe-apihc-apivat-func.robot deleted file mode 100644 index 6f5a406fe8..0000000000 --- a/tests/honeycomb/func/mgmt-cfg-vxlangpe-apihc-apivat-func.robot +++ /dev/null @@ -1,172 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interface to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} - -# Parameters to be set on existing interface -| ${vxlan_gpe_existing_if}= | ${interface} -| &{vxlan_gpe_base_wrong_interface_settings}= -| ... | name=${vxlan_gpe_existing_if} -| ... | type=iana-if-type:ethernetCsmacd -| ... | description=for testing purposes -| ... | enabled=true -| ... | link-up-down-trap-enable=enabled -| &{vxlan_gpe_wrong_interface_settings}= -| ... | local=192.168.50.77 -| ... | remote=192.168.50.72 -| ... | vni=${9} -| ... | next-protocol=wrong_ipv4 -| ... | encap-vrf-id=${0} -| ... | decap-vrf-id=${0} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/vxlan_gpe.robot -# Import additional VxLAN GPE settings from resource file -| Variables | resources/test_data/honeycomb/vxlan_gpe.py -| ... -| Documentation | *Honeycomb VxLAN-GPE management test suite.* -| ... -| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node} -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} - -*** Test Cases *** -| TC01: Honeycomb creates VxLAN GPE tunnel -| | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel. -| | ... -| | [Tags] | HC_FUNC -| | Given interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vxlan_gpe_if1} -| | And interface Operational Data From VAT Should Be empty -| | ... | ${node} | ${vxlan_gpe_if1} -| | When Honeycomb creates VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if1} -| | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings} -| | Then VxLAN GPE Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vxlan_gpe_if1} -| | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings} -| | And VxLAN GPE Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings} -| | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond -| | ... | ${node} | ${vxlan_gpe_if1} - -| TC02: Honeycomb removes VxLAN GPE tunnel -| | [Documentation] | Check if Honeycomb API can remove VxLAN GPE tunnel. -| | ... -| | [Tags] | HC_FUNC -| | Given VxLAN GPE Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vxlan_gpe_if1} -| | ... | ${vxlan_gpe_base_settings} | ${vxlan_gpe_settings} -| | VxLAN GPE Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_gpe_if1} | ${vxlan_gpe_settings} -| | When Honeycomb removes VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if1} -| | Then VxLAN GPE Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vxlan_gpe_if1} -| | And VxLAN GPE Operational Data From VAT Should Be empty -| | ... | ${node} - -| TC03: Honeycomb sets wrong interface type while creating VxLAN GPE tunnel -| | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\ -| | ... | with a wrong interface type set. -| | ... -| | [Tags] | HC_FUNC -| | Given interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vxlan_gpe_if2} -| | And interface Operational Data From VAT Should Be empty -| | ... | ${node} | ${vxlan_gpe_if2} -| | When Honeycomb fails to create VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if2} -| | ... | ${vxlan_gpe_wrong_type_base_settings} | ${vxlan_gpe_settings} -| | Then interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vxlan_gpe_if2} -| | And interface Operational Data From VAT Should Be empty -| | ... | ${node} | ${vxlan_gpe_if2} - -| TC04: Honeycomb sets wrong protocol while creating VxLAN GPE tunnel -| | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\ -| | ... | with a wrong next-protocol set. -| | ... -| | [Tags] | HC_FUNC -| | Given interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vxlan_gpe_if3} -| | And interface Operational Data From VAT Should Be empty -| | ... | ${node} | ${vxlan_gpe_if3} -| | When Honeycomb fails to create VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if3} -| | ... | ${vxlan_gpe_wrong_protocol_base_settings} -| | ... | ${vxlan_gpe_wrong_protocol_settings} -| | Then interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vxlan_gpe_if3} -| | And interface Operational Data From VAT Should Be empty -| | ... | ${node} | ${vxlan_gpe_if3} - -| TC05: Honeycomb sets VxLAN GPE tunnel on existing interface with wrong type -| | [Documentation] | Check if Honeycomb refuses to create a VxLAN GPE tunnel\ -| | ... | on existing interface with wrong type. -| | ... -| | [Tags] | HC_FUNC -| | Given VxLAN GPE Operational Data From VAT Should Be empty -| | ... | ${node} -| | When Honeycomb fails to create VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_existing_if} -| | ... | ${vxlan_gpe_base_wrong_interface_settings} -| | ... | ${vxlan_gpe_wrong_interface_settings} -| | Then VxLAN GPE Operational Data From VAT Should Be empty -| | ... | ${node} - -| TC06: Honeycomb creates VxLAN GPE tunnel with ipv6 -| | [Documentation] | Check if Honeycomb API can configure a VxLAN GPE tunnel\ -| | ... | with IPv6 addresses. -| | ... -| | [Tags] | HC_FUNC -| | Given VxLAN GPE Operational Data From VAT Should Be empty -| | ... | ${node} -| | And VxLAN GPE Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vxlan_gpe_if5} -| | When Honeycomb creates VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if5} -| | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings} -| | Then VxLAN GPE Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vxlan_gpe_if5} -| | ... | ${vxlan_gpe_base_ipv6_settings} | ${vxlan_gpe_ipv6_settings} -| | And Run Keyword And Continue On Failure -| | ... | VxLAN GPE Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_gpe_if5} | ${vxlan_gpe_ipv6_settings} -| | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond -| | ... | ${node} | ${vxlan_gpe_if5} - -| TC07: Honeycomb creates a second VxLAN GPE tunnel with ipv6 -| | [Documentation] | Check if Honeycomb API can configure another VxLAN\ -| | ... | GPE tunnel with IPv6 addresses. -| | ... -| | [Tags] | HC_FUNC -| | Given interface Operational Data From Honeycomb Should Be empty -| | ... | ${node} | ${vxlan_gpe_if6} -| | And interface Operational Data From VAT Should Be empty -| | ... | ${node} | ${vxlan_gpe_if6} -| | When Honeycomb creates VxLAN GPE interface -| | ... | ${node} | ${vxlan_gpe_if6} -| | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2} -| | Then VxLAN GPE Operational Data From Honeycomb Should Be -| | ... | ${node} | ${vxlan_gpe_if6} -| | ... | ${vxlan_gpe_base_ipv6_settings2} | ${vxlan_gpe_ipv6_settings2} -| | And VxLAN GPE Operational Data From VAT Should Be -| | ... | ${node} | ${vxlan_gpe_if6} | ${vxlan_gpe_ipv6_settings2} -| | And VxLAN GPE Interface indices from Honeycomb and VAT should correspond -| | ... | ${node} | ${vxlan_gpe_if6} diff --git a/tests/honeycomb/func/mgmt-notif-apihcnc-func.robot b/tests/honeycomb/func/mgmt-notif-apihcnc-func.robot deleted file mode 100644 index ad47861ffa..0000000000 --- a/tests/honeycomb/func/mgmt-notif-apihcnc-func.robot +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables *** -# Interfaces to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} -| ${tap_interface}= | tap_test -| ${tap_interface_vpp}= | tap0 -| &{tap_settings}= | host-interface-name=tap_test | mac=08:00:27:c0:5d:37 -| ... | id=${1} -| &{tap_settings_oper}= | host-interface-name=tap_test | device-name=tap0 -| ... | mac=08:00:27:c0:5d:37 | rx_ring_sz=${256} | tx_ring_sz=${256} | id=${1} -| &{tap_settings_vat}= | dev_name=tap0 | mac=08:00:27:c0:5d:37 -| ... | rx_ring_sz=${256} | tx_ring_sz=${256} | id=${1} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/tap.robot -| Resource | resources/libraries/robot/honeycomb/notifications.robot -| ... -| Documentation | *Honeycomb notifications test suite.* -| ... -| Suite Setup | Set Up Honeycomb Notifications Functional Test Suite -| ... -| Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node} -| ... -| Force Tags | HC_FUNC - -*** Test Cases *** -| TC01: Honeycomb sends notification on interface state change -| | [Documentation] | Check if Honeycomb sends a state-changed notification\ -| | ... | when the state of an interface is changed. -| | ... -| | Given Interface state from Honeycomb should be -| | ... | ${node} | ${interface} | down -| | And Interface state from VAT should be | ${node} | ${interface} | down -| | And Notification listener should be established | ${node} -| | When Honeycomb configures interface state | ${node} | ${interface} | up -| | Then Honeycomb should send interface state notification | ${interface} | up -| | When Honeycomb configures interface state | ${node} | ${interface} | down -| | And Honeycomb should send interface state notification | ${interface} | down - -| TC02: Honeycomb sends notification on interface deletion -| | [Documentation] | Check if Honeycomb sends an interface-deleted notification -| | ... | when an interface is deleted. -| | ... -| | Given TAP Operational Data From Honeycomb Should Be -| | ... | ${node} | ${tap_interface} | ${tap_settings_oper} -| | And TAP Operational Data From VAT Should Be -| | ... | ${node} | ${tap_interface_vpp} | ${tap_settings_vat} -| | And Notification listener should be established | ${node} -| | When Honeycomb removes TAP interface | ${node} | ${tap_interface} -| | Then Honeycomb should send interface deleted notification | ${tap_interface} - -*** Keywords *** -| Set Up Honeycomb Notifications Functional Test Suite -| | Set Up Honeycomb Functional Test Suite | ${node} -| | Honeycomb configures interface state -| | ... | ${node} | ${interface} | down -| | Honeycomb creates TAP interface -| | ... | ${node} | ${tap_interface} | ${tap_settings}
\ No newline at end of file diff --git a/tests/honeycomb/func/mgmt-statepersist-apihc-func.robot b/tests/honeycomb/func/mgmt-statepersist-apihc-func.robot deleted file mode 100644 index b7fe610b18..0000000000 --- a/tests/honeycomb/func/mgmt-statepersist-apihc-func.robot +++ /dev/null @@ -1,166 +0,0 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. -# 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. - -*** Variables*** -# Interface to run tests on. -| ${interface}= | ${node['interfaces']['port1']['name']} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/honeycomb/persistence.robot -| Resource | resources/libraries/robot/honeycomb/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot -| Resource | resources/libraries/robot/honeycomb/l2_fib.robot -| ... -| Suite Setup | Run Keywords -| ... | Configure Persistence | ${node} | enable | AND -| ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| ... -| Suite Teardown | Configure Persistence | ${node} | disable -| ... -| Force Tags | HC_PERSIST | HC_REST_ONLY -| ... -| Documentation | *Honeycomb configuration persistence test suite.* - -*** Test Cases *** -# multi-feature cases -# =================== -| TC01: Honeycomb persists configuration through restart of both Honeycomb and VPP -| | [Documentation] | Checks if Honeycomb maintains configuration after both\ -| | ... | Restart Honeycomb and VPP. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Multi-Feature Persistence test configuration | ${node} | ${interface} -| | And Multi-Feature persistence Test Verification | ${node} | ${interface} -| | And Log persisted configuration on node | ${node} -| | When Restart Honeycomb and VPP in pesistence test | ${node} -| | Then Multi-Feature persistence Test Verification | ${node} | ${interface} - -| TC02: Honeycomb reverts to defaults if persistence files are invalid -| | [Documentation] | Checks if Honeycomb reverts to default configuration when\ -| | ... | persistence files are damaged or invalid. -| | ... -| | [Tags] | HC_FUNC -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Multi-Feature Persistence test configuration | ${node} | ${interface} -| | And Multi-Feature persistence Test Verification | ${node} | ${interface} -| | When Persistence file is damaged during restart | ${node} -| | Then Honeycomb and VPP should have default configuration | ${node} - -| TC03: Honeycomb persists configuration through restart of Honeycomb -| | [Documentation] | Checks if Honeycomb maintains configuration after it\ -| | ... | is restarted. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Multi-Feature Persistence test configuration | ${node} | ${interface} -| | And Multi-Feature persistence Test Verification | ${node} | ${interface} -| | And Log persisted configuration on node | ${node} -| | When Restart Honeycomb | ${node} -| | Then Multi-Feature persistence Test Verification | ${node} | ${interface} - -| TC04: Honeycomb persists configuration through restart of VPP -| | [Documentation] | Checks if Honeycomb updates VPP settings after VPP is\ -| | ... | restarted. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Multi-Feature Persistence test configuration | ${node} | ${interface} -| | And Multi-Feature persistence Test Verification | ${node} | ${interface} -| | And Log persisted configuration on node | ${node} -| | When Restart VPP | ${node} -| | Then Multi-Feature persistence Test Verification | ${node} | ${interface} - -# single-feature cases -# ==================== - -| TC05: Persist configuration of IP addresses and neighbors - HC and VPP restart -| | [Documentation] | Verify persistence of interface state, IPv4 address -| | ... | and neighbor entries through restart of both Honeycomb and VPP. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Interface Persistence Setup | ${node} -| | And Interface Persistence Check | ${node} -| | When Restart Honeycomb and VPP in pesistence test | ${node} -| | Then Interface Persistence Check | ${node} - -| TC06: Persist configuration of IP addresses and neighbors - HC restart -| | [Documentation] | Verify persistence of interface state, IPv4 address -| | ... | and neighbor entries through restart of Honeycomb. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Interface Persistence Setup | ${node} -| | And Interface Persistence Check | ${node} -| | When Restart Honeycomb | ${node} -| | Then Interface Persistence Check | ${node} - -| TC07: Persist configuration of IP addresses and neighbors - VPP restart -| | [Documentation] | Verify persistence of interface state, IPv4 address -| | ... | and neighbor entries through restart of VPP. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Interface Persistence Setup | ${node} -| | And Interface Persistence Check | ${node} -| | When Restart VPP | ${node} -| | Then Interface Persistence Check | ${node} - -| TC08: Honeycomb persists configuration of bridge domains - HC and VPP restart -| | [Documentation] | Verify persistence of bridge domain, L2-FIB entry -| | ... | and Bridge domain Operational Interface Assignment through restart -| | ... | of both Honeycomb and VPP. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Bridge Domain Persistence Setup | ${node} -| | When Restart Honeycomb and VPP in pesistence test | ${node} -| | Then Bridge Domain Persistence Check | ${node} - -| TC09: Honeycomb persists configuration of bridge domains - HC restart -| | [Documentation] | Verify persistence of bridge domain, L2-FIB entry -| | ... | and Bridge domain Operational Interface Assignment through restart -| | ... | of Honeycomb. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Bridge Domain Persistence Setup | ${node} -| | When Restart Honeycomb | ${node} -| | Then Bridge Domain Persistence Check | ${node} - -| TC10: Honeycomb persists configuration of bridge domains - VPP restart -| | [Documentation] | Verify persistence of bridge domain, L2-FIB entry -| | ... | and Bridge domain Operational Interface Assignment through restart -| | ... | of VPP. -| | ... -| | [Teardown] -| | ... | Restart Honeycomb And VPP And Clear Persisted Configuration | ${node} -| | ... -| | Given Bridge Domain Persistence Setup | ${node} -| | When Restart VPP | ${node} -| | Then Bridge Domain Persistence Check | ${node} - -#TODO: All other features diff --git a/tests/honeycomb/perf/__init__.robot b/tests/honeycomb/perf/__init__.robot deleted file mode 100644 index 6b5e67f331..0000000000 --- a/tests/honeycomb/perf/__init__.robot +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Variables*** -# Honeycomb node to run tests on. -| ${node}= | ${nodes['DUT1']} - -*** Settings *** -| Resource | resources/libraries/robot/shared/default.robot -| Resource | resources/libraries/robot/shared/interfaces.robot -| Resource | resources/libraries/robot/honeycomb/honeycomb.robot -| Resource | resources/libraries/robot/honeycomb/performance.robot -| Library | resources.libraries.python.SetupFramework -| Library | resources.libraries.python.SetupFramework.CleanupFramework -| Library | resources.libraries.python.CpuUtils -| Library | resources.libraries.python.honeycomb.Performance -| Suite Setup | Setup suite for Honeycomb performance tests -| Suite Teardown | Run Keywords -| ... | Stop VPP Service | ${node} -| ... | AND | Archive Honeycomb Logs | ${node} | perf=${True} -| ... | AND | Stop honeycomb service on DUTs | ${node} -| ... | AND | Cleanup Framework | ${nodes} - -*** Keywords *** -| Setup suite for Honeycomb performance tests -| | [Documentation] | Setup variables and configure VPP and Honeycomb -| | ... | for performance testing. -| | ... -| | Set Global Variable | ${node} -| | Get CPU Info from All Nodes | ${nodes} -| | ${cores}= | Get Length | ${node['cpuinfo']} -| | Set Global Variable | ${cores} -| | Stop VPP Service | ${node} -| | Stop Honeycomb service on DUTs | ${node} -| | Generate VPP Startup Configuration for Honeycomb Test on DUT | ${node} -| | Configure Restconf binding address | ${node} -| | Configure Log Level | ${node} | INFO -| | Configure Persistence | ${node} | disable -| | Configure jVPP timeout | ${node} | ${14} -| | Generate Honeycomb startup configuration for performance test -| | ... | ${node} | ${cores} -| | Clear Persisted Honeycomb Configuration | ${node} - -| Configure ODL Client for performance tests -| | [Documentation] | Setup ODL client for performance testing. -| | ... -| | ${use_odl_client}= | Get Variable Value | ${HC_ODL} -| | Run Keyword If | '${use_odl_client}' != '${NONE}' -| | ... | Run Keywords -| | ... | Set Global Variable | ${use_odl_client} -| | ... | AND | Copy ODL client | ${node} | ${HC_ODL} | ~ | ${install_dir} -| | ... | AND | Configure ODL Client Service On DUT | ${node} | ${install_dir} -| | ... | ELSE | Log | Variable HC_ODL is not present. Not using ODL. -| | ... | level=INFO diff --git a/tests/honeycomb/perf/localhostp1-tcp-netconf16t-crud-read.robot b/tests/honeycomb/perf/localhostp1-tcp-netconf16t-crud-read.robot deleted file mode 100644 index c13851cc62..0000000000 --- a/tests/honeycomb/perf/localhostp1-tcp-netconf16t-crud-read.robot +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/honeycomb/performance.robot -| ... -| Suite Setup | Run Keywords -| ... | Configure Honeycomb Netconf threads | ${node} | ${16} -| ... | AND | Honeycomb Performance Suite Setup Generic | ${node} -| ... -| Suite Teardown | Honeycomb Performance Suite Teardown Generic | ${node} -| ... -| Force Tags | HC_PERF -| ... -| Documentation | *Base Netconf operational read test suite with sixteen Netconf -| ... | threads.* -| ... -| ... | *[Top] Network Topologies:* DUT1 single-node topology. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP. -| ... | *[Cfg] DUT configuration:* Default -| ... | *[Ver] verification:* DUT verifies Honeycomb's response times with zero -| ... | error or loss tolerance. Test packets are generated by DUT1 on localhost -| ... | loopback interface. -| ... | Traffic profile contains flow-groups containing REST requests -| ... | for operational reads. -| ... | *[Ref] Applicable standard specifications:* RFC6241. - -*** Test Cases *** -| TC01: Base operational read with 1 TG thread -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in a single thread. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${1} -| | ${entries}= | Set Variable | ${100000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC02: Base operational read with 2 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in two threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${2} -| | ${entries}= | Set Variable | ${50000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC03: Base operational read with 4 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in four threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${4} -| | ${entries}= | Set Variable | ${25000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC04: Base operational read with 8 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in eigth threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${8} -| | ${entries}= | Set Variable | ${12500} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC05: Base operational read with 16 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in sixteen threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${16} -| | ${entries}= | Set Variable | ${6250} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} diff --git a/tests/honeycomb/perf/localhostp1-tcp-netconf1t-crud-read.robot b/tests/honeycomb/perf/localhostp1-tcp-netconf1t-crud-read.robot deleted file mode 100644 index d46fdf795b..0000000000 --- a/tests/honeycomb/perf/localhostp1-tcp-netconf1t-crud-read.robot +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/honeycomb/performance.robot -| ... -| Suite Setup | Run Keywords -| ... | Configure Honeycomb Netconf threads | ${node} | ${1} -| ... | AND | Honeycomb Performance Suite Setup Generic | ${node} -| ... -| Suite Teardown | Honeycomb Performance Suite Teardown Generic | ${node} -| ... -| Force Tags | HC_PERF -| ... -| Documentation | *Base Netconf operational read test suite with one Netconf -| ... | thread.* -| ... -| ... | *[Top] Network Topologies:* DUT1 single-node topology. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP. -| ... | *[Cfg] DUT configuration:* Default -| ... | *[Ver] verification:* DUT verifies Honeycomb's response times with zero -| ... | error or loss tolerance. Test packets are generated by DUT1 on localhost -| ... | loopback interface. -| ... | Traffic profile contains flow-groups containing REST requests -| ... | for operational reads. -| ... | *[Ref] Applicable standard specifications:* RFC6241. - -*** Test Cases *** -| TC01: Base operational read with 1 TG thread -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in a single thread. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${1} -| | ${entries}= | Set Variable | ${100000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC02: Base operational read with 2 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in two threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${2} -| | ${entries}= | Set Variable | ${50000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC03: Base operational read with 4 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in four threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${4} -| | ${entries}= | Set Variable | ${25000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC04: Base operational read with 8 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in eigth threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${8} -| | ${entries}= | Set Variable | ${12500} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC05: Base operational read with 16 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in sixteen threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${16} -| | ${entries}= | Set Variable | ${6250} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} diff --git a/tests/honeycomb/perf/localhostp1-tcp-netconf8t-crud-read.robot b/tests/honeycomb/perf/localhostp1-tcp-netconf8t-crud-read.robot deleted file mode 100644 index 9928f15f1d..0000000000 --- a/tests/honeycomb/perf/localhostp1-tcp-netconf8t-crud-read.robot +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright (c) 2017 Cisco and/or its affiliates. -# 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. - -*** Settings *** -| Resource | resources/libraries/robot/honeycomb/performance.robot -| ... -| Suite Setup | Run Keywords -| ... | Configure Honeycomb Netconf threads | ${node} | ${8} -| ... | AND | Honeycomb Performance Suite Setup Generic | ${node} -| ... -| Suite Teardown | Honeycomb Performance Suite Teardown Generic | ${node} -| ... -| Force Tags | HC_PERF -| ... -| Documentation | *Base Netconf operational read test suite with eight Netconf -| ... | threads.* -| ... -| ... | *[Top] Network Topologies:* DUT1 single-node topology. -| ... | *[Enc] Packet Encapsulations:* Eth-IPv4-TCP. -| ... | *[Cfg] DUT configuration:* Default -| ... | *[Ver] verification:* DUT verifies Honeycomb's response times with zero -| ... | error or loss tolerance. Test packets are generated by DUT1 on localhost -| ... | loopback interface. -| ... | Traffic profile contains flow-groups containing REST requests -| ... | for operational reads. -| ... | *[Ref] Applicable standard specifications:* RFC6241. - -*** Test Cases *** -| TC01: Base operational read with 1 TG thread -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in a single thread. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${1} -| | ${entries}= | Set Variable | ${100000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC02: Base operational read with 2 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in two threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${2} -| | ${entries}= | Set Variable | ${50000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC03: Base operational read with 4 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in four threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${4} -| | ${entries}= | Set Variable | ${25000} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC04: Base operational read with 8 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in eigth threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${8} -| | ${entries}= | Set Variable | ${12500} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC05: Base operational read with 16 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in sixteen threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${16} -| | ${entries}= | Set Variable | ${6250} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} - -| TC05: Base operational read with 24 TG threads -| | [Documentation] -| | ... | [Ver] Measure response time using single trial throughput test -| | ... | with 100K requests generated in sixteen threads. -| | ${cycles}= | Set Variable | ${1} -| | ${threads}= | Set Variable | ${24} -| | ${entries}= | Set Variable | ${6250} -| | Run base operational read performance trial -| | ... | ${node} | ${cores} | ${cycles} | ${threads} | ${entries} |