salt.modules.purefa
Management of Pure Storage FlashArray
Installation Prerequisites
-
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)
- maintainer
-
Simon Dodsley (simon@purestorage.com)
- maturity
-
new
- requires
-
purestorage
- platform
-
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.
- namestring
-
name of hostgroup (truncated to 63 characters)
- hoststring
-
name of host to add to hostgroup
- volumestring
-
name of volume to add to hostgroup
CLI Example:
salt '*' purefa.hg_create foo host=bar volume=vol
salt.modules.purefa.hg_create(name, host=None, volume=None)
-
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.
- namestring
-
name of hostgroup
CLI Example:
salt '*' purefa.hg_delete foo
salt.modules.purefa.hg_delete(name)
-
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.
- namestring
-
name of hostgroup
- volumestring
-
name of volume to remove from hostgroup
- hoststring
-
name of host to remove from hostgroup
CLI Example:
salt '*' purefa.hg_remove foo volume=test host=bar
salt.modules.purefa.hg_remove(name, volume=None, host=None)
-
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.
- namestring
-
name of hostgroup
- hoststring
-
name of host to add to hostgroup
- volumestring
-
name of volume to add to hostgroup
CLI Example:
salt '*' purefa.hg_update foo host=bar volume=vol
salt.modules.purefa.hg_update(name, host=None, volume=None)
-
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.
- namestring
-
name of host (truncated to 63 characters)
- iqnstring
-
iSCSI IQN of host
- wwnstring
-
Fibre Channel WWN of host
CLI Example:
salt '*' purefa.host_create foo iqn='<Valid iSCSI IQN>' wwn='<Valid WWN>'
salt.modules.purefa.host_create(name, iqn=None, wwn=None)
-
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.
- namestring
-
name of host
CLI Example:
salt '*' purefa.host_delete foo
salt.modules.purefa.host_delete(name)
-
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.
- namestring
-
name of host
- iqnstring
-
Additional iSCSI IQN of host
- wwnstring
-
Additional Fibre Channel WWN of host
CLI Example:
salt '*' purefa.host_update foo iqn='<Valid iSCSI IQN>' wwn='<Valid WWN>'
salt.modules.purefa.host_update(name, iqn=None, wwn=None)
-
Create a protection group on a Pure Storage FlashArray.
- Will return False is the following cases:
-
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.
- namestring
-
name of protection group
- hostgroupstring
-
name of hostgroup to add to protection group
- hoststring
-
name of host to add to protection group
- volumestring
-
name of volume to add to protection group
CLI Example:
salt '*' purefa.pg_create foo [hostgroup=foo | host=bar | volume=vol] enabled=[true | false]
salt.modules.purefa.pg_create(name, hostgroup=None, host=None, volume=None, enabled=True)
-
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.
- namestring
-
name of protection group
CLI Example:
salt '*' purefa.pg_delete foo
salt.modules.purefa.pg_delete(name, eradicate=False)
-
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.
- namestring
-
name of protection group
CLI Example:
salt '*' purefa.pg_eradicate foo
salt.modules.purefa.pg_eradicate(name)
-
Remove a hostgroup, host or volume from a protection group on a Pure Storage FlashArray.
- Will return False in the following cases:
-
Protection group does not exist
Specified type is not currently associated with the protection group
New in version 2018.3.0.
- namestring
-
name of hostgroup
- hostgroupstring
-
name of hostgroup to remove from protection group
- hoststring
-
name of host to remove from hostgroup
- volumestring
-
name of volume to remove from hostgroup
CLI Example:
salt '*' purefa.pg_remove foo [hostgroup=bar | host=test | volume=bar]
salt.modules.purefa.pg_remove(name, hostgroup=None, host=None, volume=None)
-
Update a protection group on a Pure Storage FlashArray.
- Will return False in the following cases:
-
Protection group does not exist
Incorrect type selected for current protection group type
Specified type does not exist
New in version 2018.3.0.
- namestring
-
name of protection group
- hostgroupstring
-
name of hostgroup to add to protection group
- hoststring
-
name of host to add to protection group
- volumestring
-
name of volume to add to protection group
CLI Example:
salt '*' purefa.pg_update foo [hostgroup=foo | host=bar | volume=vol]
salt.modules.purefa.pg_update(name, hostgroup=None, host=None, volume=None)
-
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.
- namestring
-
name of volume to snapshot
- suffixstring
-
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
salt.modules.purefa.snap_create(name, suffix=None)
-
Delete a volume snapshot on a Pure Storage FlashArray.
Will return False if selected snapshot does not exist.
New in version 2018.3.0.
- namestring
-
name of volume
- suffixstring
-
name of snapshot
- eradicateboolean
-
Eradicate snapshot after deletion if True. Default is False
CLI Example:
salt '*' purefa.snap_delete foo suffix=snap eradicate=True
salt.modules.purefa.snap_delete(name, suffix=None, eradicate=False)
-
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.
- namestring
-
name of volume
- suffixstring
-
name of snapshot
CLI Example:
salt '*' purefa.snap_eradicate foo suffix=snap
salt.modules.purefa.snap_eradicate(name, suffix=None)
-
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.
- namestring
-
name of volume snapshot
- targetstring
-
name of clone volume
- overwriteboolean
-
overwrite clone if already exists (default: False)
CLI Example:
salt '*' purefa.snap_volume_create foo.bar clone overwrite=True
salt.modules.purefa.snap_volume_create(name, target, overwrite=False)
-
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.
- namestring
-
name of volume
- hoststring
-
name of host
CLI Example:
salt '*' purefa.volume_attach foo bar
salt.modules.purefa.volume_attach(name, host)
-
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.
- namestring
-
name of volume
- targetstring
-
name of clone volume
- overwriteboolean
-
overwrite clone if already exists (default: False)
CLI Example:
salt '*' purefa.volume_clone foo bar overwrite=True
salt.modules.purefa.volume_clone(name, target, overwrite=False)
-
Create a volume on a Pure Storage FlashArray.
Will return False if volume already exists.
New in version 2018.3.0.
- namestring
-
name of volume (truncated to 63 characters)
- sizestring
-
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
salt.modules.purefa.volume_create(name, size=None)
-
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.
- namestring
-
name of volume
- eradicateboolean
-
Eradicate volume after deletion if True. Default is False
CLI Example:
salt '*' purefa.volume_delete foo eradicate=True
salt.modules.purefa.volume_delete(name, eradicate=False)
-
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.
- namestring
-
name of volume
- hoststring
-
name of host
CLI Example:
salt '*' purefa.volume_detach foo bar
salt.modules.purefa.volume_detach(name, host)
-
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.
- namestring
-
name of volume
CLI Example:
salt '*' purefa.volume_eradicate foo
salt.modules.purefa.volume_eradicate(name)
-
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.
- namestring
-
name of volume
- sizestring
-
New capacity of volume. Refer to Pure Storage documentation for formatting rules.
CLI Example:
salt '*' purefa.volume_extend foo 10T
salt.modules.purefa.volume_extend(name, size)
© 2021 SaltStack.
Licensed under the Apache License, Version 2.0.
https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.purefa.html