dellemc.powerflex.nvme_host module – Manage NVMe hosts on Dell PowerFlex

Note

This module is part of the dellemc.powerflex collection (version 2.6.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install dellemc.powerflex. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: dellemc.powerflex.nvme_host.

New in dellemc.powerflex 2.6.0

Synopsis

  • Managing NVMe hosts on PowerFlex storage system includes creating, getting details of NVMe hosts , modifying and deleting NVMe hosts.

Requirements

The below requirements are needed on the host that executes this module.

  • A Dell PowerFlex storage system version 3.6 or later.

  • PyPowerFlex 1.14.0.

Parameters

Parameter

Comments

hostname

aliases: gateway_host

string / required

IP or FQDN of the PowerFlex host.

max_num_paths

string

Maximum number of paths per volume. Used to create or modify the NVMe host.

max_num_sys_ports

string

Maximum number of ports per protection domain. Used to create or modify the NVMe host.

nqn

string

NQN of the NVMe host. Used to create, get or modify the NVMe host.

To retrieve NQN of NVMe host, use command :command:`cat /etc/nvme/hostnqn`

nvme_host_name

string

Name of the NVMe host.

Specify either nvme_host_name, nqn for create, get or rename operation.

nvme_host_new_name

string

New name of the NVMe host. Used to rename the NVMe host.

Only used for updates. Ignored during creation.

password

string / required

The password of the PowerFlex host.

port

integer

Port number through which communication happens with PowerFlex host.

Default: 443

state

string

State of the NVMe host.

Choices:

  • "present" ← (default)

  • "absent"

timeout

integer

Time after which connection will get terminated.

It is to be mentioned in seconds.

Default: 120

username

string / required

The username of the PowerFlex host.

validate_certs

aliases: verifycert

boolean

Boolean variable to specify whether or not to validate SSL certificate.

true - Indicates that the SSL certificate should be verified.

false - Indicates that the SSL certificate should not be verified.

Choices:

  • false

  • true ← (default)

Attributes

Attribute

Support

Description

check_mode

Support: full

Runs task to validate without performing action on the target machine.

diff_mode

Support: full

Runs the task to report the changes made or to be made.

Notes

Note

  • The modules present in the collection named as ‘dellemc.powerflex’ are built to support the Dell PowerFlex storage platform.

Examples

- name: Create NVMe host
  dellemc.powerflex.nvme_host:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    nqn: "{{ nqn }}"
    nvme_host_name: "{{ nvme_host_name }}"
    state: "present"

- name: Rename nvme_host using NVMe host id
  dellemc.powerflex.nvme_host:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    nvme_host_name: "{{ nvme_host_name }}"
    nvme_host_new_name: "{{ nvme_host_new_name }}"
    state: "present"

- name: Set maximum number of paths per volume and maximum Number of Ports Per Protection Domain of nvme_host
  dellemc.powerflex.nvme_host:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    nvme_host_name: "{{ nvme_host_name }}"
    max_num_paths: "{{ max_num_paths }}"
    max_num_sys_ports: "{{ max_num_sys_ports }}"
    state: "present"

- name: Remove nvme_host
  dellemc.powerflex.nvme_host:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    nvme_host_name: "{{ nvme_host_name }}"
    state: "absent"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

changed

boolean

Whether or not the resource has changed.

Returned: always

Sample: false

nvme_host_details

dictionary

Details of the NVMe host.

Returned: When NVMe host exists

Sample: {"hostOsFullType": "Generic", "hostType": "NVMeHost", "id": "1040d67200010000", "installedSoftwareVersionInfo": null, "kernelBuildNumber": null, "kernelVersion": null, "links": [{"href": "/api/instances/Host::1040d67200010000", "rel": "self"}, {"href": "/api/instances/Host::1040d67200010000/relationships/Volume", "rel": "/api/Host/relationship/Volume"}, {"href": "/api/instances/Host::1040d67200010000/relationships/NvmeController", "rel": "/api/Host/relationship/NvmeController"}, {"href": "/api/instances/System::264ec85b3855280f", "rel": "/api/parent/relationship/systemId"}], "maxNumPaths": 6, "maxNumSysPorts": 10, "mdmConnectionState": null, "mdmIpAddressesCurrent": null, "memoryAllocationFailure": null, "name": "name", "nqn": "nqn.org.nvmexpress:uuid", "osType": null, "peerMdmId": null, "perfProfile": null, "sdcAgentActive": null, "sdcApproved": null, "sdcApprovedIps": null, "sdcGuid": null, "sdcIp": null, "sdcIps": null, "sdcType": null, "sdrId": null, "sdtId": null, "socketAllocationFailure": null, "softwareVersionInfo": null, "systemId": "264ec85b3855280f", "versionInfo": null}

hostOsFullType

string

Full type of the host OS.

Returned: success

hostType

string

Type of the host.

Returned: success

id

string

ID of the NVMe host.

Returned: success

installedSoftwareVersionInfo

string

Installed software version information.

Returned: success

kernelBuildNumber

string

Kernel build number.

Returned: success

kernelVersion

string

Kernel version.

Returned: success

list / elements=string

Links related to the NVMe host.

Returned: success

string

Hyperlink reference.

Returned: success

string

Relation type.

Returned: success

max_num_paths

integer

Maximum number of paths per volume. Used to create or modify the NVMe host.

Returned: success

max_num_sys_ports

integer

Maximum number of ports per protection domain. Used to create or modify the NVMe host.

Returned: success

mdmConnectionState

string

MDM connection state.

Returned: success

mdmIpAddressesCurrent

list / elements=string

Current MDM IP addresses.

Returned: success

name

string

Name of the NVMe host.

Returned: success

nqn

string

NQN of the NVMe host. Used to create, get or modify the NVMe host.

Returned: success

osType

string

OS type.

Returned: success

peerMdmId

string

Peer MDM ID.

Returned: success

perfProfile

string

Performance profile.

Returned: success

sdcAgentActive

boolean

Whether the SDC agent is active.

Returned: success

sdcApproved

boolean

Whether an SDC has approved access to the system.

Returned: success

sdcApprovedIps

list / elements=string

SDC approved IPs.

Returned: success

sdcGuid

string

SDC GUID.

Returned: success

sdcIp

string

SDC IP address.

Returned: success

sdcIps

list / elements=string

SDC IP addresses.

Returned: success

sdcType

string

SDC type.

Returned: success

sdrId

string

SDR ID.

Returned: success

sdtId

string

SDT ID.

Returned: success

softwareVersionInfo

string

Software version information.

Returned: success

systemId

string

ID of the system.

Returned: success

versionInfo

string

Version information.

Returned: success

Authors

  • Peter Cao (@P-Cao)