dellemc.openmanage.ome_smart_fabric 模块 – 在 OpenManage Enterprise Modular 上创建、修改或删除 Fabric

注意

此模块是 dellemc.openmanage 集合 (版本 9.9.0) 的一部分。

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

要安装它,请使用:ansible-galaxy collection install dellemc.openmanage。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求

要在 playbook 中使用它,请指定:dellemc.openmanage.ome_smart_fabric

dellemc.openmanage 2.1.0 中的新增功能

概要

  • 此模块允许在 OpenManage Enterprise Modular 上创建 Fabric,以及修改或删除现有 Fabric。

要求

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

  • python >= 3.9.6

参数

参数

注释

ca_path

路径

dellemc.openmanage 5.0.0 中新增

包含用于验证的 CA 证书的隐私增强邮件 (PEM) 文件。

description

字符串

提供要创建或修改的 Fabric 的简短描述。

fabric_design

字符串

指定 Fabric 拓扑。请参阅使用 API https://www.dell.com/support/manuals/en-in/poweredge-mx7000/omem_1_20_10_ug/smartfabric-network-topologies 以了解其拓扑结构。

创建 Fabric 时,fabric_design 为必填项。

选项

  • "2xMX5108n_Ethernet_Switches_in_same_chassis"

  • "2xMX9116n_Fabric_Switching_Engines_in_same_chassis"

  • "2xMX9116n_Fabric_Switching_Engines_in_different_chassis"

hostname

字符串 / 必填

OpenManage Enterprise Modular 的 IP 地址或主机名。

name

字符串 / 必填

提供要创建、删除或修改的 Fabric 的名称

new_name

字符串

提供要修改的 Fabric 的名称

override_LLDP_configuration

字符串

启用此配置可允许 Fabric 管理地址包含在 LLDP 消息中。

注释:OpenManage Enterprise Modular 1.0 不支持此选项。某些软件网络解决方案需要所有以太网交换机都传输单个管理地址来表示整个 Fabric。仅当连接到此类解决方案时才启用此功能。

选项

  • "已启用"

  • "已禁用"

password

字符串

OpenManage Enterprise Modular 密码。

如果未提供密码,则使用环境变量 OME_PASSWORD

示例:export OME_PASSWORD=password

port

整数

OpenManage Enterprise Modular HTTPS 端口。

默认值: 443

primary_switch_service_tag

字符串

第一个交换机的服务标签。

创建 Fabric 时,primary_switch_service_tag 为必填项。

primary_switch_service_tag 必须属于在 fabric_design 中选择的型号。

secondary_switch_service_tag

字符串

第二个交换机的服务标签。

创建 Fabric 时,secondary_switch_service_tag 为必填项。

secondary_switch_service_tag 必须属于在 fabric_design 中选择的型号。

state

字符串

present 创建新的 Fabric 或修改现有 Fabric。

absent 删除现有 Fabric。

注释:创建、修改或删除 Fabric 操作大约需要 15-20 分钟才能完成。建议在当前操作完成之前不要开始另一个操作。

选项

  • "present" ← (默认)

  • "absent"

timeout

整数

dellemc.openmanage 5.0.0 中新增

以秒为单位的套接字级别超时。

默认值: 30

username

字符串

OpenManage Enterprise Modular 用户名。

如果未提供用户名,则使用环境变量 OME_USERNAME

示例:export OME_USERNAME=username

validate_certs

布尔值

dellemc.openmanage 5.0.0 中新增

如果为 false,则不会验证 SSL 证书。

仅在使用自签名证书的个人控制站点上配置 false

在集合版本 5.0.0 之前,validate_certs 默认值为 false

选项

  • false

  • true ← (默认)

x_auth_token

字符串

dellemc.openmanage 9.3.0 中新增

身份验证令牌。

如果未提供 x_auth_token,则使用环境变量 OME_X_AUTH_TOKEN

示例:export OME_X_AUTH_TOKEN=x_auth_token

注释

注意

  • 从此模块可以直接访问 Dell OpenManage Enterprise Modular 的系统运行此模块。

  • 此模块支持 check_mode

示例

---
- name: Create a fabric
  dellemc.openmanage.ome_smart_fabric:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: present
    name: "fabric1"
    description: "fabric desc"
    fabric_design: "2xMX9116n_Fabric_Switching_Engines_in_different_chassis"
    primary_switch_service_tag: "SVTG123"
    secondary_switch_service_tag: "PXYT456"
    override_LLDP_configuration: "Enabled"

- name: Modify a fabric
  dellemc.openmanage.ome_smart_fabric:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: present
    name: "fabric1"
    new_name: "fabric_gold1"
    description: "new description"

- name: Delete a fabric
  dellemc.openmanage.ome_smart_fabric:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    state: "absent"
    name: "fabric1"

返回值

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

描述

additional_info

字典

Fabric 操作的其他详细信息。

返回:state=present 并且响应中存在其他信息时。

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "Fabric 更新成功。 未在有效负载中提供 OverrideLLDPConfiguration 属性,因此它保留了先前的值。", "MessageArgs": [], "RelatedProperties": [], "Resolution": "如有必要,请使用 Disabled Enabled 更新 Fabric 中的 OverrideLLDPConfiguration 。", "Severity": "Informational"}], "code": "Base.1.0.GeneralError", "message": "发生一般错误。 请参阅 ExtendedInfo 以获取更多信息。"} }

error_info

字典

HTTP 错误详情。

返回: HTTP 错误时

示例: {"error": {"@Message.ExtendedInfo": [{"Message": "由于无法访问结构管理器,因此无法执行操作。", "MessageArgs": [], "RelatedProperties": [], "Resolution": "确保以下各项并重试操作:1)至少有一个高级 I/O 模块处于开机模式。例如,MX9116n 以太网交换机和 MX5108n 以太网交换机。但是,如果高级 I/O 模块处于开机模式,请确保在结构管理器处于切换模式时未设置网络配置文件。2)如果问题仍然存在,请等待几分钟然后重试操作。", "Severity": "Warning"}], "code": "Base.1.0.GeneralError", "message": "发生一般错误。 请参阅 ExtendedInfo 以获取更多信息。"} }

fabric_id

字符串

创建、修改或删除 Fabric 时返回 ID。

返回: 成功

示例: "1312cceb-c3dd-4348-95c1-d8541a17d776"

msg

字符串

Fabric 操作的总体状态。

返回: 始终返回

示例: "Fabric 创建操作已启动。"

作者

  • Sajna Shetty(@Sajna-Shetty)