community.network.ce_netstream_export 模块 – 管理 HUAWEI CloudEngine 交换机上的 NetStream 导出。
注意
此模块是 community.network 集合 (版本 5.1.0) 的一部分。
如果您使用的是 ansible 包,则可能已安装此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install community.network。
要在剧本中使用它,请指定: community.network.ce_netstream_export。
注意
community.network 集合已被弃用,并将从 Ansible 12 中移除。有关更多信息,请参阅 讨论主题。
已弃用
- 在以下版本中移除:
- 版本 6.0.0 
- 原因:
- 此集合及其中的所有内容均未维护且已弃用。 
- 替代方案:
- 未知。 
概要
- 配置 HUAWEI CloudEngine 交换机上 NetStream 流统计信息的导出和导出数据包的版本。 
别名:network.cloudengine.ce_netstream_export
参数
| 参数 | 注释 | 
|---|---|
| 指定统计信息中记录的 AS 号码是原始 AS 号码还是对等 AS 号码。 选项 
 | |
| 配置统计信息以携带 BGP 下一跳信息。目前,只有 V9 支持导出数据包携带 BGP 下一跳信息。 选项 
 | |
| 指定导出的 NetStream 数据包的 IPv6 或 IPv4 目的地址。 | |
| 指定导出数据包的目标 UDP 端口号。值是一个介于 1 到 65535 之间的整数。 | |
| 指定携带流量统计信息的导出数据包的 VPN 实例。确保已在设备上创建 VPN 实例。 | |
| 指定导出的 NetStream 数据包的 IPv6 或 IPv4 源地址。 | |
| 管理资源的状态。 选项 
 | |
| 指定 NetStream 功能。 选项 
 | |
| 设置导出数据包的版本。 选项 
 | 
备注
注意
- 推荐连接是 - network_cli。
- 此模块也适用于旧版剧本的 - local连接。
示例
- name: Netstream export module test
  hosts: cloudengine
  connection: local
  gather_facts: false
  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.
    community.network.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.
    community.network.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.
    community.network.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.
    community.network.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.
    community.network.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.
    community.network.ce_netstream_export:
      type: vxlan
      version: 9
      provider: "{{ cli }}"
返回值
常见的返回值已在此处 记录,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| 检查设备上是否进行了更改 返回:始终 示例:  | |
| 设备上最终属性的键值对 返回:始终 示例:  | |
| 设备上现有属性的键值对 返回:始终 示例:  | |
| 传递到模块的参数的键值对 返回:始终 示例:  | |
| 发送到设备的命令列表 返回:始终 示例:  | 
状态
- 此模块将在6.0.0版本中移除。[已弃用] 
- 更多信息请参见 已弃用。 
