community.general.ce_netstream_template (0.1.1) — module

Manages NetStream template configuration on HUAWEI CloudEngine switches.

Authors: wangdezhuang (@QijunPan)

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

Manages NetStream template configuration on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: netstream template module 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 ipv4 netstream record
    ce_netstream_template:
      state: present
      type: ip
      record_name: test
      provider: "{{ cli }}"
  - name: Undo ipv4 netstream record
    ce_netstream_template:
      state: absent
      type: ip
      record_name: test
      provider: "{{ cli }}"
  - name: Config ipv4 netstream record collect_counter
    ce_netstream_template:
      state: present
      type: ip
      record_name: test
      collect_counter: bytes
      provider: "{{ cli }}"
  - name: Undo ipv4 netstream record collect_counter
    ce_netstream_template:
      state: absent
      type: ip
      record_name: test
      collect_counter: bytes
      provider: "{{ cli }}"

Inputs

    
type:
    choices:
    - ip
    - vxlan
    description:
    - Configure the type of netstream record.
    required: true

match:
    choices:
    - destination-address
    - destination-port
    - tos
    - protocol
    - source-address
    - source-port
    description:
    - Configure flexible flow statistics template keywords.

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Specify desired state of the resource.

description:
    description:
    - Configure the description of netstream record. The value is a string of 1 to 80
      case-insensitive characters.

record_name:
    description:
    - Configure the name of netstream record. The value is a string of 1 to 32 case-insensitive
      characters.

collect_counter:
    choices:
    - bytes
    - packets
    description:
    - Configure the number of packets and bytes that are included in the flexible flow
      statistics sent to NSC.

collect_interface:
    choices:
    - input
    - output
    description:
    - Configure the input or output interface that are included in the flexible flow statistics
      sent to NSC.

Outputs

changed:
  description: check to see if a change was made on the device
  returned: always
  sample: true
  type: bool
end_state:
  description: k/v pairs of aaa params after module execution
  returned: always
  sample:
    record_name: test
    type: ip
  type: dict
existing:
  description: k/v pairs of existing aaa server
  returned: always
  sample: {}
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    record_name: test
    state: present
    type: ip
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - netstream record test ip
  type: list