introduce 'weave hide'

This commit is contained in:
Matthias Radestock committed 2014-09-03 11:17:24 +01:00
1 parent d0dc7b7556
commit 0767964934
2 files changed
+13 -1

No files matched your search

+2 -1
View File
@@ -198,7 +198,8 @@ application containers. On $HOST2 we run
host2# weave expose 10.0.1.102/24
choosing an unused IP address in the application subnet.
choosing an unused IP address in the application subnet. (There is a
corresponding 'hide' command to revert this step.)
Now
+11
View File
@@ -6,6 +6,7 @@ usage() {
echo "weave launch <ipaddr>/<subnet> [-passwd <passwd>] <peer_host> ..."
echo "weave run <ipaddr>/<subnet> <docker run args> ..."
echo "weave expose <ipaddr>/<subnet>"
echo "weave hide <ipaddr>/<subnet>"
echo "weave stop"
exit 1
}
@@ -89,6 +90,16 @@ case "$COMMAND" in
fi
exit 0
;;
hide)
[ $# -gt 0 ] || usage
IPADDR=$1
shift 1
if ip addr list dev $BRIDGE | grep -qF $IPADDR
then
ip addr del dev $BRIDGE $IPADDR
fi
exit 0
;;
stop)
docker kill weave > /dev/null
docker rm weave > /dev/null