Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zhmc_nic examples in documentation use zhmc_partition #1058

Open
jacobemery opened this issue Jul 29, 2024 · 1 comment
Open

zhmc_nic examples in documentation use zhmc_partition #1058

jacobemery opened this issue Jul 29, 2024 · 1 comment

Comments

@jacobemery
Copy link

Describe the bug
<-- A clear and concise description of what the bug is. -->
The examples for the zhmc_nic module in the documentation in Ansible Galaxy here use the zhmc_partition module.

I know that "Note that the Ansible module zhmc_partition can be used to gather facts about existing NICs of a partition.", but the module parameters given in the examples don't work for the zhmc_partition module.

Expected behavior
<-- A clear and concise description of what you expected to happen. -->

The module's documentation should use its own module as the example, it should not reference other modules. The examples should work with the provided parameters.

To Reproduce
<-- Describe the steps to reproduce the behavior. -->
N/A

Environment information

  • Output of zhmc_prometheus_exporter --version:
  • HMC version:
    N/A

Ansible task
<-- The Ansible task from the playbook or role that failed. -->

The provided example task fails, i.e:

- name: Gather facts about a NIC
      tags: nic_facts
      ibm.ibm_zhmc.zhmc_partition:
        hmc_host: "{{ hmc_host }}"
        hmc_auth: "{{ hmc_auth }}"
        cpc_name: "{{ cpc_name }}"
        partition_name: "{{ lpar_name }}"
        name: "{{ nic_name }}"
        state: facts
      register: nic_facts

with error:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "Unsupported parameters for (ibm.ibm_zhmc.zhmc_partition) module: partition_name. Supported parameters include: _faked_session, cpc_name, expand_crypto_adapters, expand_storage_groups, hmc_auth, hmc_host, log_file, name, properties, state."}

Because the 'partition_name' in the example is not accepted by the zhmc_partition module, it should just be 'name'.

However, just by changing the module name to zhmc_nic, the provided example task succeeds:

    - name: "Gather facts about NIC {{ nic_name }}"
      tags: nic_facts
      ibm.ibm_zhmc.zhmc_nic:
        hmc_host: "{{ hmc_host }}"
        hmc_auth: "{{ hmc_auth }}"
        cpc_name: "{{ cpc_name }}"
        partition_name: "{{ lpar_name }}"
        name: "{{ nic_name }}"
        state: facts
      register: nic_facts_result

So I believe this should be a relatively simple fix, by just changing the module referenced in the examples to zhmc_nic.

Log file
<-- If possible, use the 'log_file' parameter in the Ansible task to create a log file and attach or paste the relevant parts of it. -->

@jacobemery
Copy link
Author

@andy-maier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants