Storage Rules

Interface Storage

class portal.vidispine.istoragerule.StorageRuleHelper(slug=None, user=None, runas=None, *args, **kwargs)

This is an interface to the helper classes provided by RESTAPI

createOrModifyStorageRule(storagerule_document, resource_name=None)

Given a resource name and StorageRuleDocument object, create a storage rule for the resource.

Args:
  • storagerule_document: A StorageRuleDocument object

  • resource_name: The name of the resource, e.g. shape tag name. Optional.

Returns:
  • Returns a VSStorageRule object

getAllStorageRules(types=None, tags=None, *args)

Get all storage rules

Args:
  • types: Optional list of types to retrieve. Valid values: ITEM, COLLECTION, LIBRARY, and GENERIC.

  • tags: Optional list of tags to retrieve.

Returns:
  • A list of VSStorageRule objects

getStorageRule(resource_name, *args)

Given a resource name, get the storage rule for it

Args:
  • resource_name: The resource name

Returns:
  • A VSStorageRule object representing the storage rule for the resource

removeStorageRule(resource_name)

Given a resource name, remove the storage rule associated to it

Args:
  • resource_name: The name of the resource, e.g. shape tag name

Returns:
  • None