salt.modules.purefb

Management of Pure Storage FlashBlade

Installation Prerequisites

  • You will need the purity_fb python package in your python installation path that is running salt.

    pip install purity_fb
    
  • Configure Pure Storage FlashBlade authentication. Use one of the following three methods.

    1. From the minion config

    pure_tags:
      fb:
        san_ip: management vip or hostname for the FlashBlade
        api_token: A valid api token for the FlashBlade being managed
    
    1. From environment (PUREFB_IP and PUREFB_API)

    2. From the pillar (PUREFB_IP and PUREFB_API)

maintainer

Simon Dodsley (simon@purestorage.com)

maturity

new

requires

purity_fb

platform

all

New in version 2019.2.0.

salt.modules.purefb.fs_create(name, size=None, proto='NFS', nfs_rules='*(rw,no_root_squash)', snapshot=False)

Create a filesystem on a Pure Storage FlashBlade.

Will return False if filesystem already exists.

New in version 2019.2.0.

namestring

name of filesystem (truncated to 63 characters)

protostring

(Optional) Sharing protocol (NFS, CIFS or HTTP). If not specified default is NFS

snapshot: boolean

(Optional) Are snapshots enabled on the filesystem. Default is False

nfs_rulesstring

(Optional) export rules for NFS. If not specified default is *(rw,no_root_squash). Refer to Pure Storage documentation for formatting rules.

sizestring

if specified capacity of filesystem. If not specified default to 32G. Refer to Pure Storage documentation for formatting rules.

CLI Example:

salt '*' purefb.fs_create foo proto=CIFS
salt '*' purefb.fs_create foo size=10T
salt.modules.purefb.fs_delete(name, eradicate=False)

Delete a share on a Pure Storage FlashBlade.

Will return False if filesystem doesn't exist or is already in a deleted state.

New in version 2019.2.0.

namestring

name of filesystem

eradicateboolean

(Optional) Eradicate filesystem after deletion if True. Default is False

CLI Example:

salt '*' purefb.fs_delete foo eradicate=True
salt.modules.purefb.fs_eradicate(name)

Eradicate a deleted filesystem on a Pure Storage FlashBlade.

Will return False is filesystem is not in a deleted state.

New in version 2019.2.0.

namestring

name of filesystem

CLI Example:

salt '*' purefb.fs_eradicate foo
salt.modules.purefb.fs_extend(name, size)

Resize an existing filesystem on a Pure Storage FlashBlade.

Will return False if new size is less than or equal to existing size.

New in version 2019.2.0.

namestring

name of filesystem

sizestring

New capacity of filesystem. Refer to Pure Storage documentation for formatting rules.

CLI Example:

salt '*' purefb.fs_extend foo 10T
salt.modules.purefb.fs_update(name, rules, snapshot=False)

Update filesystem on a Pure Storage FlashBlade.

Allows for change of NFS export rules and enabling/disabled of snapshotting capability.

New in version 2019.2.0.

namestring

name of filesystem

rulesstring

NFS export rules for filesystem Refer to Pure Storage documentation for formatting rules.

snapshot: boolean

(Optional) Enable/Disable snapshots on the filesystem. Default is False

CLI Example:

salt '*' purefb.fs_nfs_update foo rules='10.234.112.23(ro), 10.234.112.24(rw)' snapshot=True
salt.modules.purefb.snap_create(name, suffix=None)

Create a filesystem snapshot on a Pure Storage FlashBlade.

Will return False if filesystem selected to snap does not exist.

New in version 2019.2.0.

namestring

name of filesystem to snapshot

suffixstring

if specificed forces snapshot name suffix. If not specified defaults to timestamp.

CLI Example:

salt '*' purefb.snap_create foo
salt '*' purefb.snap_create foo suffix=bar
salt.modules.purefb.snap_delete(name, suffix=None, eradicate=False)

Delete a filesystem snapshot on a Pure Storage FlashBlade.

Will return False if selected snapshot does not exist.

New in version 2019.2.0.

namestring

name of filesystem

suffixstring

name of snapshot

eradicateboolean

Eradicate snapshot after deletion if True. Default is False

CLI Example:

salt '*' purefb.snap_delete foo suffix=snap eradicate=True
salt.modules.purefb.snap_eradicate(name, suffix=None)

Eradicate a deleted filesystem snapshot on a Pure Storage FlashBlade.

Will return False if snapshot is not in a deleted state.

New in version 2019.2.0.

namestring

name of filesystem

suffixstring

name of snapshot

CLI Example:

salt '*' purefb.snap_eradicate foo suffix=snap