cisco.dnac.compliance_device_by_id_v1_info 模块 – Compliance Device By Id V1 信息模块

注意

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

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

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

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

cisco.dnac 3.1.0 中的新增功能

概要

  • 获取所有 Compliance Device By Id V1。

  • 返回设备的合规性详细报告。

注意

此模块具有相应的 action 插件

要求

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

  • dnacentersdk >= 2.4.9

  • python >= 3.5

参数

参数

注释

category

字符串

类别查询参数。类别可以是 ‘INTENT’,‘RUNNING_CONFIG’,‘IMAGE’,‘PSIRT’,‘DESIGN_OOD’,‘EOX’,‘NETWORK_SETTINGS’ 中的任何值。

complianceType

字符串

ComplianceType 查询参数。用逗号分隔指定“合规性类型”。合规性类型可以是 ‘APPLICATION_VISIBILITY’,‘EOX’,‘FABRIC’,‘IMAGE’,‘NETWORK_PROFILE’,‘NETWORK_SETTINGS’,‘PSIRT’,‘RUNNING_CONFIG’,‘WORKFLOW’。

deviceUuid

字符串

DeviceUuid 路径参数。设备 ID。

diffList

布尔值

DiffList 查询参数。将 diffList 设置为 true 以获取 diff 列表。

选项

  • false

  • true

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

字典

附加的 headers。

validate_response_schema

布尔值

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

选项

  • false

  • true ← (默认)

备注

注意

  • 使用的 SDK 方法是 compliance.Compliance.compliance_details_of_device_v1,

  • 使用的路径是 get /dna/intent/api/v1/compliance/{deviceUuid}/detail,

  • 支持 check_mode

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

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

另请参阅

另请参阅

Cisco DNA Center 合规性 ComplianceDetailsOfDeviceV1 文档

ComplianceDetailsOfDeviceV1 API 的完整参考。

示例

- name: Get all Compliance Device By Id V1
  cisco.dnac.compliance_device_by_id_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}}"
    category: string
    complianceType: string
    diffList: True
    deviceUuid: string
  register: result

返回值

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

描述

dnac_response

字典

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

返回值:始终

示例: {"deviceUuid": "string", "response": [{"ackStatus": "string", "complianceType": "string", "deviceUuid": "string", "lastSyncTime": 0, "lastUpdateTime": 0, "sourceInfoList": [{"ackStatus": "string", "appName": "string", "businessKey": {"businessKeyAttributes": {}, "otherAttributes": {"cfsAttributes": {"appName": "string", "description": "string", "displayName": "string", "source": "string", "type": "string"}, "name": "string"}, "resourceName": "string"}, "count": 0, "diffList": [{"ackStatus": "string", "businessKey": "string", "configuredValue": "string", "displayName": "string", "extendedAttributes": {"attributeDisplayName": "string", "dataConverter": "string", "path": "string", "type": "string"}, "instanceUUID": "string", "intendedValue": "string", "moveFromPath": "string", "op": "string", "path": "string"}], "displayName": "string", "name": "string", "nameWithBusinessKey": "string", "sourceEnum": "string", "type": "string"}], "state": "string", "status": "string", "version": "string"}]}

作者

  • Rafael Campos (@racampos)