Skip to content

Commit

Permalink
feat: add script to fetch bootstrap logs
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
  • Loading branch information
glimchb committed Oct 12, 2023
1 parent c592b44 commit 4a31c3c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions scripts/logs.sh
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4a31c3c

Please sign in to comment.