ce_info_center_trap - Manages information center trap configuration on HUAWEI CloudEngine switches.

New in version 2.4.

Synopsis

Parameters

Parameter Choices/Defaults Comments
channel_id
Number of a channel. The value is an integer ranging from 0 to 9. The default value is 0.
module_name
Module name of the rule. The value is a string of 1 to 31 case-insensitive characters. The default value is default. Please use lower-case letter, such as [aaa, acl, arp, bfd].
state
    Choices:
  • present ←
  • absent
Specify desired state of the resource.
trap_buff_enable
    Choices:
  • no_use ←
  • true
  • false
Whether a trap buffer is enabled to output information.
trap_buff_size
Size of a trap buffer. The value is an integer ranging from 0 to 1024. The default value is 256.
trap_enable
    Choices:
  • no_use ←
  • true
  • false
Whether a device is enabled to output alarms.
trap_level
    Choices:
  • emergencies
  • alert
  • critical
  • error
  • warning
  • notification
  • informational
  • debugging
Trap level permitted to output.
trap_time_stamp
    Choices:
  • date_boot
  • date_second
  • date_tenthsecond
  • date_millisecond
  • shortdate_second
  • shortdate_tenthsecond
  • shortdate_millisecond
  • formatdate_second
  • formatdate_tenthsecond
  • formatdate_millisecond
Timestamp format of alarm information.

Examples

- name: CloudEngine info center trap test
  hosts: cloudengine
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli

  tasks:

  - name: "Config trap buffer"
    ce_info_center_trap:
      state: present
      trap_buff_enable: true
      trap_buff_size: 768
      provider: "{{ cli }}"

  - name: "Undo trap buffer"
    ce_info_center_trap:
      state: absent
      trap_buff_enable: true
      trap_buff_size: 768
      provider: "{{ cli }}"

  - name: "Config trap module log level"
    ce_info_center_trap:
      state: present
      module_name: aaa
      channel_id: 1
      trap_enable: true
      trap_level: error
      provider: "{{ cli }}"

  - name: "Undo trap module log level"
    ce_info_center_trap:
      state: absent
      module_name: aaa
      channel_id: 1
      trap_enable: true
      trap_level: error
      provider: "{{ cli }}"

Return Values

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

Key Returned Description
changed
boolean
always
check to see if a change was made on the device

Sample:
True
end_state
dict
always
k/v pairs of aaa params after module execution

Sample:
{'trapBuffSize': '768', 'icTrapBuffEn': 'true'}
existing
dict
always
k/v pairs of existing aaa server

Sample:
{'trapBuffSize': '256', 'icTrapBuffEn': 'false'}
proposed
dict
always
k/v pairs of parameters passed into module

Sample:
{'state': 'present', 'trap_buff_size': '768', 'trap_buff_enable': 'true'}
updates
list
always
command sent to the device

Sample:
['info-center trapbuffer', 'info-center trapbuffer size 768']


Status

This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.

Maintenance

This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.

For a list of other modules that are also maintained by the Ansible Community, see here.

Author

  • wangdezhuang (@CloudEngine-Ansible)

Hint

If you notice any issues in this documentation you can edit this document to improve it.