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:
1 parent
f956a76455
commit
3a9af4413d
6 files changed
+67
-77
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user