Merge pull request #761 from Jorge-Rodriguez/sched_hint

Added optional parameter scheduler_hints.
This commit is contained in:
Brian Coca 2015-02-20 07:39:13 -05:00
commit 3a02f31e34

View file

@ -168,6 +168,12 @@ options:
required: false
default: None
version_added: "1.6"
scheduler_hints:
description:
- Arbitrary key/value pairs to the scheduler for custom use
required: false
default: None
version_added: "1.9"
requirements: ["novaclient"]
'''
@ -422,7 +428,7 @@ def _create_server(module, nova):
'config_drive': module.params['config_drive'],
}
for optional_param in ('region_name', 'key_name', 'availability_zone'):
for optional_param in ('region_name', 'key_name', 'availability_zone', 'scheduler_hints'):
if module.params[optional_param]:
bootkwargs[optional_param] = module.params[optional_param]
try:
@ -543,6 +549,7 @@ def main():
auto_floating_ip = dict(default=False, type='bool'),
floating_ips = dict(default=None),
floating_ip_pools = dict(default=None),
scheduler_hints = dict(default=None),
))
module = AnsibleModule(
argument_spec=argument_spec,
@ -582,4 +589,3 @@ def main():
from ansible.module_utils.basic import *
from ansible.module_utils.openstack import *
main()