cisco.dnac.network_device_module_v1_info 模块 – 网络设备模块 V1 的信息模块

注意

此模块是 cisco.dnac 集合(版本 6.25.0)的一部分。

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

要安装它,请使用:ansible-galaxy collection install cisco.dnac。您需要进一步的要求才能使用此模块,请参阅 要求 获取详细信息。

要在 playbook 中使用它,请指定:cisco.dnac.network_device_module_v1_info

cisco.dnac 3.1.0 中的新增功能

概要

  • 获取所有网络设备模块 V1。

  • 通过 ID 获取网络设备模块 V1。

  • 通过“模块 ID”返回模块信息。

  • 按指定的设备 ID 返回模块。

注意

此模块具有相应的 操作插件

要求

执行此模块的主机上需要以下要求。

  • dnacentersdk >= 2.4.9

  • python >= 3.5

参数

参数

注释

deviceId

字符串

DeviceId 查询参数。

dnac_debug

布尔值

用于启用调试的 Cisco DNA Center SDK 标志。

选项

  • false ← (默认)

  • true

dnac_host

字符串 / 必需

Cisco DNA Center 主机名。

dnac_password

字符串

用于身份验证的 Cisco DNA Center 密码。

dnac_port

整数

Cisco DNA Center 端口。

默认: 443

dnac_username

别名: user

字符串

用于身份验证的 Cisco DNA Center 用户名。

默认: "admin"

dnac_verify

布尔值

启用或禁用 SSL 证书验证的标志。

选项

  • false

  • true ← (默认)

dnac_version

字符串

通知 SDK 要使用哪个版本的 Cisco DNA Center。

默认: "2.3.7.6"

headers

字典

其他标头。

id

字符串

Id 路径参数。模块 ID。

limit

整数

Limit 查询参数。

nameList

列表 / elements=string

NameList 查询参数。

offset

整数

Offset 查询参数。

operationalStateCodeList

列表 / elements=dictionary

OperationalStateCodeList 查询参数。

partNumberList

列表 / elements=string

PartNumberList 查询参数。

validate_response_schema

布尔值

用于使 Cisco DNA Center SDK 能够验证请求正文是否符合 JSON 架构的标志。

选项

  • false

  • true ← (默认)

vendorEquipmentTypeList

列表 / elements=string

VendorEquipmentTypeList 查询参数。

注释

注意

  • 使用的 SDK 方法是 devices.Devices.get_module_info_by_id_v1, devices.Devices.get_modules_v1,

  • 使用的路径是 get /dna/intent/api/v1/network-device/module, get /dna/intent/api/v1/network-device/module/{id},

  • 支持 check_mode

  • 该插件在控制节点上运行,不使用任何 ansible 连接插件,而是使用 Cisco DNAC SDK 中的嵌入式连接管理器

  • 以 dnac_ 开头的参数由 Cisco DNAC Python SDK 用于建立连接

另请参阅

另请参阅

Cisco DNA Center 文档,了解 Devices GetModuleInfoByIdV1

GetModuleInfoByIdV1 API 的完整参考。

Cisco DNA Center 文档,了解 Devices GetModulesV1

GetModulesV1 API 的完整参考。

示例

- name: Get all Network Device Module V1
  cisco.dnac.network_device_module_v1_info:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    headers: "{{my_headers | from_json}}"
    deviceId: string
    limit: 0
    offset: 0
    nameList: []
    vendorEquipmentTypeList: []
    partNumberList: []
    operationalStateCodeList: []
  register: result

- name: Get Network Device Module V1 by id
  cisco.dnac.network_device_module_v1_info:
    dnac_host: "{{dnac_host}}"
    dnac_username: "{{dnac_username}}"
    dnac_password: "{{dnac_password}}"
    dnac_verify: "{{dnac_verify}}"
    dnac_port: "{{dnac_port}}"
    dnac_version: "{{dnac_version}}"
    dnac_debug: "{{dnac_debug}}"
    headers: "{{my_headers | from_json}}"
    id: string
  register: result

返回值

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

描述

dnac_response

字典

包含 Cisco DNAC Python SDK 返回的响应的字典或列表

已返回: 始终

示例: {"response": {"assemblyNumber": "string", "assemblyRevision": "string", "attributeInfo": {}, "containmentEntity": "string", "description": "string", "entityPhysicalIndex": "string", "id": "string", "isFieldReplaceable": "string", "isReportingAlarmsAllowed": "string", "manufacturer": "string", "moduleIndex": 0, "name": "string", "operationalStateCode": "string", "partNumber": "string", "serialNumber": "string", "vendorEquipmentType": "string"}, "version": "string"}

作者

  • Rafael Campos (@racampos)