community.network.exos_lldp_global 模块 – 在 EXOS 平台上配置和管理链路层发现协议 (LLDP) 属性。
注意
此模块是 community.network 集合 (版本 5.1.0) 的一部分。
如果您使用的是 ansible
包,则可能已经安装了此集合。它不包含在 ansible-core
中。要检查它是否已安装,请运行 ansible-galaxy collection list
。
要安装它,请使用: ansible-galaxy collection install community.network
。
要在剧本中使用它,请指定: community.network.exos_lldp_global
。
注意
community.network 集合已弃用,并将从 Ansible 12 中删除。有关更多信息,请参阅 讨论主题。
已弃用
- 在以下版本中移除:
6.0.0 版本
- 原因:
此集合及其中的所有内容均未维护且已弃用。
- 替代方案:
未知。
概要
此模块配置和管理 Extreme Networks EXOS 平台上的链路层发现协议 (LLDP) 属性。
别名:network.exos.exos_lldp_global
参数
参数 |
注释 |
---|---|
LLDP 选项的字典 |
|
发送 LLDP 通告的频率(以秒为单位)。默认为 30 秒。 默认值: |
|
此属性可用于指定需要在 LLDP 数据包中发送的 TLV。默认情况下,只发送系统名称和系统描述 |
|
用于在 TLV 消息中指定管理地址 选项
|
|
用于指定端口描述 TLV 选项
|
|
用于指定系统功能 TLV 选项
|
|
用于指定系统描述 TLV 选项
|
|
用于指定系统名称 TLV 选项
|
|
模块完成后的配置状态。 选项
|
备注
注意
在 x460g2 上针对 Extreme Networks EXOS 30.2.1.8 版本进行了测试。
此模块与连接
httpapi
一起使用。请参阅 EXOS 平台选项
示例
# Using merged
# Before state:
# -------------
# path: /rest/restconf/data/openconfig_lldp:lldp/config
# method: GET
# data:
# {
# "openconfig_lldp:config": {
# "enabled": true,
# "hello-timer": 30,
# "suppress-tlv-advertisement": [
# "PORT_DESCRIPTION",
# "SYSTEM_CAPABILITIES",
# "MANAGEMENT_ADDRESS"
# ],
# "system-description": "ExtremeXOS (X460G2-24t-10G4) version 30.2.1.8"
# "system-name": "X460G2-24t-10G4"
# }
# }
- name: Merge provided LLDP configuration with device configuration
community.network.exos_lldp_global:
config:
interval: 10000
tlv_select:
system_capabilities: true
state: merged
# Module Execution Results:
# -------------------------
#
# "before": [
# {
# "interval": 30,
# "tlv_select": {
# "system_name": true,
# "system_description": true
# "port_description": false,
# "management_address": false,
# "system_capabilities": false
# }
# }
# ]
#
# "requests": [
# {
# "data": {
# "openconfig_lldp:config": {
# "hello-timer": 10000,
# "suppress-tlv-advertisement": [
# "PORT_DESCRIPTION",
# "MANAGEMENT_ADDRESS"
# ]
# }
# },
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig_lldp:lldp/config"
# }
# ]
#
# "after": [
# {
# "interval": 10000,
# "tlv_select": {
# "system_name": true,
# "system_description": true,
# "port_description": false,
# "management_address": false,
# "system_capabilities": true
# }
# }
# ]
# After state:
# -------------
# path: /rest/restconf/data/openconfig_lldp:lldp/config
# method: GET
# data:
# {
# "openconfig_lldp:config": {
# "enabled": true,
# "hello-timer": 10000,
# "suppress-tlv-advertisement": [
# "PORT_DESCRIPTION",
# "MANAGEMENT_ADDRESS"
# ],
# "system-description": "ExtremeXOS (X460G2-24t-10G4) version 30.2.1.8"
# "system-name": "X460G2-24t-10G4"
# }
# }
# Using replaced
# Before state:
# -------------
# path: /rest/restconf/data/openconfig_lldp:lldp/config
# method: GET
# data:
# {
# "openconfig_lldp:config": {
# "enabled": true,
# "hello-timer": 30,
# "suppress-tlv-advertisement": [
# "PORT_DESCRIPTION",
# "SYSTEM_CAPABILITIES",
# "MANAGEMENT_ADDRESS"
# ],
# "system-description": "ExtremeXOS (X460G2-24t-10G4) version 30.2.1.8"
# "system-name": "X460G2-24t-10G4"
# }
# }
- name: Replace device configuration with provided LLDP configuration
community.network.exos_lldp_global:
config:
interval: 10000
tlv_select:
system_capabilities: true
state: replaced
# Module Execution Results:
# -------------------------
#
# "before": [
# {
# "interval": 30,
# "tlv_select": {
# "system_name": true,
# "system_description": true
# "port_description": false,
# "management_address": false,
# "system_capabilities": false
# }
# }
# ]
#
# "requests": [
# {
# "data": {
# "openconfig_lldp:config": {
# "hello-timer": 10000,
# "suppress-tlv-advertisement": [
# "SYSTEM_NAME",
# "SYSTEM_DESCRIPTION",
# "PORT_DESCRIPTION",
# "MANAGEMENT_ADDRESS"
# ]
# }
# },
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig_lldp:lldp/config"
# }
# ]
#
# "after": [
# {
# "interval": 10000,
# "tlv_select": {
# "system_name": false,
# "system_description": false,
# "port_description": false,
# "management_address": false,
# "system_capabilities": true
# }
# }
# ]
# After state:
# -------------
# path: /rest/restconf/data/openconfig_lldp:lldp/config
# method: GET
# data:
# {
# "openconfig_lldp:config": {
# "enabled": true,
# "hello-timer": 10000,
# "suppress-tlv-advertisement": [
# "SYSTEM_NAME",
# "SYSTEM_DESCRIPTION",
# "PORT_DESCRIPTION",
# "MANAGEMENT_ADDRESS"
# ],
# "system-description": "ExtremeXOS (X460G2-24t-10G4) version 30.2.1.8"
# "system-name": "X460G2-24t-10G4"
# }
# }
# Using deleted
# Before state:
# -------------
# path: /rest/restconf/data/openconfig_lldp:lldp/config
# method: GET
# data:
# {
# "openconfig_lldp:config": {
# "enabled": true,
# "hello-timer": 10000,
# "suppress-tlv-advertisement": [
# "SYSTEM_CAPABILITIES",
# "MANAGEMENT_ADDRESS"
# ],
# "system-description": "ExtremeXOS (X460G2-24t-10G4) version 30.2.1.8"
# "system-name": "X460G2-24t-10G4"
# }
# }
- name: Delete attributes of given LLDP service (This won't delete the LLDP service itself)
community.network.exos_lldp_global:
config:
state: deleted
# Module Execution Results:
# -------------------------
#
# "before": [
# {
# "interval": 10000,
# "tlv_select": {
# "system_name": true,
# "system_description": true,
# "port_description": true,
# "management_address": false,
# "system_capabilities": false
# }
# }
# ]
#
# "requests": [
# {
# "data": {
# "openconfig_lldp:config": {
# "hello-timer": 30,
# "suppress-tlv-advertisement": [
# "SYSTEM_CAPABILITIES",
# "PORT_DESCRIPTION",
# "MANAGEMENT_ADDRESS"
# ]
# }
# },
# "method": "PATCH",
# "path": "/rest/restconf/data/openconfig_lldp:lldp/config"
# }
# ]
#
# "after": [
# {
# "interval": 30,
# "tlv_select": {
# "system_name": true,
# "system_description": true,
# "port_description": false,
# "management_address": false,
# "system_capabilities": false
# }
# }
# ]
# After state:
# -------------
# path: /rest/restconf/data/openconfig_lldp:lldp/config
# method: GET
# data:
# {
# "openconfig_lldp:config": {
# "enabled": true,
# "hello-timer": 30,
# "suppress-tlv-advertisement": [
# "SYSTEM_CAPABILITIES",
# "PORT_DESCRIPTION",
# "MANAGEMENT_ADDRESS"
# ],
# "system-description": "ExtremeXOS (X460G2-24t-10G4) version 30.2.1.8"
# "system-name": "X460G2-24t-10G4"
# }
# }
返回值
常见的返回值已记录在 此处,以下是此模块特有的字段
键 |
描述 |
---|---|
模块完成后的配置作为结构化数据。 返回:发生更改时 示例: |
|
模块调用之前的配置作为结构化数据。 返回:始终返回 示例: |
|
推送到远程设备的请求集。 返回:始终返回 示例: |
状态
此模块将在 6.0.0 版本中删除。 *[已弃用]*
有关更多信息,请参阅 已弃用。