Make create request_pool log in right place

Change-Id: Ic0b033bcb6edb5b5987ade8a3ef45baa248f5e08
This commit is contained in:
Dongcan Ye 2017-03-23 11:52:22 +08:00
parent 5bcaa03d55
commit ef2c4db0c5
1 changed files with 1 additions and 1 deletions

View File

@ -1370,7 +1370,6 @@ def ipam_request_pool():
pool_name = options.get(const.NEUTRON_POOL_NAME_OPTION)
pool_id = options.get(const.NEUTRON_POOL_UUID_OPTION)
if requested_pool:
LOG.info(_LI("Creating subnetpool with the given pool CIDR"))
if requested_subpool:
cidr = ipaddress.ip_network(six.text_type(requested_subpool))
else:
@ -1393,6 +1392,7 @@ def ipam_request_pool():
'name': pool_name,
'default_prefixlen': cidr.prefixlen,
'prefixes': [subnet_cidr]}
LOG.info(_LI("Creating subnetpool with the given pool CIDR"))
created_subnetpool_response = app.neutron.create_subnetpool(
{'subnetpool': new_subnetpool})
pool = created_subnetpool_response['subnetpool']