make weave rmpeer accept a list of peers

This isn't as efficient as it could be. In particular we end up
broadcasting the ipam state for every peer listed. To avoid that we'd
have to change the HTTP API, and would no longer be able to use
'DELETE'. That is just not worth it.

Closes #2044.
This commit is contained in:
Matthias Radestock committed 2016-03-20 15:53:45 +00:00
1 parent 18ddf50b4c
commit 439e57ca56
2 files changed
+14 -9

No files matched your search

+8 -4
View File
@@ -86,13 +86,14 @@ weave stop
stop-plugin
weave reset
rmpeer <nickname> | <weave internal peer ID>
rmpeer <peer_id> ...
where <peer> = <ip_address_or_fqdn>[:<port>]
<cidr> = <ip_address>/<routing_prefix_length>
<addr> = [ip:]<cidr> | net:<cidr> | net:default
<endpoint> = [tcp://][<ip_address>]:<port> | [unix://]/path/to/socket
<peer_id> = <nickname> | <weave internal peer ID>
EOF
}
@@ -2190,9 +2191,12 @@ EOF
done
;;
rmpeer)
[ $# -eq 1 ] || usage
PEER=$1
call_weave DELETE /peer/$PEER
[ $# -gt 0 ] || usage
res=0
for PEER in "$@" ; do
call_weave DELETE /peer/$PEER || res=1
done
[ $res -eq 0 ]
;;
launch-dns)
echo "The 'launch-dns' command has been removed; DNS is launched as part of 'launch' and 'launch-router'." >&2