os_subnet: allow using non-default subnet pool (#52608)
This commit is contained in:
parent
025e30ea0c
commit
17f2b5f73e
2 changed files with 9 additions and 3 deletions
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
bugfixes:
|
||||
- >
|
||||
os_subnet - it is valid to specify an explicit ``subnetpool_id`` rather than
|
||||
``use_default_subnetpool`` or ``cidr``
|
|
@ -272,9 +272,10 @@ def main():
|
|||
if state == 'present':
|
||||
if not module.params['network_name']:
|
||||
module.fail_json(msg='network_name required with present state')
|
||||
if not module.params['cidr'] and not use_default_subnetpool:
|
||||
module.fail_json(msg='cidr or use_default_subnetpool required '
|
||||
'with present state')
|
||||
if (not module.params['cidr'] and not use_default_subnetpool and
|
||||
not extra_specs.get('subnetpool_id', False)):
|
||||
module.fail_json(msg='cidr or use_default_subnetpool or '
|
||||
'subnetpool_id required with present state')
|
||||
|
||||
if pool_start and pool_end:
|
||||
pool = [dict(start=pool_start, end=pool_end)]
|
||||
|
|
Loading…
Reference in a new issue