summaryrefslogtreecommitdiffstats
path: root/examples/docker/test/show_interfaces_state.sh
blob: fe154b2e7850b1b01b2afe4a0ea1e0a0e02dc46a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

# Obtain IP of the container
# $1 - container name
ip=$(/hc2vpp/test/docker_ip.sh $1)
url="https://$ip:8445/restconf/operational/ietf-interfaces:interfaces/"
echo "GET $url"

# Show interfaces
curl --insecure -X GET $url \
  -H 'authorization: Basic YWRtaW46YWRtaW4=' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'

echo