dellemc.openmanage.idrac_network_attributes module – Configures the iDRAC network attributes

Note

This module is part of the dellemc.openmanage collection (version 8.7.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.

New in dellemc.openmanage 8.4.0

Synopsis

  • This module allows you to configure the port and partition network attributes on the network interface cards.

Requirements

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

  • python >= 3.9.6

Parameters

Parameter

Comments

apply_time

string / required

Apply time of the network_attributes and oem_network_attributes.

This is applicable only to network_attributes and oem_network_attributes.

Immediate allows the user to immediately reboot the host and apply the changes. job_wait is applicable. This is applicable for oem_network_attributes and job_wait.

OnReset allows the user to apply the changes on the next reboot of the host server.

AtMaintenanceWindowStart allows the user to apply at the start of a maintenance window as specified in maintenance_window. A reboot job is scheduled.

InMaintenanceWindowOnReset allows to apply after a manual reset but within the maintenance window as specified in maintenance_window.

This is not applicable for iDRAC8 and value will be ignored and will not have any impact for configuring oem_network_attributes.

Choices:

  • "Immediate"

  • "OnReset"

  • "AtMaintenanceWindowStart"

  • "InMaintenanceWindowOnReset"

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.

clear_pending

boolean

This parameter allows you to clear all the pending OEM network attributes changes.

false does not perform any operation.

true discards any pending changes to network attributes, or if a job is in scheduled state, removes the job.

apply_time value will be ignored and will not have any impact for clear_pending operation.

This operation is not supported for iDRAC8.

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

job_wait

boolean

Provides the option to wait for job completion.

This is applicable when apply_time is Immediate for oem_network_attributes.

Choices:

  • false

  • true ← (default)

job_wait_timeout

integer

The maximum wait time of job_wait in seconds. The job is tracked only for this duration.

This option is applicable when job_wait is true.

Default: 1200

maintenance_window

dictionary

This option allows you to schedule the maintenance window.

This is required when apply_time is AtMaintenanceWindowStart or InMaintenanceWindowOnReset.

duration

integer / required

The duration in seconds for the maintenance window.

start_time

string / required

The start time for the maintenance window to be scheduled.

The format is YYYY-MM-DDThh:mm:ss<offset>

<offset> is the time offset from UTC that the current timezone set in iDRAC in the format: +05:30 for IST.

network_adapter_id

string / required

FQDD of the network adapter device that represents the physical network adapter capable of connecting to a computer network.

An example of FQDD of the network adapter is ‘NIC.Mezzanine.1A’

network_attributes

dictionary

Dictionary of network attributes and value. To view the list of attributes and its structure, see the below API https://I(idrac_ip/redfish/v1/Systems/System.Embedded.1/NetworkAdapters/<network_id>/NetworkDeviceFunctions/ <network_port_id>/Settings) and https://<idrac_ip>/redfish/v1/Schemas/NetworkDeviceFunction.v1_8_0.json.

network_attributes is mutually exclusive with oem_network_attributes.

network_device_function_id

string / required

FQDD of the network adapter device function that represents a logical interface exposed by the network adapter.

An example of FQDD of the network adapter device function is ‘NIC.Mezzanine.1A-1-1’

oem_network_attributes

dictionary

The attributes must be part of the Integrated Dell Remote Access Controller Attribute Registry. To view the list of attributes in Attribute Registry for iDRAC9 and newer versions. For more information, see, https://I(idrac_ip/redfish/v1/Chassis/System.Embedded.1/NetworkAdapters/<network_id>/NetworkDeviceFunctions/ <network_port_id>/Oem/Dell/DellNetworkAttributes/<network_port_id>) and https://I(idrac_ip/redfish/v1/Registries/NetworkAttributesRegistry_<network_port_id>/ NetworkAttributesRegistry_network_port_id.json).

For iDRAC8 based servers, derive the network attribute name from Server Configuration Profile.

oem_network_attributes is mutually exclusive with network_attributes.

resource_id

string

Id of the resource.

If the value for resource ID is not provided, the module picks the first resource ID available from the list of system resources returned by the iDRAC.

timeout

integer

added in dellemc.openmanage 5.0.0

The socket level timeout in seconds.

Default: 30

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.

  • This module supports check_mode.

Examples

---
- name: Configure OEM network attributes
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: "NIC.Integrated.1"
    network_port_id: "NIC.Integrated.1-1-1"
    apply_time: "Immediate"
    oem_network_attributes:
      BannerMessageTimeout: "4"

- name: Configure OEM network attributes to apply on reset
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    oem_network_attributes:
      BannerMessageTimeout: "4"
    apply_time: OnReset

- name: Configure OEM network attributes to apply at maintainance window
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    oem_network_attributes:
      BannerMessageTimeout: "4"
    apply_time: AtMaintenanceWindowStart
    maintenance_window:
      start_time: "2022-09-30T05:15:40-05:00"
      duration: 600

- name: Clearing the pending attributes
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    apply_time: "Immediate"
    clear_pending: true

- name: Clearing the OEM pending attributes and apply the OEM network attributes
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    apply_time: "Immediate"
    clear_pending: true
    oem_network_attributes:
      BannerMessageTimeout: "4"

- name: Configure OEM network attributes and wait for the job
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    apply_time: "Immediate"
    oem_network_attributes:
      LnkSpeed: "10MbpsHalf"
      WakeOnLan: "Enabled"
      VLanMode: "Enabled"
    job_wait: true
    job_wait_timeout: 2000

- name: Configure redfish network attributes to update fiber channel on reset
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    apply_time: OnReset
    network_attributes:
      Ethernet:
        VLAN:
          VLANEnable: true

- name: Configure redfish network attributes to apply on reset
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    network_attributes:
      Ethernet:
        VLAN:
          VLANEnable: true
    apply_time: OnReset

- name: Configure redfish network attributes of iscsi to apply at maintainance window start
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    network_attributes:
      iSCSIBoot:
        InitiatorIPAddress: 1.0.0.1
    apply_time: AtMaintenanceWindowStart
    maintenance_window:
      start_time: "2022-09-30T05:15:40-05:00"
      duration: 600

- name: Configure redfish network attributes to apply at maintainance window on reset
  dellemc.openmanage.idrac_network_attributes:
    idrac_ip: "192.168.0.1"
    idrac_user: "user_name"
    idrac_password: "user_password"
    network_id: NIC.Integrated.1
    network_port_id: "NIC.Integrated.1-1-1"
    network_attributes:
      Ethernet:
        VLAN:
          VLANEnable: false
          VLANId: 1
    apply_time: AtMaintenanceWindowStart
    maintenance_window:
      start_time: "2022-09-30T05:15:40-05:00"
      duration: 600

Return Values

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

Key

Description

error_info

dictionary

Details of the HTTP Error.

Returned: on HTTP error

Sample: {"error": {"@Message.ExtendedInfo": [{"Message": "Unable to process the request because an error occurred.", "MessageArgs": [], "MessageId": "GEN1234", "RelatedProperties": [], "Resolution": "Retry the operation. If the issue persists, contact your system administrator.", "Severity": "Critical"}], "code": "Base.1.0.GeneralError", "message": "A general error has occurred. See ExtendedInfo for more information."}}

invalid_attributes

dictionary

Dictionary of invalid attributes provided that cannot be applied.

Returned: On invalid attributes or values

Sample: {"IscsiInitiatorIpAddr": "Attribute is not valid.", "IscsiInitiatorSubnet": "Attribute is not valid."}

job_status

dictionary

Returns the output for status of the job.

Returned: always

Sample: {"ActualRunningStartTime": null, "ActualRunningStopTime": null, "CompletionTime": null, "Description": "Job Instance", "EndTime": "TIME_NA", "Id": "JID_XXXXXXXXX", "JobState": "Scheduled", "JobType": "NICConfiguration", "Message": "Task successfully scheduled.", "MessageArgs": [], "MessageId": "JCP001", "Name": "Configure: NIC.Integrated.1-1-1", "PercentComplete": 0, "StartTime": "2023-08-07T06:21:24", "TargetSettingsURI": null}

msg

string

Status of the attribute update operation.

Returned: when network attributes is applied

Sample: "Successfully updated the network attributes."

Authors

  • Abhishek Sinha(@ABHISHEK-SINHA10)