community.network.ce_netstream_global 模块 – 管理华为CloudEngine交换机上NetStream的全局参数。

注意

此模块是 community.network 集合 (版本 5.1.0) 的一部分。

如果您使用的是 ansible 包,则可能已安装此集合。它不包含在 ansible-core 中。要检查它是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用: ansible-galaxy collection install community.network

要在 playbook 中使用它,请指定: community.network.ce_netstream_global

注意

community.network 集合已弃用,并将从 Ansible 12 中删除。有关更多信息,请参阅 讨论主题

已弃用

在以下版本中移除:

6.0.0 版本

原因:

此集合及其中的所有内容均未维护且已弃用。

替代方案:

未知。

概要

  • 管理华为CloudEngine交换机上NetStream的全局参数。

别名:network.cloudengine.ce_netstream_global

参数

参数

注释

index_switch

字符串

指定 netstream index-switch。

选项

  • "16" ← (默认)

  • "32"

interface

字符串 / 必需

Netstream 全局接口。

sampler_direction

字符串

指定 netstream 采样方向。

选项

  • "inbound"

  • "outbound"

sampler_interval

字符串

指定 netstream 采样间隔,长度为 1 - 65535。

state

字符串

指定所需资源状态。

选项

  • "present" ← (默认)

  • "absent"

statistics_direction

字符串

指定 netstream 统计方向。

选项

  • "inbound"

  • "outbound"

statistics_record

字符串

指定灵活的 netstream 统计记录,长度为 1 - 32。

type

字符串

指定 netstream 全局的类型。

选项

  • "ip" ← (默认)

  • "vxlan"

备注

注意

  • 推荐连接方式为 network_cli

  • 此模块也适用于旧版 playbook 的 local 连接。

示例

- name: Netstream global module test
  hosts: cloudengine
  connection: local
  gather_facts: false

  tasks:

  - name: Configure a netstream sampler at interface 10ge1/0/2, direction is outbound,interval is 30.
    community.network.ce_netstream_global:
      interface: 10ge1/0/2
      type: ip
      sampler_interval: 30
      sampler_direction: outbound
      state: present
  - name: Configure a netstream flexible statistic at interface 10ge1/0/2, record is test1, type is ip.
    community.network.ce_netstream_global:
      type: ip
      interface: 10ge1/0/2
      statistics_record: test1
  - name: Set the vxlan index-switch to 32.
    community.network.ce_netstream_global:
      type: vxlan
      interface: all
      index_switch: 32

返回值

常见的返回值已在 此处 记录,以下是此模块特有的字段

描述

changed

布尔值

检查设备上是否进行了更改

返回:始终

示例: true

end_state

字典

模块执行后配置的键值对

返回:详细模式

示例: {"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"}]}

existing

字典

现有配置的键值对

返回:详细模式

示例: {"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"]}

建议

字典

传递给模块的参数的键值对

返回:详细模式

示例: {"index_switch": "16", "interface": "10ge1/0/2", "state": "present", "statistics_record": "test", "type": "vxlan"}

更新

列表 / 元素=字符串

发送到设备的命令

返回:始终

示例: ["interface 10ge1/0/2", "netstream record test vxlan inner-ip"]

状态

  • 此模块将在6.0.0版中移除。[已弃用]

  • 更多信息请参见 已弃用

作者

  • 杨杨 (@QijunPan)