summaryrefslogtreecommitdiffstats
path: root/kud/tests
diff options
context:
space:
mode:
authorEric Multanen <eric.w.multanen@intel.com>2020-12-10 00:21:09 +0000
committerGerrit Code Review <gerrit@onap.org>2020-12-10 00:21:09 +0000
commit1916aca588115140289817e20dbe316196cc1287 (patch)
tree2365a177e7286849b675be74a8b88e2b4acac701 /kud/tests
parente664d6332d810c3c70b42e0d7f420c49e8dc5dcc (diff)
parent38630e4d8a231c26360c3c2f3ae95ec608171f2e (diff)
Merge "Fix sriov test in baremetal deploy"
Diffstat (limited to 'kud/tests')
-rwxr-xr-xkud/tests/sriov.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/kud/tests/sriov.sh b/kud/tests/sriov.sh
index 2dea576e..e617ea62 100755
--- a/kud/tests/sriov.sh
+++ b/kud/tests/sriov.sh
@@ -10,17 +10,12 @@
set -o pipefail
-ethernet_adpator_version=$( lspci | grep "Ethernet Controller XL710" | head -n 1 | cut -d " " -f 8 )
-if [ -z "$ethernet_adpator_version" ]; then
- echo " Ethernet adapator version is not set. SRIOV test case cannot run on this machine"
+sriov_capable_nodes=$(kubectl get nodes -o json | jq -r '.items[] | select(.status.capacity."intel.com/intel_sriov_700">="2") | .metadata.name')
+if [ -z "$sriov_capable_nodes" ]; then
+ echo "SRIOV test case cannot run on the cluster."
exit 0
-fi
-#checking for the right hardware version of NIC on the machine
-if [ $ethernet_adpator_version == "XL710" ]; then
- echo "NIC card specs match. SRIOV option avaiable for this version."
else
- echo -e "Failed. The version supplied does not match.\nTest cannot be executed."
- exit 0
+ echo "SRIOV option avaiable in the cluster."
fi
pod_name=pod-case-01