cisco.intersight.intersight_fibre_channel_adapter_policy module – Manage Fibre Channel Adapter Policies for Cisco Intersight

Note

This module is part of the cisco.intersight collection (version 2.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 cisco.intersight.

To use it in a playbook, specify: cisco.intersight.intersight_fibre_channel_adapter_policy.

Synopsis

  • Create, update, and delete Fibre Channel Adapter Policies on Cisco Intersight.

  • Fibre Channel Adapter policies configure FC adapter settings for Fibre Channel virtual interfaces.

  • These policies control error recovery, timeouts, retry counts, interrupt modes, queue settings, and LUN configurations.

  • For more information see Cisco Intersight.

Parameters

Parameter

Comments

api_key_id

string / required

Public API Key ID associated with the private key.

If not set, the value of the INTERSIGHT_API_KEY_ID environment variable is used.

api_private_key

path / required

Filename (absolute path) or string of PEM formatted private key data to be used for Intersight API authentication.

If a string is used, Ansible vault should be used to encrypt string data.

Ex. ansible-vault encrypt_string --vault-id tme@/Users/dsoper/Documents/vault_password_file ‘-----BEGIN EC PRIVATE KEY-----

<your private key data>

-----END EC PRIVATE KEY-----’

If not set, the value of the INTERSIGHT_API_PRIVATE_KEY environment variable is used.

api_uri

string

URI used to access the Intersight API.

If not set, the value of the INTERSIGHT_API_URI environment variable is used.

Default: "https://intersight.com/api/v1"

description

aliases: descr

string

The user-defined description for the Fibre Channel Adapter Policy.

Description can contain letters(a-z, A-Z), numbers(0-9), hyphen(-), period(.), colon(:), or an underscore(_).

error_detection_timeout

integer

Error Detection Timeout, also referred to as EDTOV, is the number of milliseconds to wait.

This is the time before the system assumes that an error has occurred.

Default: 2000

error_recovery_enabled

boolean

Enables Fibre Channel Error recovery.

Choices:

  • false ← (default)

  • true

flogi_retries

integer

The number of times that the system tries to log in to the fabric after the first failure.

Default: 8

flogi_timeout

integer

The number of milliseconds that the system waits before it tries to log in again.

Default: 4000

interrupt_mode

string

The preferred driver interrupt mode.

MSIx is the recommended option.

Choices:

  • "MSIx" ← (default)

  • "MSI"

  • "INTx"

io_retry_timeout

integer

The number of seconds the adapter waits before aborting the pending command.

After timeout, it resends the same IO request.

Default: 5

io_throttle_count

integer

The maximum number of data or control I/O operations that can be pending for the virtual interface at one time.

If this value is exceeded, the additional I/O operations wait in the queue.

They wait until the number of pending I/O operations decreases and the additional operations can be processed.

Default: 512

integer

The number of milliseconds the port should actually be down before it is marked down.

After this timeout, fabric connectivity is considered lost.

Default: 30000

lun_count

integer

The maximum number of LUNs that the Fibre Channel driver will export or show.

The maximum number of LUNs is usually controlled by the operating system running on the server.

Lun Count value can exceed 1024 only for vHBA of type ‘FC Initiator’ and on servers having supported firmware version.

Default: 1024

lun_queue_depth

integer

The number of commands that the HBA can send and receive in a single transmission per LUN.

Default: 20

name

string / required

The name assigned to the Fibre Channel Adapter Policy.

Must be unique within the organization.

The name must be between 1 and 62 alphanumeric characters, allowing special characters :-_.

organization

string

The name of the Organization this resource is assigned to.

Policies created within a Custom Organization are applicable only to devices in the same Organization.

Use ‘default’ for the default organization.

Default: "default"

plogi_retries

integer

The number of times that the system tries to log in to a port after the first failure.

Default: 8

plogi_timeout

integer

The number of milliseconds that the system waits before it tries to log in again.

Default: 20000

port_down_io_retry_count

integer

The number of times an I/O request to a port is retried because the port is busy.

After this count, the system decides the port is unavailable.

Default: 8

port_down_timeout

integer

The number of milliseconds a remote Fibre Channel port should be offline before informing the SCSI upper layer.

This determines when the port is considered unavailable.

For a server with a VIC adapter running ESXi, the recommended value is 10000.

For a server with a port used to boot a Windows OS from the SAN, the recommended value is 5000 milliseconds.

Default: 10000

resource_allocation_timeout

integer

Resource Allocation Timeout, also referred to as RATOV, is the number of milliseconds to wait.

This is the time before the system assumes that a resource cannot be properly allocated.

Default: 10000

rx_ring_size

integer

The number of descriptors in each receive queue.

The maximum value for Receive queue is 2048.

Default: 64

scsi_io_queue_count

integer

The number of SCSI I/O queue resources the system should allocate.

Default: 1

scsi_io_ring_size

integer

The number of descriptors in each SCSI I/O queue.

Default: 512

state

string

If present, will verify the resource is present and will create if needed.

If absent, will verify the resource is absent and will delete if needed.

Choices:

  • "present" ← (default)

  • "absent"

tags

list / elements=dictionary

List of tags in Key:<user-defined key> Value:<user-defined value> format.

tx_ring_size

integer

The number of descriptors in each transmit queue.

The maximum value for Transmit queue is 128.

Default: 64

use_proxy

boolean

If no, it will not use a proxy, even if one is defined in an environment variable on the target hosts.

Choices:

  • false

  • true ← (default)

validate_certs

boolean

Boolean control for verifying the api_uri TLS certificate

Choices:

  • false

  • true ← (default)

Examples

- name: Create Fibre Channel Adapter Policy with default settings
  cisco.intersight.intersight_fibre_channel_adapter_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "fc-adapter-default"
    description: "Fibre Channel Adapter policy with default values"
    state: present

- name: Create Fibre Channel Adapter Policy with custom error recovery settings
  cisco.intersight.intersight_fibre_channel_adapter_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "fc-adapter-error-recovery"
    description: "FC Adapter policy with error recovery enabled"
    error_recovery_enabled: true
    port_down_timeout: 5000
    io_retry_timeout: 8
    link_down_timeout: 20000
    port_down_io_retry_count: 10
    tags:
      - Key: Environment
        Value: Production
    state: present

- name: Create Fibre Channel Adapter Policy with custom queue settings
  cisco.intersight.intersight_fibre_channel_adapter_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "fc-adapter-high-performance"
    description: "FC Adapter policy with optimized queue settings"
    io_throttle_count: 1024
    lun_count: 4096
    lun_queue_depth: 254
    rx_ring_size: 128
    tx_ring_size: 128
    scsi_io_queue_count: 8
    scsi_io_ring_size: 512
    state: present

- name: Create Fibre Channel Adapter Policy with custom timeout settings
  cisco.intersight.intersight_fibre_channel_adapter_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "Engineering"
    name: "fc-adapter-custom-timeouts"
    description: "FC Adapter policy with custom timeout values"
    error_detection_timeout: 5000
    resource_allocation_timeout: 15000
    flogi_retries: 12
    flogi_timeout: 8000
    plogi_retries: 12
    plogi_timeout: 30000
    state: present

- name: Create Fibre Channel Adapter Policy with MSI interrupt mode
  cisco.intersight.intersight_fibre_channel_adapter_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "fc-adapter-msi-mode"
    description: "FC Adapter policy with MSI interrupt mode"
    interrupt_mode: MSI
    state: present

- name: Update Fibre Channel Adapter Policy description
  cisco.intersight.intersight_fibre_channel_adapter_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "fc-adapter-default"
    description: "Updated FC Adapter policy description"
    state: present

- name: Delete Fibre Channel Adapter Policy
  cisco.intersight.intersight_fibre_channel_adapter_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "fc-adapter-default"
    state: absent

Return Values

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

Key

Description

api_response

dictionary

The API response output returned by the specified resource.

Returned: always

Sample: {"api_response": {"Description": "Fibre Channel Adapter policy with default values", "ErrorDetectionTimeout": 2000, "ErrorRecoverySettings": {"Enabled": false, "IoRetryCount": 8, "IoRetryTimeout": 5, "LinkDownTimeout": 30000, "PortDownTimeout": 10000}, "FlogiSettings": {"Retries": 8, "Timeout": 4000}, "InterruptSettings": {"Mode": "MSIx"}, "IoThrottleCount": 512, "LunCount": 1024, "LunQueueDepth": 20, "Moid": "1234567890abcdef12345678", "Name": "fc-adapter-default", "ObjectType": "vnic.FcAdapterPolicy", "Organization": {"Moid": "abcdef1234567890abcdef12", "ObjectType": "organization.Organization"}, "PlogiSettings": {"Retries": 8, "Timeout": 20000}, "ResourceAllocationTimeout": 10000, "RxQueueSettings": {"RingSize": 64}, "ScsiQueueSettings": {"Count": 1, "RingSize": 512}, "Tags": [{"Key": "Environment", "Value": "Production"}], "TxQueueSettings": {"RingSize": 64}}}

Authors

  • Ron Gershburg (@rgershbu)