Top

Module infi.storagemodel.base


Index

Classes

class StorageModel

StorageModel provides a layered view of the storage stack. The layers currently exposed by the model are:

  • SCSI
  • Multipath
  • Disks
  • Mounts
  • Utils

All layers are fetched lazily and cached inside the model. When you think that the cache no longer up-to-date, you can clear it using the refresh() method

Descendents

Class variables

var predicates

Methods

def __init__(

self)

def get_disk(

self)

Returns a infi.storagemodel.base.disk.DiskModel object which represents the disks layer

def get_mount_manager(

self)

def get_mount_repository(

self)

def get_native_multipath(

self)

Returns a infi.storagemodel.base.multipath.MultipathFrameworkModel object, as seen by the operating system's built-in MPIO driver

def get_scsi(

self)

Returns a infi.storagemodel.base.scsi.SCSIModel object which represents the SCSI layer

def get_utils(

self)

Returns an instance of infi.storagemodel.base.utils.Utils

def get_veritas_multipath(

self)

Returns a infi.storagemodel.base.multipath.MultipathFrameworkModel object, as seen by the operating system's built-in MPIO driver

def refresh(

self)

clears the model cache

def rescan_and_wait_for(

self, predicate=None, timeout_in_seconds=60, **rescan_kwargs)

Rescan devices and poll the predicate until either it returns True or a timeout is reached.

The model is refreshed automatically, there is no need to refresh after calling this method or in the implementation of the predicate.

predicate: a callable object that returns either True or False.

timeout_in_seconds: time in seconds to poll the predicate.

rescan_kwargs: additional keyword arguments to pass to _initiate_rescan.

Raises infi.storagemodel.errors.TimeoutError exception if the timeout is reached.

def retry_rescan(

self, **rescan_kwargs)

Sub-modules

infi.storagemodel.base.diagnostic

infi.storagemodel.base.disk

infi.storagemodel.base.filesystem

infi.storagemodel.base.gevent_wrapper

infi.storagemodel.base.inquiry

infi.storagemodel.base.mount

This is the mounts layer of the storagemodel.

Example 1 - listing mounts:

>>> from infi.storagemodel import get_storage_model
>>> mgr = get_storage_model().get_mount_manager()
>>> for mount in mgr.get_mounts():
...     print  print '{:10} {:30} {}'.format(mount.get_blo...

infi.storagemodel.base.multipath

infi.storagemodel.base.partition

infi.storagemodel.base.scsi

infi.storagemodel.base.utils


Documentation generated by pdoc 0.2.3. pdoc is in the public domain with the UNLICENSE.