cisco.dnac.interfaces_count_info 模块 – 接口计数信息的信息模块

注意

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

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

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

要在剧本中使用它,请指定:cisco.dnac.interfaces_count_info

cisco.dnac 6.15.0 中的新增功能

概要

  • 此模块表示模块 interfaces_count_v1_info 的别名

注意

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

要求

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

  • dnacentersdk >= 2.4.9

  • python >= 3.5

参数

参数

注释

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"

endTime

浮点数

EndTime 查询参数。API 查询与资源相关的数据集的结束时间。必须以毫秒为单位的 UNIX 时间戳指定。值是包含在内的。

headers

字典

其他标头。

interfaceId

字符串

InterfaceId 查询参数。接口 UUID 列表。(例如 `6bef213c-19ca-4170-8375-b694e251101c`)示例 `interfaceId=6bef213c-19ca-4170-8375-b694e251101c` (单个接口 uuid) `interfaceId=6bef213c-19ca-4170-8375-b694e251101c&32219612-819e-4b5e-a96b-cf22aca13dd9&2541e9a7-b80d-4955-8aa2-79b233318ba0` (带有 & 分隔符的多个接口 uuid)。

interfaceName

字符串

InterfaceName 查询参数。接口名称列表(例如 `GigabitEthernet1/0/1`)。此字段支持基于通配符 (`*`) 的字符搜索。例如 `*1/0/1*` 或 `1/0/1*` 或 `*1/0/1` 示例 `interfaceNames=GigabitEthernet1/0/1` (单个接口名称) `interfaceNames=GigabitEthernet1/0/1&GigabitEthernet2/0/1&GigabitEthernet3/0/1` (带有 & 分隔符的多个接口名称)。

networkDeviceId

字符串

NetworkDeviceId 查询参数。网络设备 UUID 列表。(例如 `6bef213c-19ca-4170-8375-b694e251101c`)示例 `networkDeviceId=6bef213c-19ca-4170-8375-b694e251101c` (请求单个 networkDeviceId) `networkDeviceId=6bef213c-19ca-4170-8375- b694e251101c&networkDeviceId=32219612-819e-4b5e-a96b-cf22aca13dd9&networkDeviceId=2541e9a7-b80d-4955-8aa2-79b233318ba0` (带有 & 分隔符的多个 networkDeviceIds)。

networkDeviceIpAddress

字符串

NetworkDeviceIpAddress 查询参数。网络设备管理 IP 地址列表。(例如 `121.1.1.10`)此字段支持基于通配符 (`*`) 的字符搜索。例如 `*1.1*` 或 `1.1*` 或 `*1.1` 示例 `networkDeviceIpAddress=121.1.1.10` `networkDeviceIpAddress=121.1.1.10&networkDeviceIpAddress=172.20.1.10&networkDeviceIpAddress=10.10.20.10` (带有 & 分隔符的多个网络设备 IP 地址)。

networkDeviceMacAddress

字符串

NetworkDeviceMacAddress 查询参数。网络设备 MAC 地址列表。(例如 `64 f6 9d 07 9a 00`)此字段支持基于通配符 (`*`) 的字符搜索。例如 `*AB AB AB*` 或 `AB AB AB*` 或 `*AB AB AB` 示例 `networkDeviceMacAddress=64 f6 9d 07 9a 00` `networkDeviceMacAddress=64 f6 9d 07 9a 00&networkDeviceMacAddress=70 56 9d 07 ac 77` (带有 & 分隔符的多个网络设备 MAC 地址)。

siteHierarchy

字符串

SiteHierarchy 查询参数。站点树的完整分层细分,从全局站点名称开始,到特定站点名称结束。根站点名为“全局”(例如 `Global/AreaName/BuildingName/FloorName`)此字段支持通配符星号 (`*`) 字符搜索。例如 `*/San*, */San, /San*` 示例 `?siteHierarchy=Global/AreaName/BuildingName/FloorName` (请求单个 siteHierarchy) `?siteHierarchy=Global/AreaName/BuildingName/FloorName&siteHierarchy=Global /AreaName2/BuildingName2/FloorName2` (请求多个 siteHierarchies)。

siteHierarchyId

字符串

SiteHierarchyId 查询参数。站点树的完整层级结构,以 ID 形式表示,从全局站点 UUID 开始,到特定站点 UUID 结束。(例如:`globalUuid/areaUuid/buildingUuid/floorUuid`)此字段支持使用星号 (`*`) 通配符进行搜索。例如:`*uuid*, *uuid, uuid*` 示例:`?siteHierarchyId=globalUuid/areaUuid/buildingUuid/floorUuid` (请求单个 siteHierarchyId) `?siteHierarchyId=globalUuid/areaUuid/buildingUuid/floorUuid&siteHierarchyId=globalUuid/areaUuid2/buildingUuid2/floorUuid2` (请求多个 siteHierarchyId)。

siteId

字符串

SiteId 查询参数。站点的 UUID。(例如:`flooruuid`) 示例:`?siteId=id1` (请求单个 ID) `?siteId=id1&siteId=id2&siteId=id3` (请求多个 ID)。

startTime

浮点数

StartTime 查询参数。API 查询与资源相关的数据集的起始时间。必须以 UNIX 纪元时间(毫秒)指定。该值是包含在内的。如果未提供 `startTime`,API 将默认为当前时间。

validate_response_schema

布尔值

Cisco DNA Center SDK 的标志,用于启用针对 JSON 模式验证请求正文。

选择

  • false

  • true ← (默认)

注释

注意

  • 使用的 SDK 方法是 devices.Devices.gets_the_total_network_device_interface_counts_in_the_specified_time_range_when_there_is_no_start_and_end_time_specified_returns_the_latest_interfaces_total_count_v1。

  • 使用的路径是 get /dna/data/api/v1/interfaces/count。

  • 应该注意的是,此模块是 interfaces_count_v1_info 的别名。

  • 支持 check_mode

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

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

另请参阅

另请参阅

Cisco DNA Center 文档,关于 Devices GetsTheTotalNetworkDeviceInterfaceCountsInTheSpecifiedTimeRangeWhenThereIsNoStartAndEndTimeSpecifiedReturnsTheLatestInterfacesTotalCountV1

GetsTheTotalNetworkDeviceInterfaceCountsInTheSpecifiedTimeRangeWhenThereIsNoStartAndEndTimeSpecifiedReturnsTheLatestInterfacesTotalCountV1 API 的完整参考。

示例

- name: Get all Interfaces Count Info
  cisco.dnac.interfaces_count_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}}"
    startTime: 0
    endTime: 0
    siteHierarchy: string
    siteHierarchyId: string
    siteId: string
    networkDeviceId: string
    networkDeviceIpAddress: string
    networkDeviceMacAddress: string
    interfaceId: string
    interfaceName: string
  register: result

返回值

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

描述

dnac_response

字典

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

返回: 总是

示例: {"response": {"count": 0}, "version": "string"}

作者

  • Rafael Campos (@racampos)