d2eb98d048
Refactors the module to be based off OpenstackModule. Changes sdk calls to use the proxy layer where appropriate. The inspection itself stays at the cloud layer to support waiting. Make sure we convert returned resource objects to dict Adds a barebones role to test the module. This won't run in CI, since we don't have the ironic plugin configured in devstack. Changes the return value of the module to be the entire node, instead of just the properties that resulted from inspection. Return docs were updated to reflect this. Update module params to use `name` as the identifier for the node, aliasing it to the previous supported values of `id` and `uuid`. Use module kwargs to specify mutually exclusive params. Stop catching exceptions and instead let them bubble up so ansible handles them. Change-Id: I2b07b58c8b068d7f18db9862fcecb4088328ac74
16 lines
466 B
YAML
16 lines
466 B
YAML
---
|
|
# TODO: Actually run this role in CI. Atm we do not have DevStack's ironic plugin enabled.
|
|
- name: Introspect node
|
|
openstack.cloud.baremetal_inspect:
|
|
cloud: "{{ cloud }}"
|
|
name: node-1
|
|
register: inspect
|
|
|
|
- debug: var=inspect
|
|
|
|
- name: assert return values of baremetal_inspect module
|
|
assert:
|
|
that:
|
|
# allow new fields to be introduced but prevent fields from being removed
|
|
- expected_fields|difference(inspect.node.keys())|length == 0
|