From b1e8189611555f5f2bafe60b73bcaf677d590c70 Mon Sep 17 00:00:00 2001 From: Boris Glimcher Date: Fri, 13 Oct 2023 00:02:28 +0300 Subject: [PATCH] feat: add script to fetch bootstrap logs Signed-off-by: Boris Glimcher --- scripts/logs.sh | 19 +++++++++++++++++++ scripts/tests.sh | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 scripts/logs.sh diff --git a/scripts/logs.sh b/scripts/logs.sh new file mode 100755 index 00000000..89d0cac4 --- /dev/null +++ b/scripts/logs.sh @@ -0,0 +1,19 @@ +#!/bin/bash +# SPDX-License-Identifier: Apache-2.0 +# Copyright (c) 2022 Dell Inc, or its subsidiaries. + +set -euxo pipefail + +# docker compose plugin +command -v docker-compose || { shopt -s expand_aliases && alias docker-compose='docker compose'; } + +# let everything start +sleep 5 + +# print for debug +docker-compose ps + +# check bootstrapping log +docker-compose exec -T bootstrap curl -i -X GET --user my-admin@example.com:my-secret -H "Accept:application/yang-data+json" http://bootstrap:7080/restconf/ds/ietf-datastores:operational/wn-sztpd-1:devices/device=my-serial-number/bootstrapping-log + +echo "DONE" diff --git a/scripts/tests.sh b/scripts/tests.sh index 463214b1..455ea40e 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -21,7 +21,7 @@ sleep 5 # tests mDNS client docker-compose run --rm -T nmapmdnsclient -docker-compose run --rm -T nmapmdnsclient | grep sztp_avahi_1.sztp_opi +docker-compose run --rm -T nmapmdnsclient | grep sztp_opi # tests dhcp client docker-compose exec -T client cat /var/lib/dhclient/dhclient.leases