ansible / ansible.builtin / v2.8.18 / module / ce_netstream_export Manages netstream export on HUAWEI CloudEngine switches. | "added in version" 2.4 of ansible.builtin" Authors: Zhijin Zhou (@QijunPan) preview | supported by communityansible.builtin.ce_netstream_export (v2.8.18) — module
pip
Install with pip install ansible==2.8.18
Configure NetStream flow statistics exporting and versions for exported packets on HUAWEI CloudEngine switches.
- name: netstream export 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: Configures the source address for the exported packets carrying IPv4 flow statistics. ce_netstream_export: type: ip source_ip: 192.8.2.2 provider: "{{ cli }}" - name: Configures the source IP address for the exported packets carrying VXLAN flexible flow statistics. ce_netstream_export: type: vxlan source_ip: 192.8.2.3 provider: "{{ cli }}" - name: Configures the destination IP address and destination UDP port number for the exported packets carrying IPv4 flow statistics. ce_netstream_export: type: ip host_ip: 192.8.2.4 host_port: 25 host_vpn: test provider: "{{ cli }}" - name: Configures the destination IP address and destination UDP port number for the exported packets carrying VXLAN flexible flow statistics. ce_netstream_export: type: vxlan host_ip: 192.8.2.5 host_port: 26 host_vpn: test provider: "{{ cli }}" - name: Configures the version number of the exported packets carrying IPv4 flow statistics. ce_netstream_export: type: ip version: 9 as_option: origin bgp_nexthop: enable provider: "{{ cli }}" - name: Configures the version for the exported packets carrying VXLAN flexible flow statistics. ce_netstream_export: type: vxlan version: 9 provider: "{{ cli }}"
type: choices: - ip - vxlan description: - Specifies NetStream feature. required: true state: choices: - present - absent default: present description: - Manage the state of the resource. host_ip: description: - Specifies destination address which can be IPv6 or IPv4 of the exported NetStream packet. version: choices: - '5' - '9' description: - Sets the version of exported packets. host_vpn: description: - Specifies the VPN instance of the exported packets carrying flow statistics. Ensure the VPN instance has been created on the device. as_option: choices: - origin - peer description: - Specifies the AS number recorded in the statistics as the original or the peer AS number. host_port: description: - Specifies the destination UDP port number of the exported packets. The value is an integer that ranges from 1 to 65535. source_ip: description: - Specifies source address which can be IPv6 or IPv4 of the exported NetStream packet. bgp_nexthop: choices: - enable - disable default: disable description: - Configures the statistics to carry BGP next hop information. Currently, only V9 supports the exported packets carrying BGP next hop information.
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 end attributes on the device returned: always sample: as_option: origin bgp_nexthop: enable host_ip: 192.8.5.6 host_port: '26' host_vpn: test source_ip: 192.8.2.5 type: ip version: '9' type: dict existing: description: k/v pairs of existing attributes on the device returned: always sample: as_option: null bgp_nexthop: disable host_ip: null host_port: null host_vpn: null source_ip: null type: ip version: null type: dict proposed: description: k/v pairs of parameters passed into module returned: always sample: as_option: origin bgp_nexthop: enable host_ip: 192.8.5.6 host_port: '26' host_vpn: test source_ip: 192.8.2.5 state: present type: ip version: '9' type: dict updates: description: command list sent to the device returned: always sample: - netstream export ip source 192.8.2.5 - netstream export ip host 192.8.5.6 26 vpn-instance test - netstream export ip version 9 origin-as bgp-nexthop type: list