Add 'weave restart' command

This commit is contained in:
Bryan Boreham committed 2016-01-12 14:38:44 +00:00
1 parent f84b933d7c
commit 7985e43e68
3 files changed
+27

No files matched your search

+14
View File
@@ -63,6 +63,7 @@ weave run [--without-dns] [--no-rewrite-hosts] [--no-multicast-route]
start [<addr> ...] <container_id>
attach [<addr> ...] <container_id>
detach [<addr> ...] <container_id>
restart <container_id>
weave expose [<addr> ...] [-h <fqdn>]
hide [<addr> ...]
@@ -1045,6 +1046,10 @@ echo_ips() {
done
}
echo_cidrs() {
echo $3
}
peer_args() {
res=''
sep=''
@@ -2026,6 +2031,15 @@ EOF
done
show_addrs $ALL_CIDRS
;;
restart)
[ $# -ge 1 ] || usage
create_bridge
ALL_CIDRS=$(with_container_addresses echo_cidrs $1)
RES=$(docker restart "$1")
with_container_netns_or_die $1 attach $ALL_CIDRS
when_weave_running with_container_fqdn $1 put_dns_fqdn $ALL_CIDRS
echo $RES
;;
dns-add)
collect_dns_add_remove_args "$@"
FN=put_dns_fqdn