dellemc.powerflex.sdt module – Manage SDT (also called NVMe Target) 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.sdt.

New in dellemc.powerflex 2.6.0

Synopsis

  • Managing SDT (also called NVMe Target) on PowerFlex storage system includes creating new SDT, getting details of SDT, managing IP or role of SDT, modifying attributes of SDT, and deleting SDT.

  • Support only for Powerflex 4.5 versions and above.

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

discovery_port

integer

Discovery port of the SDT.

hostname

aliases: gateway_host

string / required

IP or FQDN of the PowerFlex host.

maintenance_mode

string

Maintenance mode state of the SDT.

Choices:

  • "active"

  • "inactive"

nvme_port

integer

NVMe port of the SDT.

password

string / required

The password of the PowerFlex host.

port

integer

Port number through which communication happens with PowerFlex host.

Default: 443

protection_domain_name

string

The name of the protection domain.

sdt_ip_list

list / elements=dictionary

Dictionary of IPs and their roles for the SDT.

At least one IP-role is mandatory while creating a SDT.

IP-roles can be updated as well.

ip

string / required

IP address of the SDT.

role

string / required

Role assigned to the SDT IP address.

Choices:

  • "StorageOnly"

  • "HostOnly"

  • "StorageAndHost"

sdt_name

string / required

The name of the SDT.

Mandatory for all operations.

It is unique across the PowerFlex array.

sdt_new_name

string

SDT new name, can only be used for renaming the SDT.

Only used for updates. Ignored during creation.

state

string

State of the SDT.

Choices:

  • "present" ← (default)

  • "absent"

storage_port

integer

Storage port of the SDT.

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

  • IP addresses, and IP address roles must be configured for each SDT.

  • You can assign both storage and host roles to the same target IP addresses.

  • Alternatively, assign the storage role to one target IP address, and add another target IP address for the host role.

  • Both roles must be configured on each NVMe target.

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

Examples

- name: Create SDT
  dellemc.powerflex.sdt:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    sdt_name: "sdt_example"
    sdt_ip_list:
      - ip: "172.169.xx.xx"
        role: "StorageAndHost"
      - ip: "172.169.yy.yy"
        role: "StorageAndHost"
    protection_domain_name: "PD1"
    storage_port: 12200
    nvme_port: 4420
    discovery_port: 8009
    state: "present"

- name: Rename SDT
  dellemc.powerflex.sdt:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    sdt_name: "sdt_example"
    sdt_new_name: "sdt_new_example"
    state: "present"

- name: Modify SDT port
  dellemc.powerflex.sdt:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    sdt_name: "sdt_example"
    nvme_port: 4421
    discovery_port: 8008
    state: "present"

- name: Change maintenance mode
  dellemc.powerflex.sdt:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    sdt_name: "sdt_example"
    maintenance_mode: "active"
    state: "present"

- name: Set IP and role to SDT
  dellemc.powerflex.sdt:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    sdt_name: "sdt_example"
    sdt_ip_list:
      - ip: "172.169.xx.xx"
        role: "StorageAndHost"
      - ip: "172.169.zz.zz"
        role: "StorageAndHost"
    state: "present"

- name: Remove SDT
  dellemc.powerflex.sdt:
    hostname: "{{ hostname }}"
    username: "{{ username }}"
    password: "{{ password }}"
    validate_certs: "{{ validate_certs }}"
    sdt_name: "sdt_example"
    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

sdt_details

dictionary

Details of the SDT.

Returned: When SDT exists

Sample: {"authenticationError": "None", "certificateInfo": {"issuer": "/GN=MDM/CN=CA-804696a4dbe1d90f/L=Hopkinton/ST=Massachusetts/C=US/O=EMC/OU=ASD", "subject": "/GN=sdt-comp-0/CN=host41/L=Hopkinton/ST=Massachusetts/C=US/O=EMC/OU=ASD", "thumbprint": "07:1E:FC:48:03:42:E6:45:14:1D:AA:97:1F:4F:B9:B2:B4:11:99:09", "validFrom": "Oct 8 02:35:00 2024 GMT", "validFromAsn1Format": "241008023500Z", "validTo": "Oct 7 03:35:00 2034 GMT", "validToAsn1Format": "341007033500Z"}, "discoveryPort": 8009, "faultSetId": null, "id": "917d28ed00000000", "ipList": [{"ip": "172.169.xx.xx", "role": "StorageAndHost"}, {"ip": "172.169.yy.yy", "role": "StorageAndHost"}], "links": [{"href": "/api/instances/Sdt::917d28ed00000000", "rel": "self"}, {"href": "/api/instances/Sdt::917d28ed00000000/relationships/Statistics", "rel": "/api/Sdt/relationship/Statistics"}, {"href": "/api/instances/ProtectionDomain::b4787fa100000000", "rel": "/api/parent/relationship/protectionDomainId"}], "maintenanceState": "NoMaintenance", "mdmConnectionState": "Connected", "membershipState": "Joined", "name": "Sdt-pf460-svm-1", "nvmePort": 4420, "persistentDiscoveryControllersNum": 0, "protectionDomainId": "b4787fa100000000", "protectionDomainName": "PD1", "sdtState": "Normal", "softwareVersionInfo": "R4_5.2100.0", "storagePort": 12200, "systemId": "804696a4dbe1d90f"}

authenticationError

string

Indicates authentication error.

Returned: success

certificateInfo

dictionary

Information about certificate.

Returned: success

issuer

string

Issuer of the certificate.

Returned: success

subject

string

Subject of the certificate.

Returned: success

thumbprint

string

Thumbprint of the certificate.

Returned: success

validFrom

string

Date and time the certificate is valid from.

Returned: success

validFromAsn1Format

string

Valid from date in ASN.1 format.

Returned: success

validTo

string

Date and time the certificate is valid to.

Returned: success

validToAsn1Format

string

Valid to date in ASN.1 format.

Returned: success

discoveryPort

integer

Discovery port.

Returned: success

faultSetId

string

Fault set ID.

Returned: success

id

string

SDS ID.

Returned: success

ipList

list / elements=string

SDS IP list.

Returned: success

ip

string

IP present in the SDS.

Returned: success

role

string

Role of the SDS IP.

Returned: success

list / elements=string

SDS links.

Returned: success

string

SDS instance URL.

Returned: success

string

SDS’s relationship with different entities.

Returned: success

maintenanceState

string

Maintenance state.

Returned: success

mdmConnectionState

string

MDM connection state.

Returned: success

membershipState

string

Membership state.

Returned: success

name

string

Name of the SDS.

Returned: success

nvmePort

integer

NVMe port.

Returned: success

persistentDiscoveryControllersNum

integer

Number of persistent discovery controllers.

Returned: success

protectionDomainId

string

Protection Domain ID.

Returned: success

protectionDomainName

string

Protection Domain Name.

Returned: success

sdtState

string

SDS state.

Returned: success

softwareVersionInfo

string

SDS software version information.

Returned: success

storagePort

integer

Storage port.

Returned: success

systemId

string

System ID.

Returned: success

Authors

  • Yuhao Liu (@RayLiu7)