Repository URL to install this package:
|
Version:
2.5 ▾
|
ó
±EYc @ sw d d l m Z d d l m Z y d d l Z d d l Z Wn e k
r[ d Z d Z n Xd d l m Z
d d l m Z d d l
m Z d d l m Z d d l m Z d d l m Z d d
l m Z d d l m Z d d l m Z d d
l m Z d d
l m Z e
j e Z d e f d YZ d e f d YZ d e f d YZ! d e f d YZ" d S( iÿÿÿÿ( t tpool( t urllibN( t log( t jsonutils( t loopingcall( t excutils( t units( t exception( t _( t _LE( t _LW( t utilst RbdProxyc B s e Z d Z d Z d Z RS( sá A wrapper around rbd.RBD class instance to avoid blocking of process.
Offloads all calls to rbd.RBD class methods to native OS threads, so that
we do not block the whole process while executing the librbd code.
c C s t j t j | _ d S( N( R t Proxyt rbdt RBDt _rbd( t self( ( sX /home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/storage/rbd_utils.pyt __init__3 s c C s t | j | S( N( t getattrR ( R t attr( ( sX /home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/storage/rbd_utils.pyt __getattr__6 s ( t __name__t
__module__t __doc__R R ( ( ( sX /home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/storage/rbd_utils.pyR + s t RBDVolumeProxyc B s; e Z d Z d d e d Z d Z d Z d Z RS( s$ Context manager for dealing with an existing rbd volume.
This handles connecting to rados and opening an ioctx automatically, and
otherwise acts like a librbd Image object.
The underlying librados client and ioctx can be accessed as the attributes
'client' and 'ioctx'.
c C s | j | \ } } yR | r- | j d n d } t j t j | | j d d | d | | _ Wn t j k
r° t j
% t j d | | j
| | Wd QXnM t j k
rü t j
+ t j t d | | j
| | Wd QXn X| | _ | | _ | | _ d S( Nt utf8t snapshott read_onlys rbd image %s does not exists error opening rbd image %s( t _connect_to_radost encodet NoneR R
R t Imaget volumet
ImageNotFoundR t save_and_reraise_exceptiont LOGt debugt _disconnect_from_radost ErrorR R t drivert clientt ioctx( R R( t namet poolR R R) R* t snap_name( ( sX /home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/storage/rbd_utils.pyR C s"
c C s | S( N( ( R ( ( sX /home/tvault/.virtenv/lib/python2.7/site-packages/nova/virt/libvirt/storage/rbd_utils.pyt __enter__X s c C s2 z | j j Wd | j j | j | j Xd S( N( R! t closeR( R&