With "extends_documentation_fragment: ['openstack.cloud.openstack']"
it is not necessary to list required Python libraries in section
'requirements' of DOCUMENTATION docstring in modules. Ansible will
merge requirements from doc fragments and DOCUMENTATION docstring
which previously resulted in duplicates such as in server module [0]:
* openstacksdk
* openstacksdk >= 0.36, < 0.99.0
* python >= 3.6
When removing the 'requirements' section from server module, then
Ansible will list openstacksdk once only:
* openstacksdk >= 0.36, < 0.99.0
* python >= 3.6
To see what documentation Ansible will produce for server module run:
ansible-doc --type module openstack.cloud.server
[0] https://docs.ansible.com/ansible/latest/collections/openstack/\
cloud/server_module.html
Change-Id: I727ed95ee480bb644b5a533f6a9526973677064c
Added integration tests for both modules. They will not run in CI atm,
because we do not have Ironic enabled in our DevStack environment.
Sorted argument specs and documentation of both modules.
Refactored both modules to be subclasses of OpenStackModule class.
Renamed baremetal_node_info's module attribute 'node' to 'name' and
added the former as an alias to be consistent with other *_info
modules.
baremetal_node_info will no longer fetch port and portgroup details
because this requires extra api calls for each node. Users can use
the baremetal_port module to retrieve ports for each node on demand.
Refactored code for constructing node updates in baremetal_node module
which allowed us to drop the dependency on Python module jsonpatch.
Deprecated baremetal_node's skip_update_of_masked_password attribute.
Updating or even specificing passwords for nodes has not been
supported for a while now, rendering the attribute useless.
Renamed baremetal_node's module attributes 'chassis_uuid' to
'chassis_id', 'uuid' to 'id' as well as suboptions of
'properties' to match openstacksdk. Added the previous attribute
names as aliases to keep backward compatibility.
Marked nics attribute in baremetal_node as not updatable.
Changed baremetal_node module to return attribute 'node' only when
state is present. It will return no values (except Ansible's default
values) when state is absent. Previous return value 'uuid' can be
retrieved from node's dictionary entry 'id'.
The non-standard return value 'result' has been dropped because its
content can easily be reconstructed with Ansible's is changed check.
The non-standard return value 'changes' has been dropped because it
was only returned on updates, has no known uses and can easily be
reconstructed in Ansible by comparing the returned node dictionary
with a copy of a previous node dictionary.
Module baremetal_node_info will no longer fail when no node with a
matching id or name or mac could be found. Instead it will return
an empty list like other *_info modules.
baremetal_node_info's return attribute 'baremetal_nodes' has been
renamed to 'nodes' to be consistent with other modules. The former
name will keep to be available for now to keep backward
compatibility.
Both modules convert their return values into dictionaries without
computed (redundant) values. They do not drop values such as links
anymore though, because we do not withhold information from users.
Updated DOCUMENTATION, EXAMPLES and RETURN docstrings in both
modules.
Dropped deprecated ironic_url attribute from DOCUMENTATION docstring
in baremetal_info. 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 provisioning
times, than what e.g. the generic doc fragment specifies.
Change-Id: If3044acf672295e9b61fa60d0969f47cd06dfdeb
None of the properties are required nowadays, putting made-up values
there brings more harm than good.
Change-Id: I35bda0ac2dc9c32acb94aaa4d28572af2cac85fa
This structure does not reflect the actual ironic API and is mostly
meaningless nowadays. Just let people populate driver_info directly.
Change-Id: I04d168dc86e8c0115b7183b14499fe1812af7343
This change merely moves the code to one location. The next logical
step would be to make IronicModule inherit the common ansible module.
Change-Id: Iec0ca1e33de6ebc36d7664941eafe1d77203d8f2
The endpoint may be specified in clouds.yaml or via auth, do not
force ironic_url in either of these cases.
Finally, accept "none" as a valid no-auth plugin name.
Change-Id: I4d50b7c55727f022d79df85fb4a163fe3e5fca7b
We don't use github, so having @ mentions of specific humans is
not valuable. Also, we are a team and own the modules as a team,
so calling out individual authors is philosophically contrary.
We landed a patch upstream to special-case this author string.
Change-Id: I38b4e68f14bbba6e13e8a50e2b202874ab74e3bc
This is separate from the previous patch - it's just the results
of running the script so we can review the two a little independently.
We should probably squash them.
Change-Id: I838f15cf4a32455a5be20033c8ddc27db6ca15c0