Fixes 36950. Added support for missing options capabilities and root_device in properties of os_ironic.py ansible module (#37113)

* Fix for 36950. Added support for missing options capabilities and root_device in properties of os_ironic.py ansible module

* Updated docstring to pass documentation validation

* Updated review comments from juliakreger

* version_added: "2.8"
This commit is contained in:
Chandra Shekar Rangavajjula 2018-12-12 19:07:44 +02:00 committed by John R Barker
parent d729614d72
commit 2f8001a7af

View file

@ -93,6 +93,20 @@ options:
description:
- size of first storage device in this machine (typically /dev/sda), in GB
default: 1
capabilities:
description:
- special capabilities for the node, such as boot_option, node_role etc
(see U(https://docs.openstack.org/ironic/latest/install/advanced.html)
for more information)
default: ""
version_added: "2.8"
root_device:
description:
- Root disk device hints for deployment.
(see U(https://docs.openstack.org/ironic/latest/install/include/root-device-hints.html)
for allowed hints)
default: ""
version_added: "2.8"
skip_update_of_driver_password:
description:
- Allows the code that would assert changes to nodes to skip the
@ -120,6 +134,9 @@ EXAMPLES = '''
cpu_arch: "x86_64"
ram: 8192
disk_size: 64
capabilities: "boot_option:local"
root_device:
wwn: "0x4000cca77fc4dba1"
nics:
- mac: "aa:bb:cc:aa:bb:cc"
- mac: "dd:ee:ff:dd:ee:ff"
@ -149,6 +166,8 @@ def _parse_properties(module):
cpus=p.get('cpus') if p.get('cpus') else 1,
memory_mb=p.get('ram') if p.get('ram') else 1,
local_gb=p.get('disk_size') if p.get('disk_size') else 1,
capabilities=p.get('capabilities') if p.get('capabilities') else '',
root_device=p.get('root_device') if p.get('root_device') else '',
)
return props