community.general.pn_cpu_class (0.1.1) — module

CLI command to create/modify/delete cpu-class

Authors: Pluribus Networks (@rajaspachipulusu17)

preview | supported by community

Install collection

Install with ansible-galaxy collection install community.general:==0.1.1


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

This module can be used to create, modify and delete CPU class information.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create cpu class
  pn_cpu_class:
    pn_cliswitch: 'sw01'
    state: 'present'
    pn_name: 'icmp'
    pn_rate_limit: '1000'
    pn_scope: 'local'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: delete cpu class
  pn_cpu_class:
    pn_cliswitch: 'sw01'
    state: 'absent'
    pn_name: 'icmp'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

- name: modify cpu class
  pn_cpu_class:
    pn_cliswitch: 'sw01'
    state: 'update'
    pn_name: 'icmp'
    pn_rate_limit: '2000'

Inputs

    
state:
    choices:
    - present
    - absent
    - update
    description:
    - State the action to perform. Use C(present) to create cpu-class and C(absent) to
      delete cpu-class C(update) to modify the cpu-class.
    required: true
    type: str

pn_name:
    description:
    - name for the CPU class.
    required: false
    type: str

pn_scope:
    choices:
    - local
    - fabric
    description:
    - scope for CPU class.
    required: false

pn_cliswitch:
    description:
    - Target switch to run the CLI on.
    required: false
    type: str

pn_rate_limit:
    description:
    - rate-limit for CPU class.
    required: false
    type: str

pn_hog_protect:
    choices:
    - disable
    - enable
    - enable-and-drop
    description:
    - enable host-based hog protection.
    required: false
    type: str

Outputs

changed:
  description: indicates whether the CLI caused changes on the target.
  returned: always
  type: bool
command:
  description: the CLI command run on the target node.
  returned: always
  type: str
stderr:
  description: set of error responses from the cpu-class command.
  returned: on error
  type: list
stdout:
  description: set of responses from the cpu-class command.
  returned: always
  type: list