cisco.intersight.intersight_system_qos_policy module – System 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_system_qos_policy.

Synopsis

  • System QoS policy configuration for Cisco Intersight.

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

classes

list / elements=dictionary

List of QoS classes configured in the policy.

System includes predefined classes (Bronze, Silver, Gold, Platinum, Best Effort, FC).

Best Effort and FC classes are always enabled and have restrictions on modifiable parameters.

admin_state

string

Administrative state of the QoS class.

Best Effort and FC classes are always enabled.

Bronze, Silver, Gold, and Platinum classes are disabled by default when not specified.

If not specified, appropriate class defaults will be applied automatically.

Choices:

  • "Enabled"

  • "Disabled"

cos

integer

Class of service received by the traffic tagged with this QoS.

Valid range is 0-6.

FC class defaults to 3.

Bronze defaults to 1, Silver to 2, Gold to 4, Platinum to 5.

If not specified, appropriate class defaults will be applied automatically.

mtu

integer

Maximum transmission unit (MTU) is the largest size packet or frame, that can be sent in a packet- or frame-based network such as the Internet.

Valid range is 1500-9216.

Normal (default) maps to 1500, FC maps to 2240

FC class defaults to 2240, others default to 1500.

If not specified, appropriate class defaults will be applied automatically.

name

string / required

Name of the QoS class.

Valid class names are Bronze, Silver, Gold, Platinum, Best Effort, FC.

Choices:

  • "Bronze"

  • "Silver"

  • "Gold"

  • "Platinum"

  • "Best Effort"

  • "FC"

packet_drop

boolean

If enabled, this QoS class will allow packet drops within an acceptable limit.

FC class defaults to false (no packet drop).

All other classes default to true (packet drop enabled).

If not specified, appropriate class defaults will be applied automatically.

Choices:

  • false

  • true

weight

integer

The weight of the QoS Class controls the distribution of bandwidth between QoS Classes.

Valid range is 0-10.

Bronze defaults to 7, Silver to 8, Gold to 9, Platinum to 10, Best Effort and FC to 5.

If not specified, appropriate class defaults will be applied automatically.

description

aliases: descr

string

The user-defined description of the System QoS policy.

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

name

string / required

The name assigned to the System 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 and Policies that are created within a Custom Organization are applicable only to devices in the same Organization.

Default: "default"

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.

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: Configure System QoS Policy with default classes
  cisco.intersight.intersight_system_qos_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: DevNet
    name: lab-system-qos
    description: System QoS policy for lab use
    tags:
      - Key: Site
        Value: RCDN
    classes:
      - name: Bronze
        admin_state: Enabled
        weight: 7
      - name: Silver
        admin_state: Enabled
        weight: 8
      - name: Gold
        admin_state: Enabled
        weight: 9
      - name: Platinum
        admin_state: Enabled
        weight: 10
      - name: 'Best Effort'
        weight: 5
      - name: FC
        weight: 5

- name: Configure System QoS Policy with custom settings
  cisco.intersight.intersight_system_qos_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: DevNet
    name: custom-system-qos
    description: Custom System QoS policy
    classes:
      - name: Bronze
        admin_state: Enabled
        cos: 1
        mtu: 1500
        packet_drop: true
        weight: 7
      - name: Gold
        admin_state: Enabled
        cos: 4
        mtu: 1500
        packet_drop: true
        weight: 9
      - name: 'Best Effort'
        mtu: 1500
        weight: 6
      - name: FC
        weight: 8

- name: Delete System QoS Policy
  cisco.intersight.intersight_system_qos_policy:
    api_private_key: "{{ api_private_key }}"
    api_key_id: "{{ api_key_id }}"
    organization: DevNet
    name: lab-system-qos
    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: {"Classes": [{"AdminState": "Enabled", "Cos": 1, "Mtu": 1500, "MulticastOptimize": false, "Name": "Bronze", "PacketDrop": true, "Weight": 7}], "Description": "System QoS policy for lab use", "Name": "lab-system-qos", "Organization": {"Moid": "675450ee69726530014753e2", "ObjectType": "organization.Organization"}}

Authors

  • Ron Gershburg (@rgershbu)