community.network.exos_lldp_interfaces 模块 – 管理 EXOS 平台接口上的链路层发现协议 (LLDP) 属性。
注意
此模块是 community.network 集合 (版本 5.1.0) 的一部分。
如果您使用的是 ansible
包,则可能已安装此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install community.network
。
要在剧本中使用它,请指定: community.network.exos_lldp_interfaces
。
注意
community.network 集合已被弃用,并将从 Ansible 12 中删除。有关更多信息,请参阅 讨论主题。
community.network 0.2.0 中的新增功能
已弃用
- 在以下版本中移除:
6.0.0 版本
- 原因:
此集合及其中的所有内容均未维护且已弃用。
- 替代方案:
未知。
摘要
此模块管理 Extreme Networks EXOS 平台接口上的链路层发现协议 (LLDP) 属性。
别名:network.exos.exos_lldp_interfaces
参数
参数 |
注释 |
---|---|
链路层发现协议接口属性配置列表 |
|
这是一个布尔值,用于控制在接口 选项
|
|
需要在其上配置 LLDP 的接口名称。 |
|
配置应保留的状态。 选项
|
示例
# Using merged
# Before state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "5"
# }
# }
# ]
# }
# }
- name: Merge provided configuration with device configuration
community.network.exos_lldp_interfaces:
config:
- name: '2'
enabled: false
- name: '5'
enabled: true
state: merged
# Module Execution Results:
# -------------------------
#
# "before":
# - name: '1'
# enabled: true
# - name: '2'
# enabled: true
# - name: '3'
# enabled: false
# - name: '4'
# enabled: true
# - name: '5'
# enabled: false
#
# "requests": [
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": false,
# "name": "2"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=2/config"
# },
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "5"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=5/config"
# }
# ]
#
# "after":
# - name: '1'
# enabled: true
# - name: '2'
# enabled: false
# - name: '3'
# enabled: false
# - name: '4'
# enabled: true
# - name: '5'
# enabled: true
# After state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "5"
# }
# }
# ]
# }
# }
# Using replaced
# Before state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "5"
# }
# }
# ]
# }
# }
- name: Replaces device configuration of listed lldp_interfaces with provided configuration
community.network.exos_lldp_interfaces:
config:
- name: '1'
enabled: false
- name: '3'
enabled: true
state: merged
# Module Execution Results:
# -------------------------
#
# "before":
# - name: '1'
# enabled: true
# - name: '2'
# enabled: true
# - name: '3'
# enabled: false
# - name: '4'
# enabled: true
# - name: '5'
# enabled: false
#
# "requests": [
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": false,
# "name": "1"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=1/config"
# },
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "3"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=3/config"
# }
# ]
#
# "after":
# - name: '1'
# enabled: false
# - name: '2'
# enabled: true
# - name: '3'
# enabled: true
# - name: '4'
# enabled: true
# - name: '5'
# enabled: false
# After state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": false,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "5"
# }
# }
# ]
# }
# }
# Using deleted
# Before state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": false,
# "name": "1"
# },
# },
# {
# "config": {
# "enabled": false,
# "name": "2"
# },
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# },
# }
# ]
# }
# }
- name: Delete lldp interface configuration (this will not delete other lldp configuration)
community.network.exos_lldp_interfaces:
config:
- name: '1'
- name: '3'
state: deleted
# Module Execution Results:
# -------------------------
#
# "before":
# - name: '1'
# enabled: false
# - name: '2'
# enabled: false
# - name: '3'
# enabled: false
#
# "requests": [
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "1"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=1/config"
# },
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "3"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=3/config"
# }
# ]
#
# "after":
# - name: '1'
# enabled: true
# - name: '2'
# enabled: false
# - name: '3'
# enabled: true
#
# After state:
# -------------
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# },
# },
# {
# "config": {
# "enabled": false,
# "name": "2"
# },
# },
# {
# "config": {
# "enabled": true,
# "name": "3"
# },
# }
# ]
# }
# }
# Using overridden
# Before state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": false,
# "name": "5"
# }
# }
# ]
# }
# }
- name: Override device configuration of all lldp_interfaces with provided configuration
community.network.exos_lldp_interfaces:
config:
- name: '3'
enabled: true
state: overridden
# Module Execution Results:
# -------------------------
#
# "before":
# - name: '1'
# enabled: true
# - name: '2'
# enabled: true
# - name: '3'
# enabled: false
# - name: '4'
# enabled: true
# - name: '5'
# enabled: false
#
# "requests": [
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "5"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=5/config"
# },
# {
# "data": |
# {
# "openconfig-lldp:config": {
# "enabled": true,
# "name": "3"
# }
# }
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig-lldp:lldp/interfaces/interface=3/config"
# }
# ]
#
# "after":
# - name: '1'
# enabled: true
# - name: '2'
# enabled: true
# - name: '3'
# enabled: true
# - name: '4'
# enabled: true
# - name: '5'
# enabled: true
# After state:
# -------------
#
# path: /rest/restconf/data/openconfig-lldp:lldp/interfaces?depth=4
# method: GET
# data:
# {
# "openconfig-lldp:interfaces": {
# "interface": [
# {
# "config": {
# "enabled": true,
# "name": "1"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "2"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "3"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "4"
# }
# },
# {
# "config": {
# "enabled": true,
# "name": "5"
# }
# }
# ]
# }
# }
返回值
常见返回值在此处记录,以下是此模块特有的字段
键 |
描述 |
---|---|
生成的配置模型调用。 返回:发生更改时 示例: |
|
模型调用之前的配置。 返回:始终返回 示例: |
|
推送到远程设备的请求集。 返回:始终返回 示例: |
状态
此模块将在 6.0.0 版本中删除。* [已弃用]*
有关更多信息,请参阅 已弃用。