WarpStor Client API

Contents:

class lwarpstor.WarpStor

Main Class

clone(*args, **kwargs)

Description:

  • Clones a WarpStor snapshot into a R/W clone filesystem
  • Mounted automatically by WarpStor
  • Applies metadata ops
  • NFS exports the freshly cloned dataset
Comments:
The snapshot is a read-only copy of a dataset The clone is a r/w version of a dataset snapshot Metadata-related operations will be applied to the clone (chown, etc) Clones can have arbitrary names

payload:

  • args: None
  • kwargs: fs_snapshot = “string”, dest_fs = “string”, userid = “string”, groupid = “string”

format:

Returns:dataset
Return type:string
clone_only(*args, **kwargs)
Description:
Clones (only) a WarpStor snapshot into a R/W clone filesystem; mounted automatically by WarpStor
Comments:
The snapshot is a read-only copy of a dataset By _only_, this means that WarpStor doesn’t perform additional metadata operations such as chmod/chown The clone is a r/w version of a dataset snapshot Clones can have arbitrary names

payload:

  • args: None
  • kwargs: fs_snapshot = “string”, dest_fs = “string”

format:

Returns:dataset
Return type:string
create_fs(*args, **kwargs)
Description:
Creates a WarpStor dataset for a specific userid/groupid AND NFS export
Comments:
The snapshot is a read-only copy of a dataset Snapshots can have arbitrary names

payload:

  • args: None
  • kwargs: dataset = “string”, userid = “string”, groupid = “string”, dataset_type = “string”
Returns:dataset
Return type:string
create_fs_no_export(*args, **kwargs)
Description:
Creates a WarpStor dataset for a specific userid/groupid but do not NFS export
Comments:
The snapshot is a read-only copy of a dataset Snapshots can have arbitrary names No NFS exporting here

payload:

  • args: None
  • kwargs: dataset = “string”, userid = “string”, groupid = “string”
Returns:dataset
Return type:string
create_fs_only(*args, **kwargs)
Description:
Creates a WarpStor dataset only
Comments:
The snapshot is a read-only copy of a dataset Snapshots can have arbitrary names By only, this means that we don’t do any massaging like setting properties, chown/chmod and or NFS exports

payload:

  • args: None
  • kwargs: dataset = “string”
Returns:0/1 on success/failure
Return type:string
dataset_exists_not(*args, **kwargs)
Description:
tests the existence of a dataset
Comments:
This is a helper mostly

payload:

  • args: None
  • kwargs: dataset_name
Returns:0/1 EXISTS/NO_EXIST
Return type:string
destroy(*args, **kwargs)

Description:

  • Destroys existing datasets, snapshots and clones

Comments:

Dataset data will be lost forever

payload:

  • args: none
  • kwargs: dataset = “string”, recursive = “1/0”, recursive_mode = “-R ” (Recursively destroy all dependents, including ALL dependent cloned file systems) or “-r” (Recursively destroy all children), force = “-f” (Forces an unmount of file system using ‘unmount -f’)

format:

  • dataset = “string”
  • recursive = “string” (1/0)
  • recursive_mode = “string” (-R,-r)
  • froce = “string” (-f)
Returns:0/1 on success/failure
Return type:string
filtered_clone(*args, **kwargs)

Description:

  • Clones a WarpStor snapshot into a R/W clone filesystem
  • Mounted automatically by WarpStor
  • Applies metadata ops
  • NFS exports the freshly cloned dataset
Comments:
The snapshot is a read-only copy of a dataset The clone is a r/w version of a dataset snapshot Metadata-related operations will be applied to the clone (chown, etc) Clones can have arbitrary names

payload:

  • args: None
  • kwargs: fs_snapshot = “string”, dest_fs = “string”, userid = “string”, groupid = “string”

format:

Returns:dataset
Return type:string
get_available_space_for_vol(*args, **kwargs)

How much unused space is available on this volume (optional) Answer is in bytes.

get_used_space_for_vol(*args, **kwargs)

How much used space on this volume (optional) Answer is in bytes.

get_vfsid_for_export(*args, **kwargs)
Description:
Gets the VFSID for an exported dataset
Comments:
Hack hack hack

payload:

  • args: None
  • kwargs: dataset = “string”,
Returns:VFSID
Return type:string
list_filesystems(*args, **kwargs)

List pattern matching filesystems sorted by name.

Keyword arguments: pattern – Filter according to pattern (default None)

list_snapshots(pattern=None)

List pattern matching snapshots sorted by creation date. Oldest first

Keyword arguments: pattern – Filter according to pattern (default None)

list_vols()

Returns a list of all volumes on the system

list_wst_methods()
Description:
Lists all wst methods available
Comments:
This is a helper mostly

payload:

  • args: None
  • kwargs: None
Returns:Comma separated string of all available methods
Return type:string
promote(*args, **kwargs)

Description:

  • Promotes a cloned dataset into it’s standalone version.
  • This operation removes the dependency the clone had with its base snapshot.

Comments:

The snapshot that was cloned, and any snapshots previous to this snapshot, are now owned by the promoted clone. The space they use moves from the origin file system to the promoted clone, so enough space must be available to accommodate these snapshots. No new space is consumed by this call, but the space accounting is adjusted. The promoted clone must not have any conflicting snapshot names of its own. The rename() call can be used to rename any conflicting snapshots. If NFS exported, stays exported

payload:

  • args: None
  • kwargs: cloned_dataset = “string”

format:

  • cloned_dataset = “string”
Returns:0/1 on success/failure
Return type:string
rebuild_vol(*args, **kwargs)

Description:

  • Destroys and rebuilds the existing default volume

Comments:

All data will be lost

payload:

  • args: None
  • kwargs: vol = “string” (optional, default volume will be used if ommitted)

format:

  • vol: wsvol
Returns:0/1 on success/failure
Return type:string
rename(*args, **kwargs)

Description:

  • Renames a dataset into another non-existant one

Comments:

  • datasets are unmounted prior to being renamed
  • if NFS exported, stays exported

payload:

  • args: None
  • kwargs: dataset_a = “string”, dataset_b = “string”

format:

  • dataset_a: my_dataset
  • dataset_b: my_renamed_dataset
Returns:0/1 on success/failure
Return type:string
replace(*args, **kwargs)
Description:
Replaces a WarpStor dataset for another one; applies metadata and exports with a custom VFSID
Comments:
Hack hack hack

payload:

  • args: None
  • kwargs: dataset = “string”, userid = “string”, groupid = “string”
Returns:0/1 on success/failure
Return type:string
snapshot(*args, **kwargs)
Description:
Creates a snapshot from a WarpStor dataset
Comments:
The snapshot is a read-only copy of a dataset Snapshots can have arbitrary names

payload:

  • args: None
  • kwargs: dataset = “string” snap_name = “string”
Returns:0/1 on success/failure
Return type:string
snapshot_exists_not(*args, **kwargs)
Description:
tests the existence of a snapshot
Comments:
This is a helper mostly

payload:

  • args: None
  • kwargs: snapshot_name
Returns:0/1 EXISTS/NOEXIST
Return type:string
version(*args, **kwargs)
Description:
Displays current version of various modules
Comments:
This is informative only

payload:

  • args: None
  • kwargs: None
Returns:Comma separated string of all available versions
Return type:string

Indices and tables