Current File : //usr/lib/python2.7/site-packages/lsm/_iplugin.pyo |
�
-�P`c @ s� d d l m Z d d l m Z d d l m Z m Z d d l m Z d e e e
� f d � � YZ d e f d � � YZ d e f d
� � YZ
d e
f d � � YZ d
S( i����( t ABCMeta( t abstractmethod( t LsmErrort ErrorNumber( t with_metaclasst IPluginc B s� e Z d Z e d d � � Z e d d � � Z e d d � � Z e d d � � Z e d d � � Z e d d � � Z e d d � � Z
e d d � � Z e d d d d
� � Z
e d d � � Z RS(
sU
Plug-in interface that all plug-ins must implement for basic
operation.
i c C s d S( s�
Method first called to setup the plug-in (except for plugin_info)
This would be the place to make a connection to the array.
Returns None on success, else LsmError exception
N( ( t selft urit passwordt timeoutt flags( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt plugin_register s c C s d S( ss
Sets any time-outs for the plug-in (ms)
Returns None on success, else LsmError exception
N( ( R t msR
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt time_out_set( s c C s d S( se
Retrieves the current time-out
Returns time-out in ms, else raise LsmError
N( ( R R
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt time_out_get1 s c C s d S( sZ
Called when the client wants to finish up or the socket goes eof.
Plug-in should clean up all resources. Note: In the case where
the socket goes EOF and the plugin_unregister runs into errors the
exception(s) will not be delivered to the client!
Returns None on success, else LsmError exception
N( ( R R
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt plugin_unregister: s
c C s d S( s�
Returns the stats of the given job.
Returns a tuple ( status (enumeration), percent_complete,
completed item).
else LsmError exception.
N( ( R t job_idR
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt
job_statusF s c C s d S( sl
Frees resources for a given job.
Returns None on success, else raises an LsmError
N( ( R R R
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt job_freeQ s c C s d S( sS
Returns the capabilities for the selected system, raises LsmError
N( ( R t systemR
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt capabilitiesZ s c C s d S( s�
Returns the description and version for plug-in, raises LsmError
Note: Make sure plugin can handle this call before plugin_register is
called.
N( ( R R
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt plugin_infoa s c C s d S( s�
Returns an array of pool objects. Pools are used in both block and
file system interfaces, thus the reason they are in the base class.
Raises LsmError on error
N( ( R t
search_keyt search_valueR
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt poolsk s c C s d S( s
Returns an array of system objects. System information is used to
distinguish resources from on storage array to another when the plug=in
supports the ability to have more than one array managed by it
Raises LsmError on error
N( ( R R
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt systemsu s N( t __name__t
__module__t __doc__t _abstractmethodR R
R R R R R R t NoneR R ( ( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyR s*
t IStorageAreaNetworkc B s e Z d d d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z
d d � Z d
� Z d d � Z
d d � Z d d d d
� Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z d d d d � Z RS( i c C s t t j d � � d S( sV
Returns an array of volume objects
Raises LsmError on error
s
Not supportedN( R R t
NO_SUPPORT( R R R R
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt volumes� s c C s t t j d � � d S( s�
Creates a volume, given a pool, volume name, size and provisioning
Returns a tuple (job_id, new volume)
Note: Tuple return values are mutually exclusive, when one
is None the other must be valid.
s
Not supportedN( R R R ( R t poolt volume_namet
size_bytest provisioningR
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt
volume_create� s c C s t t j d � � d S( sq
Deletes a volume.
Returns Job id or None if completed, else raises LsmError on errors.
s
Not supportedN( R R R ( R t volumeR
( ( s0 /usr/lib/python2.7/site-packages/lsm/_iplugin.pyt
volume_delete� s c C s t t j d � � d S( s�
Re-sizes a volume.
Returns a tuple (job_id, re-sized_volume)
Note: Tuple return values are mutually exclusive, when one
is None the other must be valid.
s
Not supportedN( R R R ( R R'