#Missing value from the netapp.ontap.na_ontap_rest_cli module for "options command"

1 messages · Page 1 of 1 (latest)

vocal void
#

We are trying to manage replication throttling on our NetApp systems in smaller locations. Instead of just setting the value every time, I would like to check the currently configured value for the replication throttle option first.

Using the rest_cli module, I can set the option without any problems. However, when I try to retrieve this option, I do get the option name, but the value is missing.

I also tried accessing it directly via the API call to:
https://<host-name>/api/private/cli/options/

But there as well, I only get the option names, not the actual values.

Here is the task I’m using:

  • name: Get outgoing replication throttle status (SSH) via RestAPI
    netapp.ontap.na_ontap_rest_cli:
    hostname: "{{ inventory_hostname }}"
    username: "{{ ansible_user }}"
    password: "{{ ansible_password }}"
    command: options
    verb: GET
    params:
    option_name: replication.throttle.enable

Can someone help me figure out how to also retrieve the option value?

potent fiber
#

"All fields that you want returned from the GET call must be specified using the fields parameter"

#

try adding fields: option-name,option-value to your params

vocal void
#

hi mamoep 🙂 awesome in the same time i figuredit out

#

https://<host-name>/api/private/cli/options?fields=option_value

#

it works as well with ansible

#
  • name: Get outgoing replication throttle status (SSH) via RestAPI
    netapp.ontap.na_ontap_rest_cli:
    hostname: "{{ inventory_hostname }}"
    username: "{{ ansible_user }}"
    password: "{{ ansible_password }}"
    command: options?fields=option_value
    verb: GET
    params:
    option_name: replication.throttle.enable
#

with the command parameter. unfortunatly thats not documented some where 😦 but it works. danke a lot

potent fiber
#

I quoted from the REST API documentation.