Rationalize ipam arguments

- rename -defaultsubnet to -ipsubnet
- default subnet defaults to whole -iprange
- parse and check inside ipam package
- removes some error cases
This commit is contained in:
Bryan Boreham committed 2015-06-10 17:21:16 +01:00
1 parent f956a76455
commit 3a9af4413d
6 files changed
+67 -77

No files matched your search

-4
View File
@@ -782,10 +782,6 @@ ipam_cidrs() {
fi
# If no addresses passed in, get one in the default subnet
CIDR_ARGS="$(http_call $CONTAINER_NAME $HTTP_PORT POST /ip/$CONTAINER_ID)"
if [ "$CIDR_ARGS" = "No subnet specified" ] ; then
echo "No IP address supplied (use the -iprange and -defaultsubnet options on 'weave launch' to enable IP address allocation)" >&2
return 1
fi
if [ "$CIDR_ARGS" = "404 page not found" ] ; then
echo "No IP address supplied (use the -iprange option on 'weave launch' to enable IP address allocation)" >&2
return 1