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 Fluorine.

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

Create a filesystem on a Pure Storage FlashBlade.

Will return False if filesystem already exists.

New in version Fluorine.

name
: string
name of filesystem (truncated to 63 characters)
proto
: string
(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_rules
: string
(Optional) export rules for NFS. If not specified default is *(rw,no_root_squash). Refer to Pure Storage documentation for formatting rules.
size
: string
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 Fluorine.

name
: string
name of filesystem
eradicate
: boolean
(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 Fluorine.

name
: string
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 Fluorine.

name
: string
name of filesystem
size
: string
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 Fluorine.

name
: string
name of filesystem
rules
: string
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 Fluorine.

name
: string
name of filesystem to snapshot
suffix
: string
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 Fluorine.

name
: string
name of filesystem
suffix
: string
name of snapshot
eradicate
: boolean
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 Fluorine.

name
: string
name of filesystem
suffix
: string
name of snapshot

CLI Example:

salt '*' purefb.snap_eradicate foo suffix=snap