Updated allocation pool checks

As per the REST Networking API v2.0 (Subnet) docs, if subnets pools
are not specified, OpenStack networking automatically allocates pools
covering all IP addresses in the CIDR.

In custom vendor specific environments, subnets can be created without
allocation pools via UI due to which subnets will not have any existing
allocation pools. Under this scenario, module throws an
"IndexError: list index out of range" error.

Also, allow to add more allocation pools on top of existing allocation
pools.

Change-Id: Ib8becf5e958f1bc8e5c9fd76f1722536bf1c9f1a
This commit is contained in:
rawat
2020-04-25 15:55:10 +10:00
parent b824bf1c38
commit 95dcd82cbb
3 changed files with 71 additions and 3 deletions

View File

@@ -41,3 +41,6 @@
cloud: "{{ cloud }}"
name: "{{ network_name }}"
state: absent
- name: Subnet Allocation
include_tasks: subnet-allocation.yml