dellemc.openmanage.idrac_network_attributes_info module – Query and validate iDRAC Network Attribute Registry for a specific NIC

Note

This module is part of the dellemc.openmanage collection (version 11.0.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install dellemc.openmanage. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: dellemc.openmanage.idrac_network_attributes_info.

New in dellemc.openmanage 10.0.0

Synopsis

  • Query the Dell OEM DellNetworkAttributes endpoint and NetworkAttributesRegistry for a specific network device function (NIC).

  • Returns full attribute schema with current values, supporting attribute name filtering and OEM vs. standard attribute classification.

  • Supports both iDRAC9 (16G) and iDRAC10 (17G) via dynamic URI resolution.

  • When validate=true and attributes is provided, validates each user-supplied attribute name-value pair against the registry and returns a consolidated report with fuzzy match suggestions for misspelled attribute names.

Requirements

The below requirements are needed on the host that executes this module.

  • python >= 3.9.6

Parameters

Parameter

Comments

attribute_name

string

Pattern to filter attributes by name (supports glob patterns via fnmatch).

attribute_source

string

Filter attributes by source type.

Choices:

  • "all" ← (default)

  • "oem"

  • "standard"

attributes

dictionary

Dictionary of attribute name-value pairs to validate against the registry.

Required when validate=true.

Example: {VLanMode: Enabled, VLanId: 100}.

ca_path

path

added in dellemc.openmanage 5.0.0

The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.

cert_fingerprint

string

SHA-256 fingerprint of the expected TLS certificate (hex digest, with or without colons).

When supplied together with validate_certs=false, the module verifies the remote certificate’s fingerprint instead of performing full CA validation.

enforce_validate_certs

boolean

If true and validate_certs is false, the module will fail with an error instead of just emitting a warning.

Choices:

  • false ← (default)

  • true

force_refresh

boolean

Force refresh of attribute registry data, bypassing the in-memory cache.

Choices:

  • false ← (default)

  • true

idrac_ip

string / required

iDRAC IP Address.

idrac_password

aliases: idrac_pwd

string / required

iDRAC user password.

If the password is not provided, then the environment variable IDRAC_PASSWORD is used.

Example: export IDRAC_PASSWORD=password

idrac_port

integer

iDRAC port.

Default: 443

idrac_user

string / required

iDRAC username.

If the username is not provided, then the environment variable IDRAC_USERNAME is used.

Example: export IDRAC_USERNAME=username

network_device_function_id

string / required

FQDD of the network device function to query attributes for.

Example: NIC.Embedded.1-1-1.

If the specified ID does not exist, the module returns an error including a list of valid NIC IDs discovered on the iDRAC.

timeout

integer

added in dellemc.openmanage 5.0.0

The socket level timeout in seconds.

Default: 30

validate

boolean

When set to true, validates the attribute name-value pairs provided in attributes against the attribute registry for the specified NIC.

Returns a consolidated validation report with per-attribute status.

Requires attributes to be provided.

Choices:

  • false ← (default)

  • true

validate_certs

boolean

added in dellemc.openmanage 5.0.0

If false, the SSL certificates will not be validated.

Configure false only on personally controlled sites where self-signed certificates are used.

Prior to collection version 5.0.0, the validate_certs is false by default.

Choices:

  • false

  • true ← (default)

Notes

Note

  • Run this module from a system that has direct access to Dell iDRAC.

  • This module supports both IPv4 and IPv6 address for idrac_ip.

  • This module is read-only and always returns changed=false.

  • Use idrac_network_info to discover valid NIC IDs before calling this module.

Examples

---
- name: Query all network attributes for a specific NIC
  dellemc.openmanage.idrac_network_attributes_info:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    ca_path: "/path/to/ca_cert.pem"
    network_device_function_id: "NIC.Embedded.1-1-1"

- name: Filter attributes by glob pattern
  dellemc.openmanage.idrac_network_attributes_info:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_device_function_id: "NIC.Embedded.1-1-1"
    attribute_name: "VLan*"

- name: Query only OEM attributes
  dellemc.openmanage.idrac_network_attributes_info:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_device_function_id: "NIC.Embedded.1-1-1"
    attribute_source: "oem"

- name: Validate attribute values before applying
  dellemc.openmanage.idrac_network_attributes_info:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_device_function_id: "NIC.Embedded.1-1-1"
    validate: true
    attributes:
      VLanMode: "Enabled"
      VLanId: "100"

- name: Batch validate with fuzzy match suggestions for misspelled names
  dellemc.openmanage.idrac_network_attributes_info:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_device_function_id: "NIC.Embedded.1-1-1"
    validate: true
    attributes:
      VLanMoed: "Enabled"
      VLanId: "99999"

- name: Two-step workflow - discover NICs then query attributes
  hosts: idrac_hosts
  tasks:
    - name: Discover all NICs
      dellemc.openmanage.idrac_network_info:
        idrac_ip: "{{ idrac_ip }}"
        idrac_user: "{{ idrac_user }}"
        idrac_password: "{{ idrac_password }}"
      register: nic_result

    - name: Query attributes for first NIC
      dellemc.openmanage.idrac_network_attributes_info:
        idrac_ip: "{{ idrac_ip }}"
        idrac_user: "{{ idrac_user }}"
        idrac_password: "{{ idrac_password }}"
        network_device_function_id: "{{ nic_result.network_device_functions[0].id }}"
      register: attr_result

    - name: Display attribute count
      ansible.builtin.debug:
        msg: "Found {{ attr_result.attribute_count }} attributes"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

attribute_count

integer

Total number of attributes returned (after filtering).

Returned: success

Sample: 85

attribute_registry

string

Name of the attribute registry used.

Returned: success

Sample: "NetworkAttributesRegistry_NIC.Embedded.1-1-1"

idrac_firmware_version

string

iDRAC firmware version.

Returned: success

Sample: "7.30.30.50"

idrac_generation

integer

PowerEdge server generation (14G-16G for iDRAC9, 17G+ for iDRAC10).

Returned: success

Sample: 16

idrac_model

string

iDRAC model identifier.

Returned: success

Sample: "iDRAC 9"

invalid_count

integer

Number of attributes that failed validation.

Returned: when validate=true

Sample: 1

msg

string

Overall status message.

Returned: always

Sample: "Successfully queried network attribute registry."

network_attributes

list / elements=string

List of network attributes with complete metadata.

Returned: success

Sample: [{"current_value": "Disabled", "default_value": "Disabled", "dependencies": [], "description": "Enable or disable VLAN mode.", "is_oem": true, "name": "VLanMode", "read_only": false, "requires_reboot": false, "type": "Enumeration", "valid_values": ["Disabled", "Enabled"]}]

network_device_function_id

string

The NIC FQDD that was queried.

Returned: success

Sample: "NIC.Embedded.1-1-1"

redfish_error

dictionary

Details of the HTTP Error.

Returned: on HTTP error

Sample: {"error": {"code": "Base.1.0.GeneralError", "message": "A general error has occurred."}}

valid

boolean

Whether all submitted attributes passed validation.

Returned: when validate=true

Sample: false

valid_count

integer

Number of attributes that passed validation.

Returned: when validate=true

Sample: 1

validation_results

list / elements=string

Per-attribute validation results.

Returned: when validate=true

Sample: [{"attribute": "VLanMode", "reason": "Value 'Enabled' is valid for enumeration attribute.", "status": "valid", "suggestions": []}, {"attribute": "VLanMoed", "reason": "Attribute not found.", "status": "invalid", "suggestions": ["VLanMode", "VLanId"]}]

Authors

  • Mangirish Kenkare(@MangirishK)