Refactored baremetal_node_action module
Sorted argument specs and documentation of the module. Refactored baremetal_node_action module to be a subclass of the OpenStackModule class. Redefined baremetal_node_info's module attributes 'id' and 'uuid' as aliases of the 'name' attribute because modules in this collection do not differentiate between ids and names. The previous revision of baremetal_node_info module had the same behaviour implemented but did not make the relationship between 'id'/'uuid' and 'name' explicit. Changed types and/or choices of module attributes 'deploy', 'maintenance', 'power' and 'state' to match what has been described in DOCUMENTATION string and to get rid of the non-Ansible'ish and inconsistent parsing of input values in _is_true() and _is_false() functions. Ansible can handle argument types for us, no need to implement it ourselfs. Dropped deprecated ironic_url attribute from DOCUMENTATION docstring. Dropped wait and timeout attributes from DOCUMENTATION because their docstrings will be added via documentation fragment. Dropped attribute 'result' from module results because in our modules we consistently do not explain what we do in modules. Updated DOCUMENTATION, EXAMPLES and added RETURN docstrings. Refactored the change logic for maintenance, power state and state, eliminating unreachable or broken code. Dropped wait attribute from DOCUMENTATION because its docstring will be added via documentation fragment. Kept timeout attribute in DOCUMENTATION and argument_spec because it has a high(er) default value, to account for long node (de)activiation times, than what e.g. the generic doc fragment specifies. Change-Id: I991f23c16583da106105677d75b3651959280d98
Loading
Please register or sign in to comment