Note that set command automatically merges the included prefixes:
$ openstack subnet pool show testpool
[...]
| prefixes | 10.0.0.0/23, 20.0.0.0/24 |
$ openstack subnet pool set --pool-prefix 10.0.0.0/22 testpool
$ openstack subnet pool show testpool
[...]
| prefixes | 10.0.0.0/22, 20.0.0.0/24 |
$ openstack subnet pool unset --pool-prefix 10.0.0.0/23 testpool
Subnet pool does not contain prefix 10.0.0.0/23
No need to manually clean the inner prefixes.
The code was added in https://review.openstack.org/#/c/306253/ in a general round to add unset commands where missing, but for subnet pools, I would suggest to remove it, as the operation is not supported (and not needed as shown, expanding a subnet merges it in the newer larger one)
Confirmed on stable rocky release, the subnet pool update only allows to expand the existing prefixes: /github. com/openstack/ neutron/ blob/13. 0.0/neutron/ db/db_base_ plugin_ v2.py#L89
https:/
Note that set command automatically merges the included prefixes:
$ openstack subnet pool show testpool
[...]
| prefixes | 10.0.0.0/23, 20.0.0.0/24 |
$ openstack subnet pool set --pool-prefix 10.0.0.0/22 testpool
$ openstack subnet pool show testpool
[...]
| prefixes | 10.0.0.0/22, 20.0.0.0/24 |
$ openstack subnet pool unset --pool-prefix 10.0.0.0/23 testpool
Subnet pool does not contain prefix 10.0.0.0/23
No need to manually clean the inner prefixes.
The code was added in https:/ /review. openstack. org/#/c/ 306253/ in a general round to add unset commands where missing, but for subnet pools, I would suggest to remove it, as the operation is not supported (and not needed as shown, expanding a subnet merges it in the newer larger one)