cisco.dnac.custom_issue_definitions_v1_info 模块 – 自定义问题定义 V1 的信息模块

注意

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

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

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

要在 Playbook 中使用它,请指定:cisco.dnac.custom_issue_definitions_v1_info

cisco.dnac 6.15.0 中的新增功能

概要

  • 获取所有自定义问题定义 V1。

  • 检索现有的基于 Syslog 的自定义问题定义。支持的过滤器包括 id、name、profileId、定义启用状态、优先级、严重性、工具和助记符。问题定义配置可能因配置文件而异,因此在查询参数中指定配置文件 ID 非常重要,默认配置文件为 global。

注意

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

要求

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

  • 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"

facility

字符串

工具查询参数。Syslog 工具名称。

headers

字典

其他标头。

id

字符串

Id 查询参数。自定义问题定义标识符和跨配置文件的唯一标识符。示例 id=6bef213c-19ca-4170-8375-b694e251101c(请求单个实体 UUID)id=6bef213c-19ca-4170-8375-b694e251101c&id=19ca-4170-8375-b694e251101c-6bef213c(在查询参数中请求多个 ID)。

isEnabled

布尔值

IsEnabled 查询参数。自定义问题定义的启用状态,为 true 或 false。

选择

  • false

  • true

limit

浮点数

Limit 查询参数。要返回的最大记录数。

mnemonic

字符串

助记符查询参数。Syslog 助记符名称。

name

字符串

Name 查询参数。UDI 问题名称列表。

offset

浮点数

Offset 查询参数。指定 API 返回的所有记录中的起始点。这是一个基于 1 的偏移量。起始值为 1。

order

字符串

Order 查询参数。字段的排序顺序,升序或降序。

priority

字符串

Priority 查询参数。问题优先级值,可能的值为 P1、P2、P3、P4。P1 是需要立即关注且可能对网络运营产生广泛影响的关键问题。P2 是可能影响多个设备或客户端的主要问题。P3 是具有局部或最小影响的次要问题。P4 是可能不是直接问题但解决它可以优化网络性能的警告问题。

profileId

字符串

ProfileId 查询参数。用于获取与配置文件关联的自定义问题定义的配置文件标识符。默认为 global。对于自定义配置文件,它是配置文件 UUID。示例 3fa85f64-5717-4562-b3fc-2c963f66afa6。

severity

浮点数

Severity 查询参数。Syslog 严重性级别。0 紧急情况 1 警报,2 严重。3 错误,4 警告,5 通知,6 信息。示例 severity=1&severity=2(支持使用 & 分隔符的多值)。

sortBy

字符串

SortBy 查询参数。响应中要排序的字段。

validate_response_schema

布尔值

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

选择

  • false

  • true ←(默认)

注释

注意

  • 使用的 SDK 方法是 issues.Issues.get_all_the_custom_issue_definitions_based_on_the_given_filters_v1,

  • 使用的路径是 get /dna/intent/api/v1/customIssueDefinitions,

  • 支持 check_mode

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

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

另请参阅

另请参阅

有关 Issues GetAllTheCustomIssueDefinitionsBasedOnTheGivenFiltersV1 的 Cisco DNA Center 文档

GetAllTheCustomIssueDefinitionsBasedOnTheGivenFiltersV1 API 的完整参考。

示例

- name: Get all Custom Issue Definitions V1
  cisco.dnac.custom_issue_definitions_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
    profileId: string
    name: string
    priority: string
    isEnabled: True
    severity: 0
    facility: string
    mnemonic: string
    limit: 0
    offset: 0
    sortBy: string
    order: string
  register: result

返回值

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

描述

dnac_response

字典

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

返回:始终

示例: {"page": {"count": 0, "limit": 0, "offset": 0, "sortBy": [{"name": "string", "order": "string"}]}, "response": [{"createdTime": 0, "description": "string", "id": "string", "isDeletable": true, "isEnabled": true, "isNotificationEnabled": true, "lastUpdatedTime": 0, "name": "string", "priority": "string", "profileId": "string", "rules": [{"durationInMinutes": 0, "facility": "string", "mnemonic": "string", "occurrences": 0, "pattern": "string", "severity": 0, "type": "string"}], "triggerId": "string"}], "version": "string"}

作者

  • Rafael Campos (@racampos)