Delete-lava-tool-commands-already-replaced-with-lava 08/21008/2
authorKhouloud Touil <ktouil@baylibre.com>
Tue, 9 Apr 2019 13:53:44 +0000 (15:53 +0200)
committerKhouloud Touil <ktouil@baylibre.com>
Mon, 15 Apr 2019 12:22:07 +0000 (14:22 +0200)
As the lavacli works fine now, the lava-tool part is no longer needed.
This patch delete just the part to list the devices and the part of auth
using lava-tool.

Change-Id: Id18c281e533f97bd2fc77737d56e48db0fb6faa2
Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
jjb/common/include-agl-lava-labs-prepare.sh

index 19801e1..ea19d28 100644 (file)
@@ -60,15 +60,6 @@ for lab in "${!labs[@]}"; do
     full_url+="RPC2/" # entry point for XML-RPC API
     echo "LAVA auth-add for lab: $lab, URL: $full_url"
 
-    # LAVA auth using token
-    echo ${token} > $token_file
-    lava-tool auth-add --token $token_file $full_url
-    if [ $? != 0 ]; then
-        echo "ERROR: Lab ${lab}: lava-tool auth-add failed."
-        continue
-    fi
-    rm -f $token_file
-
     # lavacli auth using token
     mkdir -p ~/.config
     lavacli identities add --token ${token} --uri ${url}/RPC2 --username $user $lab
@@ -96,16 +87,6 @@ for lab in "${!labs[@]}"; do
        echo "lavacli: did not find any device available: $lavacli_line"
     fi
 
-    # Find the LAVA Lab that has the device available to run the job
-    echo -n "Checking for $lava_device at $full_url... "
-    line=$(lava-tool devices-list $full_url | grep $lava_device)
-    line=$(echo "$line" | tr -d '[:space:]')
-
-    if [ -z "$line" ]; then
-        echo "not found."
-        continue
-    fi
-
     if [ x"$device_status" = x"Reserved,Good" ]; then
         retries=10
     else