aboutsummaryrefslogtreecommitdiffstats
path: root/lava-slave
diff options
context:
space:
mode:
authorkhilman <khilman@users.noreply.github.com>2018-09-17 08:05:40 -0700
committerGitHub <noreply@github.com>2018-09-17 08:05:40 -0700
commit869ae36fae80df03e5ed55a26a6f251488a05db4 (patch)
tree6625f5f6a1a4b8cd1be5dab750c9c7603e510f97 /lava-slave
parent55579b2a662bee819a2c531d3db99edd3f230212 (diff)
parent5ec706b035b1213bb82ceabf5e7d160d8003b174 (diff)
Merge pull request #48 from montjoie/tags
Permit to add tags to devices
Diffstat (limited to 'lava-slave')
-rw-r--r--lava-slave/Dockerfile1
-rwxr-xr-xlava-slave/scripts/setup.sh7
-rw-r--r--lava-slave/tags/.empty0
3 files changed, 8 insertions, 0 deletions
diff --git a/lava-slave/Dockerfile b/lava-slave/Dockerfile
index cbaafdc..d9ae68a 100644
--- a/lava-slave/Dockerfile
+++ b/lava-slave/Dockerfile
@@ -43,6 +43,7 @@ COPY scripts/retire.sh /usr/local/bin/
RUN chmod 755 /usr/local/bin/retire.sh
COPY devices/ /root/devices/
+COPY tags/ /root/tags/
COPY scripts/extra_actions /root/
RUN if [ -x /root/extra_actions ] ; then /root/extra_actions ; fi
diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh
index 7cff479..f281f6b 100755
--- a/lava-slave/scripts/setup.sh
+++ b/lava-slave/scripts/setup.sh
@@ -113,6 +113,13 @@ do
lavacli $LAVACLIOPTS devices add --type $devicetype --worker $worker $devicename || exit $?
lavacli $LAVACLIOPTS devices dict set $devicename /root/devices/$worker/$device || exit $?
fi
+ if [ -e /root/tags/$devicename ];then
+ while read tag
+ do
+ echo "DEBUG: Add tag $tag to $devicename"
+ lavacli $LAVACLIOPTS devices tags add $devicename $tag || exit $?
+ done < /root/tags/$devicename
+ fi
done
done
diff --git a/lava-slave/tags/.empty b/lava-slave/tags/.empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/lava-slave/tags/.empty