Skip to content

Commit

Permalink
Display output of MCIS status script in a table (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
seokho-son authored Sep 15, 2021
1 parent c0b30ba commit f890857
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/testclient/scripts/8.mcis/status-mcis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ echo "${MCISID}"
ControlCmd=status
curl -H "${AUTH}" -sX GET http://$TumblebugServer/tumblebug/ns/$NSID/mcis/${MCISID}?action=${ControlCmd} | jq ''

echo "Table: All VMs in the MCIS : ${MCISID}"
echo ""
curl -H "${AUTH}" -sX GET http://$TumblebugServer/tumblebug/ns/$NSID/mcis/${MCISID}?action=${ControlCmd} |
jq '.status | .vm' |
jq -r '(["ID","Status","PublicIP","PrivateIP","CloudType","CloudRegion","CreatedTime"] | (., map(length*"-"))), (.[] | [.id, .status, .publicIp, .privateIp, .location.cloudType, .location.nativeRegion, .createdTime]) | @tsv' |
column -t

#HTTP_CODE=$(curl -o /dev/null -w "%{http_code}\n" -H "${AUTH}" "http://${TumblebugServer}/tumblebug/ns/$NSID/mcis/${MCISID}?action=status" --silent)
#echo "Status: $HTTP_CODE"

Expand Down

0 comments on commit f890857

Please sign in to comment.