Expose the reuse_fips flag on os_server (#4849)

* Expose the reuse_fips flag on os_server

* Remove useless line
This commit is contained in:
Monty Taylor 2016-09-15 15:07:34 -05:00 committed by David Shrewsbury
parent 48d932643b
commit 4840d30589

View file

@ -185,6 +185,18 @@ options:
required: false required: false
default: false default: false
version_added: "2.2" version_added: "2.2"
reuse_fips:
description:
- When I(auto_ip) is true and this option is true, the I(auto_ip) code
will attempt to re-use unassigned floating ips in the project before
creating a new one. It is important to note that it is impossible
to safely do this concurrently, so if your use case involves
concurrent server creation, it is highly recommended to set this to
false and to delete the floating ip associated with a server when
the server is deleted using I(delete_fip).
required: false
default: true
version_added: "2.2"
requirements: requirements:
- "python >= 2.6" - "python >= 2.6"
- "shade" - "shade"
@ -475,6 +487,7 @@ def _create_server(module, cloud):
boot_volume=module.params['boot_volume'], boot_volume=module.params['boot_volume'],
boot_from_volume=module.params['boot_from_volume'], boot_from_volume=module.params['boot_from_volume'],
terminate_volume=module.params['terminate_volume'], terminate_volume=module.params['terminate_volume'],
reuse_fips=module.params['reuse_fips'],
wait=module.params['wait'], timeout=module.params['timeout'], wait=module.params['wait'], timeout=module.params['timeout'],
**bootkwargs **bootkwargs
) )
@ -575,6 +588,7 @@ def main():
scheduler_hints = dict(default=None, type='dict'), scheduler_hints = dict(default=None, type='dict'),
state = dict(default='present', choices=['absent', 'present']), state = dict(default='present', choices=['absent', 'present']),
delete_fip = dict(default=False, type='bool'), delete_fip = dict(default=False, type='bool'),
reuse_fips = dict(default=True, type='bool'),
) )
module_kwargs = openstack_module_kwargs( module_kwargs = openstack_module_kwargs(
mutually_exclusive=[ mutually_exclusive=[