Merge "Add check to handle case when --gateway not given"

This commit is contained in:
Jenkins 2016-01-19 08:47:11 +00:00 committed by Gerrit Code Review
commit 0dacc5bd60
1 changed files with 2 additions and 1 deletions

View File

@ -958,7 +958,8 @@ def ipam_request_address():
# This address cannot be reserved with neutron at this time as subnet
# is not created yet. In /NetworkDriver.CreateNetwork this address will
# be reserved with neutron.
allocated_address = '/'.join([req_address, pool_prefix_len])
if req_address:
allocated_address = '/'.join([req_address, pool_prefix_len])
return flask.jsonify({'Address': allocated_address})