community.general.ce_netstream_global (0.1.1) — module

Manages global parameters of NetStream on HUAWEI CloudEngine switches.

Authors: YangYang (@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 global parameters of NetStream on HUAWEI CloudEngine switches.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: netstream global 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: Configure a netstream sampler at interface 10ge1/0/2, direction is outbound,interval is 30.
    ce_netstream_global:
      interface: 10ge1/0/2
      type: ip
      sampler_interval: 30
      sampler_direction: outbound
      state: present
      provider: "{{ cli }}"
  - name: Configure a netstream flexible statistic at interface 10ge1/0/2, record is test1, type is ip.
    ce_netstream_global:
      type: ip
      interface: 10ge1/0/2
      statistics_record: test1
      provider: "{{ cli }}"
  - name: Set the vxlan index-switch to 32.
    ce_netstream_global:
      type: vxlan
      interface: all
      index_switch: 32
      provider: "{{ cli }}"

Inputs

    
type:
    choices:
    - ip
    - vxlan
    default: ip
    description:
    - Specifies the type of netstream global.

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

interface:
    description:
    - Netstream global interface.
    required: true

index_switch:
    choices:
    - '16'
    - '32'
    default: '16'
    description:
    - Specifies the netstream index-switch.

sampler_interval:
    description:
    - Specifies the netstream sampler interval, length is 1 - 65535.

sampler_direction:
    choices:
    - inbound
    - outbound
    description:
    - Specifies the netstream sampler direction.

statistics_record:
    description:
    - Specifies the flexible netstream statistic record, length is 1 - 32.

statistics_direction:
    choices:
    - inbound
    - outbound
    description:
    - Specifies the netstream statistic direction.

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 configuration after module execution
  returned: verbose mode
  sample:
    flexible_statistic:
    - interface: 10ge1/0/2
      statistics_record: []
      type: ip
    - interface: 10ge1/0/2
      statistics_record:
      - test
      type: vxlan
    index-switch:
    - index-switch: '16'
      type: ip
    - index-switch: '16'
      type: vxlan
    sampler:
    - interface: all
      sampler_direction: 'null'
      sampler_interval: 'null'
    statistic:
    - interface: 10ge1/0/2
      statistics_direction: []
      type: 'null'
  type: dict
existing:
  description: k/v pairs of existing configuration
  returned: verbose mode
  sample:
    flexible_statistic:
    - interface: 10ge1/0/2
      statistics_record: []
      type: ip
    - interface: 10ge1/0/2
      statistics_record: []
      type: vxlan
    index-switch:
    - index-switch: '16'
      type: ip
    - index-switch: '16'
      type: vxlan
    ip_record:
    - test
    - test1
    sampler:
    - interface: all
      sampler_direction: 'null'
      sampler_interval: 'null'
    statistic:
    - interface: 10ge1/0/2
      statistics_direction: []
      type: 'null'
    vxlan_record:
    - test
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: verbose mode
  sample:
    index_switch: '16'
    interface: 10ge1/0/2
    state: present
    statistics_record: test
    type: vxlan
  type: dict
updates:
  description: commands sent to the device
  returned: always
  sample:
  - interface 10ge1/0/2
  - netstream record test vxlan inner-ip
  type: list