Management of Pure Storage FlashArray
You will need the purestorage
python package in your python installation
path that is running salt.
pip install purestorage
Configure Pure Storage FlashArray authentication. Use one of the following three methods.
From the minion config
pure_tags:
fa:
san_ip: management vip or hostname for the FlashArray
api_token: A valid api token for the FlashArray being managed
From environment (PUREFA_IP and PUREFA_API)
From the pillar (PUREFA_IP and PUREFA_API)
Simon Dodsley (simon@purestorage.com)
new
purestorage
all
New in version 2018.3.0.
Create a hostgroup on a Pure Storage FlashArray.
Will return False if hostgroup already exists, or if named host or volume do not exist.
New in version 2018.3.0.
name of hostgroup (truncated to 63 characters)
name of host to add to hostgroup
name of volume to add to hostgroup
CLI Example:
salt '*' purefa.hg_create foo host=bar volume=vol
Delete a hostgroup on a Pure Storage FlashArray (removes all volumes and hosts).
Will return False is hostgroup is already in a deleted state.
New in version 2018.3.0.
name of hostgroup
CLI Example:
salt '*' purefa.hg_delete foo
Remove a host and/or volume from a hostgroup on a Pure Storage FlashArray.
Will return False is hostgroup does not exist, or named host or volume are not in the hostgroup.
New in version 2018.3.0.
name of hostgroup
name of volume to remove from hostgroup
name of host to remove from hostgroup
CLI Example:
salt '*' purefa.hg_remove foo volume=test host=bar
Adds entries to a hostgroup on a Pure Storage FlashArray.
Will return False is hostgroup doesn't exist, or host or volume do not exist.
New in version 2018.3.0.
name of hostgroup
name of host to add to hostgroup
name of volume to add to hostgroup
CLI Example:
salt '*' purefa.hg_update foo host=bar volume=vol
Add a host on a Pure Storage FlashArray.
Will return False if host already exists, or the iSCSI or Fibre Channel parameters are not in a valid format. See Pure Storage FlashArray documentation.
New in version 2018.3.0.
name of host (truncated to 63 characters)
iSCSI IQN of host
NVMeF NQN of host .. versionadded:: 3006.0
Fibre Channel WWN of host
CLI Example:
salt '*' purefa.host_create foo iqn='<Valid iSCSI IQN>' wwn='<Valid WWN>' nqn='<Valid NQN>'
Delete a host on a Pure Storage FlashArray (detaches all volumes).
Will return False if the host doesn't exist.
New in version 2018.3.0.
name of host
CLI Example:
salt '*' purefa.host_delete foo
Update a hosts port definitions on a Pure Storage FlashArray.
Will return False if new port definitions are already in use by another host, or are not in a valid format. See Pure Storage FlashArray documentation.
New in version 2018.3.0.
name of host
Additional NVMeF NQN of host .. versionadded:: 3006.0
Additional iSCSI IQN of host
Additional Fibre Channel WWN of host
CLI Example:
salt '*' purefa.host_update foo iqn='<Valid iSCSI IQN>' wwn='<Valid WWN>' nqn='<Valid NQN>'
Create a protection group on a Pure Storage FlashArray.
Protection Grop already exists
Protection Group in a deleted state
More than one type is specified - protection groups are for only hostgroups, hosts or volumes
Named type for protection group does not exist
New in version 2018.3.0.
name of protection group
name of hostgroup to add to protection group
name of host to add to protection group
name of volume to add to protection group
CLI Example:
salt '*' purefa.pg_create foo [hostgroup=foo | host=bar | volume=vol] enabled=[true | false]
Delete a protecton group on a Pure Storage FlashArray.
Will return False if protection group is already in a deleted state.
New in version 2018.3.0.
name of protection group
CLI Example:
salt '*' purefa.pg_delete foo
Eradicate a deleted protecton group on a Pure Storage FlashArray.
Will return False if protection group is not in a deleted state.
New in version 2018.3.0.
name of protection group
CLI Example:
salt '*' purefa.pg_eradicate foo
Remove a hostgroup, host or volume from a protection group on a Pure Storage FlashArray.
Protection group does not exist
Specified type is not currently associated with the protection group
New in version 2018.3.0.
name of hostgroup
name of hostgroup to remove from protection group
name of host to remove from hostgroup
name of volume to remove from hostgroup
CLI Example:
salt '*' purefa.pg_remove foo [hostgroup=bar | host=test | volume=bar]
Update a protection group on a Pure Storage FlashArray.
Protection group does not exist
Incorrect type selected for current protection group type
Specified type does not exist
New in version 2018.3.0.
name of protection group
name of hostgroup to add to protection group
name of host to add to protection group
name of volume to add to protection group
CLI Example:
salt '*' purefa.pg_update foo [hostgroup=foo | host=bar | volume=vol]
Create a volume snapshot on a Pure Storage FlashArray.
Will return False is volume selected to snap does not exist.
New in version 2018.3.0.
name of volume to snapshot
if specificed forces snapshot name suffix. If not specified defaults to timestamp.
CLI Example:
salt '*' purefa.snap_create foo
salt '*' purefa.snap_create foo suffix=bar
Delete a volume snapshot on a Pure Storage FlashArray.
Will return False if selected snapshot does not exist.
New in version 2018.3.0.
name of volume
name of snapshot
Eradicate snapshot after deletion if True. Default is False
CLI Example:
salt '*' purefa.snap_delete foo suffix=snap eradicate=True
Eradicate a deleted volume snapshot on a Pure Storage FlashArray.
Will return False if snapshot is not in a deleted state.
New in version 2018.3.0.
name of volume
name of snapshot
CLI Example:
salt '*' purefa.snap_eradicate foo suffix=snap
Create R/W volume from snapshot on a Pure Storage FlashArray.
Will return False if target volume already exists and overwrite is not specified, or selected snapshot doesn't exist.
New in version 2018.3.0.
name of volume snapshot
name of clone volume
overwrite clone if already exists (default: False)
CLI Example:
salt '*' purefa.snap_volume_create foo.bar clone overwrite=True
Attach a volume to a host on a Pure Storage FlashArray.
Host and volume must exist or else will return False.
New in version 2018.3.0.
name of volume
name of host
CLI Example:
salt '*' purefa.volume_attach foo bar
Clone an existing volume on a Pure Storage FlashArray.
Will return False if source volume doesn't exist, or target volume already exists and overwrite not specified.
New in version 2018.3.0.
name of volume
name of clone volume
overwrite clone if already exists (default: False)
CLI Example:
salt '*' purefa.volume_clone foo bar overwrite=True
Create a volume on a Pure Storage FlashArray.
Will return False if volume already exists.
New in version 2018.3.0.
name of volume (truncated to 63 characters)
if specificed capacity of volume. If not specified default to 1G. Refer to Pure Storage documentation for formatting rules.
CLI Example:
salt '*' purefa.volume_create foo
salt '*' purefa.volume_create foo size=10T
Delete a volume on a Pure Storage FlashArray.
Will return False if volume doesn't exist is already in a deleted state.
New in version 2018.3.0.
name of volume
Eradicate volume after deletion if True. Default is False
CLI Example:
salt '*' purefa.volume_delete foo eradicate=True
Detach a volume from a host on a Pure Storage FlashArray.
Will return False if either host or volume do not exist, or if selected volume isn't already connected to the host.
New in version 2018.3.0.
name of volume
name of host
CLI Example:
salt '*' purefa.volume_detach foo bar
Eradicate a deleted volume on a Pure Storage FlashArray.
Will return False is volume is not in a deleted state.
New in version 2018.3.0.
name of volume
CLI Example:
salt '*' purefa.volume_eradicate foo
Extend an existing volume on a Pure Storage FlashArray.
Will return False if new size is less than or equal to existing size.
New in version 2018.3.0.
name of volume
New capacity of volume. Refer to Pure Storage documentation for formatting rules.
CLI Example:
salt '*' purefa.volume_extend foo 10T