cisco.intersight.intersight_ethernet_qos_policy module – Ethernet QoS Policy configuration for Cisco Intersight

Note

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

Synopsis

  • Manages Ethernet QoS Policy configuration on Cisco Intersight.

  • A policy to configure Quality of Service settings for Ethernet virtual interfaces on Cisco Intersight managed servers.

  • 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"

burst

integer

The burst traffic, in bytes, allowed on the vNIC.

The range is between 1 to 1000000.

Default: 10240

cos

integer

Class of Service to be associated to the traffic on the virtual interface.

The acceptable range is 0-6.

Default: 0

description

aliases: descr

string

The user-defined description for the Ethernet QoS Policy.

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

mtu

integer

The Maximum Transmission Unit (MTU) or packet size that the virtual interface accepts.

The acceptable range is 1500-9000.

Default: 1500

name

string / required

The name assigned to the Ethernet QoS Policy.

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.

Profiles, Policies, and Pools that are created within a Custom Organization are applicable only to devices in the same Organization.

Default: "default"

priority

string

The priority matching the System QoS specified in the fabric profile.

Choices:

  • "Best Effort" ← (default)

  • "FC"

  • "Platinum"

  • "Gold"

  • "Silver"

  • "Bronze"

rate_limit

integer

The value in Mbps (0-10G/40G/100G depending on Adapter Model) to use for limiting the data rate on the virtual interface.

The range is between 0 and 100000.

Default: 0

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.

trust_host_cos

boolean

Enables usage of the Class of Service provided by the operating system.

Choices:

  • false ← (default)

  • true

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 an Ethernet QoS Policy with default settings
  cisco.intersight.intersight_ethernet_qos_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "default-qos-policy"
    description: "Default Ethernet QoS policy"
    state: present

- name: Create an Ethernet QoS Policy with Platinum priority and trust host CoS
  cisco.intersight.intersight_ethernet_qos_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: "default"
    name: "platinum-qos-policy"
    description: "High priority Ethernet QoS policy"
    tags:
      - Key: "Environment"
        Value: "Production"
    mtu: 9000
    cos: 5
    priority: "Platinum"
    trust_host_cos: true
    rate_limit: 10000
    burst: 100000
    state: present

- name: Create an Ethernet QoS Policy with custom settings
  cisco.intersight.intersight_ethernet_qos_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: "custom-qos-policy"
    description: "Custom Ethernet QoS policy for specific workload"
    mtu: 1500
    cos: 3
    priority: "Gold"
    trust_host_cos: false
    rate_limit: 5000
    burst: 50000
    state: present

- name: Delete an Ethernet QoS Policy
  cisco.intersight.intersight_ethernet_qos_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    name: "custom-qos-policy"
    state: absent

Return Values

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

Key

Description

api_repsonse

dictionary

The API response output returned by the specified resource.

Returned: always

Sample: {"api_response": {"Burst": 100000, "Cos": 5, "Mtu": 9000, "Name": "platinum-qos-policy", "ObjectType": "vnic.EthQosPolicy", "Priority": "Platinum", "RateLimit": 10000, "Tags": [{"Key": "Environment", "Value": "Production"}], "TrustHostCos": true}}

Authors

  • Ron Gershburg (@rgershbu)