community.general.oneview_fcoe_network 模块 – 管理 OneView FCoE 网络资源
注意
此模块是 community.general 集合(版本 10.1.0)的一部分。
如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list。
要安装它,请使用: ansible-galaxy collection install community.general。您需要其他要求才能使用此模块,有关详细信息,请参阅 要求。
要在 playbook 中使用它,请指定:community.general.oneview_fcoe_network。
概要
- 提供用于管理 FCoE 网络资源的接口。可以创建、更新或删除。 
要求
执行此模块的主机上需要以下要求。
- Python >= 2.7.9 
- hpOneView >= 4.0.0 
参数
| 参数 | 注释 | 
|---|---|
| OneView API 版本。 | |
| 指向包含 OneView 客户端配置的 JSON 配置文件的路径。配置文件是可选的,使用时应位于运行 Ansible 命令的主机上。如果未提供文件路径,将从环境变量加载配置。有关示例配置文件或如何使用环境变量的链接,请验证“注意”部分。 | |
| 包含 FCoE 网络属性的列表。 | |
| 设备的 IP 地址或主机名。 | |
| HPE Image Streamer REST API 的 IP 地址或主机名。 | |
| 用于 API 身份验证的密码。 | |
| 指示 FCoE 网络资源的期望状态。 选项 
 | |
| 用于 API 身份验证的用户名。 | |
| 启用 ETag 验证后,仅当资源的当前 ETag 与数据中提供的 ETag 匹配时,才会以条件方式处理请求。 选项 
 | 
属性
| 属性 | 支持 | 描述 | 
|---|---|---|
| 支持:无 | 可以在  | |
| 支持:无 | 当处于 diff 模式时,将返回已更改的内容的详细信息(或在  | 
注意
注意
- config 参数的示例配置文件可以在以下位置找到: https://github.com/HewlettPackard/oneview-ansible/blob/master/examples/oneview_config-rename.json 
- 查看如何在以下位置使用环境变量进行配置:https://github.com/HewlettPackard/oneview-ansible#environment-variables 
- HPE OneView Ansible 模块的其他 Playbook 可以在以下位置找到:https://github.com/HewlettPackard/oneview-ansible/tree/master/examples 
- 使用的 OneView API 版本将直接影响资源中返回和期望的字段。有关设置所需 API 版本的信息,可以在以下位置找到:https://github.com/HewlettPackard/oneview-ansible#setting-your-oneview-version 
示例
- name: Ensure that FCoE Network is present using the default configuration
  community.general.oneview_fcoe_network:
    config: '/etc/oneview/oneview_config.json'
    state: present
    data:
      name: Test FCoE Network
      vlanId: 201
  delegate_to: localhost
- name: Update the FCOE network scopes
  community.general.oneview_fcoe_network:
    config: '/etc/oneview/oneview_config.json'
    state: present
    data:
      name: New FCoE Network
      scopeUris:
        - '/rest/scopes/00SC123456'
        - '/rest/scopes/01SC123456'
  delegate_to: localhost
- name: Ensure that FCoE Network is absent
  community.general.oneview_fcoe_network:
    config: '/etc/oneview/oneview_config.json'
    state: absent
    data:
      name: New FCoE Network
  delegate_to: localhost
返回值
常见的返回值记录在此处,以下是此模块特有的字段
| 键 | 描述 | 
|---|---|
| 包含有关 OneView FCoE 网络的事实。 返回: 状态为“present”时。可以为 null。 | 
