port 'scheduler_hints' feature from nova_compute to os_server module

This commit is contained in:
David Hocky 2016-03-02 12:55:20 -05:00 committed by Matt Clay
parent 92d76e8828
commit 3b800f1f34

View file

@ -169,6 +169,11 @@ options:
- A list of preexisting volumes names or ids to attach to the instance - A list of preexisting volumes names or ids to attach to the instance
required: false required: false
default: [] default: []
scheduler_hints:
description:
- Arbitrary key/value pairs to the scheduler for custom use
required: false
default: None
state: state:
description: description:
- Should the resource be present or absent. - Should the resource be present or absent.
@ -451,7 +456,7 @@ def _create_server(module, cloud):
) )
for optional_param in ( for optional_param in (
'key_name', 'availability_zone', 'network', 'key_name', 'availability_zone', 'network',
'volume_size', 'volumes'): 'scheduler_hints', 'volume_size', 'volumes'):
if module.params[optional_param]: if module.params[optional_param]:
bootkwargs[optional_param] = module.params[optional_param] bootkwargs[optional_param] = module.params[optional_param]
@ -555,6 +560,7 @@ def main():
boot_volume = dict(default=None, aliases=['root_volume']), boot_volume = dict(default=None, aliases=['root_volume']),
terminate_volume = dict(default=False, type='bool'), terminate_volume = dict(default=False, type='bool'),
volumes = dict(default=[], type='list'), volumes = dict(default=[], type='list'),
scheduler_hints = dict(default=None),
state = dict(default='present', choices=['absent', 'present']), state = dict(default='present', choices=['absent', 'present']),
) )
module_kwargs = openstack_module_kwargs( module_kwargs = openstack_module_kwargs(