new weave status, weave status ..., and weave report
This commit is contained in:
1 parent
00ecff09f7
commit
fc9a1c8664
27 files changed
+784
-493
No files matched your search
@@ -45,7 +45,8 @@ weave env
|
||||
weave config
|
||||
weave connect [--replace] [<peer> ...]
|
||||
weave forget <peer> ...
|
||||
weave status
|
||||
weave status [targets | connections | peers | dns]
|
||||
weave report [-f <format>]
|
||||
weave run [--with-dns | --without-dns] [<addr> ...]
|
||||
<docker run args> ...
|
||||
weave start [<addr> ...] <container_id>
|
||||
@@ -1323,14 +1324,29 @@ case "$COMMAND" in
|
||||
;;
|
||||
status)
|
||||
res=0
|
||||
call_weave GET /status || res=1
|
||||
echo
|
||||
if check_running $PROXY_CONTAINER_NAME 2>/dev/null ; then
|
||||
OMIT_PROXY=
|
||||
STATUS_URL="/status"
|
||||
while [ $# -gt 0 ] ; do
|
||||
OMIT_PROXY=1
|
||||
STATUS_URL="$STATUS_URL/$1"
|
||||
shift
|
||||
done
|
||||
call_weave GET $STATUS_URL || res=1
|
||||
if [ -z "$OMIT_PROXY" ] && check_running $PROXY_CONTAINER_NAME 2>/dev/null ; then
|
||||
echo
|
||||
echo "weave proxy is running"
|
||||
echo " Service: proxy"
|
||||
echo " Address: $(proxy_addr)"
|
||||
fi
|
||||
[ $res -eq 0 ]
|
||||
;;
|
||||
report)
|
||||
if [ $# -gt 0 ] ; then
|
||||
[ $# -eq 2 -a "$1" = "-f" ] || usage
|
||||
call_weave GET /report --get --data-urlencode "format=$2"
|
||||
else
|
||||
call_weave GET /report -H 'Accept: application/json'
|
||||
fi
|
||||
;;
|
||||
run)
|
||||
dns_args "$@"
|
||||
shift $(dns_arg_count "$@")
|
||||
|
||||
Reference in new issue
Block a user